/**
 * TrixTasks Calendar - Modern Views Styles
 * Month, Week, and Day Studio Views
 * Version: 3.1.8
 * 
 * Changelog 3.1.8:
 * - Fixed action buttons to fit/adapt with mobile browser width
 * - Added extra bottom padding so last card actions are visible
 * - Reminder badge moves to new row on mobile
 *
 * Changelog 3.1.7:
 * - Fixed cross-browser flexbox compatibility for day task cards (Samsung/Android)
 * - Added webkit/ms prefixes for flexbox properties
 * - Moved reminder badge inside actions container for proper layout
 * - Fixed mobile month view to fill available space
 * - Show exactly 2 ribbons per cell with overflow indicator
 * - Reduced padding/margins for compact mobile display
 */

/* ====================
   COMMON VIEW STYLES
   ==================== */
.modern-month-view,
.modern-week-view,
.modern-day-studio {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ====================
   MONTH VIEW
   ==================== */
.modern-month-view {
    padding: 2rem;
    background: linear-gradient(180deg, hsl(0, 0%, 100%) 0%, hsl(240, 10%, 98%) 100%);
}

.month-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.month-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-foreground, hsl(240, 10%, 4%));
    letter-spacing: -0.02em;
}

.month-nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.month-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border, hsl(240, 6%, 90%));
    background: white;
    color: var(--color-foreground, hsl(240, 10%, 4%));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.month-nav-btn:hover {
    background: var(--color-primary, hsl(263, 70%, 50%));
    color: white;
    border-color: var(--color-primary, hsl(263, 70%, 50%));
    transform: scale(1.05);
}

.month-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 1rem;
}

.day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(80px, 1fr);
    gap: 0.5rem;
}

.month-cell {
    background: white;
    border-radius: 1rem;
    border: 1px solid transparent;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.month-cell:hover {
    transform: scale(1.05) translateY(-5px);
    background: hsla(0, 0%, 100%, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: hsla(263, 70%, 50%, 0.2);
    z-index: 10;
}

.month-cell-empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.month-cell-today {
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.1), hsla(220, 70%, 50%, 0.05));
    border: 2px solid hsla(263, 70%, 50%, 0.5);
    box-shadow: 0 0 20px hsla(263, 70%, 50%, 0.3), inset 0 0 40px hsla(263, 70%, 50%, 0.05);
}

.month-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0.5rem;
}

.month-cell-day {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-foreground, hsl(240, 10%, 4%));
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 300ms;
}

.day-today {
    background: var(--color-primary, hsl(263, 70%, 50%));
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px hsla(263, 70%, 50%, 0.3);
}

.month-cell-tasks {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 1rem;
}

.task-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    transition: transform 200ms;
}

.month-cell:hover .task-dot {
    transform: scale(1.3);
}

.task-dot-purple {
    background: hsl(263, 70%, 50%);
}

.task-dot-blue {
    background: hsl(220, 70%, 50%);
}

.task-dot-green {
    background: hsl(145, 70%, 50%);
}

.task-dot-red {
    background: hsl(0, 70%, 50%);
}

.task-dot-gray {
    background: hsl(240, 5%, 60%);
}

.task-dot-more {
    font-size: 0.625rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    font-weight: 600;
}

/* ====================
   WEEK VIEW
   ==================== */
.modern-week-view {
    padding: 2rem;
    background: white;
}

.week-view-header {
    margin-bottom: 2rem;
}

.week-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-foreground, hsl(240, 10%, 4%));
}

.week-view-content {
    flex: 1;
    overflow: auto;
    padding-bottom: 2rem;
}

.week-timeline-grid {
    min-width: 800px;
}

.week-days-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 1rem 0;
}

.week-time-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-top: 0.5rem;
}

.week-day-header {
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: all 200ms;
    cursor: pointer;
}

.week-day-header:hover {
    background: hsla(240, 10%, 50%, 0.05);
}

