/* ================================================
   MasterMy Barber - Dark Luxury Theme
   Built on Smart ERP Template Structure
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary-color: #c9a84c;
    --primary-dark: #a8892d;
    --primary-light: #e8c97a;
    --secondary-color: #8b5cf6;
    --accent-color: #c9a84c;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;

    --bg-body: #0d0d0f;
    --bg-sidebar: #111114;
    --bg-card: #18181c;
    --bg-card-hover: #1f1f25;
    --bg-topbar: #111114;
    --bg-input: #1f1f25;
    --bg-light: #1f1f25;
    --bg-white: #18181c;

    --text-primary: #f5f0e8;
    --text-dark: #f5f0e8;
    --text-gray: #9a9a9a;
    --text-light: #5a5a5a;
    --text-muted: #6b6b6b;

    --border-color: rgba(255,255,255,0.06);
    --border-gold: rgba(201,168,76,0.25);
    --border-hover: rgba(201,168,76,0.4);

    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --gold-dark: #a8892d;
    --gold-glow: rgba(201,168,76,0.12);
    --gold-glow-strong: rgba(201,168,76,0.25);

    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.6);
    --shadow-gold: 0 0 20px rgba(201,168,76,0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d0d0f;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 12px var(--gold-glow-strong);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.sidebar-brand { display: flex; flex-direction: column; }

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 10px;
    color: var(--text-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 10px;
    overflow-y: auto;
}

.sidebar-nav-section {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 14px 6px;
}

.nav-item { margin-bottom: 2px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-gray);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(201,168,76,0.07);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(201,168,76,0.18), rgba(201,168,76,0.08));
    color: var(--gold);
    border-color: var(--border-gold);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
}

.nav-link i { width: 20px; font-size: 16px; text-align: center; }

.nav-badge {
    margin-left: auto;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-user:hover { border-color: var(--border-gold); }

.sidebar-user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #0d0d0f;
    flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sidebar-user-role { font-size: 11px; color: var(--text-gray); }

/* ================================================
   MAIN WRAPPER
   ================================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================================
   TOPBAR
   ================================================ */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
    display: none;
    width: 38px; height: 38px;
    border: none;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

/* search-box removed — navbar search disabled */

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-icon {
    position: relative;
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.topbar-icon:hover { border-color: var(--border-gold); color: var(--gold); }

.topbar-icon .badge {
    position: absolute;
    top: 7px; right: 7px;
    width: 7px; height: 7px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 1px solid var(--bg-topbar);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.user-profile:hover { border-color: var(--border-gold); }

.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d0d0f;
    font-weight: 700;
    font-size: 12px;
}

.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-gray); }

