/* =========================================
   1. SETUP & VARIABEL GLOBAL
   ========================================= */
:root {
    --primary: #262262;
    --primary-light: #4e489c;
    --primary-soft: #f0f4ff;
    --secondary: #6c5ce7;
    --accent: #55efc4;
    --white: #ffffff;
    --light-bg: #f9f9fc;
    --border-color: #eef1f6;
    --text-dark: #2d3436;
    --text-main: #636e72;
    --text-gray: #b2bec3;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(38, 34, 98, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --radius-md: 16px;
    --radius-lg: 24px;
}

body.dashboard-body {
    background-color: var(--light-bg);
    padding-top: 100px;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    color: var(--text-dark);
}

/* =========================================
   2. HEADER DASHBOARD (PROFESIONAL LAYOUT)
   ========================================= */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    height: 85px;
    background: var(--glass-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Bagian Kiri (Brand & Switch) */
.dash-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.brand-text {
    font-weight: 800;
    color: var(--primary);
    font-size: 20px;
    letter-spacing: 0.5px;
}

.brand-text-light {
    font-weight: 500;
    color: #bbb;
    font-size: 16px;
    transition: 0.3s;
}

/* Switch Toggle Custom */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    margin: 0 5px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Bagian Tengah (Menu Navigasi) */
.dash-nav {
    flex: 2;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.dash-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 18px;
    border-radius: 12px;
}

.dash-link i {
    font-size: 22px;
    margin-bottom: 5px;
    color: #ccc;
    transition: 0.3s;
}

/* Hover & Active State */
.dash-link:hover {
    color: var(--primary);
    background-color: #f8f9ff;
}

.dash-link:hover i {
    color: var(--primary);
    transform: translateY(-2px);
}

.dash-link.active {
    color: var(--primary);
    background-color: #f0f4ff;
    box-shadow: inset 0 0 0 1px rgba(38, 34, 98, 0.1);
}

.dash-link.active i {
    color: var(--primary);
}

/* Bagian Kanan (Profil & Logout) */
.dash-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    min-width: 200px;
}

.user-profile-circle img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
    object-fit: cover;
    transition: 0.3s;
    cursor: pointer;
}

.user-profile-circle img:hover {
    border-color: var(--primary);
}

.btn-logout-dash {
    width: 40px;
    height: 40px;
    background: #fff5f5;
    border: 1px solid #ffe0e0;
    color: #d32f2f;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn-logout-dash:hover {
    background: #d32f2f;
    color: white;
    transform: scale(1.05);
}


/* =========================================
   3. LAYOUT KONTEN UTAMA
   ========================================= */
.dashboard-content {
    padding: 60px 5%;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 80vh;
}

/* Modifier untuk halaman Folder & Schedule (Lebih Lebar) */
.dashboard-content.full-width-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 50px 60px;
}

.text-center {
    text-align: center;
}


/* =========================================
   4. HALAMAN HOME (HERO & TOOLS)
   ========================================= */
.dash-hero {
    margin-bottom: 80px;
    padding: 40px 0;
}

.dash-hero h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 50px;
    color: var(--primary);
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grid Tools */
.dash-tools-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.dash-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 110px;
    gap: 18px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.dash-tool-card:hover {
    transform: translateY(-10px) scale(1.05);
    color: var(--primary);
}

.dash-tool-card:hover .icon-sq {
    box-shadow: 0 20px 40px rgba(38, 34, 98, 0.2);
    transform: rotate(5deg);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.icon-sq {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 10px 25px rgba(38, 34, 98, 0.12);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.icon-sq::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: 0.4s;
}

.dash-tool-card:hover .icon-sq::after {
    opacity: 1;
}


/* =========================================
   5. COMPONENT PROJEK (GRID & CARD)
   ========================================= */
.dash-projects {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #f5f5f5;
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-title::before {
    content: '';
    width: 6px;
    height: 24px;
    background: var(--primary);
    border-radius: 3px;
    display: block;
}

/* Grid System - Maksimal 4 Kolom per Baris */
.project-grid {
    display: grid;
    /* Secara default menggunakan repeat auto-fill untuk mobilitas */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    width: 100%;
    transition: all 0.4s ease;
}

/* Cek pada layar Desktop (Lega) -> Paksa Maksimal 4 Kolom */
@media (min-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Cek pada layar Tablet -> 2 atau 3 Kolom */
@media (max-width: 1199px) and (min-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Cek pada layar Mobile -> 1 Kolom Saja */
@media (max-width: 767px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Card Style */
.project-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: rgba(38, 34, 98, 0.1);
}

.project-cover {
    height: 160px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cover-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cover-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cover-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.cover-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.cline {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.cline.w-80 {
    width: 80%;
}

.cline.w-60 {
    width: 60%;
}

.cline.w-40 {
    width: 40%;
}

.project-details {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--border-color);
}

/* Indikator Load Project saat Hover */
.project-card::after {
    content: '\f04b';
    /* FontAwesome Play Icon for "Load" sensation */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.project-card:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Overlay Blur saat Hover */
.project-card:hover .project-cover {
    filter: blur(2px) brightness(0.8);
}

.project-details h4 {
    margin: 0 0 15px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.details-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-bottom .date {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.badge.private {
    background: #fdf5e6;
    color: #d4a017;
}

.badge.public {
    background: #e6f7ef;
    color: #27ae60;
}

/* Empty States */
.empty-project {
    /* Besar Vertikal (Home) */
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px;
    color: #999;
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    background: #fafafa;
}

.empty-project i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #d0d0d0;
}

.empty-state-box {
    /* Memanjang Horizontal (Folder) */
    grid-column: 1 / -1;
    width: 100%;
    background-color: transparent;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #999;
    font-size: 15px;
    font-weight: 500;
}

.empty-state-box i {
    font-size: 24px;
    color: #ccc;
}


/* =========================================
   6. HALAMAN FOLDER
   ========================================= */
.folder-header {
    margin-bottom: 60px;
}

.folder-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
}

.folder-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.folder-search-wrapper input {
    width: 100%;
    padding: 14px 25px 14px 50px;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
    color: #555;
}

.folder-search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 5px 25px rgba(38, 34, 98, 0.08);
}

.folder-search-wrapper i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
}

.folder-section {
    margin-bottom: 60px;
    width: 100%;
}

.project-title-folder {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary);
    border-left: 6px solid var(--primary);
    padding-left: 15px;
    line-height: 1;
}


/* =========================================
   7. HALAMAN SCHEDULE (KALENDER PROFESIONAL)
   ========================================= */
.schedule-wrapper {
    max-width: 1300px;
    margin: 0 auto;
}

/* Header Page Schedule */
.schedule-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.schedule-page-header .text-group h1 {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 5px 0;
    line-height: 1.1;
}

.schedule-page-header .text-group p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Navigasi Bulan */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9f9fc;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.btn-icon-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-icon-nav:hover {
    color: var(--primary);
    transform: scale(1.05);
}

.btn-text-nav {
    padding: 0 16px;
    height: 32px;
    border: none;
    background: white;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: 0.2s;
}

.btn-text-nav:hover {
    color: var(--primary);
}

.btn-add-note {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(38, 34, 98, 0.15);
    transition: all 0.3s ease;
}

.btn-add-note:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Calendar Card (Box) */
.calendar-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef0f2;
    overflow: hidden;
    margin-bottom: 50px;
}

/* Header Grid Hari */
.calendar-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
    border-bottom: 1px solid #eee;
}

.weekday {
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Body Grid Tanggal */
.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f4f4f4;
    /* Warna gap/garis */
    gap: 1px;
}

.day {
    background: white;
    min-height: 150px;
    /* Tinggi kotak yang lega */
    padding: 15px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: 0.2s;
}

.day:hover {
    background: #fafafa;
}

.day-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day.today .day-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(38, 34, 98, 0.25);
}