.week-day-today {
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.1), hsla(220, 70%, 50%, 0.1));
    color: var(--color-primary, hsl(263, 70%, 50%));
}

.week-day-name {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.7;
}

.week-day-number {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.week-timeline-body {
    position: relative;
}

.week-time-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
}

.week-time-cell {
    position: relative;
    text-align: right;
    padding-top: 0.5rem;
}

.week-time-text {
    font-size: 0.75rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
}

.week-time-line {
    position: absolute;
    top: 0.75rem;
    left: 100%;
    right: -100vw;
    height: 1px;
    background: linear-gradient(to right, var(--color-border, hsl(240, 6%, 90%)) 30%, transparent);
    opacity: 0.3;
    transition: opacity 200ms;
}

.week-time-row:hover .week-time-line {
    opacity: 0.6;
}

.week-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
}

.week-day-slot {
    position: relative;
    min-height: 60px;
}

.week-task-card {
    padding: 0.75rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all 200ms;
    cursor: pointer;
}

.week-task-card:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.task-card-purple {
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.15), hsla(263, 70%, 50%, 0.08));
    border-left: 3px solid hsl(263, 70%, 50%);
}

.task-card-blue {
    background: linear-gradient(135deg, hsla(220, 70%, 50%, 0.15), hsla(220, 70%, 50%, 0.08));
    border-left: 3px solid hsl(220, 70%, 50%);
}

.task-card-green {
    background: linear-gradient(135deg, hsla(145, 70%, 50%, 0.15), hsla(145, 70%, 50%, 0.08));
    border-left: 3px solid hsl(145, 70%, 50%);
}

.task-card-red {
    background: linear-gradient(135deg, hsla(0, 70%, 50%, 0.15), hsla(0, 70%, 50%, 0.08));
    border-left: 3px solid hsl(0, 70%, 50%);
}

.week-task-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.week-task-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Current Time Indicator */
.week-current-time-line {
    position: absolute;
    left: 60px;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, hsl(0, 70%, 50%), transparent);
    z-index: 20;
    pointer-events: none;
    display: flex;
    align-items: center;
    box-shadow: 0 0 10px hsla(0, 70%, 50%, 0.5);
    transition: all 1s ease;
}

.time-dot {
    width: 0.75rem;
    height: 0.75rem;
    background: hsl(0, 70%, 50%);
    border-radius: 50%;
    margin-left: -0.375rem;
    box-shadow: 0 0 10px hsla(0, 70%, 50%, 0.8);
}

/* ====================
   DAY STUDIO VIEW
   ==================== */
.modern-day-studio {
    position: relative;
    background: linear-gradient(180deg, hsl(0, 0%, 100%) 0%, hsl(240, 10%, 98%) 100%);
}

.day-studio-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16rem;
    background: linear-gradient(to bottom, hsla(263, 70%, 50%, 0.05), transparent);
}

.bg-gradient-accent {
    position: absolute;
    top: -5rem;
    right: -5rem;
    width: 24rem;
    height: 24rem;
    background: hsla(220, 70%, 60%, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.day-studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 1;
}

.day-nav-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-nav-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    color: var(--color-foreground, hsl(240, 10%, 4%));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms;
}

.day-nav-btn svg {
    width: 14px;
    height: 14px;
}

.day-nav-btn:hover {
    background: hsla(240, 10%, 50%, 0.05);
    transform: scale(1.1);
}