.datetime { text-align: right; }
.datetime-time { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.datetime-date { font-size: 11px; color: var(--text-gray); }

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content { flex: 1; padding: 24px; }

/* ================================================
   PAGE HEADER
   ================================================ */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.page-subtitle { font-size: 13px; color: var(--text-gray); }

/* ================================================
   CARDS
   ================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: none;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 20px; }

/* ================================================
   KPI CARDS
   ================================================ */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover { border-color: var(--border-gold); }

.kpi-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-icon.gold { background: rgba(201,168,76,0.15); color: var(--gold); }
.kpi-icon.blue { background: rgba(59,130,246,0.12); color: #60a5fa; }
.kpi-icon.green { background: rgba(16,185,129,0.12); color: #10b981; }
.kpi-icon.purple { background: rgba(139,92,246,0.12); color: #a78bfa; }
.kpi-icon.orange { background: rgba(245,158,11,0.12); color: #f59e0b; }
.kpi-icon.pink { background: rgba(236,72,153,0.12); color: #ec4899; }

.kpi-content { flex: 1; }

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.1;
}

.kpi-label { font-size: 12px; color: var(--text-gray); margin-bottom: 6px; font-weight: 500; }

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}

.kpi-change.up { color: var(--success-color); }
.kpi-change.down { color: var(--danger-color); }
.kpi-change.gold-text { color: var(--gold); }

/* ================================================
   BUTTONS
   ================================================ */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0d0d0f;
    border: none;
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-gold:hover {
    box-shadow: 0 4px 16px var(--gold-glow-strong);
    transform: translateY(-1px);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border-gold);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 9px 18px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-outline-gold:hover { background: var(--gold-glow); border-color: var(--gold); }

.btn-ghost {
    background: var(--bg-input);
    color: var(--text-gray);
    border: 1px solid var(--border-color);
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 9px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-ghost:hover { border-color: var(--border-gold); color: var(--text-primary); }

.btn-sm-danger {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.2);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.btn-sm-danger:hover { background: rgba(239,68,68,0.2); }

.btn-sm-success {
    background: rgba(16,185,129,0.12);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.2);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.btn-sm-success:hover { background: rgba(16,185,129,0.2); }

.btn-walkin {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0d0d0f;
    border: none;
    font-weight: 800;
    border-radius: var(--radius-lg);
    padding: 13px 26px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 4px 20px var(--gold-glow-strong);
    font-family: inherit;
}

.btn-walkin:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,0.4); }

/* ================================================
   STATUS BADGES
   ================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-waiting { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }
.status-waiting::before { background: #f59e0b; }
.status-called { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.status-called::before { background: #60a5fa; }
.status-inservice { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }
.status-inservice::before { background: #a78bfa; }
.status-done { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.status-done::before { background: #10b981; }
.status-online { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.status-online::before { background: #10b981; }
.status-offline { background: rgba(100,100,100,0.15); color: #6b6b6b; border: 1px solid rgba(100,100,100,0.2); }
.status-offline::before { background: #6b6b6b; }
.status-busy { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.status-busy::before { background: #ef4444; }

/* ================================================
   KANBAN BOARD
   ================================================ */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}

.kanban-column {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.kanban-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.kanban-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.kanban-dot { width: 8px; height: 8px; border-radius: 50%; }

.kanban-count {
    background: var(--bg-input);
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }

.queue-card {
    background: var(--bg-card-hover);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
}

.queue-card:hover { border-color: var(--border-gold); transform: translateY(-1px); }

.queue-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.queue-number { font-size: 18px; font-weight: 800; color: var(--gold); }

.queue-customer { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }

.queue-service { font-size: 12px; color: var(--text-gray); display: flex; align-items: center; gap: 5px; }

.queue-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.queue-staff { display: flex; align-items: center; gap: 7px; }

.staff-avatar-sm {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #0d0d0f;
    flex-shrink: 0;
}

.queue-staff-name { font-size: 11px; color: var(--text-gray); }
.queue-time { font-size: 11px; color: var(--text-gray); display: flex; align-items: center; gap: 4px; }

.queue-actions { display: flex; gap: 6px; margin-top: 10px; }

.btn-queue-action {
    flex: 1;
    padding: 6px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ================================================
   TIMELINE
   ================================================ */
.timeline { position: relative; padding-left: 20px; }

.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 1px;
    background: var(--border-color);
}

.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -16px; top: 4px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--gold-glow);
}

.timeline-dot.gray { background: var(--text-light); box-shadow: none; }
.timeline-dot.blue { background: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,0.2); }
.timeline-dot.green { background: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,0.2); }

.timeline-time { font-size: 11px; color: var(--text-gray); margin-bottom: 3px; }
.timeline-text { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.timeline-sub { font-size: 11px; color: var(--text-gray); margin-top: 2px; }

/* ================================================
   CHARTS
   ================================================ */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }

/* ================================================
   SERVICES GRID
   ================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.25s ease;
}

.service-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.service-img {
    height: 140px;
    background: linear-gradient(135deg, #1a1a20, #22222a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}

.service-body { padding: 16px; }
.service-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }

.service-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.service-duration { font-size: 12px; color: var(--text-gray); display: flex; align-items: center; gap: 5px; }
.service-price { font-size: 18px; font-weight: 700; color: var(--gold); }
.service-price span { font-size: 12px; font-weight: 400; color: var(--text-gray); }

.service-actions { display: flex; gap: 8px; }

/* ================================================
   STAFF CARDS
   ================================================ */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.staff-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.25s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.staff-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    opacity: 0;
    transition: opacity 0.2s;
}

