/* ============================================
   Supsup - Main Stylesheet v2.0
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Vazirmatn, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    direction: rtl;
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: #00897b;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

/* ============ Layout ============ */
.app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: row-reverse; /* ← این خط مهم */
}

/* ============ Sidebar ============ */
.sidebar {
    width: 240px;
    background: #1e293b;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    font-size: 22px;
    font-weight: bold;
    color: #4db6ac;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    padding: 12px 15px;
    border-radius: 10px;
    transition: .2s;
    font-size: 14px;
    font-weight: 500;
}

.sidebar nav a:hover {
    background: #334155;
    color: #fff;
}

.sidebar nav a.active {
    background: #00897b;
    color: #fff;
}

.sidebar .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* User Info */
.sidebar .user-info {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00897b, #00695c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 6px;
}

.sidebar .user-details span {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: block;
}

.sidebar .user-details small {
    color: #94a3b8;
    font-size: 12px;
    display: block;
}

.sidebar .logout-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(239, 68, 68, .1);
    color: #ef4444;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 5px;
}

.sidebar .logout-btn:hover {
    background: rgba(239, 68, 68, .2);
}

/* ============ Main Content ============ */
.main-content {
    flex: 1;
    padding: 30px;
    min-width: 0;
    overflow-x: hidden;
}