.day-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-foreground, hsl(240, 10%, 4%)), hsla(240, 10%, 4%, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.day-subtitle {
    font-size: 0.8rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    font-weight: 500;
    margin-top: 0.25rem;
}

.day-mood-section {
    display: flex;
    gap: 1rem;
    background: hsla(0, 0%, 100%, 0.6);
    backdrop-filter: blur(20px);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border, hsl(240, 6%, 90%));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.mood-slider-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mood-slider-group svg {
    color: hsl(30, 90%, 50%);
}

.mood-slider-group:last-child svg {
    color: hsl(145, 70%, 50%);
}

.mood-slider,
.energy-slider {
    width: 6rem;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border, hsl(240, 6%, 90%));
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.mood-slider::-webkit-slider-thumb,
.energy-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--color-primary, hsl(263, 70%, 50%));
    cursor: pointer;
    box-shadow: 0 2px 8px hsla(263, 70%, 50%, 0.3);
    transition: transform 200ms;
}

.mood-slider::-webkit-slider-thumb:hover,
.energy-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.day-studio-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem 1rem;
    padding-bottom: 5rem; /* Extra padding for last card actions */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

/* Tasks Header with Count */
.day-tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.tasks-count-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.1), hsla(220, 70%, 50%, 0.08));
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.tasks-count {
    font-size: 1rem;
    font-weight: 700;
    color: hsl(263, 70%, 50%);
}

.tasks-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
}

/* Tasks List */
.day-tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.625rem;
}

/* Empty Day State */
.day-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    grid-column: 1 / -1;
}

.empty-icon {
    color: hsla(263, 70%, 50%, 0.3);
    margin-bottom: 1.5rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-foreground, hsl(240, 10%, 4%));
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    font-size: 0.9rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
}

/* Legacy section styles (kept for compatibility) */
.day-section {
    position: relative;
}

.day-section-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, hsl(0, 0%, 99%), transparent);
    padding-bottom: 0.5rem;
}

.day-section-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}

.day-section-morning .day-section-badge {
    background: hsla(30, 90%, 50%, 0.15);
    color: hsl(30, 90%, 40%);
}

.day-section-afternoon .day-section-badge {
    background: hsla(220, 70%, 50%, 0.15);
    color: hsl(220, 70%, 40%);
}

.day-section-evening .day-section-badge {
    background: hsla(263, 70%, 50%, 0.15);
    color: hsl(263, 70%, 40%);
}

.section-icon {
    font-size: 1.125rem;
}

.day-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--color-border, hsl(240, 6%, 90%)) 50%, transparent);
}

.day-section-tasks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.day-task-card {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 3px solid;
    transition: all 200ms ease;
    cursor: pointer;
    animation: taskFadeIn 0.4s ease backwards;
}

@keyframes taskFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.day-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.day-task-card.task-card-purple {
    border-left-color: hsl(263, 70%, 50%);
    background: linear-gradient(to right, hsla(263, 70%, 50%, 0.03), white);
}

.day-task-card.task-card-blue {
    border-left-color: hsl(220, 70%, 50%);
    background: linear-gradient(to right, hsla(220, 70%, 50%, 0.03), white);
}

.day-task-card.task-card-green {
    border-left-color: hsl(145, 70%, 50%);
    background: linear-gradient(to right, hsla(145, 70%, 50%, 0.03), white);
}

.day-task-card.task-card-red {
    border-left-color: hsl(0, 70%, 50%);
    background: linear-gradient(to right, hsla(0, 70%, 50%, 0.03), white);
}

.day-task-card.task-card-orange {
    border-left-color: hsl(30, 90%, 50%);
    background: linear-gradient(to right, hsla(30, 90%, 50%, 0.03), white);
}

.day-task-header {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin-bottom: 0.375rem;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-task-title {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.day-task-time {
    font-size: 0.65rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    font-weight: 600;
    background: hsla(240, 10%, 50%, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.day-task-description {
    font-size: 0.75rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    line-height: 1.4;
    margin-bottom: 0.375rem;
}

.day-task-duration {
    font-size: 0.65rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.125rem 0.375rem;
    background: hsla(240, 10%, 50%, 0.05);
    border-radius: 0.25rem;
}

.day-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    border: 2px dashed var(--color-border, hsl(240, 6%, 90%));
    border-radius: 1.25rem;
    opacity: 0.5;
}

/* ====================
   MULTI-DAY TASK RIBBONS (Month View)
   ==================== */
.month-cell-ribbons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin-top: 0.35rem;
}

.multiday-ribbon {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 200ms;
    cursor: pointer;
    min-height: 22px;
}

.multiday-ribbon:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Ribbon colors */
.ribbon-purple {
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.25), hsla(263, 70%, 50%, 0.15));
    color: hsl(263, 70%, 40%);
    border: 1px solid hsla(263, 70%, 50%, 0.3);
}

