/* ============================================================
   CraftHub Organizer — Global Stylesheet
   Design: Dark Glassmorphism | Craft-Inspired Palette
   Font: Outfit (headings) + Inter (body)
   ============================================================ */

/* ──────────── CSS VARIABLES ──────────── */
:root {
    --bg-primary:    #0d0d1a;
    --bg-secondary:  #12122a;
    --bg-card:       rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --sidebar-bg:    #0b0b1f;
    --topbar-bg:     rgba(13, 13, 26, 0.9);

    --accent-red:    #e94560;
    --accent-blue:   #2563eb;
    --accent-gold:   #f5a623;
    --accent-teal:   #4ecdc4;
    --accent-purple: #9b59b6;

    --text-primary:  #f0f0ff;
    --text-secondary:#a0a0c0;
    --text-muted:    #606080;

    --border-color:  rgba(255, 255, 255, 0.08);
    --border-hover:  rgba(37, 99, 235, 0.4);

    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow:0 0 20px rgba(37, 99, 235, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ──────────── RESET & BASE ──────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(78,205,196,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(245,166,35,0.04) 0%, transparent 50%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ──────────── LAYOUT: SIDEBAR + MAIN ──────────── */
.sidebar {
    position: fixed;
    top: var(--topbar-height); left: 0;
    height: calc(100vh - var(--topbar-height));
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 900;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin: 16px 12px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.sidebar-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.sidebar-user-info {
    display: flex; flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }

.sidebar-nav ul { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
}

.nav-link i { font-size: 1rem; min-width: 18px; transition: var(--transition); }

.nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(37,99,235,0.05));
    color: var(--accent-blue);
    border: 1px solid rgba(37,99,235,0.2);
}

.nav-link.active i { color: var(--accent-blue); }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border-color); }

.logout-link { color: var(--text-secondary); }
.logout-link:hover { background: rgba(233,69,96,0.1); color: var(--accent-red); }

/* Collapsed sidebar overrides */
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 12px; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 12px; }

/* ──────────── MAIN WRAPPER ──────────── */
.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.main-wrapper.collapsed { margin-left: var(--sidebar-collapsed); }

/* ──────────── TOPBAR ──────────── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 14px;
    z-index: 1000;
}

.topbar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}
.topbar-toggle:hover { color: var(--text-primary); background: var(--bg-card); }

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.topbar-logo-img {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: inline-block !important;
    vertical-align: middle;
    flex-shrink: 0;
}
.topbar-logo span {
    background: linear-gradient(135deg, #f0f0ff, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.topbar-logo i {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.topbar-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-role-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.topbar-user {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ──────────── MAIN CONTENT ──────────── */
.main-content {
    padding: 28px;
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

/* ──────────── PAGE HEADER ──────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ──────────── CARDS ──────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ──────────── STAT CARDS ──────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--stat-color, var(--accent-red));
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.stat-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--stat-color, var(--accent-red));
    background: linear-gradient(135deg, var(--stat-color, var(--accent-red)), transparent);
    color: white;
}

.stat-info { flex: 1; min-width: 0; }

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ──────────── GRID LAYOUT ──────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ──────────── TABLES ──────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.table thead th {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-primary);
    vertical-align: middle;
    white-space: nowrap;
}

.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: var(--bg-card-hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* ──────────── FORMS ──────────── */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}

.form-control:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.07);
}

.form-control:focus {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.05);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.15),
        inset 0 2px 6px rgba(0,0,0,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control option { background: #12122a; color: var(--text-primary); }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-hint {
    font-size: 0.79rem;
    color: var(--text-muted);
    margin-top: 6px;
    padding-left: 2px;
    display: flex; align-items: center; gap: 5px;
}

/* ──────────── BUTTONS ──────────── */
@keyframes btn-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    outline: none;
}

.btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.2s;
}
.btn:hover::after {
    opacity: 1;
    animation: btn-shimmer 0.6s ease;
}

.btn:active { transform: translateY(1px) scale(0.98) !important; }