/* ============ Top Bar ============ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar h1 {
    font-size: 24px;
    color: #1e293b;
    font-weight: 700;
}

.date-info {
    background: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    text-align: left;
}

.date-info .date-day {
    color: #00897b;
    font-weight: 600;
    font-size: 14px;
    display: block;
}

.date-info .date-full {
    color: #64748b;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

/* ============ Alerts ============ */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error { background: #fee2e2; color: #991b1b; border-right: 4px solid #ef4444; }
.alert-info { background: #dbeafe; color: #1e40af; border-right: 4px solid #3b82f6; }
.alert-success { background: #d1fae5; color: #065f46; border-right: 4px solid #10b981; }
.alert-warning { background: #fef3c7; color: #92400e; border-right: 4px solid #f59e0b; }

/* ============ Stats Cards ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    text-align: center;
}

.stat-card.primary {
    background: linear-gradient(135deg, #00897b, #00695c);
    color: #fff;
}

.stat-card.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    opacity: .85;
}

/* ============ Content Section ============ */
.content-section {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: 20px;
}

.content-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

/* ============ Tables ============ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* ============ Badge ============ */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    font-weight: 500;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-completed { background: #dbeafe; color: #1e40af; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-no_show { background: #f3e8ff; color: #6b21a8; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-partial { background: #fef3c7; color: #92400e; }

/* ============ Empty State ============ */
.empty-state {
    text-align: center;
    color: #94a3b8;
    padding: 40px;
}

/* ============ Forms ============ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #475569;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: .2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00897b;
    box-shadow: 0 0 0 4px rgba(0,137,123,.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ============ Buttons ============ */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: #00897b;
    color: #fff;
}

.btn-primary:hover {
    background: #00695c;
}

.btn-white {
    background: #fff;
    color: #00897b;
    font-weight: bold;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-icon {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-icon.btn-danger {
    background: #ef4444;
    color: #fff;
}

.hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

/* ============ Auth Pages ============ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00897b, #004d40);
    padding: 20px;
}

.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 80px rgba(0,0,0,.3);
}

.auth-box h1 {
    text-align: center;
    color: #00897b;
    margin-bottom: 10px;
    font-size: 26px;
}

.auth-box .subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 25px;
}

/* ============ Date Nav ============ */
.date-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.date-nav a {
    padding: 8px 15px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
}

.date-nav a:hover {
    background: #00897b;
    color: #fff;
}

.date-nav .current-date {
    font-weight: bold;
    color: #00897b;
    padding: 0 10px;
}

/* ============ Actions Bar ============ */
.actions-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============ Reminders Page ============ */
.reminder-header {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.reminder-stats {
    display: flex;
    gap: 12px;
}

.reminder-stat {
    text-align: center;
    padding: 10px 18px;
    background: #f8fafc;
    border-radius: 10px;
    min-width: 80px;
}

.reminder-stat b {
    display: block;
    font-size: 22px;
    margin-bottom: 3px;
}

.reminder-stat span {
    font-size: 12px;
    color: #64748b;
}

.reminder-stat.sent b { color: #065f46; }
.reminder-stat.pending b { color: #d97706; }

.bulk-bar {
    background: linear-gradient(135deg, #00897b, #00695c);
    color: #fff;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ============ Modals ============ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 25px 80px rgba(0,0,0,.3);
}

.modal h2 {
    margin-bottom: 20px;
    color: #00897b;
    font-size: 20px;
}

/* ============ Search Bar ============ */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: #00897b;
    box-shadow: 0 0 0 4px rgba(0,137,123,.1);
}

/* ============ Fix: Persian Datepicker ============ */
.pdatepicker,
.datepicker-plot-area {
    z-index: 99999 !important;
    position: absolute !important;
    direction: rtl !important;
    font-family: Tahoma, Vazirmatn, sans-serif !important;
}

.datepicker-plot-area {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,.15) !important;
    padding: 10px !important;
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .main-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 15px;
    }

    .sidebar .logo {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 10px;
    }

    .sidebar nav a {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .sidebar .user-info {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding-top: 15px;
        margin-top: 15px;
    }

    .sidebar .user-avatar {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .sidebar .user-details {
        flex: 1;
        min-width: 0;
    }

    .sidebar .logout-btn {
        margin-top: 0;
        padding: 6px 10px;
        flex-shrink: 0;
    }

    .sidebar .logout-btn span:first-child {
        display: none;
    }

    .main-content {
        padding: 15px;
    }

    .top-bar h1 {
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 18px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .search-bar {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
/* ═══════════════════════════════════════════
   Layout - Sidebar + Topbar
   ═══════════════════════════════════════════ */

/* ═══════════════ App Container ═══════════════ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════ Overlay ═══════════════ */
.app-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    transition: opacity .3s;
}
.app-overlay.is-active {
    display: block;
    opacity: 1;
}

/* ═══════════════ Sidebar ═══════════════ */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.15);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.3);
}

.sidebar__head {
    padding: 22px 20px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.3px;
}
.sidebar__logo-icon {
    font-size: 26px;
    filter: drop-shadow(0 4px 10px rgba(0,137,123,.4));
}
.sidebar__logo-text {
    background: linear-gradient(135deg, #4db6ac, #26a69a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar__close {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transform: rotate(180deg);
}

/* ═══ Nav ═══ */
.sidebar__nav {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
}

.sidebar__group {
    margin-bottom: 20px;
}
.sidebar__group:last-child {
    margin-bottom: 0;
}
.sidebar__group-title {
    font-size: 10.5px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 0 12px 8px;
    margin-bottom: 4px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    margin-bottom: 2px;
    position: relative;
}

.sidebar__link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: #4db6ac;
    border-radius: 0 3px 3px 0;
    transition: transform .25s;
}

.sidebar__link:hover {
    background: rgba(255,255,255,.05);
    color: #fff;
    transform: translateX(-4px);
}

.sidebar__link.is-active {
    background: linear-gradient(135deg, #00897b, #00695c);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,137,123,.35);
}
.sidebar__link.is-active::before {
    transform: translateY(-50%) scaleY(1);
    background: #fff;
}
.sidebar__link.is-active:hover {
    transform: none;
}

.sidebar__icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: .85;
}
.sidebar__link.is-active .sidebar__icon {
    opacity: 1;
}

/* ═══ Sidebar Foot ═══ */
.sidebar__foot {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.15);
}
.sidebar__user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar__avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #00897b, #4db6ac);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,137,123,.4);
}
.sidebar__user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sidebar__user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar__user-role {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.sidebar__logout {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(239, 68, 68, .15);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .2s;
    flex-shrink: 0;
}
.sidebar__logout:hover {
    background: rgba(239, 68, 68, .3);
    color: #fca5a5;
    transform: scale(1.05);
}

/* ═══════════════ Main ═══════════════ */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ═══ Topbar ═══ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226,232,240,.6);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 15px;
    flex-wrap: wrap;
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.topbar__menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.topbar__menu-btn:hover {
    background: #e2e8f0;
    color: #00897b;
}

.topbar__title {
    min-width: 0;
}
.topbar__title h1 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin: 0 0 4px;
    letter-spacing: -.3px;
}

/* ═══ Breadcrumb ═══ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #94a3b8;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb a:hover {
    color: #00897b;
}
.breadcrumb__sep {
    color: #cbd5e1;
}
.breadcrumb__current {
    color: #00897b;
    font-weight: 600;
}

/* ═══ Topbar Right ═══ */
.topbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar__search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 11px;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all .2s;
}
.topbar__search:hover {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}
.topbar__search-text {
    flex: 1;
    text-align: right;
}
.topbar__search-kbd {
    background: #fff;
    color: #64748b;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-family: monospace;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.topbar__date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 14px;
    background: #f8fafc;
    border-radius: 11px;
    gap: 2px;
}
.topbar__date-day {
    font-size: 12px;
    color: #00897b;
    font-weight: 700;
}
.topbar__date-full {
    font-size: 11px;
    color: #64748b;
}

.topbar__user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00897b, #00695c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,137,123,.3);
    cursor: pointer;
    transition: transform .2s;
}
.topbar__user-avatar:hover {
    transform: scale(1.05);
}

/* ═══════════════ Page Content ═══════════════ */
.page-content {
    flex: 1;
    padding: 25px 30px 40px;
    animation: pageFadeIn .4s ease;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════ Alert ═══════════════ */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin: 20px 30px 0;
    font-size: 14px;
    font-weight: 500;
    animation: alertSlide .3s ease;
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert__icon { font-size: 18px; flex-shrink: 0; }
.alert__text { flex: 1; }
.alert__close {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0,0,0,.08);
    color: inherit;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .6;
    transition: opacity .2s;
}
.alert__close:hover { opacity: 1; }

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-right: 4px solid #10b981;
}
.alert-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-right: 4px solid #ef4444;
}
.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-right: 4px solid #f59e0b;
}
.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-right: 4px solid #3b82f6;
}

