/* ==========================================
   ROOT VARIABLES & GLOBAL STYLES
========================================== */
:root {
    --ink: #f4f1e9;
    --muted: #979c92;
    --dim: #6b736a;
    --night: #111613;
    --side: #0e1210;
    --panel: #1b211d;
    --panel-light: #222a24;
    --line: rgba(226, 214, 187, .13);
    --gold: #d7b36a;
    --gold-light: #f0d99c;
    --green: #91b39a;
    --blue: #9db6c4;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Manrope', Arial, sans-serif;
    --mono: 'DM Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--night);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
}


/* ==========================================
   ADMIN SHELL & SIDEBAR
========================================== */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    background: var(--side);
    border-right: 1px solid var(--line);
    padding: 30px 22px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font: 500 15px var(--serif);
    letter-spacing: -3px;
}

.brand-mark span {
    color: var(--ink);
    font-size: 12px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    letter-spacing: .12em;
}

.brand-copy strong {
    font: 600 15px var(--serif);
    letter-spacing: .04em;
}

.brand-copy small {
    font: 500 7px var(--mono);
    color: var(--gold);
    margin-top: 3px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 72px;
}

.side-nav a,
.back-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 12px;
    color: #858c82;
    text-decoration: none;
    font: 500 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: color .2s, background .2s;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--ink);
    background: #1a211c;
}

.side-nav a.active {
    border-left: 2px solid var(--gold);
    padding-left: 10px;
}

.side-nav a span {
    width: 16px;
    color: var(--gold);
    font-size: 15px;
    text-align: center;
}

.side-nav a b {
    margin-left: auto;
    border-radius: 50%;
    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    background: #38483b;
    color: var(--gold-light);
    font: 9px var(--mono);
}

.sidebar-bottom {
    margin-top: auto;
}

.owner-chip {
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--line);
    padding: 22px 7px;
}

.owner-chip>span {
    display: grid;
    place-items: center;
    border-radius: 50%;
    width: 31px;
    height: 31px;
    background: #80634c;
    color: #e6d3aa;
    font: 9px var(--mono);
}

.owner-chip strong,
.owner-chip small {
    display: block;
}

.owner-chip strong {
    font: 500 12px var(--serif);
}

.owner-chip small {
    color: var(--dim);
    font: 8px var(--mono);
    margin-top: 3px;
}

.back-link {
    padding: 12px 7px;
    color: #6c746a;
}

.back-link:hover {
    color: var(--gold);
}


/* ==========================================
   DASHBOARD MAIN CONTENT
========================================== */
.dashboard {
    margin-left: 245px;
    flex: 1;
    max-width: 1500px;
    padding: 58px clamp(28px, 5vw, 78px);
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 45px;
    border-bottom: 1px solid var(--line);
}

.kicker {
    color: var(--gold);
    font: 500 9px var(--mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.dashboard-header h1 {
    font: 500 clamp(38px, 4vw, 56px)/1 var(--serif);
    letter-spacing: -.04em;
    margin: 0;
}

.header-subtitle {
    color: var(--muted);
    font-size: 12px;
    margin: 13px 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button,
.export-button {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    height: 39px;
    cursor: pointer;
}

.icon-button {
    width: 39px;
    color: var(--gold);
    font-size: 20px;
}

.export-button {
    padding: 0 15px;
    color: #c9cfc6;
    font: 500 9px var(--mono);
    text-transform: uppercase;
}

.export-button span {
    color: var(--gold);
    font-size: 15px;
    margin-left: 8px;
}

.icon-button:hover,
.export-button:hover {
    border-color: var(--gold);
    background: rgba(215, 179, 106, .08);
}


/* ==========================================
   METRIC CARDS
========================================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    padding: 27px 0 54px;
}

.metric-card {
    min-height: 135px;
    padding: 20px;
    background: linear-gradient(145deg, #1d241f, #171c19);
    border: 1px solid var(--line);
}

.metric-card.accent-card {
    background: linear-gradient(145deg, #49412f, #272920);
    border-color: rgba(215, 179, 106, .35);
}

.metric-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca399;
    font: 9px var(--mono);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    font-size: 14px;
}

.metric-icon.gold {
    color: var(--gold);
    background: rgba(215, 179, 106, .12);
}

.metric-icon.green {
    color: var(--green);
    background: rgba(145, 179, 154, .1);
}

.metric-icon.blue {
    color: var(--blue);
    background: rgba(157, 182, 196, .1);
}

.metric-icon.cream {
    color: #f2dda4;
    background: rgba(240, 217, 156, .15);
}

.metric-card>strong {
    display: block;
    font: 500 39px/.9 var(--serif);
    margin-top: 20px;
    color: #ece6d8;
}

.metric-card small {
    display: block;
    color: #747d73;
    font-size: 10px;
    margin-top: 8px;
}

.metric-suffix {
    font: 500 16px var(--sans);
    color: #d2c18f;
}


/* ==========================================
   REQUESTS & TABLES SECTION
========================================== */
.requests-section {
    border-top: 1px solid var(--line);
    padding-top: 43px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.section-title h2,
.mini-panel h2 {
    font: 500 31px/1 var(--serif);
    margin: 0;
    letter-spacing: -.025em;
}

.live-indicator {
    color: var(--green);
    font: 9px var(--mono);
    text-transform: uppercase;
}

.live-indicator i {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 7px;
    box-shadow: 0 0 9px var(--green);
}

.request-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0 17px;
    gap: 20px;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 285px;
    border-bottom: 1px solid var(--line);
    color: var(--gold);
}

.search-wrap input {
    width: 100%;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--ink);
    padding: 11px 0;
    font: 11px var(--sans);
}

.search-wrap input::placeholder {
    color: #6d756b;
}

.filter-tabs {
    display: flex;
    gap: 25px;
}

.filter-tabs button {
    background: none;
    border: 0;
    border-bottom: 1px solid transparent;
    padding: 9px 0;
    color: #747d73;
    cursor: pointer;
    font: 500 9px var(--mono);
    text-transform: uppercase;
}

.filter-tabs button.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.filter-tabs b {
    font-size: 8px;
    color: inherit;
    margin-left: 5px;
}

.request-list {
    display: flex;
    flex-direction: column;
}

.request-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1fr) minmax(150px, 1fr) 90px 116px;
    align-items: center;
    gap: 18px;
    padding: 18px 12px;
    border-top: 1px solid var(--line);
    transition: background .2s;
}