.staff-card:hover { border-color: var(--border-gold); transform: translateY(-3px); }
.staff-card:hover::before { opacity: 1; }

.staff-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f1f28, #2a2a36);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    margin: 0 auto 12px;
    border: 2px solid var(--border-gold);
    position: relative;
}

.staff-status-dot {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.staff-status-dot.online { background: #10b981; }
.staff-status-dot.offline { background: #6b6b6b; }
.staff-status-dot.busy { background: #ef4444; }

.staff-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.staff-role-text { font-size: 11px; color: var(--text-gray); margin-bottom: 12px; letter-spacing: 0.5px; text-transform: uppercase; }
.staff-badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }

.role-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.role-badge.owner { background: rgba(201,168,76,0.15); color: var(--gold); border: 1px solid var(--border-gold); }
.role-badge.barber { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }
.role-badge.trainee { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }

.staff-stats { display: flex; border-top: 1px solid var(--border-color); padding-top: 14px; }
.staff-stat { flex: 1; text-align: center; }
.staff-stat + .staff-stat { border-left: 1px solid var(--border-color); }
.staff-stat-value { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.staff-stat-label { font-size: 10px; color: var(--text-gray); }

/* ================================================
   WEBSITE SETTINGS
   ================================================ */
.website-settings-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.upload-zone {
    border: 2px dashed var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(201,168,76,0.03);
}

.upload-zone:hover { background: var(--gold-glow); border-color: var(--gold); }
.upload-zone-icon { font-size: 36px; color: var(--gold); margin-bottom: 10px; opacity: 0.7; }
.upload-zone-text { font-size: 14px; color: var(--text-gray); }
.upload-zone-hint { font-size: 11px; color: var(--text-light); margin-top: 6px; }

.qr-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-gold);
    padding: 24px;
    text-align: center;
}

.qr-placeholder {
    width: 160px; height: 160px;
    background: white;
    border-radius: var(--radius-md);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.qr-url { font-size: 12px; color: var(--gold); word-break: break-all; margin-bottom: 12px; }

.form-control-dark {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control-dark:focus {
    outline: none;
    border-color: var(--border-gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-control-dark::placeholder { color: var(--text-light); }

.form-label-dark {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ================================================
   ACTIVITY FEED
   ================================================ */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--text-primary); font-weight: 500; margin-bottom: 2px; }
.activity-time { font-size: 11px; color: var(--text-gray); }

/* ================================================
   SUBSCRIPTION CARDS
   ================================================ */
.subscription-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sub-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}

.sub-card.featured {
    border-color: var(--border-gold);
    background: linear-gradient(135deg, rgba(201,168,76,0.06), var(--bg-card));
}

.sub-card.featured::before {
    content: 'ยอดนิยม';
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0d0d0f;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
}

.sub-plan { font-size: 12px; font-weight: 700; color: var(--text-gray); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.sub-price { font-size: 36px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.sub-price span { font-size: 14px; font-weight: 400; color: var(--text-gray); }
.sub-period { font-size: 12px; color: var(--text-gray); margin-bottom: 24px; }
.sub-features { text-align: left; margin-bottom: 24px; }

.sub-feature {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-gray);
    padding: 6px 0;
}

.sub-feature i { color: var(--gold); font-size: 11px; width: 12px; }

/* ================================================
   NOTIFICATIONS
   ================================================ */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    margin-bottom: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.notification-item:hover { background: var(--bg-card-hover); border-color: var(--border-color); }
.notification-item.unread { background: rgba(201,168,76,0.04); border-color: rgba(201,168,76,0.1); }

.notif-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.notif-text { font-size: 12px; color: var(--text-gray); }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.notif-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 6px; }

/* ================================================
   PROFILE
   ================================================ */
.profile-header {
    background: linear-gradient(135deg, #15151a, #1c1c24);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-gold);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.profile-avatar-lg {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #0d0d0f;
    border: 3px solid var(--gold);
    box-shadow: 0 0 30px var(--gold-glow-strong);
    flex-shrink: 0;
}

.profile-fullname { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.profile-email { font-size: 14px; color: var(--text-gray); margin-bottom: 14px; }

/* ================================================
   SIDEBAR WIDGETS (DASHBOARD)
   ================================================ */
.sidebar-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.widget-list {}

.widget-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.widget-item:last-child { border-bottom: none; }
.widget-item:hover { color: var(--gold); }

.widget-item-left { display: flex; align-items: center; gap: 12px; }

.widget-item i:first-child {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    color: var(--text-gray);
    font-size: 13px;
    transition: all 0.2s;
}

.widget-item:hover i:first-child { background: rgba(201,168,76,0.12); color: var(--gold); }

.widget-item-text { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.widget-item .fa-chevron-right { color: var(--text-light); font-size: 11px; }

/* ================================================
   PROMO CARD
   ================================================ */
.promo-card {
    background: linear-gradient(135deg, #1a1510, #221c0e);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-gold);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: -30%; right: -20%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.promo-card h3 { font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.promo-card p { font-size: 13px; color: var(--text-gray); margin-bottom: 16px; }
.promo-devices { font-size: 28px; display: flex; justify-content: center; gap: 16px; color: var(--gold); opacity: 0.6; }

/* ================================================
   FOOTER
   ================================================ */
.main-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

/* ================================================
   MOBILE SIDEBAR
   ================================================ */
/* ─── Sidebar overlay (used by app.js + responsive.css with class "open") ─── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1040;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* FIX: was .sidebar-overlay.active — must match app.js which adds class "open" */
.sidebar-overlay.open { display: block; }

/* Legacy alias kept for safety */
.sidebar-overlay.active { display: block; }

.mobile-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.mobile-sidebar.active  { transform: translateX(0); }
.mobile-sidebar.open    { transform: translateX(0); }

.mobile-sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(201,168,76,0.08), transparent);
}

.mobile-sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; }

/* ================================================
   MOBILE BOTTOM NAV
   ================================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    z-index: 998;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-list { display: flex; align-items: center; padding: 4px 8px; }

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    cursor: pointer;
    color: var(--text-gray);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-nav-item.active { color: var(--gold); }
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item.center-action { flex: 0; padding: 0 16px; }

.center-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #0d0d0f;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--gold-glow-strong);
    transition: all 0.2s;
}

.center-btn:hover { transform: scale(1.05); }

/* ================================================
   NEWS
   ================================================ */
.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
}

.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--bg-card-hover); }

.news-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #0d0d0f;
    flex-shrink: 0;
}

.news-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.news-date { font-size: 11px; color: var(--text-gray); }

/* ================================================
   BOOTSTRAP MODAL OVERRIDES
   ================================================ */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-gold) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-primary) !important;
}