.day.other-month {
    background: #fdfdfd;
    color: #ddd;
    pointer-events: none;
}

/* Event Chip (Catatan di Kalender) */
.event-chip {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 2px;
}

.event-chip:hover {
    opacity: 0.9;
    transform: translateX(2px);
}

/* Upcoming Notes List (Bawah Kalender) */
.upcoming-section {
    margin-top: 50px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.upcoming-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upcoming-section h3::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--primary);
    border-radius: 4px;
}

/* Filter Sort */
.filter-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 13px;
    color: #888;
}

.sort-select {
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
    color: #333;
    outline: none;
    cursor: pointer;
}

/* Notes Grid List */
.notes-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.note-item {
    background: white;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #ccc;
    /* Warna via JS */
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.note-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-5px);
}

.note-item h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.note-item span {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.note-item span i {
    color: var(--primary);
    opacity: 0.7;
}


/* =========================================
   8. MODAL & FORM
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-box {
    background: white;
    width: 500px;
    max-width: 90%;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.close-note-modal {
    font-size: 20px;
    cursor: pointer;
    color: #bbb;
    transition: 0.2s;
}

.close-note-modal:hover {
    color: #d32f2f;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    display: block;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
    background: #fcfcfc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(38, 34, 98, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.right-btns {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-save {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.btn-save:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-cancel {
    background: #f5f5f5;
    color: #555;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-delete {
    background: transparent;
    color: #d32f2f;
    border: 1px solid #ffcccc;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.btn-delete:hover {
    background: #ffebee;
}

/* =========================================
   9. LAIN-LAIN
   ========================================= */
.lang-selector {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.lang-selector select {
    padding: 12px 25px;
    border-radius: 50px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    outline: none;
    font-size: 14px;
}

/* Responsif Mobile */
@media (max-width: 900px) {
    .dashboard-content.full-width-content {
        padding: 40px 20px;
    }

    .dashboard-header {
        padding: 0 20px;
        height: 70px;
    }

    .dash-nav {
        display: none;
    }

    .project-grid,
    .notes-grid-list {
        grid-template-columns: 1fr;
    }

    .dash-tools-grid {
        gap: 25px;
    }

    .schedule-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .action-group {
        width: 100%;
        justify-content: space-between;
    }

    .calendar-head .weekday {
        font-size: 10px;
        padding: 10px 2px;
    }

    .day {
        min-height: 80px;
        padding: 5px;
    }
}

/* ... (STYLE SEBELUMNYA TETAP ADA, TAMBAHKAN DI BAWAH INI) ... */

/* =========================================
   STYLE TAMBAHAN: FOLDER MANAGEMENT
   ========================================= */

/* Header Controls */
.folder-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.folder-search-wrapper {
    flex: 1;
    position: relative;
}

.btn-select-mode {
    background: white;
    border: 1px solid #ddd;
    color: var(--primary);
    padding: 0 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-select-mode:hover,
.btn-select-mode.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.item-count {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    background: #f0f4ff;
    padding: 6px 16px;
    border-radius: 20px;
}

/* PROJECT CARD UPDATES */
.project-card {
    position: relative;
    /* Penting untuk positioning menu */
    transition: 0.2s;
}

/* 1. Checkbox (Multi Select) */
.card-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0;
    transition: 0.2s;
    transform: scale(0.8);
    accent-color: var(--primary);
}

.project-card:hover .card-checkbox,
.project-card.selecting .card-checkbox,
.project-card.selected .card-checkbox {
    opacity: 1;
    transform: scale(1);
}

/* State terpilih */
.project-card.selected {
    border: 2px solid var(--primary);
    background: #f0f4ff;
    transform: translateY(-5px);
}

/* 2. Kebab Menu (Single Action) */
.card-menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: 0.2s;
}

.project-card:hover .card-menu-btn,
.card-menu-btn.active {
    opacity: 1;
}

.card-menu-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    color: white;
}

/* Dropdown Menu di Kartu */
.card-dropdown {
    position: absolute;
    top: 45px;
    right: 10px;
    width: 140px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #eee;
    z-index: 30;
    display: none;
    overflow: hidden;
    animation: fadeIn 0.2s;
}

.card-dropdown.show {
    display: block;
}

.menu-opt {
    padding: 10px 15px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.1s;
}

.menu-opt:hover {
    background: #f5f5f5;
    color: var(--primary);
}

.menu-opt.delete {
    color: #d32f2f;
    border-top: 1px solid #eee;
}

.menu-opt.delete:hover {
    background: #ffebee;
}