.request-card:hover {
    background: #1b231d;
}

.client-info,
.service-info,
.date-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar,
.team-avatar {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    flex: none;
    color: #eee0b7;
    background: #725646;
    font: 9px var(--mono);
}

.client-info strong,
.service-info strong,
.date-info strong {
    display: block;
    font: 500 13px var(--serif);
}

.client-info small,
.service-info small,
.date-info small {
    display: block;
    color: #727b71;
    font-size: 10px;
    margin-top: 3px;
}

.service-info>span {
    font-size: 19px;
    color: var(--gold);
}

.date-info {
    display: block;
}

.date-info strong {
    font-family: var(--mono);
    font-size: 10px;
    color: #b9c0b5;
}

.date-info small {
    font: 9px var(--mono);
}

.status-select {
    border: 0;
    background: #29342c;
    color: var(--green);
    padding: 7px 8px;
    cursor: pointer;
    font: 9px var(--mono);
    text-transform: uppercase;
    outline: none;
}

.status-select option {
    background: #202822;
    color: #fff;
}

.status-select[data-status="Booked"] {
    color: var(--gold);
}

.status-select[data-status="Contacted"] {
    color: var(--blue);
}

.row-action {
    color: var(--gold);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: 18px var(--sans);
    text-align: right;
}

.empty-state {
    text-align: center;
    border: 1px dashed var(--line);
    padding: 65px 20px;
    color: var(--muted);
}

.empty-state span {
    color: var(--gold);
    font-size: 27px;
}

.empty-state h3 {
    font: 500 24px var(--serif);
    margin: 12px 0 3px;
}

.empty-state p {
    font-size: 11px;
}

.empty-state a {
    display: inline-block;
    margin-top: 12px;
    color: var(--gold);
    font: 9px var(--mono);
    text-transform: uppercase;
}

.hidden {
    display: none !important;
}


/* ==========================================
   TOAST NOTIFICATION
========================================== */
.toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    max-width: 320px;
    background: #e5d4a0;
    color: #20251e;
    padding: 13px 16px;
    font: 10px var(--mono);
    transform: translateY(100px);
    opacity: 0;
    transition: all .25s;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}


/* ==========================================
   OWNER LOGIN PANEL & CARD STYLES
========================================== */
.owner-login {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.15), transparent 40%), #030712;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 24px;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.08);
    color: white;
    text-align: center;
}

.login-logo {
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #f6d365);
    color: #111;
    font-size: 30px;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.35);
}

.login-card h1 {
    margin: 0;
    font-size: 28px;
    color: #f6d365;
}

.login-card > p {
    color: #9ca3af;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #d1d5db;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
    font-size: 15px;
}

.input-group input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: #111;
    background: linear-gradient(135deg, #d4af37, #f6d365);
    transition: 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}

.login-error {
    min-height: 20px;
    margin-top: 15px;
    color: #ff6b6b !important;
    font-size: 14px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #050816;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#logoutBtn {
    padding: 10px 18px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    background: transparent;
    color: #f6d365;
    cursor: pointer;
    transition: 0.3s ease;
}

#logoutBtn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
    transform: translateY(-1px);
}


/* ==========================================
   RESPONSIVE MEDIA QUERIES
========================================== */
@media(max-width: 1050px) {
    .sidebar {
        width: 205px;
    }
    .dashboard {
        margin-left: 205px;
        padding-left: 32px;
        padding-right: 32px;
    }
    .request-card {
        grid-template-columns: 1.2fr 1fr 1fr 95px;
    }
    .row-action {
        display: none;
    }
}

@media(max-width: 760px) {
    .admin-shell {
        display: block;
    }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 18px 20px;
        display: block;
    }
    .side-nav {
        margin-top: 20px;
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
    }
    .side-nav a {
        white-space: nowrap;
        padding: 10px;
    }
    .side-nav a b {
        display: none;
    }
    .sidebar-bottom {
        display: none;
    }
    .dashboard {
        margin: 0;
        padding: 38px 20px;
    }
    .dashboard-header {
        display: block;
    }
    .header-actions {
        margin-top: 25px;
    }
    .metric-grid {
        grid-template-columns: 1fr 1fr;
        padding-bottom: 42px;
    }
    .metric-card {
        min-height: 120px;
    }
    .metric-card>strong {
        font-size: 33px;
    }
    .request-toolbar {
        display: block;
    }
    .search-wrap {
        width: 100%;
        margin-bottom: 18px;
    }
    .filter-tabs {
        gap: 16px;
        overflow: auto;
    }
    .filter-tabs button {
        white-space: nowrap;
    }
    .request-list {
        overflow-x: auto;
    }
    .request-card {
        min-width: 650px;
    }
}