.ribbon-blue {
    background: linear-gradient(135deg, hsla(220, 70%, 50%, 0.25), hsla(220, 70%, 50%, 0.15));
    color: hsl(220, 70%, 40%);
    border: 1px solid hsla(220, 70%, 50%, 0.3);
}

.ribbon-green {
    background: linear-gradient(135deg, hsla(145, 70%, 50%, 0.25), hsla(145, 70%, 50%, 0.15));
    color: hsl(145, 70%, 35%);
    border: 1px solid hsla(145, 70%, 50%, 0.3);
}

.ribbon-red {
    background: linear-gradient(135deg, hsla(0, 70%, 50%, 0.25), hsla(0, 70%, 50%, 0.15));
    color: hsl(0, 70%, 40%);
    border: 1px solid hsla(0, 70%, 50%, 0.3);
}

.ribbon-gray {
    background: linear-gradient(135deg, hsla(240, 5%, 60%, 0.25), hsla(240, 5%, 60%, 0.15));
    color: hsl(240, 5%, 40%);
    border: 1px solid hsla(240, 5%, 60%, 0.3);
}

/* Ribbon position styles for spanning effect */
.ribbon-start {
    border-radius: 3px 0 0 3px;
    margin-right: -4px;
}

.ribbon-middle {
    border-radius: 0;
    margin-left: -4px;
    margin-right: -4px;
}

.ribbon-end {
    border-radius: 0 3px 3px 0;
    margin-left: -4px;
}

.ribbon-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ribbon-planned {
    display: none;
}

.ribbon-percent {
    font-weight: 700;
    font-size: 0.625rem;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Month cell overflow indicator */
.month-cell-overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    margin-top: 3px;
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.15), hsla(220, 70%, 50%, 0.1));
    color: hsl(263, 70%, 40%);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid hsla(263, 70%, 50%, 0.2);
}

.month-cell-overflow:hover {
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.25), hsla(220, 70%, 50%, 0.15));
    transform: translateY(-1px);
}

/* ====================
   MULTI-DAY TASK STYLES (Day View)
   ==================== */
.day-task-card.multiday-task {
    border-left-width: 5px;
    position: relative;
}

.day-task-card.multiday-task::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent hsla(263, 70%, 50%, 0.2) transparent transparent;
}

.day-task-title-section {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.375rem;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.day-task-percentage {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, hsl(263, 70%, 50%), hsl(220, 70%, 50%));
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 1px 4px hsla(263, 70%, 50%, 0.3);
    white-space: nowrap;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.day-task-multiday-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
    padding: 0.25rem 0.375rem;
    background: hsla(240, 10%, 50%, 0.05);
    border-radius: 0.25rem;
    font-size: 0.65rem;
}

.multiday-range {
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    font-weight: 500;
}

.multiday-progress {
    color: var(--color-primary, hsl(263, 70%, 50%));
    font-weight: 600;
}

.multiday-progress-bar {
    height: 3px;
    background: hsla(240, 10%, 50%, 0.1);
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.multiday-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(263, 70%, 50%), hsl(220, 70%, 50%));
    border-radius: 2px;
    transition: width 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ====================
   RESPONSIVE
   ==================== */
/* ====================
   DAY VIEW - FIXED CARD DIMENSIONS
   ==================== */
.day-task-card {
    min-height: auto;
    max-height: none;
    overflow: visible;
}

