/* GiftPlan Page Styles */
.giftplan-section {
    background: #23272e;
    color: #ffaac9;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 32px 24px;
    margin: 32px auto;
    max-width: 600px;
    font-size: 1.15em;
    text-align: center;
}

.giftplan-section p {
    color: #fff;
    font-size: 1.2em;
    margin: 0;
}

.giftplan-section h1 {
    color: #ffaac9;
    font-size: 2em;
    margin-bottom: 16px;
}
.todo-panel-detail-complete-label {
    color: #fff;
}
.todo-panel-detail-btn.delete {
    color: #ff6b6b;
}
.todo-panel-detail-btn.delete:hover {
    background: #333;
    color: #ff8585;
}
#event-detail-modal .add-event-btn {
    background: #FF4F91;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 0;
}
#event-detail-modal .add-event-btn:hover {
    background: #ffaac9;
    color: #23272e;
}
#event-detail-modal .modal-section-header {
    font-size: 1.08em;
    font-weight: 600;
    color: #ffaac9;
    margin: 18px 0 8px 0;
    letter-spacing: 0.01em;
    border-bottom: 1px solid #31363f;
    padding-bottom: 2px;
}
@media (max-width: 767px) {
    #week-grid {
        grid-template-columns: 18px repeat(7, minmax(0, 1fr));
    }
    .timeline-hour {
        font-size: 0.6em;
        padding-top: 0;
    }
}
@media (max-width: 767px) {
    .nav-dropdown {
        font-size: 0.65em;
        padding: 4px 4px;
        min-width: 70px;
        max-width: 110px;
        height: 20px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}
@media (max-width: 767px) {
    .nav-dropdown {
        font-size: 0.85em;
        padding: 4px 8px;
        min-width: 70px;
        max-width: 110px;
        height: 28px;
        border-radius: 4px;
    }
}
#event-detail-modal .event-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
#event-detail-modal .event-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
#event-detail-modal .event-edit-btn,
#event-detail-modal .event-delete-btn,
#event-detail-modal .event-duplicate-btn {
    background: none;
    border: none;
    font-size: 1.15em;
    color: #aaa;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
#event-detail-modal .event-edit-btn:hover {
    color: #FF4F91;
    background: #23272e;
}
#event-detail-modal .event-duplicate-btn:hover {
    color: #4fa3ff;
    background: #23272e;
}
#event-detail-modal .event-delete-btn:hover {
    color: #ff3b3b;
    background: #23272e;
}
#event-detail-modal .modal-back {
    background: none;
    border: none;
    font-size: 1.25em;
    color: #aaa;
    cursor: pointer;
    margin-right: 10px;
    transition: color 0.2s;
}
#event-detail-modal .modal-back:hover {
    color: #FF4F91;
}
#event-detail-modal .event-times {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 0.98em;
    color: #b7b7b7;
}
#event-detail-modal .event-location {
    font-size: 0.97em;
    color: #b7b7b7;
    margin-bottom: 4px;
}
#event-detail-modal .event-description {
    font-size: 0.97em;
    color: #b7b7b7;
    margin-bottom: 2px;
}
/* Day Details Modal Styles */
#event-detail-modal .modal-content {
    background: #23272e;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    padding: 24px 20px 18px 20px;
    max-width: 380px;
    margin: 40px auto;
    color: #fff;
}
#event-detail-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
#event-detail-modal .modal-title {
    font-size: 1.35em;
    font-weight: 600;
    letter-spacing: 0.02em;
}
#event-detail-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
#event-detail-modal .modal-close:hover {
    color: #FF4F91;
}
#event-detail-modal .modal-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#event-detail-modal .modal-event-item {
    background: #1b1b1b;
    border-radius: 8px;
    box-shadow: none;
    padding: 14px 12px 10px 14px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    border: 2px solid #31363f;
    /* border-left is now set inline per event color */
}
#event-detail-modal .modal-event-item:hover {
    background: #31363f;
    box-shadow: 0 4px 16px rgba(255,79,145,0.08);
}
#event-detail-modal .event-title {
    font-size: 1.08em;
    font-weight: 500;
    margin-bottom: 6px;
    color: #FF4F91;
    letter-spacing: 0.01em;
}
#event-detail-modal .event-time {
    font-size: 0.98em;
    color: #b7b7b7;
    margin-left: 2px;
}
#event-detail-modal .no-events {
    color: #b7b7b7;
    font-size: 1.05em;
    text-align: center;
    margin: 24px 0 10px 0;
}
html, body {
    height: 100%;
    margin: 0; /* remove default white-space around the page */
    background-color: #111; /* extend background to full page */
    overflow: hidden; /* prevent page scroll — calendar handles its own scrolling */
}