.modal-header { border-bottom: 1px solid var(--border-color) !important; padding: 20px 24px !important; }
.modal-footer { border-top: 1px solid var(--border-color) !important; padding: 16px 24px !important; }
.modal-title { color: var(--text-primary) !important; font-weight: 700 !important; }
.btn-close { filter: invert(1) !important; opacity: 0.5 !important; }
.btn-close:hover { opacity: 1 !important; }

.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    font-family: inherit !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--border-gold) !important;
    box-shadow: 0 0 0 3px var(--gold-glow) !important;
    background: var(--bg-input) !important;
}

.form-control::placeholder { color: var(--text-light) !important; }
.form-label { color: var(--text-gray) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: 0.5px !important; }
.form-select option { background: var(--bg-card); color: var(--text-primary); }

.table { color: var(--text-primary) !important; border-color: var(--border-color) !important; }
.table thead th {
    background: var(--bg-input) !important;
    color: var(--text-gray) !important;
    border-color: var(--border-color) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.7px !important;
    padding: 12px 16px !important;
}

.table tbody tr { border-color: var(--border-color) !important; }
.table tbody tr:hover td { background: rgba(201,168,76,0.03) !important; }
.table td { padding: 12px 16px !important; font-size: 13px !important; border-color: var(--border-color) !important; vertical-align: middle !important; }

.divider { height: 1px; background: var(--border-color); margin: 16px 0; }