/* Multi-day task cards need more height for the extra info */
.day-task-card.multiday-task {
    min-height: auto;
    max-height: none;
}

.day-task-description {
    max-height: 2rem; /* ~2 lines */
    overflow: hidden;
}

.day-task-description-truncated {
    cursor: pointer;
    position: relative;
}

.day-task-description-truncated:hover {
    color: var(--color-primary, hsl(263, 70%, 50%));
}

.read-more-link {
    color: var(--color-primary, hsl(263, 70%, 50%));
    font-weight: 600;
    margin-left: 0.25rem;
    text-decoration: underline;
    cursor: pointer;
}

.read-more-link:hover {
    color: var(--color-primary-hover, hsl(263, 70%, 45%));
}

/* ====================
   TASK DETAIL MODAL
   ==================== */
.task-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.task-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.task-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.task-modal-content {
    position: relative;
    background: white;
    border-radius: 1.25rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.task-detail-modal.active .task-modal-content {
    transform: scale(1) translateY(0);
}

.task-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, hsl(240, 6%, 90%));
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.05), hsla(220, 70%, 50%, 0.05));
}

.task-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-foreground, hsl(240, 10%, 4%));
    margin: 0;
    flex: 1;
    padding-right: 1rem;
}

.task-modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-muted-foreground, hsl(240, 4%, 46%));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.task-modal-close:hover {
    background: hsla(240, 10%, 50%, 0.1);
    color: var(--color-foreground, hsl(240, 10%, 4%));
}

.task-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.task-modal-body p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-foreground, hsl(240, 10%, 4%));
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ====================
   DAY TASK ACTION BUTTONS
   ==================== */
.day-task-actions {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid hsla(240, 6%, 90%, 0.5);
}

.task-action-btn {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.task-action-btn svg {
    width: 12px;
    height: 12px;
}

.task-edit-btn {
    background: linear-gradient(135deg, hsla(220, 70%, 50%, 0.1), hsla(263, 70%, 50%, 0.1));
    color: hsl(263, 70%, 45%);
}

.task-edit-btn:hover {
    background: linear-gradient(135deg, hsla(220, 70%, 50%, 0.2), hsla(263, 70%, 50%, 0.2));
    transform: translateY(-1px);
}

.task-close-btn {
    background: linear-gradient(135deg, hsla(142, 70%, 45%, 0.1), hsla(142, 70%, 35%, 0.1));
    color: hsl(142, 70%, 35%);
}

.task-close-btn:hover {
    background: linear-gradient(135deg, hsla(142, 70%, 45%, 0.2), hsla(142, 70%, 35%, 0.2));
    transform: translateY(-1px);
}

.task-reminder-btn {
    background: linear-gradient(135deg, hsla(45, 90%, 50%, 0.1), hsla(30, 90%, 50%, 0.1));
    color: hsl(30, 90%, 40%);
}

.task-reminder-btn:hover {
    background: linear-gradient(135deg, hsla(45, 90%, 50%, 0.2), hsla(30, 90%, 50%, 0.2));
    transform: translateY(-1px);
}

/* Reminder Badge on Card - Inline after actions */
.day-task-reminder-badge {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, hsl(45, 90%, 50%), hsl(30, 90%, 50%));
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 2px 6px hsla(30, 90%, 50%, 0.35);
    white-space: nowrap;
    -webkit-animation: badgePulse 0.3s ease-out;
    animation: badgePulse 0.3s ease-out;
    margin-left: auto;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.day-task-reminder-badge svg {
    flex-shrink: 0;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.task-closed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.2rem 0.5rem;
    background: hsla(142, 70%, 45%, 0.15);
    color: hsl(142, 70%, 30%);
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
}

.task-closed-badge svg {
    width: 10px;
    height: 10px;
}

.day-task-card.task-closed {
    opacity: 0.7;
}

.day-task-card.task-closed .day-task-title {
    text-decoration: line-through;
    color: hsl(240, 4%, 46%);
}

/* ====================
   EDIT TASK MODAL
   ==================== */
.task-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.task-edit-modal.active {
    opacity: 1;
    visibility: visible;
}

.edit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.edit-modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.task-edit-modal.active .edit-modal-content {
    transform: scale(1) translateY(0);
}

.edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid hsl(240, 6%, 90%);
    background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.05), hsla(220, 70%, 50%, 0.05));
}