body {
    font-family: Arial, sans-serif;
}

/* Login Screen Styles */
#login-screen {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
}

.login-container {
    background-color: #222;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #FF4F91;
    text-align: center;
    margin-bottom: 30px;
}

#login-form label {
    color: #fff;
    display: block;
    margin-bottom: 8px;
}

#login-form input[type="email"],
#login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

#login-form input[type="email"]:focus,
#login-form input[type="password"]:focus {
    outline: none;
    border-color: #FF4F91;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #FF4F91;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #ff85b8;
}

.login-error {
    color: #ff6b6b;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
}

/* Logout Button */
.logout-button {
    padding: 2px 9px;
    background-color: #555;
    border: 1px solid #111111;
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    margin-left: 4px;
}

.logout-button:hover {
    background-color: #777;
}

.nav-link {
    padding: 8px 12px;
    background-color: #333;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    background-color: #444;
}

.nav-dropdown {
    padding: 8px 12px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    outline: none;
}

.nav-dropdown:hover {
    background-color: #444;
    border-color: #666;
}

.nav-dropdown:focus {
    border-color: #777;
    background-color: #3a3a3a;
}

.nav-dropdown option {
    background-color: #333;
    color: #e0e0e0;
}

#calendar {
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
}

#calendar-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background-color: #111111;
    color: #FF4F91;
    flex: 0 0 auto;
    position: relative;
}

#header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#page-title {
    color: #FF4F91;
    font-size: 1.8em;
    margin: 0;
    white-space: nowrap;
}