/* ── PRIMARY (Positive / Neutral actions: Login, Save, Book, Submit, Add, etc.) — BLUE ── */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    border: 1px solid rgba(37,99,235,0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(37,99,235,0.55), 0 0 0 2px rgba(37,99,235,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
    background: linear-gradient(135deg, #3b7fff 0%, #2563eb 100%);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #1a9e52 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(46,204,113,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    border: 1px solid rgba(46,204,113,0.3);
}
.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(46,204,113,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-warning {
    background: linear-gradient(135deg, #f5a623 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(245,166,35,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    border: 1px solid rgba(245,166,35,0.3);
}
.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(245,166,35,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── DANGER (Negative / Destructive actions: Cancel, Delete, Decline, Reject, Deactivate, etc.) — RED ── */
.btn-danger {
    background: linear-gradient(135deg, #e94560 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(233,69,96,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
    border: 1px solid rgba(233,69,96,0.3);
}
.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(233,69,96,0.55), inset 0 1px 0 rgba(255,255,255,0.12);
    background: linear-gradient(135deg, #f0556e 0%, #d44030 100%);
}

.btn-info {
    background: linear-gradient(135deg, #4ecdc4 0%, #1a9e96 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(78,205,196,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    border: 1px solid rgba(78,205,196,0.3);
}
.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(78,205,196,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ──────────── BADGES ──────────── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success  { background: rgba(39,174,96,0.2);   color: #2ecc71; border: 1px solid rgba(39,174,96,0.3); }
.badge-warning  { background: rgba(245,166,35,0.2);  color: #f5a623; border: 1px solid rgba(245,166,35,0.3); }
.badge-danger   { background: rgba(233,69,96,0.2);   color: #e94560; border: 1px solid rgba(233,69,96,0.3); }
.badge-info     { background: rgba(78,205,196,0.2);  color: #4ecdc4; border: 1px solid rgba(78,205,196,0.3); }
.badge-secondary{ background: rgba(160,160,192,0.15);color: #a0a0c0; border: 1px solid rgba(160,160,192,0.2); }

/* ──────────── ALERTS ──────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.alert-success { background: rgba(39,174,96,0.15);  border: 1px solid rgba(39,174,96,0.3);  color: #2ecc71; }
.alert-error   { background: rgba(233,69,96,0.15);  border: 1px solid rgba(233,69,96,0.3);  color: #e94560; }
.alert-warning { background: rgba(245,166,35,0.15); border: 1px solid rgba(245,166,35,0.3); color: #f5a623; }
.alert-info    { background: rgba(78,205,196,0.15); border: 1px solid rgba(78,205,196,0.3); color: #4ecdc4; }

/* ──────────── AUTH PAGES ──────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.auth-page::before {
    content: '';
    position: fixed; inset: 0;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(37,99,235,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(78,205,196,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    width: 100%;
    min-height: 560px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.auth-brand {
    background: linear-gradient(135deg, #1a0d2e 0%, #2d0a1e 50%, #1a1a0d 100%);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e94560' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-brand-logo {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 36px;
}

.auth-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.auth-brand-logo .logo-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: white;
}

.auth-brand-logo .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}

.auth-brand h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
}

.auth-brand p { color: rgba(255,255,255,0.6); font-size: 0.95rem; line-height: 1.6; }

.auth-brand-features { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }

.auth-feature {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
}

.auth-feature i { color: var(--accent-gold); font-size: 1rem; width: 18px; }

.auth-form-side {
    background: var(--bg-secondary);
    padding: 48px;
    display: flex; flex-direction: column; justify-content: center;
}

.auth-form-side h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-form-side .auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.auth-link { color: var(--accent-blue); font-weight: 600; }
.auth-link:hover { text-decoration: underline; }

/* ──────────── PACKAGE CARDS ──────────── */
.package-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex; flex-direction: column;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37,99,235,0.35);
}

.package-card-header {
    background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(78,205,196,0.05));
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.package-icon {
    width: 60px; height: 60px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: white;
}

.package-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }

.package-price {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem; font-weight: 800;
    color: var(--accent-gold);
}

.package-price span { font-size: 0.9rem; color: var(--text-secondary); }

.package-card-body { padding: 20px; flex: 1; }

.package-meta { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; }

.package-meta-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: var(--text-secondary);
}

.package-meta-item i { color: var(--accent-teal); }

.package-description { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.package-card-footer { padding: 16px 20px; border-top: 1px solid var(--border-color); }

/* ──────────── SEARCH / FILTER BAR ──────────── */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative; flex: 1; min-width: 200px;
}

.search-input-wrapper i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem;
}

.search-input-wrapper .form-control { padding-left: 40px; }

/* ──────────── MODAL ──────────── */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.28s cubic-bezier(0.4,0,0.2,1); }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: linear-gradient(160deg, rgba(22,22,44,0.97) 0%, rgba(14,14,30,0.99) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow:
        0 24px 64px rgba(0,0,0,0.6),
        0 0 0 1px rgba(37,99,235,0.12),
        inset 0 1px 0 rgba(255,255,255,0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(37,99,235,0.3) transparent;
}

.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.3); border-radius: 4px; }

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 26px 30px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(90deg, rgba(37,99,235,0.08) 0%, transparent 60%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #fff 30%, var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex; align-items: center; gap: 10px;
}

.modal-title i {
    -webkit-text-fill-color: var(--accent-blue);
    color: var(--accent-blue);
    filter: drop-shadow(0 0 8px rgba(37,99,235,0.5));
}

.modal-close {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.modal-close:hover {
    color: white;
    background: rgba(233,69,96,0.2);
    border-color: rgba(233,69,96,0.4);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 12px rgba(233,69,96,0.3);
}

.modal-body { padding: 26px 30px; }

.modal-footer {
    padding: 20px 30px 26px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex; justify-content: flex-end; gap: 12px;
    background: rgba(0,0,0,0.15);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ──────────── EMPTY STATE ──────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i { font-size: 3rem; margin-bottom: 16px; color: var(--text-muted); }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text-primary); }
.empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* ──────────── PAGINATION ──────────── */
.pagination {
    display: flex; gap: 6px;
    justify-content: center; margin-top: 24px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.88rem; font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.page-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.page-btn.active { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* ──────────── UTILS ──────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-secondary); }
.text-red    { color: var(--accent-red); }
.text-gold   { color: var(--accent-gold); }
.text-teal   { color: var(--accent-teal); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.d-none { display: none !important; }

/* ──────────── PACKAGE CARDS (Enhanced) ──────────── */

/* Override grid-auto for package pages specifically */
.packages-page .grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.package-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.package-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(233, 69, 96, 0.06) 0%,
        rgba(78, 205, 196, 0.04) 50%,
        rgba(245, 166, 35, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

.package-card:hover {
    transform: translateY(-8px);
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(78, 205, 196, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.package-card:hover::before { opacity: 1; }

/* Image area — zoom on hover */
.package-card > div:first-child img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.package-card:hover > div:first-child img {
    transform: scale(1.08);
}

/* Card header */
.package-card-header {
    padding: 18px 20px 10px;
    position: relative;
    z-index: 1;
}

.package-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.package-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f5a623, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.package-price span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

/* Card body */
.package-card-body {
    padding: 12px 20px 16px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.package-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 4px;
}

/* Included details panel */
.package-card-body > div[style*="border-radius"] {
    backdrop-filter: blur(4px);
}

/* Slot availability bar animation */
@keyframes slotBarFill {
    from { width: 0; }
}
.package-card:hover div[style*="border-radius:20px"][style*="height:100%"] {
    animation: slotBarFill 0.8s ease forwards;
}

/* Card footer */
.package-card-footer {
    padding: 14px 20px 18px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.02);
}

.package-card-footer .btn-block {
    justify-content: center;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 13px 20px;
}

.package-card-footer .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #1a46c0 100%);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.package-card-footer .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.55);
    transform: translateY(-2px);
}

/* Fully booked state */
.package-card[style*="opacity:0.75"] {
    filter: saturate(0.6);
}

/* ──────────── MOBILE OVERLAY BACKDROP ──────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 850;
    animation: fadeIn 0.25s ease;
}
.sidebar-backdrop.visible { display: block; }

/* ──────────── SCROLLBAR ──────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════ */

/* ── LARGE DESKTOPS (< 1280px) ── */
@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ── MEDIUM DESKTOPS / TABLETS LANDSCAPE (< 1024px) ── */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .packages-page .grid-auto {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    .topbar-user { display: none; }
}

/* ── TABLETS (< 900px) ── */
@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .auth-brand { display: none; }
}

/* ── TABLETS PORTRAIT / LARGE PHONES (< 768px) ── */
@media (max-width: 768px) {

    /* ── Sidebar: slide-in overlay ── */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
        top: 0 !important;
        height: 100vh !important;
        z-index: 900;
        box-shadow: 4px 0 30px rgba(0,0,0,0.6);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        animation: slideInLeft 0.28s cubic-bezier(0.4,0,0.2,1);
    }

    @keyframes slideInLeft {
        from { transform: translateX(-100%); opacity: 0.7; }
        to   { transform: translateX(0);      opacity: 1; }
    }

    /* ── Main wrapper — full width on mobile ── */
    .main-wrapper {
        margin-left: 0 !important;
        margin-top: var(--topbar-height);
    }

    /* ── Topbar ── */
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar-title { font-size: 0.9rem; }
    .topbar-divider, .topbar-user { display: none; }
    .topbar-role-badge { display: none; }

    /* ── Main content padding ── */
    .main-content { padding: 14px; }

    /* ── Page header ── */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }
    .page-header h1 { font-size: 1.4rem; }
    .page-header .btn { width: 100%; justify-content: center; }

    /* ── Stats grid ── */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }

    /* ── Grid layouts ── */
    .grid-2, .grid-3, .form-row { grid-template-columns: 1fr; }

    /* ── Cards ── */
    .card { padding: 16px; border-radius: var(--radius-md); }
    .card-header { margin-bottom: 14px; padding-bottom: 12px; }

    /* ── Responsive Tables — card-style on mobile ── */
    .table-responsive-card thead { display: none; }

    .table-responsive-card tbody tr {
        display: block;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 14px;
        position: relative;
    }

    .table-responsive-card tbody tr:hover {
        border-color: var(--border-hover);
        background: var(--bg-card-hover);
    }

    .table-responsive-card tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        font-size: 0.88rem;
        white-space: normal;
    }

    .table-responsive-card tbody td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .table-responsive-card tbody td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-secondary);
        min-width: 100px;
        flex-shrink: 0;
    }

    /* ── Regular tables — just scroll horizontally ── */
    .table-wrapper { margin: 0 -14px; border-radius: 0; }
    .table { font-size: 0.82rem; }
    .table thead th,
    .table tbody td { padding: 10px 12px; }

    /* ── Buttons ── */
    .btn { padding: 10px 16px; font-size: 0.85rem; }
    .btn-sm { padding: 7px 12px; font-size: 0.78rem; }

    /* ── Search bar ── */
    .search-bar { gap: 8px; }
    .search-bar select.form-control { min-width: 0; }

    /* ── Auth pages ── */
    .auth-page { padding: 16px; align-items: flex-start; }
    .auth-container {
        grid-template-columns: 1fr;
        border-radius: var(--radius-lg);
        min-height: auto;
    }
    .auth-brand { display: none; }
    .auth-form-side { padding: 32px 24px; }
    .auth-form-side h3 { font-size: 1.5rem; }

    /* ── Modal ── */
    .modal-overlay { padding: 12px; align-items: flex-end; }
    .modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        animation: slideUpModal 0.3s cubic-bezier(0.34,1.2,0.64,1);
    }
    @keyframes slideUpModal {
        from { transform: translateY(60px); opacity: 0; }
        to   { transform: translateY(0);    opacity: 1; }
    }
    .modal-header { padding: 20px 20px 16px; }
    .modal-body   { padding: 18px 20px; }
    .modal-footer { padding: 16px 20px 20px; flex-direction: column-reverse; gap: 8px; }
    .modal-footer .btn { width: 100%; justify-content: center; }

    /* ── Package cards ── */
    .packages-page .grid-auto {
        grid-template-columns: 1fr;
    }

    /* ── Sidebar nav spacing ── */
    .sidebar-nav { padding: 6px 10px; }
    .nav-link { padding: 12px 14px; font-size: 0.9rem; }
}