.edit-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(240, 10%, 4%);
    margin: 0;
}

.edit-modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: hsl(240, 4%, 46%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.edit-modal-close:hover {
    background: hsla(240, 10%, 50%, 0.1);
    color: hsl(240, 10%, 4%);
}

.edit-modal-body {
    padding: 1.5rem;
    max-height: 55vh;
    overflow-y: auto;
}

.edit-form-group {
    margin-bottom: 1.25rem;
}

.edit-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(240, 10%, 20%);
    margin-bottom: 0.5rem;
}

.edit-form-group input[type="text"],
.edit-form-group input[type="number"],
.edit-form-group textarea,
.edit-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(240, 6%, 85%);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: hsl(240, 10%, 4%);
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.edit-form-group input:focus,
.edit-form-group textarea:focus,
.edit-form-group select:focus {
    outline: none;
    border-color: hsl(263, 70%, 50%);
    box-shadow: 0 0 0 3px hsla(263, 70%, 50%, 0.1);
}

.edit-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.edit-form-row {
    display: flex;
    gap: 1rem;
}

.edit-form-group.half {
    flex: 1;
}

.task-status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.task-status-badge.status-open {
    background: hsla(263, 70%, 50%, 0.1);
    color: hsl(263, 70%, 45%);
}

.task-status-badge.status-request_to_close {
    background: hsla(220, 70%, 50%, 0.1);
    color: hsl(220, 70%, 45%);
}

.task-status-badge.status-approved {
    background: hsla(142, 70%, 45%, 0.1);
    color: hsl(142, 70%, 35%);
}

.task-status-badge.status-rejected {
    background: hsla(0, 70%, 50%, 0.1);
    color: hsl(0, 70%, 45%);
}

.task-status-badge.status-closed {
    background: hsla(240, 4%, 46%, 0.1);
    color: hsl(240, 4%, 46%);
}

.edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid hsl(240, 6%, 90%);
    background: hsl(240, 6%, 97%);
}

.edit-modal-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-modal-btn.edit-modal-cancel {
    background: white;
    color: hsl(240, 4%, 46%);
    border: 1px solid hsl(240, 6%, 85%);
}

.edit-modal-btn.edit-modal-cancel:hover {
    background: hsl(240, 6%, 95%);
}

.edit-modal-btn.primary {
    background: linear-gradient(135deg, hsl(263, 70%, 50%), hsl(220, 70%, 50%));
    color: white;
}

.edit-modal-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsla(263, 70%, 50%, 0.3);
}

/* ====================
   REMINDER MODAL
   ==================== */
.task-reminder-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.task-reminder-modal.active {
    opacity: 1;
    visibility: visible;
}

.reminder-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.reminder-modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.task-reminder-modal.active .reminder-modal-content {
    transform: scale(1) translateY(0);
}

.reminder-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid hsl(240, 6%, 90%);
    background: linear-gradient(135deg, hsla(45, 90%, 50%, 0.08), hsla(30, 90%, 50%, 0.05));
}

.reminder-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(30, 90%, 35%);
    margin: 0;
}

.reminder-modal-title svg {
    color: hsl(30, 90%, 50%);
}

.reminder-modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: hsl(240, 4%, 46%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.reminder-modal-close:hover {
    background: hsla(240, 10%, 50%, 0.1);
    color: hsl(240, 10%, 4%);
}

.reminder-modal-body {
    padding: 1.25rem;
}

.reminder-form-row {
    display: flex;
    gap: 1rem;
}

.reminder-form-group {
    flex: 1;
}

.reminder-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(240, 10%, 20%);
    margin-bottom: 0.5rem;
}