#header-top {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Mobile layout - stacked rows */
@media (max-width: 767px) {
                    #calendar-body .day-cell {
                        display: flex;
                        flex-direction: column;
                        align-items: stretch;
                        width: 100%;
                        box-sizing: border-box;
                        padding: 0 !important;
                        margin: 0 !important;
                        min-width: 0;
                    }
                /* Month view: event boxes fill day cell horizontally */
                #calendar-body .day-cell .event-item {
                    display: block;
                    width: 100%;
                    box-sizing: border-box;
                    margin-left: 0 !important;
                    margin-right: 0 !important;
                    border-radius: 6px;
                    min-width: 0;
                }
            #week-grid .week-event .event-time {
                display: block;
                width: 100%;
                height: auto;
                writing-mode: vertical-lr;
                transform: none;
                text-align: left;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                font-size: 0.75em;
                padding: 0 2px 0 0;
                line-height: 1.1;
                box-sizing: border-box;
                /* vertical-align removed: not needed for block */
                background: none;
                margin-bottom: 6px;
            }
        /* Rotate event titles in week view events */
        #week-grid .week-event .event-title {
            display: block;
            width: 100%;
            height: 100%;
            writing-mode: vertical-lr;
            transform: none;
            text-align: left;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.85em;
            padding: 0 2px;
            line-height: 1.1;
            box-sizing: border-box;
            /* vertical-align removed: not needed for block */
            background: none;
        }
    #calendar-header {
        flex-direction: column;
        justify-content: center;
        position: static;
        gap: 8px;
    }
    
    #header-left {
        order: 1;
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    #header-left #today-button {
        /* display controlled by JS */
        position: static !important;
        width: auto !important;
        height: 32px !important;
        min-width: 48px;
        font-size: 1em;
        margin: 0 0 0 2px;
        border-radius: 6px;
        box-shadow: none;
        background: #222;
        color: #FF4F91;
        border: 1px solid #444;
        vertical-align: middle;
        padding: 0 10px;
    }
    
    #page-title {
        font-size: 1.3em;
    }
    
    #header-top {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        display: flex;
        order: 3;
    }

    /* Shrink week label in week view */
    #header-top h1#month {
        font-size: 1.05em !important;
        padding: 2px 0 !important;
        margin: 0 !important;
        font-weight: 500 !important;
        letter-spacing: 0.01em !important;
        line-height: 1.1 !important;
        max-width: 90vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #header-controls {
        margin-top: 0;
        margin-left: 0;
        justify-content: center;
        order: 2;
        width: 100%;
        gap: 10px;
        display: grid;
        grid-template-columns: 1fr auto auto 1fr;
        grid-auto-flow: dense;
        align-items: center;
    }
    
    #header-controls .nav-dropdown {
        grid-column: 2;
        grid-row: 1;
    }
    
    #header-controls .logout-button {
        grid-column: 3;
        grid-row: 1;
    }
    
    #header-controls .open-button {
        display: none;
    }
    
    /* Floating add button for mobile */
    #calendar .open-button {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        font-size: 24px;
        padding: 0;
        margin: 0;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(255, 79, 145, 0.5);
    }
    
    #header-controls #today-button {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        font-size: 24px;
        padding: 0;
        margin: 0;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(255, 79, 145, 0.5);
    }
    
    /* Row 2 with 3 columns for navigation controls */
    #header-controls #month-prev {
        grid-column: 2;
        grid-row: 2;
    }
    
    #header-controls .view-selector {
        grid-column: 3;
        grid-row: 2;
    }
    
    #header-controls #month-next {
        grid-column: 4;
        grid-row: 2;
    }
    
    /* Hide event times on mobile */
    #calendar-body div.day-cell .event-item .event-time {
        display: none !important;
    }
    
    /* Adjust event title for mobile when time is hidden */
    #calendar-body div.day-cell .event-item .event-title {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        text-align: left !important;
        font-size: 0.7em !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.15 !important;
        word-break: break-word !important;
    }
    
    /* For days with 3+ events, show all events with only 1 line */
    #calendar-body div.day-cell:has(.event-item:nth-child(4)) .event-item .event-title {
        -webkit-line-clamp: 1 !important;
        line-clamp: 1 !important;
    }
    
    /* Shrink text sizes for better readability on mobile */
    #calendar-body div.day-cell .day-number {
        font-size: 0.85em !important;
    }
    
    #calendar-body div.day-cell .event-item {
        font-size: 0.7em !important;
        padding: 3px 5px !important;
        justify-content: flex-start !important;
        max-height: 2.6em !important;
        line-height: 1.15 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Week view adjustments for mobile */
    #calendar-body.week-view .day-number {
        font-size: 0.75em !important;
        padding: 4px !important;
    }
    
    /* Timeline week view - show full day on mobile */
    #week-view-container {
        height: 100vh !important;
    }

    #timeline {
        height: 100% !important;
    }

    #week-grid {
        height: 100% !important;
        grid-template-rows: auto repeat(25, 28px) !important;
    }

    .timeline-hour {
        height: 28px !important;
        font-size: 0.7em !important;
    }

    #week-grid .week-day-column {
        min-height: 100% !important;
    }

    .week-event {
        min-height: 16px !important;
        font-size: 0.8em !important;
        padding: 1px 2px !important;
        border-radius: 3px !important;
    }
}

/* Week View Styles */
#week-view-container {
    display: flex;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

#timeline {
    width: 60px;
    height: 100%;
    flex-shrink: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    background-color: #222222;
    border-right: 1px solid #333;
    position: relative;
    z-index: 10;
}

#timeline::-webkit-scrollbar {
    display: none;
}

#timeline {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.timeline-hour {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        justify-content: center !important;
        text-align: center;
        box-sizing: border-box;
    height: 50px;
    border-bottom: 1px solid #555;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    font-size: 0.75em;
    color: #999;
    background-color: #222222;
    border-right: 1px solid #333;
    align-self: start;
}

.timeline-spacer {
    background-color: #222222;
    border-right: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 5;
}

#week-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 30px repeat(7, minmax(0, 1fr));
    grid-template-rows: auto repeat(25, 50px);
    gap: 0;
    width: 100%;
    background-color: #333;
    overflow-y: scroll;
    overflow-x: hidden;
}