/* ═══════════════ Command Palette ═══════════════ */
.cmdk-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
    animation: cmdkFade .15s ease;
}
.cmdk-overlay.is-active { display: flex; }
@keyframes cmdkFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes cmdkSlide {
    from { opacity: 0; transform: translateY(-20px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.cmdk {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
    overflow: hidden;
    animation: cmdkSlide .2s cubic-bezier(.4,0,.2,1);
}
.cmdk__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
}
.cmdk__icon {
    color: #94a3b8;
    display: flex;
    flex-shrink: 0;
}
.cmdk__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: #1e293b;
    background: transparent;
}
.cmdk__input::placeholder { color: #94a3b8; }
.cmdk__kbd {
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}
.cmdk__body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}
.cmdk__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 11px;
    text-decoration: none;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
    margin-bottom: 2px;
}
.cmdk__item:hover,
.cmdk__item.is-selected {
    background: #f0fdfa;
    color: #00897b;
}
.cmdk__item.is-selected {
    background: linear-gradient(135deg, #00897b, #00695c);
    color: #fff;
}
.cmdk__item-icon { font-size: 18px; flex-shrink: 0; }
.cmdk__item-label { flex: 1; }
.cmdk__item-arrow { opacity: .4; font-size: 14px; }
.cmdk__item.is-selected .cmdk__item-arrow { opacity: 1; }
.cmdk__empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1000;
    }
    .sidebar.is-open {
        right: 0;
        box-shadow: -10px 0 40px rgba(0,0,0,.3);
    }
    .sidebar__close {
        display: flex;
    }
    .topbar__menu-btn {
        display: flex;
    }
    .topbar {
        padding: 14px 20px;
    }
    .topbar__title h1 {
        font-size: 18px;
    }
    .page-content {
        padding: 20px 20px 30px;
    }
    .alert {
        margin: 15px 20px 0;
    }
    .topbar__search-text,
    .topbar__search-kbd {
        display: none;
    }
    .topbar__search {
        padding: 9px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .topbar__date {
        display: none;
    }
    .topbar__title h1 {
        font-size: 16px;
    }
    .breadcrumb {
        display: none;
    }
    .cmdk {
        border-radius: 14px;
    }
    .cmdk__head {
        padding: 14px 16px;
    }
    .cmdk__input {
        font-size: 15px;
    }
}