.reminder-form-group input[type="date"],
.reminder-form-group input[type="time"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid hsl(240, 6%, 85%);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: hsl(240, 10%, 4%);
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.reminder-form-group input:focus {
    outline: none;
    border-color: hsl(30, 90%, 50%);
    box-shadow: 0 0 0 3px hsla(30, 90%, 50%, 0.1);
}

.reminder-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid hsl(240, 6%, 90%);
    background: hsl(240, 6%, 97%);
}

.reminder-modal-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reminder-modal-btn.reminder-modal-cancel {
    background: white;
    color: hsl(240, 4%, 46%);
    border: 1px solid hsl(240, 6%, 85%);
}

.reminder-modal-btn.reminder-modal-cancel:hover {
    background: hsl(240, 6%, 95%);
}

.reminder-modal-btn.danger {
    background: hsla(0, 70%, 50%, 0.1);
    color: hsl(0, 70%, 45%);
}

.reminder-modal-btn.danger:hover {
    background: hsla(0, 70%, 50%, 0.2);
}

.reminder-modal-btn.primary {
    background: linear-gradient(135deg, hsl(45, 90%, 50%), hsl(30, 90%, 50%));
    color: white;
}

.reminder-modal-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsla(30, 90%, 50%, 0.3);
}

/* ====================
   NOTIFICATIONS
   ==================== */
.trix-notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.trix-notification.show {
    transform: translateX(0);
}

.trix-notification-success {
    border-left: 4px solid hsl(142, 70%, 45%);
}

.trix-notification-success .notification-icon {
    color: hsl(142, 70%, 45%);
}

.trix-notification-error {
    border-left: 4px solid hsl(0, 70%, 50%);
}

.trix-notification-error .notification-icon {
    color: hsl(0, 70%, 50%);
}

.trix-notification-info {
    border-left: 4px solid hsl(220, 70%, 50%);
}