.week-grid-row {
    grid-column: 1 / -1;
    border-bottom: 1px solid #555;
    pointer-events: none;
    z-index: 2;
}

#week-grid .week-day-column {
    background-color: #222222;
    position: relative;
    border-right: 1px solid #444;
}

.week-day-content {
    background-color: transparent;
    height: 100%;
    width: 100%;
    position: relative;
}

#week-grid .week-day-column.today {
    border: 3px solid #FF4F91;
    box-sizing: border-box;
}

.week-day-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
}

#week-grid .week-day-header {
    background-color: #1a1a1a;
    padding: 4px;
    text-align: center;
    border-bottom: 1px solid #333;
    box-sizing: border-box;
}

.week-allday-section {
    background-color: #2a2a2a;
    border-bottom: 2px solid #333;
    padding: 4px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.week-allday-event {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 20px;
    line-height: 16px;
    flex-shrink: 0;
}

#week-grid .week-day-header {
    font-size: 0.8em;
    color: #aaa;
}

#week-grid .week-day-header .day-name {
    font-size: 1em;
    color: #aaa;
}

#week-grid .week-day-header .day-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
}

#week-grid .week-day-header .day-number.today {
    color: #FF4F91;
}

#week-grid .week-event {
    position: absolute;
    left: 4px;
    right: 4px;
    background-color: #ffbbcf;
    color: #111111;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

#week-grid .week-event .event-time {
    font-weight: 700;
    font-size: 0.9em;
}

#week-grid .week-event .event-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide end time on smaller screens in week view */
@media (max-width: 1024px) {
    #week-grid .week-event .event-end-time {
        display: none;
    }
    
    #week-grid .week-event {
        font-size: 0.75em;
    }
    
    #week-grid .week-event .event-time {
        font-size: 0.85em;
    }
    
    #week-grid .week-event .event-title {
        font-size: 0.9em;
    }
}

#calendar-body.week-view {
    grid-template-columns: repeat(7, 1fr) !important;
    grid-template-rows: 1fr !important;
    grid-auto-rows: unset !important;
    gap: 1px;
    overflow: hidden !important;
}

#calendar-body.week-view .day-cell {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    box-sizing: border-box;
}

#calendar-body.week-view .day-cell.today {
    border: 3px solid #FF4F91;
}

#calendar-body.week-view .day-cell .day-number {
    position: sticky;
    top: 0;
    background-color: #222222;
    z-index: 1;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 2px solid #333;
    box-sizing: border-box;
}

#calendar-body.week-view .day-cell.today .day-number {
    background-color: #222222;
    color: #FF4F91;
}

#calendar-body.week-view .event-item {
    margin: 4px 8px;
}

/* Hide prev-date and next-date cells in week view */
#calendar-body.week-view .prev-date,
#calendar-body.week-view .next-date {
    display: none;
}

#month {
    margin: 0;
}

/* Month/Year picker popup */
#month-year-picker {
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%);
    background: #1b1b1b;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    z-index: 2000;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Ensure the picker can be hidden even though the base rule uses an ID selector
   (ID has higher specificity than a plain class). Using the combined selector
   guarantees `display: none` wins when the element has the `hidden` class. */
#month-year-picker.hidden { display: none; }

.hidden { display: none; }

#month-year-picker label { font-size: 0.85em; color: #ffaac9; }
#month-year-picker select { padding: 6px; background: #111; color: #fff; border: 1px solid #333; border-radius: 4px; }

#month-controls {
    margin-left: auto; /* push to the right */
    display: flex;
    gap: 8px;
    align-items: center;
}

#month-controls .change-month {
    padding: 6px 10px;
    background-color: #FF4F91;
    border: 1px solid #111111;
    color: #ffffff;
    border-radius: 4px;
}

#month-controls .change-month:hover {
    background-color: #ff85b8;
}

#weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #333;
    color: #FF4F91;
    text-align: center;
    padding: 6px 8px; /* reduce vertical padding so header consumes less height */
    flex: 0 0 auto;
}

#calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #333;
    color: #fff;
    /* let the calendar body grow to fill remaining space under the header */
    flex: 1;
    /* Ensure rows can shrink with available space and avoid forcing page scroll */
    grid-auto-rows: minmax(0, 1fr);
    /* allow internal scrolling if month content exceeds viewport */
    overflow: auto;
}

