/* ══════════════════════════════════════
 GrandStay Hotel Management — style.css
 Aesthetic: Luxury Editorial / Dark Gold
 ══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
 --bg: #0d0d0d;
 --surface: #161616;
 --surface2: #1e1e1e;
 --border: #2a2a2a;
 --gold: #c9a84c;
 --gold-light:#e8c87a;
 --gold-dim: #7a6030;
 --text: #e8e2d6;
 --muted: #6b6560;
 --green: #4caf87;
 --red: #c95c4c;
 --blue: #4c8fc9;
 --sidebar-w: 230px;
 --radius: 10px;
 --font-display: 'Cormorant Garamond', serif;
 --font-body: 'DM Sans', sans-serif;
 --transition: 0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
 font-family: var(--font-body);
 background: var(--bg);
 color: var(--text);
 display: flex;
 min-height: 100vh;
 font-size: 14px;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
 font-family: var(--font-body);
 background: var(--surface2);
 border: 1px solid var(--border);
 border-radius: 6px;
 color: var(--text);
 padding: 9px 12px;
 font-size: 13px;
 width: 100%;
 outline: none;
 transition: border-color var(--transition);
}
input:focus, select:focus { border-color: var(--gold); }
select option { background: var(--surface2); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ══════════════════════════════
 SIDEBAR
 ══════════════════════════════ */
.sidebar {
 width: var(--sidebar-w);
 background: var(--surface);
 border-right: 1px solid var(--border);
 display: flex;
 flex-direction: column;
 position: fixed;
 top: 0; left: 0; bottom: 0;
 z-index: 100;
 transition: transform var(--transition);
}

.sidebar-logo {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 28px 22px 24px;
 border-bottom: 1px solid var(--border);
}
.logo-icon { color: var(--gold); font-size: 20px; }
.logo-text {
 font-family: var(--font-display);
 font-size: 22px;
 font-weight: 600;
 color: var(--gold-light);
 letter-spacing: 1px;
}

.sidebar-nav {
 flex: 1;
 padding: 18px 12px;
 display: flex;
 flex-direction: column;
 gap: 4px;
}
.nav-item {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 10px 14px;
 border-radius: 7px;
 color: var(--muted);
 font-size: 13.5px;
 font-weight: 400;
 transition: all var(--transition);
 position: relative;
}
.nav-item:hover { color: var(--text); background: var(--surface2); }
.nav-item.active {
 color: var(--gold-light);
 background: rgba(201,168,76,0.12);
 font-weight: 500;
}
.nav-item.active::before {
 content: '';
 position: absolute;
 left: 0; top: 20%; bottom: 20%;
 width: 3px;
 background: var(--gold);
 border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 15px; width: 20px; text-align: center; }

.sidebar-footer {
 padding: 18px 16px;
 border-top: 1px solid var(--border);
}
.staff-badge {
 display: flex;
 align-items: center;
 gap: 10px;
}
.staff-avatar {
 width: 34px; height: 34px;
 border-radius: 50%;
 background: var(--gold-dim);
 color: var(--gold-light);
 font-weight: 600;
 font-size: 12px;
 display: grid; place-items: center;
}
.staff-name { font-size: 13px; font-weight: 500; }
.staff-role { font-size: 11px; color: var(--muted); }

/* ══════════════════════════════
 MAIN
 ══════════════════════════════ */
.main {
 margin-left: var(--sidebar-w);
 flex: 1;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
 background: var(--bg);
}