.trix-notification-info .notification-icon {
    color: hsl(220, 70%, 50%);
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-message {
    font-size: 0.9375rem;
    font-weight: 500;
    color: hsl(240, 10%, 20%);
}

/* ====================
   RESPONSIVE - MOBILE
   ==================== */
@media (max-width: 768px) {
    .modern-month-view,
    .modern-week-view,
    .modern-day-studio {
        padding: 0;
        height: 100%;
    }
    
    /* Month view - fill all available space */
    .modern-month-view {
        padding: 0.25rem;
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }
    
    /* Month header - compact */
    .month-view-header {
        margin-bottom: 0.5rem;
        padding: 0 0.25rem;
    }
    
    .month-title,
    .week-title,
    .day-title {
        font-size: 1.25rem;
    }
    
    /* Days header - compact */
    .month-days-header {
        margin-bottom: 0.25rem;
    }
    
    /* Month grid - fill remaining space, show 2 ribbons */
    .month-grid {
        flex: 1;
        grid-auto-rows: 1fr;
        gap: 2px;
        overflow: hidden;
    }
    
    /* Month cell - fill space, show 2 ribbons + overflow */
    .month-cell {
        padding: 3px 2px !important;
        min-height: 0;
        max-height: none;
        overflow: hidden;
        border-radius: 0.5rem;
        display: flex;
        flex-direction: column;
    }
    
    .month-cell-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        overflow: hidden;
    }
    
    /* Day number - compact at top */
    .month-cell-day {
        font-size: 0.75rem !important;
        font-weight: 700;
        width: 1.4rem;
        height: 1.4rem;
        margin-bottom: 1px;
        flex-shrink: 0;
    }
    
    /* Ribbons container - show exactly 2 ribbons */
    .month-cell-ribbons {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        gap: 1px;
        width: 100%;
        max-height: none;
    }
    
    /* Show only first 2 ribbons on mobile */
    .month-cell-ribbons .multiday-ribbon:nth-child(n+3) {
        display: none;
    }
    
    /* Ribbon - compact mobile style */
    .multiday-ribbon {
        padding: 1px 3px;
        font-size: 0.55rem;
        min-height: 14px;
        max-height: 16px;
        border-radius: 3px;
        flex-shrink: 0;
    }
    
    /* Hide task name on mobile - show only percentage */
    .ribbon-title,
    .ribbon-planned {
        display: none;
    }
    
    .ribbon-percent {
        font-size: 0.6rem;
        font-weight: 700;
        width: 100%;
        text-align: center;
    }
    
    /* Overflow indicator - compact */
    .month-cell-overflow {
        font-size: 0.55rem;
        font-weight: 600;
        padding: 1px 4px;
        margin-top: 1px;
        flex-shrink: 0;
        border-radius: 4px;
        background: linear-gradient(135deg, hsla(263, 70%, 50%, 0.15), hsla(220, 70%, 50%, 0.15));
        color: hsl(263, 70%, 45%);
        border: none;
    }
    
    /* Day header - smaller on mobile */
    .day-header {
        font-size: 0.6rem;
        padding: 0.15rem;
        letter-spacing: 0.05em;
    }
    
    .day-mood-section {
        display: none;
    }
    
    .day-section-tasks {
        grid-template-columns: 1fr;
    }
    
    /* Mobile modal adjustments */
    .task-modal-content {
        width: 95%;
        max-height: 70vh;
        margin: 1rem;
    }
    
    .task-modal-body {
        max-height: 50vh;
    }
    
    /* Today cell highlight on mobile */
    .month-cell-today {
        border-width: 2px;
    }
    
    /* Disable hover effects on mobile */
    .month-cell:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    .modern-month-view {
        padding: 0.15rem;
    }
    
    .month-view-header {
        margin-bottom: 0.25rem;
    }
    
    .month-days-header {
        margin-bottom: 0.15rem;
    }
    
    .month-grid {
        gap: 1px;
    }
    
    .month-cell {
        padding: 2px 1px !important;
        border-radius: 0.375rem;
    }
    
    .month-cell-day {
        font-size: 0.65rem !important;
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .multiday-ribbon {
        padding: 1px 2px;
        font-size: 0.5rem;
        min-height: 12px;
        max-height: 14px;
    }
    
    .ribbon-percent {
        font-size: 0.55rem;
    }
    
    .month-cell-overflow {
        font-size: 0.5rem;
        padding: 1px 3px;
    }
    
    .day-header {
        font-size: 0.55rem;
        letter-spacing: 0.03em;
        padding: 0.1rem;
    }
    
    /* Mobile task action buttons - fit width */
    .day-task-actions {
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-pack: start;
        -webkit-justify-content: flex-start;
        -ms-flex-pack: start;
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .task-action-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        -webkit-box-flex: 0;
        -webkit-flex: 0 1 auto;
        -ms-flex: 0 1 auto;
        flex: 0 1 auto;
    }
    
    .day-task-reminder-badge {
        margin-left: 0;
        margin-top: 0.25rem;
        -webkit-box-ordinal-group: 5;
        -webkit-order: 4;
        -ms-flex-order: 4;
        order: 4;
    }
    
    /* Extra bottom padding for scrollable content */
    .day-studio-content {
        padding-bottom: 6rem;
    }
    
    /* Mobile edit modal */
    .edit-modal-content {
        width: 95%;
        max-height: 80vh;
    }
    
    .edit-modal-body {
        padding: 1rem;
        max-height: 50vh;
    }
    
    .edit-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .edit-form-group.half {
        width: 100%;
    }
    
    .edit-modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .edit-modal-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile notifications */
    .trix-notification {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
}