#calendar-body div {
    padding: 20px;
    background-color: #222222;
    text-align: center;
}

#calendar-body div.today {
    background-color: #FF4F91;
    color: #fff;
}

#calendar-body div.day-cell {
    padding: 8px;
    background-color: #222222;
    text-align: left;
    display: flex;
    flex-direction: column;
    /* Row height is calculated dynamically via JavaScript so the whole month fits the viewport */
    word-wrap: break-word;
    cursor: pointer;
    position: relative;
}

#calendar-body div.day-cell.today {
    background-color: #222222;
    color: #fff;
    border: 3px solid #FF4F91;
    box-sizing: border-box;
}

#calendar-body div.day-cell .day-number {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 4px;
}

/* Event items within day cells: use the same enhanced style as today's events */
#calendar-body div.day-cell .event-item {
    background-color: #ffbbcf; /* copied user's adjusted color */
    color: #111111;
    font-weight: 600;
    /* Use flex so time sits on the left, title to the right */
    display: flex;
    align-items: center;
    gap: 8px;
    /* padding provides space from cell edges; left padding keeps time away from side */
    padding: 6px 10px 6px 14px;
    margin: 4px 0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    font-size: 0.72em;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    line-height: 1.2;
    max-height: 3.6em; /* visually limit very long entries */
    width: 100%;
    box-sizing: border-box; /* ensure padding counted in width */
}

/* Styling for the time label and the event title inside the event box */
#calendar-body div.day-cell .event-item .event-time {
    display: inline-block;
    /* reserve a fixed column for time so title truncation is based on column width */
    flex: 0 0 56px;
    width: 56px;
    text-align: left;    /* justify the time to the left of that reserved area */
    font-weight: 700;
    font-size: 0.82em;
    color: inherit;
    opacity: 0.95;
}

/* Allow the title to take remaining space and wrap if necessary */
#calendar-body div.day-cell .event-item .event-title {
    flex: 0 0 20ch;
    max-width: 20ch;
    min-width: 0; /* allow truncation when space is constrained */
    /* Single-line truncation with ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* All-day events: center content and underline title */
#calendar-body div.day-cell .event-item.all-day-event {
    justify-content: center;
    text-align: center;
}

#calendar-body div.day-cell .event-item.all-day-event .event-title {
    flex: 1 1 auto;
    max-width: 100%;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#calendar-body div.day-cell.today .event-item {
    /* Make today's events high-contrast against the pink today background */
    background-color: #ffbbcf;
    color: #111111;
    font-weight: 600;
    padding: 6px 10px 6px 14px;
    margin: 4px 0;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    /* Keep compact size, don't expand */
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    line-height: 1.2;
    max-height: 3.6em;
    flex-shrink: 0;
}

.change-month {
    padding: 4px 12px;
    font-size: 15px;
    border: none;
    background: #FF4F91;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255,79,145,0.15);
    transition: background 0.2s, box-shadow 0.2s;
}

/* Popup form centered on screen */
.form-popup {
    display: none; /* JS will toggle to block */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1b1b1b;
    color: #fff;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 9999;
    width: min(520px, 92%);
}

.form-popup h2 {
    margin-top: 0;
}

/* close X in top-right of popup */
.form-popup .form-close-x {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}
.form-popup .form-close-x:hover {
    background: rgba(255,255,255,0.06);
}

.form-popup input[type="text"],
.form-popup input[type="date"],
.form-popup input[type="time"],
.form-popup textarea {
    width: 100%;
    padding: 8px;
    margin: 6px 0 12px 0;
    box-sizing: border-box;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
}

/* Date inputs container - side by side layout */
.date-inputs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.date-input-group {
    flex: 1;
    min-width: 0;
}

.date-input-group label {
    display: block;
    margin-bottom: 6px;
}

.date-input-group input[type="date"] {
    width: 100%;
    margin: 0;
}

/* Time inputs container - side by side layout */
.time-inputs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.time-input-group {
    flex: 1;
    min-width: 0;
}

.time-input-group label {
    display: block;
    margin-bottom: 6px;
}