/* ── SMALL PHONES (< 480px) ── */
@media (max-width: 480px) {

    :root {
        --topbar-height: 56px;
    }

    /* ── Stats: single column ── */
    .stats-grid { grid-template-columns: 1fr; }

    /* ── Topbar ── */
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-logo span { display: none; }   /* Show only icon on tiny screens */

    /* ── Main content ── */
    .main-content { padding: 12px; }

    /* ── Page header ── */
    .page-header h1 { font-size: 1.2rem; }

    /* ── Auth ── */
    .auth-form-side { padding: 24px 18px; }
    .auth-form-side h3 { font-size: 1.3rem; }

    /* ── Card ── */
    .card { padding: 14px; }

    /* ── Buttons ── */
    .btn-lg { padding: 12px 24px; font-size: 0.95rem; }

    /* ── Modal ── */
    .modal-header .modal-title { font-size: 1.05rem; }

    /* ── Table actions — stack buttons ── */
    .table-actions {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .table-actions .btn { width: 100%; justify-content: center; }

    /* ── Pagination ── */
    .page-btn { width: 32px; height: 32px; font-size: 0.82rem; }
}

/* ── VERY SMALL (< 360px) ── */
@media (max-width: 360px) {
    .topbar-logo { display: none; }
    .topbar-toggle { font-size: 1rem; }
    .main-content { padding: 10px; }
    .stats-grid { gap: 8px; }
    .stat-card { padding: 12px 10px; }
    .stat-value { font-size: 1rem; }
}

/* ── LANDSCAPE PHONES ── */
@media (max-height: 500px) and (orientation: landscape) {
    :root { --topbar-height: 52px; }
    .sidebar { overflow-y: auto; }
    .auth-page { align-items: flex-start; padding: 12px; }
    .auth-container { min-height: auto; }
}

/* ── PRINT ── */
@media print {
    .sidebar, .topbar { display: none !important; }
    .main-wrapper { margin-left: 0 !important; margin-top: 0 !important; }
    .main-content { padding: 0; }
    .btn, .search-bar, .modal-overlay { display: none !important; }
    .card { border: 1px solid #ccc; box-shadow: none; background: white; color: black; }
    .table { font-size: 0.8rem; }
    .table thead th, .table tbody td { color: black; border-color: #ccc; }
}
