/*
=================================================================================
COURMACS CLIENT PORTAL - STYLESHEET
=================================================================================

This stylesheet is complete and production-ready. No changes needed unless
customizing colors, fonts, or layout.

KEY CSS CLASSES FOR BACKEND DEVELOPERS:

STATUS CLASSES (for cases):
- .status-accepted  → Green header bar (#28a745)
- .status-general   → Blue header bar (#17a2b8)
- .status-entering  → Yellow header bar (#ffc107)
Apply the same class to BOTH .case-header-bar AND .status-badge

BUTTON CLASSES:
- .action-button       → Purple filled button (primary actions)
- .view-documents-btn  → Purple outline button (secondary actions)

DARK MODE:
- Handled automatically by script.js
- Saves user preference to localStorage
- No backend work needed

RESPONSIVE BREAKPOINTS:
- Desktop: >968px (2-column layout)
- Tablet: 641px-968px (stacked, 2-column details)
- Mobile: ≤640px (single column, collapsible details)

COLOR VARIABLES:
See :root section below for all brand colors.

=================================================================================
*/

/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* System Colors */
    --primary: #282A38;
    --secondary: #735B83;
    --text: #55555D;
    --accent: #83578D;
    /* Custom Colors */
    --white: #FFFFFF;
    --black: #000000;
    --lighter-purple: #A98CAF;
    --footer-legal: #9C9C9C;
    --light-grey: #FAFAFA;
    --background: #F0F0F0;
    --dark-purple-accent: #4B3C55;
    /* Status Colors */
    --status-accepted: #28a745;
    --status-general: #17a2b8;
    --status-entering: #ffc107;
    /* Fonts */
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --font-weight-primary: 600;
    --font-weight-text: 400;
    --font-size-text: 14px;
    --letter-spacing-text: 0.1px;
    --font-size-accent: 11px;
    --letter-spacing-accent: 1.8px;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-text);
    font-size: var(--font-size-text);
    letter-spacing: var(--letter-spacing-text);
    color: var(--text);
    background-color: var(--light-grey);
    line-height: 1.6;
    position: relative;
}

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 0;
        opacity: 0.05;
        background-image: polygon(10% 20%, 15% 20%, 12.5% 15%), polygon(85% 10%, 90% 10%, 87.5% 5%), polygon(5% 60%, 10% 60%, 7.5% 55%), polygon(92% 75%, 97% 75%, 94.5% 70%), polygon(25% 85%, 30% 85%, 27.5% 80%), polygon(70% 30%, 75% 30%, 72.5% 25%), polygon(40% 5%, 45% 5%, 42.5% 0%), polygon(15% 90%, 20% 90%, 17.5% 85%), polygon(80% 50%, 85% 50%, 82.5% 45%), polygon(35% 70%, 40% 70%, 37.5% 65%), polygon(60% 15%, 65% 15%, 62.5% 10%), polygon(50% 95%, 55% 95%, 52.5% 90%), polygon(20% 40%, 25% 40%, 22.5% 35%), polygon(75% 85%, 80% 85%, 77.5% 80%), polygon(45% 55%, 50% 55%, 47.5% 50%);
        background-size: 100% 100%;
        background-repeat: no-repeat;
        filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.1));
    }

    body::before {
        background: linear-gradient(135deg, #999 0%, #999 25%, transparent 25%, transparent 75%, #999 75%, #999), linear-gradient(45deg, #999 0%, #999 25%, transparent 25%, transparent 75%, #999 75%, #999);
        background-size: 60px 60px, 60px 60px;
        background-position: 0 0, 30px 30px;
        opacity: 0.08;
    }

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background-color: var(--primary);
    border-bottom: 6px solid var(--secondary);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-image {
    height: 45px;
    width: auto;
}

.logo {
    font-size: 22px;
    font-weight: var(--font-weight-primary);
    color: var(--white);
    margin: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border-radius: 6px;
    color: var(--white);
    font-family: var(--font-family);
    font-size: var(--font-size-accent);
    font-weight: var(--font-weight-text);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
}

    .theme-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

.theme-text {
    white-space: nowrap;
}

.sun-icon,
.moon-icon {
    color: var(--white);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

body.dark-mode .sun-icon {
    display: none;
}

body.dark-mode .moon-icon {
    display: block;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

    .menu-toggle span {
        width: 24px;
        height: 3px;
        background-color: var(--white);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle:hover span {
        background-color: var(--lighter-purple);
    }

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    background-color: var(--white);
    border: 1px solid var(--background);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

    .dropdown-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.menu-item {
    display: block;
    padding: 12px 20px;
    color: var(--primary);
    text-decoration: none;
    font-size: var(--font-size-accent);
    font-weight: var(--font-weight-primary);
    letter-spacing: var(--letter-spacing-accent);
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--light-grey);
}

    .menu-item:last-child {
        border-bottom: none;
    }

    .menu-item:hover {
        background-color: var(--light-grey);
        color: var(--accent);
    }

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 32px 0 60px;
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 32px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    text-align: center;
    margin-bottom: 32px;
}

/* ===== SECTIONS ===== */
.section-title {
    font-size: 18px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 0;
    padding: 12px 16px;
    margin: -24px -24px 0 -24px;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid var(--secondary);
}

/* ===== YOUR ACTIONS SECTION ===== */
.actions-section {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.actions-header {
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
}

    .actions-header .section-title {
        color: var(--white);
        margin: 0;
        padding: 0;
        background: none;
        border: none;
        font-size: 20px;
    }

.actions-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.action-item {
    background-color: var(--white) !important;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

    .action-item:hover {
        background-color: var(--white) !important;
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.action-info {
    flex: 1;
}

.action-text {
    color: var(--primary);
    font-weight: var(--font-weight-primary);
    margin-bottom: 8px;
}

.action-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ff9800;
    color: var(--white);
    font-size: var(--font-size-accent);
    font-weight: var(--font-weight-primary);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
}

    .action-date::before {
        content: '!';
        font-size: 14px;
        font-weight: bold;
    }

.action-button {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .action-button:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(131, 87, 141, 0.3);
    }

    .action-button:active {
        transform: translateY(0);
    }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

/* ===== YOUR DETAILS SECTION ===== */
.details-section {
    background-color: var(--white);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid var(--secondary);
}

    .details-header .section-title {
        margin: 0;
        padding: 0;
        background: none;
        border: none;
        border-radius: 0;
    }

.details-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    display: none;
    transition: all 0.3s ease;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    color: var(--accent);
    font-family: var(--font-family);
    font-size: var(--font-size-accent);
    font-weight: var(--font-weight-primary);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
}

    .details-toggle:hover {
        background-color: rgba(131, 87, 141, 0.1);
    }

.toggle-text {
    white-space: nowrap;
}

.details-toggle .chevron-icon {
    color: var(--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.details-toggle.expanded .chevron-icon {
    transform: rotate(180deg);
}

.details-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease, padding 0.4s ease-in-out;
    opacity: 1;
    padding: 24px;
}

    .details-content.collapsed {
        max-height: 0;
        opacity: 0;
        padding: 0 24px;
    }

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--light-grey);
}

    .detail-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.detail-label {
    font-size: 12px;
    font-weight: var(--font-weight-primary);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-accent);
}

.detail-value {
    font-size: var(--font-size-text);
    color: var(--primary);
    font-weight: var(--font-weight-text);
}

/* Manage My Details Button */
.detail-button-row {
    border-bottom: none;
    padding-top: 8px;
    padding-bottom: 0;
    display: flex;
    justify-content: center;
}

.manage-details-btn {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

    .manage-details-btn:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(131, 87, 141, 0.3);
    }

/* ===== YOUR CASES SECTION ===== */
.cases-section {
    background-color: var(--white);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

    .cases-section .section-title {
        margin: 0;
    }

.cases-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 0 0 12px 12px;
}

.case-item {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

    .case-item:hover {
        box-shadow: 0 4px 12px rgba(131, 87, 141, 0.15);
        transform: translateY(-2px);
    }

.case-header-bar {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--white);
}

    .case-header-bar.status-accepted {
        background-color: var(--status-accepted);
    }

    .case-header-bar.status-general {
        background-color: var(--status-general);
    }

    .case-header-bar.status-entering {
        background-color: var(--status-entering);
    }

.case-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.case-info-pill {
    background-color: var(--white);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    font-weight: var(--font-weight-primary);
}

    .case-info-pill .case-label,
    .case-info-pill .case-id,
    .case-info-pill .case-ref {
        color: var(--primary) !important;
    }

.case-label {
    font-weight: 700;
}

.case-id,
.case-ref,
.case-defendant {
    font-weight: var(--font-weight-primary);
}

.case-separator {
    color: var(--white);
    margin: 0 4px;
}

.case-body {
    padding: 20px;
    background-color: var(--light-grey);
}

.status-description {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 16px;
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-icon {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.case-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.case-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.case-label {
    font-weight: var(--font-weight-text);
    color: var(--white);
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
}

.case-id,
.case-ref {
    color: var(--white);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
}

.case-separator {
    color: var(--text);
    margin: 0 4px;
}

.case-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--font-size-accent);
    font-weight: var(--font-weight-primary);
    color: var(--white);
    white-space: nowrap;
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
}

.status-accepted {
    background-color: var(--status-accepted);
}

.status-general {
    background-color: var(--status-general);
}

.status-entering {
    background-color: var(--status-entering);
    color: var(--primary);
}

/* Custom Fields */
.case-custom-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background-color: var(--white);
    border-radius: 6px;
}