.time-input-group input[type="time"] {
    width: 100%;
    margin: 0;
}

/* Checkbox row - side by side layout */
.checkbox-row {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #fff;
}

.checkbox-row input[type="checkbox"] {
    cursor: pointer;
}

/* Recurrence settings layout */
.recurrence-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.recurrence-field {
    flex: 1;
    min-width: 0;
}

.recurrence-field label {
    display: block;
    margin-bottom: 6px;
}

.recurrence-field select {
    width: 100%;
}

.recurrence-interval-field {
    flex: 0 1 180px;
}

/* Form buttons row */
.form-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

/* Color picker inline with buttons */
.color-picker-inline {
    position: relative;
    margin-left: auto;
}

.btn-color {
    padding: 8px 12px;
    font-size: 18px;
    min-width: auto;
}

.color-picker-inline .color-options {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 8px;
    z-index: 1000;
}

.form-popup .btn {
    display: inline-block;
    padding: 8px 12px;
    background: #FF4F91;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-popup .btn.cancel {
    background: #444;
    margin-left: 8px;
}

/* change the background for empty cells from previous/next month */
#calendar-body div.prev-date,
#calendar-body div.next-date {
    background-color: #282828; /* Same color as main cells */
    color: transparent; /* just in case content appears */
}

.open-button {
    background-color: #FF4F91;
    color: white;
    padding: 2px 10px;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    border-radius: 4px;
    font-size: 15px;
    margin-right: 12px;
}

.view-selector {
    background-color: #FF4F91;
    color: white;
    padding: 2px 8px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 15px;
    margin-right: 12px;
    font-weight: 600;
}

.view-selector:hover {
    opacity: 0.9;
}

#today-button {
    font-size: 15.0px; /* 10% smaller than the plus button (24px * 0.9 = 21.6px) */
    padding: 2px 9px; /* Slightly reduced padding to match smaller size */
}

/* Color picker styles - kept for reference but now inline */
.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 6px;
    padding: 8px;
    background: #1b1b1b;
    border: 1px solid #333;
    border-radius: 6px;
    max-width: 240px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.color-options.hidden {
    display: none;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.color-swatch:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.4); }
.color-swatch:focus { outline: 2px solid #ffaac9; outline-offset: 2px; }

/* Event details modal */
#event-detail-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

#event-detail-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#event-detail-modal .modal-content {
    background: #1b1b1b;
    color: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    width: min(500px, 90%);
    max-height: 80vh;
    overflow-y: auto;
}

#event-detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

#event-detail-modal .modal-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #ffaac9;
}

#event-detail-modal .modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#event-detail-modal .modal-close:hover {
    color: #ffaac9;
}

#event-detail-modal .modal-field {
    margin-bottom: 12px;
}

#event-detail-modal .modal-field-label {
    font-weight: 600;
    color: #ffaac9;
    font-size: 0.9em;
}

#event-detail-modal .modal-field-value {
    color: #ddd;
    word-break: break-word;
    margin-top: 4px;
}

/* Modal time row - side by side layout */
.modal-time-row {
    display: flex;
    gap: 5px;
    align-items: flex-end;
}

.modal-time-field {
    flex: 0 1 auto;
}

.modal-time-separator {
    color: #999;
    font-size: 1.2em;
    padding: 0 3px;
    align-self: flex-end;
    margin-bottom: 4px;
}