/* ── Topbar ── */
.topbar {
 height: 60px;
 background: var(--surface);
 border-bottom: 1px solid var(--border);
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 0 28px;
 position: sticky; top: 0;
 z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-btn {
 background: none; border: none;
 color: var(--muted); font-size: 18px;
 display: none;
}
.page-title {
 font-family: var(--font-display);
 font-size: 22px;
 font-weight: 600;
 color: var(--gold-light);
 letter-spacing: 0.5px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.search-box {
 display: flex; align-items: center;
 background: var(--surface2);
 border: 1px solid var(--border);
 border-radius: 7px;
 padding: 6px 12px;
 gap: 8px;
 transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--gold-dim); }
.search-box input { background: none; border: none; width: 180px; padding: 0; }
.notif-badge { font-size: 18px; position: relative; color: var(--muted); cursor: pointer; }
.notif-badge sup {
 position: absolute; top: -2px; right: -2px;
 background: var(--gold);
 color: #000;
 font-size: 9px;
 width: 14px; height: 14px;
 border-radius: 50%;
 display: grid; place-items: center;
}

/* ── Sections ── */
.section { display: none; padding: 28px; animation: fadeIn 0.3s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── Stats Grid ── */
.stats-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
 gap: 16px;
 margin-bottom: 24px;
}
.stat-card {
 background: var(--surface);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 22px 20px;
 position: relative;
 overflow: hidden;
 transition: transform var(--transition), border-color var(--transition);
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card::after {
 content: '';
 position: absolute;
 bottom: 0; left: 0; right: 0;
 height: 3px;
}
.stat-card.gold::after { background: var(--gold); }
.stat-card.green::after { background: var(--green); }
.stat-card.red::after { background: var(--red); }
.stat-card.blue::after { background: var(--blue); }
.stat-card.gold { border-color: var(--gold-dim); }
.stat-card.green { border-color: #2e6b54; }
.stat-card.red { border-color: #6b3a34; }
.stat-card.blue { border-color: #2e4f6b; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 8px; }
.stat-value { font-family: var(--font-display); font-size: 38px; font-weight: 700; line-height: 1; }
.stat-card.gold .stat-value { color: var(--gold-light); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.red .stat-value { color: var(--red); }
.stat-card.blue .stat-value { color: var(--blue); }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Dashboard Grid ── */
.dash-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 20px;
}

/* ── Card ── */
.card {
 background: var(--surface);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 overflow: hidden;
}
.card-header {
 padding: 18px 20px;
 border-bottom: 1px solid var(--border);
 display: flex; align-items: center; justify-content: space-between;
}
.card-header h2 {
 font-family: var(--font-display);
 font-size: 17px;
 font-weight: 600;
 color: var(--gold-light);
}

/* ── Room Grid (Dashboard) ── */
.room-grid {
 padding: 16px;
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(56px,1fr));
 gap: 8px;
}
.room-cell {
 aspect-ratio: 1;
 border-radius: 6px;
 display: grid;
 place-items: center;
 font-size: 11px;
 font-weight: 500;
 cursor: default;
 transition: transform var(--transition);
}
.room-cell:hover { transform: scale(1.08); }
.room-cell.available { background: rgba(76,175,135,0.15); border: 1px solid #2e6b54; color: var(--green); }
.room-cell.occupied { background: rgba(201,92,76,0.15); border: 1px solid #6b3a34; color: var(--red); }
.room-cell.maintenance { background: rgba(201,168,76,0.12); border: 1px solid var(--gold-dim); color: var(--gold); }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
 padding: 12px 16px;
 text-align: left;
 font-size: 10.5px;
 text-transform: uppercase;
 letter-spacing: 1.2px;
 color: var(--muted);
 border-bottom: 1px solid var(--border);
 background: var(--surface2);
 font-weight: 500;
}
.data-table tbody tr {
 border-bottom: 1px solid var(--border);
 transition: background var(--transition);
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td { padding: 13px 16px; color: var(--text); }

/* ── Badges ── */
.badge {
 display: inline-block;
 padding: 3px 9px;
 border-radius: 20px;
 font-size: 11px;
 font-weight: 500;
 letter-spacing: 0.5px;
}
.badge-green { background: rgba(76,175,135,0.15); color: var(--green); border: 1px solid #2e6b54; }
.badge-red { background: rgba(201,92,76,0.15); color: var(--red); border: 1px solid #6b3a34; }
.badge-gold { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid var(--gold-dim); }
.badge-blue { background: rgba(76,143,201,0.15); color: var(--blue); border: 1px solid #2e4f6b; }
.badge-muted { background: rgba(107,101,96,0.2); color: var(--muted); border: 1px solid var(--border); }

/* ── Section Toolbar ── */
.section-toolbar {
 display: flex;
 align-items: center;
 gap: 12px;
 margin-bottom: 18px;
}
.section-toolbar input,
.section-toolbar select {
 width: auto;
 min-width: 160px;
}

/* ── Buttons ── */
.btn {
 padding: 9px 18px;
 border-radius: 7px;
 font-size: 13px;
 font-weight: 500;
 border: none;
 transition: all var(--transition);
 white-space: nowrap;
}
.btn-primary {
 background: var(--gold);
 color: #0d0d0d;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-sm {
 padding: 5px 11px;
 font-size: 11.5px;
 border-radius: 5px;
}
.btn-outline {
 background: transparent;
 border: 1px solid var(--border);
 color: var(--muted);
}
.btn-outline:hover { border-color: var(--gold-dim); color: var(--gold); }
.btn-danger {
 background: rgba(201,92,76,0.15);
 border: 1px solid #6b3a34;
 color: var(--red);
}
.btn-danger:hover { background: rgba(201,92,76,0.25); }

/* ── Billing Form ── */
.billing-form {
 padding: 20px;
 display: flex;
 gap: 16px;
 align-items: flex-end;
 flex-wrap: wrap;
}
.billing-form .form-row { flex: 1; min-width: 200px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

.invoice-output {
 margin: 0 20px 20px;
 border: 1px dashed var(--gold-dim);
 border-radius: 8px;
 padding: 20px;
 font-size: 13.5px;
 line-height: 1.9;
 display: none;
}
.invoice-output.show { display: block; animation: fadeIn 0.3s ease; }
.invoice-title {
 font-family: var(--font-display);
 font-size: 22px;
 color: var(--gold-light);
 margin-bottom: 12px;
}
.invoice-row { display: flex; justify-content: space-between; color: var(--muted); }
.invoice-row.total { color: var(--gold-light); font-weight: 600; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 6px; font-size: 15px; }

/* ══════════════════════════════
 MODALS
 ══════════════════════════════ */
.modal-overlay {
 position: fixed; inset: 0;
 background: rgba(0,0,0,0.75);
 z-index: 200;
 display: none;
 place-items: center;
 backdrop-filter: blur(4px);
}
.modal-overlay.open { display: grid; animation: fadeIn 0.2s ease; }
.modal {
 background: var(--surface);
 border: 1px solid var(--border);
 border-radius: 12px;
 width: 420px;
 max-width: 95vw;
 overflow: hidden;
 animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.modal-header {
 padding: 18px 22px;
 border-bottom: 1px solid var(--border);
 display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 {
 font-family: var(--font-display);
 font-size: 18px;
 color: var(--gold-light);
}
.modal-header button {
 background: none; border: none;
 color: var(--muted); font-size: 18px;
 transition: color var(--transition);
}
.modal-header button:hover { color: var(--text); }
.modal-body { padding: 22px; }
.modal-body .btn { width: 100%; margin-top: 8px; padding: 11px; }

/* ══════════════════════════════
 TOAST
 ══════════════════════════════ */
.toast {
 position: fixed;
 bottom: 28px; right: 28px;
 background: var(--surface2);
 border: 1px solid var(--gold-dim);
 color: var(--gold-light);
 padding: 12px 20px;
 border-radius: 8px;
 font-size: 13.5px;
 transform: translateY(20px);
 opacity: 0;
 pointer-events: none;
 transition: all 0.3s ease;
 z-index: 300;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════
 RESPONSIVE
 ══════════════════════════════ */
@media (max-width: 900px) {
 .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
 .sidebar {
 transform: translateX(-100%);
 }
 .sidebar.open {
 transform: translateX(0);
 }
 .main {
 margin-left: 0;
 }
 .menu-btn { display: block; }
 .search-box input { width: 120px; }
 .stats-grid { grid-template-columns: 1fr 1fr; }
 .section { padding: 16px; }
}

/* ══════════════════════════════
 AUTH SCREEN
 ══════════════════════════════ */
.auth-screen {
 position: fixed; inset: 0;
 display: flex;
 z-index: 1000;
 background: var(--bg);
}
.auth-screen.hidden { display: none; }

/* Left branding panel */
.auth-left {
 width: 42%;
 background: var(--surface);
 border-right: 1px solid var(--border);
 padding: 52px 48px;
 display: flex;
 flex-direction: column;
 gap: 36px;
 position: relative;
 overflow: hidden;
}
.auth-left-deco {
 position: absolute;
 width: 360px; height: 360px;
 border-radius: 50%;
 background: radial-gradient(circle, rgba(201,168,76,0.08), transparent 70%);
 bottom: -80px; left: -80px;
 pointer-events: none;
}
.auth-brand {
 display: flex; align-items: center; gap: 10px;
}
.auth-logo-icon { font-size: 24px; color: var(--gold); }
.auth-logo-text {
 font-family: var(--font-display);
 font-size: 26px; font-weight: 600;
 color: var(--gold-light);
 letter-spacing: 1px;
}
.auth-tagline h2 {
 font-family: var(--font-display);
 font-size: 36px; font-weight: 300;
 color: var(--text); line-height: 1.25;
 margin-bottom: 14px;
}
.auth-tagline p { color: var(--muted); line-height: 1.7; font-size: 14px; }
.auth-features { display: flex; flex-direction: column; gap: 12px; }
.auth-feat {
 display: flex; align-items: center; gap: 12px;
 color: var(--muted); font-size: 13.5px;
 padding: 10px 14px;
 background: var(--surface2);
 border: 1px solid var(--border);
 border-radius: 8px;
 transition: border-color var(--transition), color var(--transition);
}
.auth-feat:hover { border-color: var(--gold-dim); color: var(--text); }
.auth-feat span { font-size: 16px; width: 22px; text-align: center; }

/* Right form panel */
.auth-right {
 flex: 1;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 48px 40px;
 overflow-y: auto;
}

/* Tabs */
.auth-tabs {
 display: flex;
 background: var(--surface2);
 border: 1px solid var(--border);
 border-radius: 8px;
 padding: 4px;
 margin-bottom: 32px;
 width: 100%; max-width: 420px;
}
.auth-tab {
 flex: 1;
 padding: 9px;
 border: none;
 background: none;
 border-radius: 6px;
 color: var(--muted);
 font-size: 13.5px;
 font-weight: 500;
 transition: all var(--transition);
}
.auth-tab.active {
 background: var(--gold);
 color: #0d0d0d;
}

/* Form */
.auth-form { width: 100%; max-width: 420px; }
.auth-form.hidden { display: none; }
.auth-form-title {
 font-family: var(--font-display);
 font-size: 28px; font-weight: 600;
 color: var(--gold-light);
 margin-bottom: 4px;
}
.auth-form-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 28px; }

.auth-field { margin-bottom: 16px; }
.auth-field label {
 display: block;
 font-size: 11px;
 text-transform: uppercase;
 letter-spacing: 1px;
 color: var(--muted);
 margin-bottom: 6px;
}
.auth-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-toggle {
 position: absolute; right: 10px; top: 50%;
 transform: translateY(-50%);
 background: none; border: none;
 color: var(--muted); font-size: 15px;
 transition: color var(--transition);
}
.pw-toggle:hover { color: var(--gold); }

.auth-remember {
 display: flex; justify-content: space-between; align-items: center;
 font-size: 12.5px; color: var(--muted);
 margin-bottom: 20px;
}
.auth-remember label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-remember input[type="checkbox"] { width: auto; accent-color: var(--gold); }
.auth-remember a { color: var(--gold-dim); transition: color var(--transition); }
.auth-remember a:hover { color: var(--gold); }

/* Password strength */
.pw-strength-wrap {
 height: 4px;
 background: var(--border);
 border-radius: 2px;
 margin: 8px 0 4px;
 overflow: hidden;
}
.pw-strength-bar {
 height: 100%; width: 0%;
 border-radius: 2px;
 transition: width 0.4s ease, background 0.4s ease;
}
.pw-strength-label { font-size: 11px; color: var(--muted); margin-bottom: 14px; min-height: 16px; }

.auth-error {
 color: var(--red);
 font-size: 12.5px;
 margin-bottom: 10px;
 min-height: 18px;
}
.auth-btn {
 width: 100%;
 padding: 13px;
 background: var(--gold);
 color: #0d0d0d;
 border: none;
 border-radius: 8px;
 font-size: 14px;
 font-weight: 600;
 letter-spacing: 0.5px;
 cursor: pointer;
 transition: all var(--transition);
 margin-bottom: 14px;
}
.auth-btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.auth-hint { text-align: center; font-size: 12px; color: var(--muted); }
.auth-hint strong { color: var(--gold-dim); }

/* App wrapper */
.app-wrapper { display: flex; min-height: 100vh; }
.app-wrapper.hidden { display: none; }

/* ── Responsive auth ── */
@media (max-width: 750px) {
 .auth-right { padding: 36px 24px; }
}