.custom-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-size: 12px;
    font-weight: var(--font-weight-primary);
    color: var(--text);
}

.field-value {
    font-size: var(--font-size-text);
    color: var(--primary);
}

/* View Documents Button */
.view-documents-btn {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 6px;
    padding: 10px 24px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
}

    .view-documents-btn:hover {
        background-color: var(--accent);
        color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(131, 87, 141, 0.2);
    }

    .view-documents-btn:active {
        transform: translateY(0);
    }

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 968px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 28px;
    }

    /* Show toggle button on tablet and below */
    .details-toggle {
        display: flex;
    }

    /* Start with details collapsed on mobile/tablet */
    .details-content {
        max-height: 0;
        opacity: 0;
    }

        .details-content.expanded {
            max-height: 1000px;
            opacity: 1;
        }

    .details-toggle.expanded .chevron-icon {
        transform: rotate(0deg);
    }

    /* 2 column layout for details on tablet */
    .details-content {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 24px;
    }

    /* Make manage details button full width on tablet */
    .detail-button-row {
        grid-column: 1 / -1;
        padding: 16px 24px 24px;
    }

    .manage-details-btn {
        max-width: none;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .main-content {
        padding: 24px 0 40px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    /* Single column on mobile */
    .details-content {
        grid-template-columns: 1fr;
    }

    .actions-section {
        padding: 0;
    }

    .actions-header {
        padding: 12px 16px;
    }

    .actions-content {
        padding: 20px 16px;
    }

    .action-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .action-button {
        width: 100%;
        text-align: center;
    }

    .details-section,
    .cases-section {
        padding: 0;
    }

    .section-title {
        margin: 0;
        font-size: 16px;
    }

    .details-content {
        padding: 20px 16px;
    }

    .cases-content {
        padding: 20px 16px;
    }

    .case-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .case-custom-fields {
        grid-template-columns: 1fr;
    }

    .case-buttons {
        flex-direction: column;
        width: 100%;
    }

        .view-documents-btn,
        .case-buttons .action-button {
            width: 100%;
        }

    .actions-title {
        font-size: 18px;
    }

    .logo-image {
        height: 35px;
    }

    .logo {
        font-size: 18px;
    }
}

/* Very Small Mobile */
@media (max-width: 380px) {
    .logo-image {
        height: 30px;
    }

    .logo {
        font-size: 16px;
    }

    .case-info {
        font-size: 10px;
    }

    .status-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* ===== DARK MODE ===== */
body.dark-mode {
    background-color: var(--primary);
    color: var(--white);
}

    body.dark-mode::before {
        background: linear-gradient(135deg, #A98CAF 0%, #A98CAF 25%, transparent 25%, transparent 75%, #A98CAF 75%, #A98CAF), linear-gradient(45deg, #A98CAF 0%, #A98CAF 25%, transparent 25%, transparent 75%, #A98CAF 75%, #A98CAF);
        background-size: 60px 60px, 60px 60px;
        background-position: 0 0, 30px 30px;
        opacity: 0.03;
    }

    /* Dark mode - Header */
    body.dark-mode .header {
        background-color: #1a1b26;
        border-bottom: 6px solid var(--secondary);
    }

    /* Dark mode - Main sections */
    body.dark-mode .details-section {
        background-color: #363847;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .cases-section {
        background-color: #363847;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .cases-content {
        background-color: #363847;
    }

    body.dark-mode .page-title {
        color: var(--white);
    }

    body.dark-mode .section-title {
        color: var(--white);
    }

    body.dark-mode .details-toggle {
        color: var(--white);
    }

        body.dark-mode .details-toggle .chevron-icon {
            color: var(--white);
        }

    /* Dark mode - Actions section */
    body.dark-mode .actions-section {
        background: linear-gradient(135deg, #8b1a1a 0%, #6d1414 100%);
    }

    body.dark-mode .action-item {
        background-color: var(--white) !important;
    }

        body.dark-mode .action-item:hover {
            background-color: var(--white) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

    /* Dark mode - Details */
    body.dark-mode .detail-row {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    body.dark-mode .detail-label {
        color: var(--lighter-purple);
    }

    body.dark-mode .detail-value {
        color: var(--white);
    }

    body.dark-mode .manage-details-btn {
        background-color: var(--accent);
    }

        body.dark-mode .manage-details-btn:hover {
            background-color: var(--lighter-purple);
        }

    /* Dark mode - Cases */
    body.dark-mode .case-item {
        background-color: #2a2c3a;
    }

        body.dark-mode .case-item:hover {
            box-shadow: 0 4px 12px rgba(169, 140, 175, 0.25);
        }

    body.dark-mode .case-body {
        background-color: #2a2c3a;
    }

    body.dark-mode .status-description {
        color: var(--lighter-purple);
    }

    /* Dark mode - Custom fields */
    body.dark-mode .case-custom-fields {
        background-color: #363847;
    }

    body.dark-mode .field-label {
        color: var(--lighter-purple);
    }

    body.dark-mode .field-value {
        color: var(--white);
    }

    /* Dark mode - Buttons */
    body.dark-mode .view-documents-btn {
        color: var(--lighter-purple);
        border-color: var(--lighter-purple);
    }

        body.dark-mode .view-documents-btn:hover {
            background-color: var(--lighter-purple);
            color: var(--primary);
        }

    /* Dark mode - Dropdown menu */
    body.dark-mode .dropdown-menu {
        background-color: #363847;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode .menu-item {
        color: var(--white);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

        body.dark-mode .menu-item:hover {
            background-color: #2a2c3a;
            color: var(--lighter-purple);
        }

    /* Dark mode - Actions section stays the same (red gradient) but adjust text */
    body.dark-mode .action-item {
        background-color: rgba(255, 255, 255, 0.95);
    }

        body.dark-mode .action-item:hover {
            background-color: var(--white);
        }


/* ===== MANAGE DETAILS PAGE ===== */

/* Manage Details Page Title */
.page-title-manage {
    font-size: 32px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 16px;
    text-align: center;
}

/* Back Button - Outline Style */
.back-button-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: var(--font-weight-primary);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 6px;
    margin-bottom: 32px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
}

    .back-button-outline:hover {
        background-color: var(--accent);
        color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(131, 87, 141, 0.3);
    }

    .back-button-outline svg {
        flex-shrink: 0;
    }

/* Two Column Grid */
.manage-details-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
    align-items: start;
}

/* Form Column */
.form-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Form Section */
.form-section {
    background-color: var(--white);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 3px solid var(--secondary);
    border-radius: 12px 12px 0 0;
}

.form-section-title {
    font-size: 20px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin: 0;
}

.instant-badge {
    background-color: #28a745;
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: var(--font-weight-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-badge {
    background-color: var(--accent);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: var(--font-weight-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.preferences-form,
.details-form {
    padding: 24px;
}

.form-subsection {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--light-grey);
}

    .form-subsection:last-of-type {
        border-bottom: none;
        margin-bottom: 24px;
        padding-bottom: 0;
    }

.subsection-title {
    font-size: 16px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: var(--font-weight-primary);
    color: var(--text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #dc3545;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-grey);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: var(--font-size-text);
    color: var(--primary);
    background-color: var(--white);
    transition: all 0.2s ease;
}

    .form-input:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(131, 87, 141, 0.1);
    }

.form-help-text {
    font-size: 12px;
    color: var(--text);
    margin-top: 8px;
    font-style: italic;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--font-size-text);
    color: var(--primary);
}

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: var(--accent);
    }

/* Time Windows */
.time-window {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.time-select {
    flex: 1;
}

.time-separator {
    color: var(--text);
    font-size: var(--font-size-text);
}

.remove-time-btn {
    background-color: #dc3545;
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    flex-shrink: 0;
}

    .remove-time-btn:hover {
        background-color: #c82333;
    }

/* Previous Address Blocks */
.previous-address-block {
    background-color: var(--light-grey);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border: 2px solid var(--background);
}

.address-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.address-block-title {
    font-size: 14px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin: 0;
}

.remove-address-btn {
    background-color: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    border-radius: 6px;
    padding: 6px 16px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: var(--font-weight-primary);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .remove-address-btn:hover {
        background-color: #dc3545;
        color: var(--white);
    }

/* Add Buttons */
.add-btn {
    background-color: transparent;
    color: var(--accent);
    border: 2px dashed var(--accent);
    border-radius: 6px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: var(--font-size-text);
    font-weight: var(--font-weight-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 8px;
}

    .add-btn:hover {
        background-color: rgba(131, 87, 141, 0.05);
        border-style: solid;
    }

/* Submit Button */
.submit-btn {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 14px 32px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-accent);
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 8px;
}

    .submit-btn:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(131, 87, 141, 0.3);
    }

/* Success Messages */
.success-message {
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: var(--font-weight-primary);
    text-align: center;
}

/* ID Verification Sidebar */
.id-sidebar {
    position: sticky;
    top: 100px;
}

.id-verification-section {
    background-color: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.id-section-title {
    font-size: 18px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 16px;
}

.id-description {
    font-size: var(--font-size-text);
    color: var(--text);
    margin-bottom: 16px;
}

.id-upload-box {
    border: 2px dashed var(--accent);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background-color: var(--light-grey);
    margin-bottom: 16px;
}

.upload-icon {
    color: var(--accent);
    margin-bottom: 12px;
}

.upload-text {
    font-size: var(--font-size-text);
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 4px;
}

.upload-subtext {
    font-size: 12px;
    color: var(--text);
    margin-bottom: 16px;
}

.file-input {
    display: none;
}

.upload-btn {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .upload-btn:hover {
        background-color: var(--dark-purple-accent);
    }

.id-help-title {
    font-size: 13px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: 8px;
}

.id-help-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

    .id-help-text strong {
        color: var(--primary);
        display: block;
        margin-bottom: 4px;
    }

/* ID Verified Section */
.id-verified-box {
    text-align: center;
    padding: 24px;
}

.check-icon {
    color: #28a745;
    margin-bottom: 12px;
}

.fail-text {
    font-size: 18px;
    font-weight: var(--font-weight-primary);
    color: #D70040; /*Carmine*/
    margin-bottom: 8px;
}

.verified-text {
    font-size: 18px;
    font-weight: var(--font-weight-primary);
    color: #28a745;
    margin-bottom: 8px;
}

.verified-date {
    font-size: var(--font-size-text);
    color: var(--text);
    margin-bottom: 16px;
}

.update-id-btn {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 6px;
    padding: 10px 24px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: var(--font-size-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .update-id-btn:hover {
        background-color: var(--accent);
        color: var(--white);
    }

/* Responsive */
@media (max-width: 968px) {
    .manage-details-grid {
        grid-template-columns: 1fr;
    }

    .id-sidebar {
        position: static;
        order: -1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .section-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 12px;
    }

    .time-window {
        flex-direction: column;
        gap: 8px;
    }

    .time-separator {
        display: none;
    }
}

/* Dark Mode - Manage Details */
body.dark-mode .form-section,
body.dark-mode .id-verification-section,
body.dark-mode .contact-preferences-section {
    background-color: #363847;
}

body.dark-mode .form-section-title,
body.dark-mode .subsection-title,
body.dark-mode .id-section-title,
body.dark-mode .address-block-title,
body.dark-mode .preferences-title {
    color: var(--white);
}

body.dark-mode .form-label,
body.dark-mode .form-label-sidebar {
    color: #b8b8b8;
}

body.dark-mode .form-help-text,
body.dark-mode .form-help-text-small {
    color: #a0a0a0;
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-select-compact {
    background-color: #2a2c3a;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

    body.dark-mode .form-input:focus,
    body.dark-mode .form-select:focus,
    body.dark-mode .form-select-compact:focus {
        border-color: var(--accent);
    }

body.dark-mode .checkbox-label {
    color: var(--white);
}

body.dark-mode .previous-address-block {
    background-color: #2a2c3a;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .id-upload-box {
    background-color: #2a2c3a;
    border-color: var(--accent);
}

body.dark-mode .upload-text,
body.dark-mode .id-description {
    color: var(--white);
}

body.dark-mode .upload-subtext {
    color: #a0a0a0;
}

body.dark-mode .id-help-title {
    color: var(--white);
}

body.dark-mode .id-help-text {
    color: #c0c0c0;
}

body.dark-mode .time-separator,
body.dark-mode .time-to-text {
    color: #a0a0a0;
}

body.dark-mode .success-message,
body.dark-mode .success-message-compact {
    background-color: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #d4edda;
}

/* Date of Birth Dropdowns */
.date-of-birth-group {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr;
    gap: 12px;
}

.dob-select {
    width: 100%;
}

/* Contact Preferences in Sidebar */
.contact-preferences-section {
    background-color: var(--white);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 24px;
}

.preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid var(--light-grey);
}

.preferences-header-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preferences-title {
    font-size: 16px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin: 0;
}

.instant-badge-small {
    background-color: #28a745;
    color: var(--white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: var(--font-weight-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    align-self: flex-start;
}

.preferences-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: none;
    color: var(--primary);
    transition: transform 0.3s ease;
}

    .preferences-toggle.active .chevron-icon {
        transform: rotate(180deg);
    }

.preferences-content {
    padding: 20px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

    .preferences-content.collapsible.collapsed {
        max-height: 0;
        padding: 0 20px;
    }

.preferences-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-label-sidebar {
    display: block;
    font-size: 12px;
    font-weight: var(--font-weight-primary);
    color: var(--text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkbox-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-help-text-small {
    font-size: 11px;
    color: var(--text);
    margin-top: 4px;
    margin-bottom: 8px;
    font-style: italic;
}

.time-window-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: var(--light-grey);
    border-radius: 6px;
}

.time-to-text {
    font-size: 11px;
    color: var(--text);
    text-align: center;
}

.form-select-compact {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--light-grey);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--primary);
    background-color: var(--white);
    transition: all 0.2s ease;
}

    .form-select-compact:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(131, 87, 141, 0.1);
    }

.remove-time-btn-compact {
    background-color: #dc3545;
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: var(--font-weight-primary);
}

    .remove-time-btn-compact:hover {
        background-color: #c82333;
    }

.add-btn-compact {
    background-color: transparent;
    color: var(--accent);
    border: 2px dashed var(--accent);
    border-radius: 6px;
    padding: 8px 16px;
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: var(--font-weight-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

    .add-btn-compact:hover {
        background-color: rgba(131, 87, 141, 0.05);
        border-style: solid;
    }

.submit-btn-compact {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: 12px;
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

    .submit-btn-compact:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(131, 87, 141, 0.3);
    }

.success-message-compact {
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: var(--font-weight-primary);
    text-align: center;
    font-size: 12px;
}

/* Responsive - Contact Preferences */
@media (max-width: 968px) {
    .preferences-toggle {
        display: flex;
        align-items: center;
    }

    .instant-badge-mobile {
        display: inline-block;
    }

    .time-window-compact {
        background-color: var(--white);
        padding: 0;
    }
}

@media (min-width: 969px) {
    .instant-badge-mobile {
        display: none;
    }
}

@media (max-width: 640px) {
    .date-of-birth-group {
        grid-template-columns: 1fr;
    }

    .preferences-header {
        padding: 12px 16px;
    }

    .preferences-content {
        padding: 16px;
    }
}

/* Dark Mode Updates */
body.dark-mode .contact-preferences-section {
    background-color: #363847;
}

body.dark-mode .preferences-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .preferences-title {
    color: var(--white);
}

body.dark-mode .preferences-toggle {
    color: var(--white);
}

body.dark-mode .time-window-compact {
    background-color: #2a2c3a;
}

body.dark-mode .form-select-compact {
    background-color: #1a1b26;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

    body.dark-mode .form-select-compact:focus {
        border-color: var(--accent);
    }

/* Section Header Simple (no badge) */
.section-header-bar-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 3px solid var(--secondary);
    border-radius: 12px 12px 0 0;
}

/* Section Explainer Text */
.section-explainer {
    padding: 16px 24px 0 24px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* Optional Label */
.optional-label {
    font-weight: normal;
    color: var(--text);
    font-size: 11px;
    text-transform: lowercase;
}

/* Form Help Text Large */
.form-help-text-large {
    font-size: 14px;
    color: var(--text);
    margin-top: 8px;
    font-weight: 500;
}

/* Input Fields - Slightly Darker Grey in Light Mode */
.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-grey);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: var(--font-size-text);
    color: var(--primary);
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

/* Contact Preferences Updates */
.preferences-title-large {
    font-size: 20px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin: 0 0 8px 0;
}

.preferences-explainer {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
}

.instant-badge-mobile {
    background-color: #28a745;
    color: var(--white);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: var(--font-weight-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

/* Dark Mode - New Styles */
body.dark-mode .page-title-manage {
    color: var(--white);
}

body.dark-mode .back-button-outline {
    color: var(--accent);
    border-color: var(--accent);
}

    body.dark-mode .back-button-outline:hover {
        background-color: var(--accent);
        color: var(--white);
    }

body.dark-mode .section-explainer {
    color: #c0c0c0;
}

body.dark-mode .preferences-title-large {
    color: var(--white);
}

body.dark-mode .preferences-explainer {
    color: #b8b8b8;
}

body.dark-mode .form-help-text-large {
    color: #b8b8b8;
}

body.dark-mode .optional-label {
    color: #a0a0a0;
}

/* Dark Mode - Add Previous Address Button Lighter */
body.dark-mode .add-btn {
    color: var(--lighter-purple);
    border-color: var(--lighter-purple);
}

    body.dark-mode .add-btn:hover {
        background-color: rgba(169, 140, 175, 0.15);
    }

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    background-color: var(--light-grey);
}

body.dark-mode.login-page {
    background-color: var(--primary);
}

/* Dark Mode Toggle (Top Right) */
.dark-mode-toggle-login {
    position: fixed;
    top: 24px;
    right: 24px;
    background-color: transparent;
    border: 2px solid var(--light-grey);
    border-radius: 24px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

    .dark-mode-toggle-login:hover {
        border-color: var(--accent);
        background-color: rgba(131, 87, 141, 0.1);
    }

    .dark-mode-toggle-login .sun-icon {
        display: block;
        color: var(--primary);
    }

    .dark-mode-toggle-login .moon-icon {
        display: none;
    }

.dark-mode-text-light,
.dark-mode-text-dark {
    font-size: var(--font-size-accent);
    font-weight: var(--font-weight-text);
    letter-spacing: var(--letter-spacing-accent);
    white-space: nowrap;
}

.dark-mode-text-light {
    display: block;
    color: var(--primary);
}

.dark-mode-text-dark {
    display: none;
}

body.dark-mode .dark-mode-toggle-login .sun-icon {
    display: none;
}

body.dark-mode .dark-mode-toggle-login .moon-icon {
    display: block;
    color: var(--white);
}

body.dark-mode .dark-mode-text-light {
    display: none;
}

body.dark-mode .dark-mode-text-dark {
    display: block;
    color: var(--white);
}

body.dark-mode .dark-mode-toggle-login {
    border-color: var(--lighter-purple);
}

    body.dark-mode .dark-mode-toggle-login:hover {
        background-color: rgba(169, 140, 175, 0.15);
    }

/* Login Container */
.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
}

/* Login Box */
body.login-page .login-container .login-box {
    background-color: #FFFFFF !important;
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

body.dark-mode.login-page .login-container .login-box {
    background-color: #1a202c !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Logo */
.login-logo {
    display: block;
    max-width: 280px;
    height: auto;
    margin: 0 auto 32px;
}

/* Title */
.login-title {
    font-size: 28px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

body.dark-mode .login-title {
    color: var(--white);
}

/* Form */
.login-form {
    width: 100%;
}

.login-form-group {
    margin-bottom: 24px;
}

.login-label {
    display: block;
    font-size: 14px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 8px;
}

body.dark-mode .login-label {
    color: var(--white);
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--light-grey);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 16px;
    color: var(--primary);
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

    .login-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(131, 87, 141, 0.1);
    }

    .login-input::placeholder {
        color: var(--text);
        opacity: 0.5;
    }

body.dark-mode .login-input {
    background-color: var(--dark-grey);
    border-color: #4a5568;
    color: var(--white);
}

    body.dark-mode .login-input:focus {
        border-color: var(--lighter-purple);
        box-shadow: 0 0 0 3px rgba(169, 140, 175, 0.1);
    }

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: color 0.2s ease;
}

    .password-toggle:hover {
        color: var(--accent);
    }

    .password-toggle .eye-off-icon {
        display: none;
    }

    .password-toggle.showing .eye-icon {
        display: none;
    }

    .password-toggle.showing .eye-off-icon {
        display: block;
    }

body.dark-mode .password-toggle {
    color: #a0aec0;
}

    body.dark-mode .password-toggle:hover {
        color: var(--lighter-purple);
    }

/* Forgot Password */
.forgot-password-wrapper {
    text-align: right;
    margin-bottom: 24px;
}

.forgot-password-link {
    font-size: 12px;
    font-weight: var(--font-weight-primary);
    letter-spacing: var(--letter-spacing-accent);
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .forgot-password-link:hover {
        color: var(--dark-purple-accent);
        text-decoration: underline;
    }

body.dark-mode .forgot-password-link {
    color: var(--lighter-purple);
}

    body.dark-mode .forgot-password-link:hover {
        color: var(--white);
    }

/* Login Button */
.login-btn {
    width: 100%;
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 14px 24px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: 14px;
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .login-btn:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(131, 87, 141, 0.3);
    }

    .login-btn:active {
        transform: translateY(0);
    }

body.dark-mode .login-btn {
    background-color: var(--accent);
}

    body.dark-mode .login-btn:hover {
        background-color: var(--lighter-purple);
    }

/* Responsive */
@media (max-width: 640px) {
    .dark-mode-toggle-login {
        top: 16px;
        right: 16px;
        padding: 8px 12px;
    }

    .dark-mode-text-light,
    .dark-mode-text-dark {
        font-size: 10px;
    }

    .login-container {
        margin-top: 60px;
    }

    .login-box {
        padding: 32px 24px;
    }

    .login-logo {
        max-width: 240px;
        margin-bottom: 24px;
    }

    .login-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .login-form-group {
        margin-bottom: 20px;
    }
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

    .modal.active {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-large {
    max-width: 900px;
}

body.dark-mode .modal-content {
    background-color: var(--card-dark);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 2px solid var(--light-grey);
    background-color: var(--white);
    border-radius: 12px 12px 0 0;
}

body.dark-mode .modal-header {
    border-bottom-color: #4a5568;
    background-color: #1a202c;
}

.modal-title {
    font-size: 24px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin: 0;
}

.modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text);
    margin: 0;
    font-weight: normal;
}

    .modal-subtitle span {
        font-weight: var(--font-weight-primary);
        color: var(--primary);
    }

body.dark-mode .modal-title {
    color: var(--white);
}

body.dark-mode .modal-subtitle {
    color: #a0aec0;
}

    body.dark-mode .modal-subtitle span {
        color: var(--white);
    }

.modal-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s ease;
    border-radius: 4px;
}

    .modal-close:hover {
        color: var(--accent);
        background-color: rgba(131, 87, 141, 0.1);
    }

body.dark-mode .modal-close {
    color: #a0aec0;
}

    body.dark-mode .modal-close:hover {
        color: var(--lighter-purple);
        background-color: rgba(169, 140, 175, 0.1);
    }

/* ===== UPLOAD MODAL ===== */

.upload-form {
    padding: 32px;
    background-color: var(--white);
}

body.dark-mode .upload-form {
    background-color: #1a202c;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: var(--font-weight-primary);
    color: var(--primary);
    margin-bottom: 8px;
}

body.dark-mode .form-label {
    color: var(--white);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-grey);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 16px;
    color: var(--primary);
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .form-select:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(131, 87, 141, 0.1);
    }

body.dark-mode .form-select {
    background-color: var(--dark-grey);
    border-color: #4a5568;
    color: var(--white);
}

    body.dark-mode .form-select:focus {
        border-color: var(--lighter-purple);
        box-shadow: 0 0 0 3px rgba(169, 140, 175, 0.1);
    }

/* Upload Area */
.upload-area {
    border: 2px dashed var(--light-grey);
    border-radius: 8px;
    padding: 48px 32px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

    .upload-area:hover {
        border-color: var(--accent);
        background-color: rgba(131, 87, 141, 0.05);
    }

    .upload-area.drag-over {
        border-color: var(--accent);
        background-color: rgba(131, 87, 141, 0.1);
    }

body.dark-mode .upload-area {
    border-color: #4a5568;
}

    body.dark-mode .upload-area:hover {
        border-color: var(--lighter-purple);
        background-color: rgba(169, 140, 175, 0.05);
    }

    body.dark-mode .upload-area.drag-over {
        background-color: rgba(169, 140, 175, 0.1);
    }

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

body.dark-mode .upload-icon {
    color: var(--lighter-purple);
}

.upload-text {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
}

body.dark-mode .upload-text {
    color: var(--white);
}

.upload-browse {
    color: var(--accent);
    font-weight: var(--font-weight-primary);
    text-decoration: underline;
}

body.dark-mode .upload-browse {
    color: var(--lighter-purple);
}

.upload-hint {
    font-size: 13px;
    color: var(--text);
    margin: 0;
}

body.dark-mode .upload-hint {
    color: #a0aec0;
}

/* Uploaded File Display */
.uploaded-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: var(--background);
    border: 1px solid var(--light-grey);
    border-radius: 6px;
    margin-top: 16px;
}

body.dark-mode .uploaded-file {
    background-color: var(--dark-grey);
    border-color: #4a5568;
}

.uploaded-file svg {
    color: var(--accent);
    flex-shrink: 0;
}

body.dark-mode .uploaded-file svg {
    color: var(--lighter-purple);
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: var(--primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .file-name {
    color: var(--white);
}

.remove-file {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: var(--text);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

    .remove-file:hover {
        color: #e53e3e;
    }

.submit-upload-btn {
    width: 100%;
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 14px 24px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: 14px;
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

    .submit-upload-btn:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(131, 87, 141, 0.3);
    }

body.dark-mode .submit-upload-btn:hover {
    background-color: var(--lighter-purple);
}

/* ===== PDF VIEWER MODAL ===== */

.download-pdf-btn {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-primary);
    font-size: 12px;
    letter-spacing: var(--letter-spacing-accent);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .download-pdf-btn:hover {
        background-color: var(--dark-purple-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(131, 87, 141, 0.3);
    }

body.dark-mode .download-pdf-btn:hover {
    background-color: var(--lighter-purple);
}

.pdf-viewer-container {
    padding: 0;
    height: 70vh;
    min-height: 500px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    touch-action: manipulation;
}

/* Responsive */
@media (max-width: 640px) {
    .modal-content {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .upload-form {
        padding: 24px 20px;
    }

    .upload-area {
        padding: 32px 20px;
    }

    .download-pdf-btn {
        padding: 8px;
        font-size: 11px;
        min-width: auto;
    }

    .download-text {
        display: none;
    }

    .pdf-viewer-container {
        height: 60vh;
        min-height: 400px;
        overflow: auto;
    }

    .pdf-viewer {
        width: 100%;
        height: 100%;
        border: none;
    }

    .modal-large {
        max-width: 95%;
        margin: 0 auto;
    }
}