/* Modal edit button */
.modal-delete {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    margin-right: 8px;
}
.modal-delete:hover { color: #ff6b6b; }

.modal-duplicate {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    margin-right: 8px;
}
.modal-duplicate:hover { color: #aed6f1; }

.modal-edit {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    margin-right: 8px;
}

.modal-edit:hover { color: #85e085; }

/* Recurring Event Delete Dialog */
.recurring-delete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.recurring-delete-modal {
    background-color: #222;
    border: 2px solid #FF4F91;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.recurring-delete-modal h2 {
    color: #FF4F91;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
}

.recurring-delete-modal p {
    color: #fff;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.recurring-delete-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recurring-delete-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recurring-delete-btn.delete-single {
    background-color: #ff9800;
    color: #fff;
}

.recurring-delete-btn.delete-single:hover {
    background-color: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.recurring-delete-btn.delete-all {
    background-color: #f44336;
    color: #fff;
}

.recurring-delete-btn.delete-all:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.recurring-delete-btn.cancel-delete {
    background-color: #555;
    color: #fff;
}

.recurring-delete-btn.cancel-delete:hover {
    background-color: #666;
}
.modal-edit:hover { color: #ffaac9; }

/* Todo Panel - Pull-out sidebar */
.todo-panel-toggle {
    display: none; /* Hidden by default, shown via media query for desktop */
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 60px;
    background: #FF4F91;
    border: none;
    border-radius: 8px 0 0 8px;
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.todo-panel-toggle:hover {
    background: #ff6fa5;
}

.todo-panel-toggle.panel-open {
    right: 380px;
}

.todo-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: #1e1e1e;
    border-left: 2px solid #FF4F91;
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.todo-panel.open {
    right: 0;
}

.todo-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.todo-panel-overlay.show {
    display: block;
}

.todo-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    background: #252525;
}

.todo-panel-header h2 {
    margin: 0;
    color: #FF4F91;
    font-size: 1.3em;
}

.todo-panel-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.8em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.todo-panel-close:hover {
    color: #FF4F91;
}

.todo-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #252525;
    border-bottom: 1px solid #333;
}

.todo-panel-add-btn {
    background: #FF4F91;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.todo-panel-add-btn:hover {
    background: #e0457f;
}

.todo-panel-sort-btn {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.todo-panel-sort-btn:hover {
    border-color: #FF4F91;
    color: #FF4F91;
}

.todo-panel-sort-menu {
    position: absolute;
    top: 90px;
    left: 10px;
    right: 10px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    z-index: 1010;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.todo-panel-sort-menu-content {
    padding: 12px;
}

.todo-panel-sort-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
}

.todo-panel-sort-menu-header span {
    color: #FF4F91;
    font-weight: 600;
    font-size: 0.95em;
}

.todo-panel-sort-menu-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.todo-panel-sort-menu-close:hover {
    color: #FF4F91;
}

.todo-panel-sort-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.todo-panel-sort-row label {
    color: #888;
    font-size: 0.85em;
    min-width: 55px;
}

.todo-panel-sort-row select {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.85em;
    cursor: pointer;
    flex: 1;
}

.todo-panel-sort-row select:hover {
    border-color: #FF4F91;
}

.todo-panel-sort-dir-btn {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
    flex-shrink: 0;
}

.todo-panel-sort-dir-btn:hover {
    border-color: #FF4F91;
    color: #FF4F91;
}

.todo-panel-sort-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.todo-panel-sort-apply {
    background: #FF4F91;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.todo-panel-sort-apply:hover {
    background: #ff6fa5;
}

.todo-panel-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    background: #252525;
}

.todo-panel-tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    color: #888;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.todo-panel-tab:hover {
    color: #fff;
    background: #2a2a2a;
}

.todo-panel-tab.active {
    color: #FF4F91;
    border-bottom-color: #FF4F91;
    background: #2a2a2a;
}

.todo-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Todo items in panel */
.todo-panel-item {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.todo-panel-item:hover {
    background: #333;
    transform: translateX(-2px);
}

.todo-panel-item.completed {
    opacity: 0.6;
}

.todo-panel-item.completed .todo-panel-item-text {
    text-decoration: line-through;
}

.todo-panel-item.importance-1 {
    border-left-color: #f44336;
}

.todo-panel-item.importance-2 {
    border-left-color: #ff9800;
}

.todo-panel-item.importance-3 {
    border-left-color: #ffeb3b;
}

.todo-panel-item.importance-4 {
    border-left-color: #666;
}

.todo-panel-item.due-today {
    background: rgba(255, 193, 7, 0.1);
}

.todo-panel-item.overdue {
    background: rgba(244, 67, 54, 0.1);
}

.todo-panel-item-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.todo-panel-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.todo-panel-item-content {
    flex: 1;
    min-width: 0;
}

.todo-panel-item-text {
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.todo-panel-item-meta {
    color: #888;
    font-size: 0.8em;
}

.todo-panel-empty {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 0.95em;
}

/* Show toggle button only on desktop */
@media (min-width: 768px) {
    .todo-panel-toggle {
        display: block;
    }
}

/* Hide panel completely on mobile */
@media (max-width: 767px) {
    .todo-panel,
    .todo-panel-toggle,
    .todo-panel-overlay {
        display: none !important;
    }
}

/* Todo Panel Detail Modal */
.todo-panel-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.todo-panel-detail-content {
    background: #2a2a2a;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #444;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.todo-panel-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #333;
    border-bottom: 1px solid #444;
    border-radius: 8px 8px 0 0;
}

.todo-panel-detail-header h2 {
    margin: 0;
    color: #FF4F91;
    font-size: 1.2em;
    word-wrap: break-word;
    flex: 1;
    padding-right: 10px;
}

.todo-panel-detail-header .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.todo-panel-detail-header .close:hover {
    color: #FF4F91;
}

.todo-panel-detail-field {
    margin-bottom: 16px;
}

.todo-panel-detail-label {
    color: #FF4F91;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.todo-panel-detail-value {
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.6;
}

.todo-panel-detail-importance {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
}

.todo-panel-detail-importance.high {
    background-color: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.todo-panel-detail-importance.medium {
    background-color: rgba(255, 136, 0, 0.2);
    color: #ff8800;
}

.todo-panel-detail-importance.low {
    background-color: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.todo-panel-detail-importance.none {
    background-color: rgba(102, 102, 102, 0.2);
    color: #999;
}

.todo-panel-detail-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.todo-panel-detail-label-tag {
    padding: 4px 10px;
    background-color: #444;
    color: #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
}

.todo-panel-detail-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.todo-panel-detail-btn {
    padding: 10px 20px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #2a2a2a;
    transition: all 0.2s;
}

.todo-panel-detail-btn.archive {
    color: #85e085;
}

.todo-panel-detail-btn.archive:hover {
    background: #333;
    color: #9ef09e;
}

.todo-panel-detail-btn.edit {
    color: #aed6f1;
}

.todo-panel-detail-btn.edit:hover {
    background: #333;
    color: #c4e4f7;
}

/* Todo Panel Add Modal */
.todo-panel-add-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.todo-panel-add-content {
    background: #2a2a2a;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #444;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.todo-panel-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #333;
    border-bottom: 1px solid #444;
    border-radius: 8px 8px 0 0;
}

.todo-panel-add-header h2 {
    margin: 0;
    color: #FF4F91;
    font-size: 1.2em;
}

.todo-panel-add-header .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.todo-panel-add-header .close:hover {
    color: #FF4F91;
}

#todo-panel-add-form {
    padding: 20px;
}

#todo-panel-add-form .form-row {
    margin-bottom: 16px;
}

#todo-panel-add-form .form-row label {
    display: block;
    margin-bottom: 6px;
    color: #e0e0e0;
    font-weight: 500;
}

#todo-panel-add-form .form-row input[type="text"],
#todo-panel-add-form .form-row input[type="date"],
#todo-panel-add-form .form-row select,
#todo-panel-add-form .form-row textarea {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

#todo-panel-add-form .form-row input:focus,
#todo-panel-add-form .form-row select:focus,
#todo-panel-add-form .form-row textarea:focus {
    outline: none;
    border-color: #FF4F91;
}

#todo-panel-add-form .form-row textarea {
    resize: vertical;
}

#todo-panel-add-form .form-row-split {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

#todo-panel-add-form .form-col {
    flex: 1;
}

#todo-panel-add-form .form-col label {
    display: block;
    margin-bottom: 6px;
    color: #e0e0e0;
    font-weight: 500;
}

#todo-panel-add-form .form-col input {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

#todo-panel-add-form .form-col input:focus {
    outline: none;
    border-color: #FF4F91;
}

#todo-panel-add-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

#todo-panel-add-form .btn-cancel,
#todo-panel-add-form .btn-save {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#todo-panel-add-form .btn-cancel {
    background-color: #555;
    color: white;
}

#todo-panel-add-form .btn-cancel:hover {
    background-color: #666;
}

#todo-panel-add-form .btn-save {
    background-color: #FF4F91;
    color: white;
}

#todo-panel-add-form .btn-save:hover {
    background-color: #e0457f;
}