/* FLOATING ACTION BAR */
.action-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(38, 34, 98, 0.4);
    z-index: 9000;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.action-bar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.action-info {
    font-weight: 600;
    font-size: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-action {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-action.cancel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-action.cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-action.delete {
    background: white;
    color: #d32f2f;
}

.btn-action.delete:hover {
    background: #ffebee;
}

/* SMALL MODAL (Rename) */
.modal-box.small-box {
    width: 400px;
    padding: 25px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   10. HALAMAN SUBSCRIBE
   ========================================= */
.pricing-section {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(38, 34, 98, 0.1);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    background: #fdfdff;
}

.popular-badge {
    background: var(--primary);
    color: white;
    padding: 5px 20px;
    font-size: 11px;
    font-weight: 700;
    position: absolute;
    top: 20px;
    right: -30px;
    transform: rotate(45deg);
    width: 100px;
}

.plan-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.plan-period {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.plan-desc {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
}

.features li {
    margin-bottom: 12px;
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features li i {
    color: #27ae60;
}

.btn-plan {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-top: auto;
}

.btn-plan.outline {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-plan.solid {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: white;
}

.btn-plan:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* =========================================
   NEW: PROFESSIONAL SUBSCRIBE BUTTON
   ========================================= */
.btn-subscribe-header {
    background: linear-gradient(135deg, #FFD700, #F39C12);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-subscribe-header:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #F39C12, #FFD700);
}

.btn-subscribe-header i {
    font-size: 16px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* =========================================
   NEW: TIER BADGE STYLES
   ========================================= */

/* =========================================
   NEW: TIER BADGE STYLES
   ========================================= */
.tier-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.premium,
.tier-badge.Premium {
    background: linear-gradient(135deg, gold, #f39c12);
    color: #fff;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.tier-badge.free,
.tier-badge.Basic {
    background: #e2e8f0;
    color: #64748b;
}

/* =========================================
   RESPONSIVE DESIGN (AUTOMATIC ADAPTATION)
   ========================================= */

/* Mobile Menu Elements (Hidden by default on Desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
}

.mobile-profile-section {
    display: none;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn-logout-mobile {
    width: 100%;
    padding: 12px;
    background: #fff5f5;
    border: 1px solid #ffe0e0;
    color: #d32f2f;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* --- TABLET VIEW (< 1024px) --- */
@media (max-width: 1024px) {
    .dashboard-header {
        padding: 0 4%;
    }

    .dash-nav {
        gap: 15px;
    }

    .dash-link {
        padding: 10px 15px;
        font-size: 14px;
    }

    .dash-hero h1 {
        font-size: 30px;
    }

    .dash-tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: 800px;
        margin: 0 auto;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* --- MOBILE VIEW (< 768px) --- */
@media (max-width: 768px) {
    body.dashboard-body {
        padding-top: 70px;
    }

    .dashboard-header {
        height: 70px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Header adjustments for mobile */
    .dash-right {
        display: none;
        /* Hidden on mobile, moved to menu */
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--bg-soft);
        color: var(--navy);
        transition: all 0.2s;
    }

    .mobile-menu-btn:active {
        transform: scale(0.9);
        background: var(--gray-light);
    }

    /* Navigation becomes a full-screen or slide-down menu */
    .dash-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 0 6%;
        gap: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .dash-nav.mobile-active {
        max-height: 100vh;
        padding-top: 20px;
        padding-bottom: 40px;
    }

    .dash-link {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 16px;
        margin-bottom: 5px;
        border: 1px solid transparent;
        transition: all 0.2s;
    }

    .dash-link.active {
        background: var(--primary-soft) !important;
        color: var(--primary) !important;
        border-color: rgba(37, 99, 235, 0.1);
    }

    .dash-link i {
        font-size: 18px;
        margin-bottom: 0;
        width: 24px;
        color: inherit;
    }

    .mobile-profile-section {
        display: flex;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        margin-top: 15px;
        padding-top: 25px;
        width: 100%;
    }

    .user-profile-circle {
        width: 45px;
        height: 45px;
        border: 2px solid white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .btn-logout-mobile {
        flex: 1;
        margin-left: 15px;
        background: #fff1f2;
        border: 1px solid #fee2e2;
        color: #e11d48;
        border-radius: 12px;
        font-size: 14px;
    }

    /* Content Hero Sizing */
    .dashboard-content {
        padding: 25px 5%;
    }

    .dash-hero {
        margin-bottom: 40px;
        padding: 10px 0;
    }

    .dash-hero h1 {
        font-size: 24px;
        margin-bottom: 30px;
        font-weight: 700;
        letter-spacing: -0.5px;
    }

    /* Tools Grid on Mobile */
    .dash-tools-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .dash-tool-card {
        padding: 18px 12px;
        border-radius: 18px;
        background: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    }

    .icon-sq {
        width: 54px;
        height: 54px;
        border-radius: 15px;
        font-size: 22px;
        margin-bottom: 12px;
    }

    .dash-tool-card span {
        font-size: 13px;
        font-weight: 600;
    }

    /* Projects Grid on Mobile */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .project-card {
        border-radius: 16px;
    }

    .project-cover {
        height: 140px;
    }

    .project-title {
        font-size: 18px;
        margin-bottom: 15px;
        font-weight: 700;
    }

    /* Schedule Specifics on Mobile */
    .calendar-card {
        padding: 12px;
        border-radius: 20px;
    }

    .calendar-header {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .calendar-header h3 {
        font-size: 16px;
    }

    .calendar-head .weekday {
        font-size: 10px;
        font-weight: 700;
        padding: 8px 0;
        color: var(--text-soft);
    }

    .day {
        min-height: 65px;
        padding: 5px;
        border-color: #f8fafc;
    }

    .day.today {
        background: #f0f7ff;
    }

    .day-number {
        font-size: 11px;
        width: 20px;
        height: 20px;
        margin-bottom: 5px;
    }

    .event-chip {
        font-size: 8px;
        padding: 2px 5px;
        border-radius: 4px;
        margin-bottom: 2px;
        font-weight: 600;
    }

    /* Upcoming List on Mobile */
    .upcoming-card {
        padding: 15px;
    }

    .note-item {
        padding: 15px;
        border-radius: 15px;
    }

    /* Floating Action Bar on Mobile */
    .action-bar {
        bottom: 20px;
        padding: 12px 20px;
        gap: 20px;
        width: 90%;
        max-width: 400px;
        justify-content: space-between;
        border-radius: 20px;
        font-size: 14px;
    }

    .btn-action {
        padding: 8px 14px;
        font-size: 12px;
    }

    /* Modals on Mobile */
    .modal-box.small-box {
        width: 90% !important;
        margin: 0 5%;
        padding: 20px;
    }
}

/* --- SMALL MOBILE VIEW (< 480px) --- */
@media (max-width: 480px) {
    .dash-hero h1 {
        font-size: 20px;
        padding: 0 10px;
    }

    .dash-tools-grid {
        gap: 12px;
    }

    .dash-tool-card {
        padding: 15px 10px;
    }

    .icon-sq {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .project-cover {
        height: 120px;
    }

    .action-bar {
        padding: 10px 15px;
        gap: 10px;
    }

    .action-info {
        font-size: 12px;
    }
}
/* =========================================
   MOBILE APP MODE (USER DASHBOARD)
   ========================================= */
@media (max-width: 768px) {
    body.dashboard-body {
        padding-top: 70px !important;
        padding-bottom: 90px !important;
        background: #f8fafc !important;
    }

    .dashboard-header {
        height: 65px !important;
        padding: 0 1.25rem !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        justify-content: center !important; /* Center the brand */
    }

    .dash-left {
        min-width: unset !important;
        flex: 1 !important;
        justify-content: center !important;
    }

    .dash-nav, .dash-right, .mobile-menu-btn {
        display: none !important; /* Move to bottom nav */
    }

    .brand-text {
        font-size: 1.25rem !important;
        font-weight: 900 !important;
        background: linear-gradient(135deg, #262262, #4e489c) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

    /* Bottom Navigation */
    .mobile-bottom-nav-dash {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-top: 1px solid rgba(0,0,0,0.06);
        z-index: 2000;
        padding-bottom: env(safe-area-inset-bottom);
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -5px 25px rgba(0,0,0,0.04);
    }

    .mobile-bottom-nav-dash .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        color: #94a3b8;
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 600;
        flex: 1;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .mobile-bottom-nav-dash .nav-item i {
        font-size: 1.35rem;
        transition: 0.2s;
    }

    .mobile-bottom-nav-dash .nav-item.active {
        color: #262262;
    }

    .mobile-bottom-nav-dash .nav-item.active i {
        transform: translateY(-3px);
    }

    .mobile-bottom-nav-dash .nav-item.active::after {
        content: '';
        position: absolute;
        top: -15px;
        width: 40px;
        height: 3px;
        background: #262262;
        border-radius: 0 0 5px 5px;
    }

    /* Content Refinement */
    .dashboard-content {
        padding: 2rem 1.25rem !important;
    }

    .dash-hero h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        margin-bottom: 2rem !important;
        text-align: left !important;
    }

    /* Grid Tools Mobile */
    .dash-tools-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        justify-content: start !important;
    }

    .dash-tool-card {
        width: 100% !important;
        gap: 10px !important;
    }

    .icon-sq {
        width: 65px !important;
        height: 65px !important;
        border-radius: 20px !important;
        font-size: 24px !important;
    }

    .dash-tool-card span {
        font-size: 0.7rem !important;
        white-space: nowrap;
    }

    /* Project Cards Mobile */
    .project-grid {
        gap: 1.25rem !important;
    }

    .project-card {
        border-radius: 20px !important;
        border: 1px solid #f1f5f9 !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.02) !important;
    }

    .project-cover {
        height: 140px !important;
    }

    .project-details {
        padding: 1.25rem !important;
    }

    .project-details h4 {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
    }

    /* Schedule Mobile Fix */
    .schedule-page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
    }

    .calendar-head {
        display: none !important; /* Hide Weekday names on tiny screens or condense them */
    }

    .calendar-body {
        gap: 0 !important;
        background: #eee !important;
    }

    .day {
        min-height: 80px !important;
        padding: 8px !important;
    }

    .day-number {
        font-size: 0.8rem !important;
    }

    .event-chip {
        font-size: 9px !important;
        padding: 2px 4px !important;
        margin-bottom: 2px !important;
    }
}

/* =========================================
   REFINED MOBILE UI (BASED ON REFERENCE)
   ========================================= */
@media (max-width: 768px) {
    body.dashboard-body {
        padding-top: 10px !important; /* Move header to flow */
        background: #f8fafc !important;
    }

    .dashboard-header {
        position: static !important;
        height: auto !important;
        padding: 20px !important;
        background: transparent !important;
        box-shadow: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .dash-left {
        justify-content: flex-start !important;
        margin-bottom: 20px !important;
    }

    .header-user-top {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .user-greet-box {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .user-greet-box img {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        border: 2px solid white !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    }

    .greet-text h4 {
        margin: 0 !important;
        font-size: 0.85rem !important;
        color: #94a3b8 !important;
        font-weight: 500 !important;
    }

    .greet-text h2 {
        margin: 0 !important;
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
    }

    .notif-btn {
        width: 45px !important;
        height: 45px !important;
        background: white !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
        position: relative !important;
        color: #64748b !important;
    }

    .notif-badge {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 10px !important;
        height: 10px !important;
        background: #ef4444 !important;
        border-radius: 50% !important;
        border: 2px solid white !important;
    }

    /* Modern Search Mobile */
    .mobile-search-box {
        display: flex !important;
        gap: 12px !important;
        margin-top: 10px !important;
        width: 100% !important;
    }

    .search-input-wrapper {
        position: relative !important;
        flex: 1 !important;
    }

    .search-input-wrapper i {
        position: absolute !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #94a3b8 !important;
    }

    .search-input-wrapper input {
        width: 100% !important;
        border: none !important;
        background: white !important;
        padding: 15px 15px 15px 45px !important;
        border-radius: 16px !important;
        font-size: 0.9rem !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
    }

    .filter-btn {
        width: 50px !important;
        height: 50px !important;
        background: #262262 !important;
        border-radius: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        font-size: 1.1rem !important;
    }

    /* Circular Tools Grid */
    .dash-tools-grid {
        display: flex !important;
        overflow-x: auto !important;
        gap: 20px !important;
        padding: 5px 20px 20px !important;
        margin: 0 -20px !important;
        scrollbar-width: none !important;
    }

    .dash-tool-card {
        flex: 0 0 70px !important;
        gap: 8px !important;
    }

    .icon-sq {
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important; /* Circular like reference */
        background: white !important;
        color: #262262 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
        border: 1px solid #f1f5f9 !important;
    }

    .dash-tool-card.active .icon-sq {
        background: #262262 !important;
        color: white !important;
    }

    .dash-tool-card span {
        font-size: 0.65rem !important;
        color: #64748b !important;
        font-weight: 500 !important;
    }

    /* Hero Promo Card */
    .promo-card {
        background: linear-gradient(135deg, #262262, #4e489c) !important;
        border-radius: 20px !important;
        padding: 25px !important;
        color: white !important;
        margin-bottom: 30px !important;
        position: relative !important;
        overflow: hidden !important;
        box-shadow: 0 15px 35px rgba(38, 34, 98, 0.2) !important;
    }

    .promo-card::after {
        content: '\f0c2';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        right: -10px;
        bottom: -20px;
        font-size: 120px;
        opacity: 0.1;
        transform: rotate(-15deg);
    }

    .promo-card h3 {
        font-size: 1.2rem !important;
        font-weight: 800 !important;
        margin-bottom: 8px !important;
    }

    .promo-card p {
        font-size: 0.75rem !important;
        opacity: 0.8 !important;
        margin-bottom: 20px !important;
        max-width: 70% !important;
    }

    .promo-btn {
        background: white !important;
        color: #262262 !important;
        border: none !important;
        padding: 10px 20px !important;
        border-radius: 12px !important;
        font-weight: 800 !important;
        font-size: 0.75rem !important;
    }

    /* Section Sub Header */
    .section-header-mobile {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 20px !important;
    }

    .section-header-mobile h2 {
        font-size: 1rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        margin: 0 !important;
    }

    .section-header-mobile .see-all {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #262262 !important;
        text-decoration: none !important;
    }
}

/* =========================================
   CLEAN SEPARATION: HOME VS OTHER PAGES (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    /* Home-Only Layout (Based on Reference) */
    body.dashboard-body.is-home-page {
        padding-top: 10px !important;
    }
    
    body.is-home-page .dashboard-header {
        position: static !important;
        height: auto !important;
        padding: 20px !important;
        background: transparent !important;
        box-shadow: none !important;
        flex-direction: column !important;
    }
    
    body.is-home-page .brand-text {
        text-align: center;
        width: 100%;
        margin-top: 10px;
    }

    /* Other Dashboard Pages (Folder, Schedule) Layout */
    body.dashboard-body:not(.is-home-page) {
        padding-top: 80px !important; /* Back to sticky header height */
    }
    
    body:not(.is-home-page) .dashboard-header {
        position: fixed !important;
        height: 65px !important;
        display: flex !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    
    body:not(.is-home-page) .dash-nav, 
    body:not(.is-home-page) .dash-right, 
    body:not(.is-home-page) .mobile-menu-btn,
    body:not(.is-home-page) .header-user-top {
        display: none !important;
    }
}

/* =========================================
   HEADER DROPDOWN MOBILE (TIER INFO)
   ========================================= */
@media (max-width: 768px) {
    .header-user-top {
        position: relative !important;
        margin-bottom: 25px !important; /* Fixed spacing */
    }

    .header-dropdown-mobile {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        background: white;
        border-radius: 18px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.1);
        padding: 15px 20px;
        width: 220px;
        z-index: 3000;
        border: 1px solid #f1f5f9;
        transform-origin: top left;
        animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .header-dropdown-mobile.active {
        display: block !important;
    }

    .tier-info-inline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .tier-badge-mobile {
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.65rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .tier-badge-mobile.free { background: #f1f5f9; color: #64748b; }
    .tier-badge-mobile.premium { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

    /* Hide desktop tier badge on mobile home */
    .dashboard-header .desktop-only-tier {
        display: none !important;
    }
}

@keyframes popUp {
    from { opacity: 0; transform: scale(0.9) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* =========================================
   HOME HEADER REFINEMENT: GREETING & LOGO
   ========================================= */
@media (max-width: 768px) {
    body.is-home-page .dashboard-header {
        position: static !important;
        height: auto !important;
        padding: 25px 20px !important;
        background: transparent !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        box-shadow: none !important;
    }

    body.is-home-page .header-user-top {
        margin-bottom: 0 !important;
        flex: 1 !important;
    }

    body.is-home-page .dash-left {
        display: none !important; /* Brand on right logo instead */
    }

    .header-logo-right-mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    .mobile-logo-img {
        height: 40px !important;
        width: auto !important;
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.05));
    }

    /* Dropdown alignment relative to greeting */
    .header-dropdown-mobile {
        top: 60px !important;
        left: 0 !important;
    }
}

/* =========================================
   FOLDER PAGE REFINEMENT (REF-INSPIRED)
   ========================================= */
@media (max-width: 768px) {
    body.is-folder-page {
        padding-top: 10px !important;
    }

    .dashboard-header.folder-header-active {
        position: static !important;
        height: auto !important;
        padding: 20px 15px !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .folder-header-mobile {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .back-btn-mobile {
        width: 45px;
        height: 45px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #1e293b;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        text-decoration: none;
    }

    .search-oval-mobile {
        flex: 1;
        position: relative;
        background: white;
        border-radius: 50px;
        padding: 0 15px 0 40px;
        height: 45px;
        display: flex;
        align-items: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    }

    .search-oval-mobile i {
        position: absolute;
        left: 15px;
        color: #94a3b8;
    }

    .search-oval-mobile input {
        border: none;
        background: transparent;
        width: 100%;
        font-size: 0.85rem;
        outline: none;
        color: #1e293b;
    }

    .select-text-btn-mobile {
        background: transparent;
        border: none;
        color: #262262;
        font-weight: 700;
        font-size: 0.8rem;
        padding: 0 10px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* 2-Column Grid for Folder */
    body.is-folder-page .project-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    body.is-folder-page .project-card {
        padding: 0 !important;
        background: white !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.04) !important;
    }

    body.is-folder-page .project-cover {
        height: 120px !important;
        border-radius: 18px 18px 0 0 !important;
    }

    body.is-folder-page .project-details {
        padding: 12px !important;
    }

    body.is-folder-page .project-details h4 {
        font-size: 0.8rem !important;
        margin-bottom: 5px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.is-folder-page .details-bottom {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }

    body.is-folder-page .badge {
        font-size: 8px !important;
        padding: 3px 8px !important;
    }

    /* Hide Original Folder Header on Mobile */
    body.is-folder-page .folder-header {
        display: none !important;
    }
    
    body.is-folder-page .section-head {
        margin-top: 10px !important;
    }
}

/* =========================================
   FOLDER UI TIDY-UP (MOBILE REFINEMENT)
   ========================================= */
@media (max-width: 768px) {
    body.is-folder-page {
        padding-top: 10px !important;
        background: #f8fafc !important;
    }

    .dashboard-header.folder-header-active {
        padding: 15px 15px !important;
        margin-bottom: 5px !important;
    }

    .folder-header-mobile {
        gap: 10px !important;
    }

    .back-btn-mobile {
        min-width: 42px !important;
        height: 42px !important;
        background: white !important;
        color: #1a1a2e !important;
        font-size: 0.9rem !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    }

    .search-oval-mobile {
        height: 42px !important;
        border: 1px solid #f1f5f9 !important;
        padding-left: 38px !important;
    }

    .search-oval-mobile i {
        left: 15px !important;
        font-size: 0.85rem !important;
    }

    .select-text-btn-mobile {
        padding: 0 5px !important;
        white-space: nowrap !important;
    }

    /* Section Header Refinement */
    body.is-folder-page .section-head {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin: 15px 0 20px !important;
        padding: 0 5px !important;
    }

    .project-title-folder {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        margin: 0 !important;
        border: none !important;
        padding: 0 !important;
    }

    .item-count {
        font-size: 0.75rem !important;
        color: #94a3b8 !important;
        font-weight: 600 !important;
        background: #f1f5f9 !important;
        padding: 4px 12px !important;
        border-radius: 20px !important;
    }

    /* 2-Column Grid Gap */
    body.is-folder-page .project-grid {
        gap: 12px !important;
        padding-bottom: 20px !important;
    }

    /* Project Card Proportions */
    body.is-folder-page .project-card {
        border-radius: 20px !important;
        border: none !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.03) !important;
        overflow: hidden !important;
        height: auto !important;
    }

    body.is-folder-page .project-cover {
        height: 110px !important; /* Balanced height for 2-col */
        padding: 15px !important;
        border-radius: 0 !important;
    }

    .cover-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }

    .cover-text {
        font-size: 10px !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    body.is-folder-page .project-details {
        padding: 15px !important;
    }

    body.is-folder-page .project-details h4 {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        white-space: normal !important;
    }

    body.is-folder-page .details-bottom {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .details-bottom .date {
        font-size: 10px !important;
        opacity: 0.8 !important;
    }

    body.is-folder-page .badge {
        padding: 4px 8px !important;
        border-radius: 8px !important;
        font-size: 7px !important;
        font-weight: 800 !important;
    }
}

/* =========================================
   FOLDER HEADER CLEAN-UP (NO BRAND TEXT)
   ========================================= */
@media (max-width: 768px) {
    body.is-folder-page .dash-left {
        display: none !important;
    }
    
    body.is-folder-page .dashboard-header {
        justify-content: flex-start !important; /* Start with back arrow */
    }
    
    /* Ensure no other branding elements leak in folder page */
    body.is-folder-page .brand-text, 
    body.is-folder-page .header-logo-right-mobile {
        display: none !important;
    }
}

/* =========================================
   SCHEDULE PAGE REFINEMENT (REF-INSPIRED)
   ========================================= */
@media (max-width: 768px) {
    body.is-schedule-page {
        padding-top: 10px !important;
        background: #fdfdff !important;
    }

    .dashboard-header.is-schedule-page-active { /* I'll add this class in JS if needed, but using :not(.is-home-page) is fine too */
        position: static !important;
        height: auto !important;
        padding: 20px !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Fixed Header for Schedule */
    .schedule-header-mobile {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .header-title-mobile {
        font-size: 1.2rem !important;
        font-weight: 800 !important;
        color: #262262 !important;
        margin: 0 !important;
    }

    .header-blank-side { width: 45px; } /* For centering title */

    .btn-add-schedule-mobile {
        width: 45px;
        height: 45px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #1e293b;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        border: none;
    }

    /* Minimal Calendar Minimalist (White background, soft shadows) */
    .schedule-wrapper .calendar-card {
        border: none !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.02) !important;
        border-radius: 24px !important;
        margin-top: 20px !important;
    }

    .calendar-head {
        display: grid !important;
        background: #fff !important;
        border: none !important;
    }

    .calendar-body {
        gap: 0 !important;
        background: transparent !important;
    }

    .day {
        min-height: 55px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }

    .day-number {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        z-index: 2 !important;
    }

    .day.today .day-number {
        color: white !important;
    }

    .day.today::after {
        content: '';
        position: absolute;
        width: 35px;
        height: 35px;
        background: #262262;
        border-radius: 50%;
        z-index: 1;
        box-shadow: 0 4px 10px rgba(38, 34, 98, 0.3);
    }

    .event-chip {
        width: 6px !important;
        height: 6px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        text-indent: -9999px !important;
        margin-top: 4px !important;
        padding: 0 !important;
        min-width: unset !important;
    }

    /* Agenda Detail Cards (Mobile) */
    .agenda-card-mobile {
        background: white !important;
        border-radius: 24px !important;
        padding: 20px !important;
        margin-bottom: 20px !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.03) !important;
    }

    .agenda-title-mobile {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        margin-bottom: 20px !important;
    }

    .agenda-info-list-mobile {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .info-item {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .info-icon {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        border-radius: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
    }

    .info-content .label {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: #1e293b !important;
        margin: 0 !important;
    }

    .info-content .sub {
        font-size: 0.75rem !important;
        color: #64748b !important;
        margin: 2px 0 0 0 !important;
    }

    /* Hide Original Schedule Page Header on Mobile */
    body.is-schedule-page .schedule-page-header {
        display: none !important;
    }
}

/* =========================================
   SCHEDULE HEADER CLEAN-UP (NO BRAND TEXT)
   ========================================= */
@media (max-width: 768px) {
    body.is-schedule-page .dash-left,
    body.is-schedule-page .brand-text {
        display: none !important;
    }
    
    body.is-schedule-page .dashboard-header {
        justify-content: center !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}

/* =========================================
   MOBILE MONTH NAVIGATOR (SCHEDULE)
   ========================================= */
@media (max-width: 768px) {
    .mobile-month-nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin: 20px 0 10px !important;
        padding: 0 10px !important;
    }

    .mobile-month-nav h2 {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: #262262 !important;
        margin: 0 !important;
        text-transform: capitalize;
    }

    .m-nav-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: white;
        color: #64748b;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        font-size: 0.8rem;
    }

    .m-nav-btn:active {
        background: #f1f5f9;
        transform: scale(0.95);
    }
}

/* =========================================
   SCHEDULE REFINEMENT: MODAL & SPACING
   ========================================= */
@media (max-width: 768px) {
    /* 1. Spacing Fixes */
    .mobile-month-nav {
        margin: 5px 0 0px !important; /* Closer to heading */
    }

    .calendar-card {
        margin-top: 10px !important;
    }

    /* 2. One-line Agenda Header */
    .upcoming-section .section-header-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-right: 5px !important;
    }
    
    .upcoming-section h3 {
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        margin-bottom: 0 !important;
    }
    
    .filter-sort {
        margin-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
    }

    .sort-label { display: none !important; } /* Hide label to save space */
    .sort-select {
        border-radius: 12px !important;
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }

    /* 3. Mobile Modal (Add Schedule) Refinement */
    .modal-overlay {
        background: rgba(0,0,0,0.5) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
    }

    #noteModal .modal-box {
        width: 90% !important;
        max-width: 400px !important;
        margin: auto !important;
        border-radius: 30px !important;
        padding: 30px 20px !important;
        position: relative !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        animation: slideInDownM 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .modal-header h2 {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        margin-bottom: 5px !important;
        color: #1e293b !important;
    }

    #noteModal .form-group {
        margin-bottom: 20px !important;
    }

    #noteModal label {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        color: #64748b !important;
        margin-bottom: 8px !important;
    }

    #noteModal input, #noteModal select, #noteModal textarea {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        padding: 12px 18px !important;
        font-size: 0.9rem !important;
        box-shadow: none !important;
    }

    #noteId + .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .modal-footer {
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 20px !important;
    }

    .modal-footer button {
        width: 100% !important;
        height: 50px !important;
        border-radius: 16px !important;
        font-weight: 700 !important;
        margin: 0 !important;
    }

    .btn-save {
        background: #262262 !important;
        box-shadow: 0 4px 15px rgba(38, 34, 98, 0.2) !important;
    }
}

@keyframes slideInDownM {
    from { opacity: 0; transform: translateY(-30%) scale(0.95); }
    to { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* =========================================
   NOTE MODAL (POP-UP) MOBILE FIXES
   ========================================= */
@media (max-width: 768px) {
    /* Absolute container sizing */
    #noteModal .modal-box {
        width: 92% !important;
        max-width: 92% !important;
        min-width: unset !important;
        padding: 25px 20px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Form container forces all children inside */
    #noteForm {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Force all inputs to stay within the box */
    #noteModal .form-group {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #noteModal .form-row {
        width: 100% !important;
        display: block !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    #noteModal input, 
    #noteModal select, 
    #noteModal textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 14px !important; /* Standard readable size */
        padding: 12px 15px !important;
        margin: 0 !important;
    }

    /* Dropdown specific text visible fixed */
    #noteModal select {
        appearance: none !important;
        -webkit-appearance: none !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 15px center !important;
        background-size: 15px !important;
        padding-right: 40px !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Ensure buttons stay inside */
    .modal-footer {
        width: 100% !important;
        padding: 0 !important;
        margin-top: 20px !important;
    }

    .modal-footer button {
        margin: 0 0 10px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================
   FULL-PAGE ADD SCHEDULE (MOBILE ONLY)
   ========================================= */
@media (max-width: 768px) {
    /* Hide Main Content when adding */
    body.is-adding-schedule .schedule-wrapper,
    body.is-adding-schedule #mobileBottomNav,
    body.is-adding-schedule .lang-selector {
        display: none !important;
    }

    /* Transform Modal into Full Page */
    body.is-adding-schedule #noteModal {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: white !important; /* Page background */
        z-index: 2000 !important;
        overflow-y: auto !important;
        padding-top: 100px !important; /* Space for fixed header */
    }

    body.is-adding-schedule #noteModal .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        top: 0 !important;
        transform: none !important;
        padding: 0 25px 50px !important;
        animation: none !important;
    }

    /* Hide redundant modal header in page mode */
    body.is-adding-schedule #noteModal .modal-header {
        display: none !important;
    }

    /* Fixed Header in Adding Mode */
    body.is-adding-schedule .dashboard-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 3000 !important;
        background: white !important;
        border-bottom: 1px solid #f1f5f9 !important;
        padding: 15px 20px !important;
    }

    .schedule-header-mobile.adding-mode {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

/* =========================================
   HARD OVERRIDE: FULL PAGE SCHEDULE MODE
   ========================================= */
@media (max-width: 768px) {
    /* Hide EVERY potential distraction when adding */
    body.is-adding-schedule #header-container,
    body.is-adding-schedule .schedule-wrapper,
    body.is-adding-schedule #mobileBottomNav,
    body.is-adding-schedule .lang-selector,
    body.is-adding-schedule footer {
        display: none !important;
    }

    /* Force the Modal into a 100% Solid Screen */
    body.is-adding-schedule #noteModal {
        display: block !important; /* Block for scrolling */
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 9999 !important;
        padding-top: 0 !important;
        margin: 0 !important;
    }

    body.is-adding-schedule #noteModal .modal-box {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        background: #fff !important;
    }

    /* Custom Header inside the Form for Page Feel */
    .mobile-add-header {
        display: none;
    }

    body.is-adding-schedule .mobile-add-header {
        display: flex !important;
        align-items: center !important;
        padding: 20px !important;
        background: white !important;
        border-bottom: 1px solid #f1f5f9 !important;
        text-align: center !important;
        justify-content: space-between !important;
    }

    .m-header-title {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        margin: 0 !important;
    }

    /* Content Area Scrollable */
    body.is-adding-schedule .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 25px !important;
    }

    body.is-adding-schedule .modal-header,
    body.is-adding-schedule .close-note-modal {
        display: none !important;
    }

    /* Standardized Buttons for Page */
    body.is-adding-schedule .modal-footer {
        padding: 20px !important;
        background: white !important;
        border-top: 1px solid #f1f5f9 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
}

/* =========================================
   SCROLLABLE FULL-PAGE ADD SCHEDULE
   ========================================= */
@media (max-width: 768px) {
    /* Absolute control over the mobile page container */
    body.is-adding-schedule #noteModal {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        inset: 0 !important;
        height: 100dvh !important; /* Dynamic Viewport Height for mobile */
        width: 100% !important;
        background: #ffffff !important;
        overflow: hidden !important; /* Body handles scroll */
        padding: 0 !important;
    }

    body.is-adding-schedule #noteModal .modal-box {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Fixed Top Header within the Page */
    #mobileAddPageHeader {
        background: #ffffff !important;
        z-index: 10 !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    /* THE SCROLLABLE AREA */
    body.is-adding-schedule .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth mobile scroll */
        padding: 25px 30px 100px !important; /* Extra bottom padding for footer space */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fixed Bottom Footer (Save/Cancel Buttons) */
    body.is-adding-schedule .modal-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        border-top: 1px solid #f1f5f9 !important;
        padding: 15px 30px !important;
        box-sizing: border-box !important;
        z-index: 10 !important;
        flex-direction: row !important; /* Side-by-side or stacked, side-by-side looks better as page icons */
        gap: 10px !important;
    }

    body.is-adding-schedule .modal-footer button {
        flex: 1 !important;
        margin: 0 !important;
        height: 50px !important;
        font-size: 0.9rem !important;
    }
}

/* =========================================
   ULTRA-COMPACT ADD SCHEDULE (ONE-SCREEN)
   ========================================= */
@media (max-width: 768px) {
    /* No scrolling, force all to fit if possible */
    body.is-adding-schedule .modal-body {
        padding: 15px 20px 20px !important;
        overflow-y: hidden !important; /* Disable scroll as requested */
    }

    #noteModal .form-group {
        margin-bottom: 10px !important; /* Extremely tight spacing */
    }

    #noteModal label {
        font-size: 0.7rem !important;
        margin-bottom: 4px !important;
    }

    #noteModal input, 
    #noteModal select, 
    #noteModal textarea {
        height: 38px !important; /* Slimmer inputs */
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        border-radius: 12px !important;
    }

    /* Restore side-by-side for Date inputs to save vertical space */
    #noteId + .form-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        width: 100% !important;
    }

    #noteId + .form-row .form-group {
        flex: 1 !important;
    }

    /* Compact Textarea */
    #noteDesc {
        height: 80px !important; /* Lower height */
        min-height: 80px !important;
    }

    /* Smaller Modal Footer to fit screen */
    body.is-adding-schedule .modal-footer {
        padding: 12px 20px !important;
        height: auto !important;
    }

    body.is-adding-schedule .modal-footer button {
        height: 44px !important;
        font-size: 0.85rem !important;
    }
}

/* =========================================
   SIDE-BY-SIDE MOBILE BUTTONS (SCHEDULE)
   ========================================= */
@media (max-width: 768px) {
    body.is-adding-schedule .modal-footer {
        flex-direction: row !important; /* Force side-by-side */
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 15px 25px !important;
    }

    body.is-adding-schedule .modal-footer button {
        flex: 1 !important; /* Equal width */
        width: 48% !important; /* Fallback */
        margin: 0 !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important; /* Adjust font size to fit */
        padding: 0 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

/* =========================================
   INLINE TIER BADGE (HOME GREETING)
   ========================================= */
@media (max-width: 768px) {
    .tier-inline-mobile {
        font-size: 0.65rem !important; /* Smaller than Hello but same line height */
        font-weight: 800 !important;
        padding: 2px 8px !important;
        border-radius: 6px !important;
        margin-left: 5px !important;
        vertical-align: middle !important;
        text-transform: uppercase !important;
        display: inline-block !important;
    }

    .tier-inline-mobile.free {
        background: #f1f5f9 !important;
        color: #64748b !important;
    }

    .tier-inline-mobile.premium {
        background: #fffbeb !important;
        color: #d97706 !important;
        border: 1px solid #fde68a !important;
    }

    /* Remove old dropdown styles if still there */
    .header-dropdown-mobile {
        display: none !important;
    }
}

/* =========================================
   DESKTOP STABILITY (ENSURE MOBILE HIDDEN)
   ========================================= */
@media (min-width: 769px) {
    .mobile-bottom-nav-dash,
    .folder-header-mobile,
    .schedule-header-mobile,
    .mobile-month-nav,
    .tier-inline-mobile,
    .mobile-add-header,
    .header-logo-right-mobile {
        display: none !important;
    }

    body.dashboard-body {
        padding-top: 100px !important;
        padding-bottom: 0 !important;
    }

    .dashboard-header {
        position: fixed !important;
        height: 85px !important;
        display: flex !important;
        flex-direction: row !important;
        background: var(--glass-bg) !important;
        padding: 0 6% !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

/* ============================================
   PROJECT THUMBNAIL PREVIEW + DIMENSION BADGE
   ============================================ */

/* When the cover holds a real thumbnail, unset the flex column layout */
.project-cover:has(img) {
    padding: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

/* Thumbnail image sizing */
.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
    transition: transform 0.35s ease;
}

.project-card:hover .project-cover img {
    transform: scale(1.04);
    filter: none; /* override the blur that applies to the cover div */
}

/* Keep 3-dot menu button above the thumbnail */
.project-cover .card-menu-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    background: rgba(255,255,255,0.85);
    border-radius: 8px;
    color: #374151;
    backdrop-filter: blur(4px);
}

/* Don't blur the thumbnail on hover — override the global .project-cover filter */
.project-card:hover .project-cover:has(img) {
    filter: none;
}

/* Canvas dimension pill in the card footer */
.dim-badge {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Saving spinner feedback on the save button */
#save-project-btn[disabled] span {
    opacity: 0.6;
}
