/* ============================================================
   NISARG HOTEL — Admin Suite
   Same premium dark charcoal & brass identity as the public site.
   ============================================================ */

@import url('theme.css');

* { margin:0; padding:0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 8% 6%, rgba(180,124,44,0.09), transparent 42%),
    radial-gradient(circle at 92% 14%, rgba(193,81,45,0.07), transparent 46%),
    radial-gradient(circle at 1px 1px, rgba(180,124,44,0.04) 1px, transparent 0);
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: auto, auto, 26px 26px;
  background-attachment: fixed, fixed, scroll;
  color: var(--ivory);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
input, select, textarea, button { font-family: var(--font-body); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius); font-weight: 700; font-size: 0.9rem;
  cursor: pointer; border: none; transition: transform 0.25s var(--ease), background 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary { background: linear-gradient(160deg, var(--clay), var(--clay-dark)); color: var(--ivory); box-shadow: var(--shadow-soft); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(193,81,45,0.35); }
.btn-outline { background: rgba(226,182,94,0.05); border: 1.5px solid rgba(226,182,94,0.4); color: var(--ivory); }
.btn-outline:hover { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }
.btn-sm { padding: 9px 15px; font-size: 0.8rem; border-radius: 6px; }
.btn-danger { background: linear-gradient(160deg, #D2543A, var(--clay-dark)); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(193,81,45,0.35); }
.btn-ghost { background: rgba(226,182,94,0.08); color: var(--ivory); }
.btn-ghost:hover { background: rgba(226,182,94,0.16); }
.btn-whatsapp { background: linear-gradient(160deg, #2FBE55, #1E9E42); color: #fff; }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37,168,74,0.35); }
.btn-whatsapp:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ivory-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.form-group input, .form-group select, .form-group textarea {
  padding: 12px 14px; border-radius: 7px; border: 1.5px solid var(--panel-border);
  background: var(--ink-deep); font-size: 0.92rem; color: var(--ivory);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(246,239,223,0.32); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold-light); box-shadow: 0 0 0 3px rgba(226,182,94,0.14); }

/* ================= LOGIN / SETUP ================= */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(226,182,94,0.14), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(193,81,45,0.1), transparent 45%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-deep) 100%);
  padding: 20px;
}
.login-card {
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--panel-border); border-top: 2px solid rgba(226,182,94,0.5);
  border-radius: 18px; padding: 42px 38px;
  width: 100%; max-width: 400px; box-shadow: 0 30px 70px rgba(30,28,22,0.16);
}
.login-brand { text-align: center; margin-bottom: 30px; }
.login-logo { font-family: var(--font-display); font-size: 1.75rem; color: var(--ivory); }
.login-logo span { display: block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; color: var(--gold-light); margin-top: 7px; }
.login-brand p { color: var(--ivory-dim); font-size: 0.85rem; margin-top: 10px; }
.login-error { display: none; color: #E0705A; font-size: 0.82rem; margin: -4px 0 14px; }
.login-error.show { display: block; }
.login-hint { text-align: center; font-size: 0.78rem; color: var(--ivory-dim); margin-top: 22px; line-height: 1.6; }
.login-back { display: block; text-align: center; margin-top: 18px; font-size: 0.82rem; color: var(--ivory-dim); transition: color 0.2s ease; }
.login-back:hover { color: var(--gold-light); }

/* ================= DASHBOARD LAYOUT ================= */
.dash-body { background: var(--ink); min-height: 100vh; }
.dash-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 254px; background: linear-gradient(180deg, var(--panel) 0%, var(--ink-deep) 100%);
  color: var(--ivory); border-right: 1px solid var(--panel-border);
  display: flex; flex-direction: column; padding: 28px 18px; flex-shrink: 0;
  position: fixed; top:0; left:0; bottom:0; z-index: 200;
  transition: transform 0.3s var(--ease);
}
.sidebar-logo { font-family: var(--font-display); font-size: 1.4rem; padding: 6px 10px 24px; border-bottom: 1px solid var(--panel-border); margin-bottom: 20px; color: var(--ivory); }
.sidebar-logo span { display: block; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.18em; color: var(--gold-light); margin-top: 6px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 8px; background: transparent; border: none;
  color: rgba(246,239,223,0.68); font-size: 0.92rem; cursor: pointer; transition: 0.2s ease;
}
.sidebar-nav button .ic { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav button:hover { background: rgba(226,182,94,0.08); color: var(--ivory); }
.sidebar-nav button.active { background: linear-gradient(160deg, var(--gold-light), var(--gold)); color: var(--ink-deep); font-weight: 700; }
.sidebar-foot { border-top: 1px solid var(--panel-border); padding-top: 16px; margin-top: 16px; }
.sidebar-foot .user { font-size: 0.82rem; color: rgba(246,239,223,0.6); margin-bottom: 12px; }
.sidebar-foot .user strong { color: var(--ivory); display:block; font-family: var(--font-mono); }

.main { margin-left: 254px; flex: 1; padding: 32px 36px 60px; width: 100%; }
.topbar {
  position: sticky; top: 0; z-index: 120;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  margin: -32px -36px 30px;
  padding: 20px 36px;
  background: rgba(16,32,26,0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 8px 24px rgba(2,6,4,0.35);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-brand { display: none; flex-direction: column; line-height: 1; padding-right: 16px; border-right: 1px solid var(--panel-border); }
.topbar-brand .tb-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--ivory); }
.topbar-brand .tb-sub { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.16em; color: var(--gold-light); margin-top: 3px; }
.topbar h1 { font-family: var(--font-display); font-size: 1.55rem; color: var(--ivory); font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar .date { font-family: var(--font-mono); font-size: 0.78rem; color: rgba(246,239,223,0.6); }
.topbar-link { border-color: rgba(226,182,94,0.35); color: var(--ivory); }
.topbar-link:hover { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }
.menu-toggle { display: none; background: rgba(226,182,94,0.1); color: var(--ivory); border:1px solid var(--panel-border); border-radius: 6px; padding: 8px 12px; font-size:1.1rem; cursor:pointer; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 34px; }
.stat-card {
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--panel-border); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow-soft);
  border-left: 3px solid var(--gold);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(30,28,22,0.14); }
.stat-card .label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ivory-dim); }
.stat-card .value { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--gold-light); margin-top: 8px; }
.stat-card.income { border-left-color: var(--moss); }
.stat-card.income .value { color: #6FCB73; }
.stat-card.due { border-left-color: var(--clay); }
.stat-card.due .value { color: #E0705A; }

.panel { background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%); border: 1px solid var(--panel-border); border-radius: 14px; box-shadow: var(--shadow-soft); padding: 28px; margin-bottom: 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.panel-head h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; color: var(--ivory); }

.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px dashed var(--panel-border); }
.inline-form .form-group { margin-bottom: 0; }
.inline-form .btn { height: 46px; }

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ivory-dim); padding: 11px 12px; border-bottom: 2px solid var(--panel-border);
}
tbody td { padding: 14px 12px; border-bottom: 1px solid var(--panel-border); font-size: 0.9rem; color: var(--ivory); }
tbody tr { transition: background 0.2s ease; }
tbody tr:hover { background: rgba(226,182,94,0.05); }
.badge { padding: 5px 11px; border-radius: 20px; font-size: 0.72rem; font-family: var(--font-mono); font-weight: 600; }
.badge.veg { background: rgba(76,175,80,0.16); color: #6FCB73; }
.badge.nonveg { background: rgba(193,81,45,0.16); color: #E0705A; }
.badge.available { background: rgba(76,175,80,0.16); color: #6FCB73; }
.badge.unavailable { background: rgba(246,239,223,0.1); color: var(--ivory-dim); }
.badge.paid { background: rgba(76,175,80,0.16); color: #6FCB73; }
.badge.unpaid { background: rgba(193,81,45,0.16); color: #E0705A; }
.badge.pending { background: rgba(226,182,94,0.18); color: var(--gold-light); }
.badge.preparing { background: rgba(193,81,45,0.16); color: #E0705A; }
.badge.served { background: rgba(246,239,223,0.1); color: var(--ivory); }
.badge.cancelled { background: rgba(246,239,223,0.08); color: var(--ivory-dim); }
.row-actions { display: flex; gap: 8px; }
.empty-row td { text-align: center; color: var(--ivory-dim); font-family: var(--font-mono); padding: 28px; }

.tab-pills { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-pill {
  font-family: var(--font-mono); font-size: 0.78rem; padding: 10px 17px; border-radius: 20px;
  border: 1.5px solid var(--panel-border); background: rgba(226,182,94,0.04); color: var(--ivory); cursor: pointer;
  transition: 0.25s ease;
}
.tab-pill.active { background: linear-gradient(160deg, var(--gold-light), var(--gold)); color: var(--ink-deep); border-color: var(--gold); }

.section-view { display: none; }
.section-view.active { display: block; }

/* Overlay for mobile sidebar */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(30,28,22,0.35); backdrop-filter: blur(2px); z-index: 150; display: none; }
.sidebar-overlay.show { display: block; }

@media (max-width: 980px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 22px 18px 50px; }
  .menu-toggle { display: inline-flex; }
  .topbar { margin: -22px -18px 24px; padding: 14px 18px; }
  .topbar-brand { display: flex; }
  .topbar h1 { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .topbar h1 { display: none; }
  .topbar .date { display: none; }
}
@media (max-width: 620px) {
  .stat-grid { grid-template-columns: 1fr; }
  table, thead, tbody, tr { display: block; }
  thead { display: none; }
  tbody tr { background: var(--panel); margin-bottom: 12px; border-radius: 10px; padding: 10px 4px; box-shadow: var(--shadow-soft); border: 1px solid var(--panel-border); }
  tbody td { display: flex; justify-content: space-between; gap: 10px; border: none; padding: 9px 14px; }
  tbody td::before { content: attr(data-label); font-family: var(--font-mono); font-size: 0.7rem; color: var(--ivory-dim); text-transform: uppercase; }
}

/* ============================================================
   WORKER DASHBOARD (clock in / clock out — separate from admin)
   ============================================================ */
.worker-shell { max-width: 620px; margin: 0 auto; padding: 26px 20px 60px; }
.worker-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.worker-topbar .brand { font-family: var(--font-display); font-size: 1.3rem; color: var(--ivory); }
.worker-topbar .brand span { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--gold-light); margin-top: 4px; }
.worker-hello { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ivory-dim); margin-bottom: 22px; }
.worker-hello strong { color: var(--ivory); }

.shift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 560px) { .shift-grid { grid-template-columns: 1fr; } }

.shift-card { background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%); border: 1px solid var(--panel-border); border-radius: 14px; box-shadow: var(--shadow-soft); padding: 22px; }
.shift-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; color: var(--ivory); margin-bottom: 4px; }
.shift-card .shift-time-range { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ivory-dim); margin-bottom: 16px; }
.shift-status { font-family: var(--font-mono); font-size: 0.78rem; padding: 8px 12px; border-radius: 8px; margin-bottom: 16px; background: rgba(246,239,223,0.06); color: var(--ivory-dim); }
.shift-status.status-in { background: rgba(76,175,80,0.14); color: #3E8E42; }
.shift-status.status-done { background: rgba(246,239,223,0.08); color: var(--ivory-dim); }
.shift-card .btn { width: 100%; justify-content: center; }

.worker-history table { font-size: 0.86rem; }
.worker-logout { background: none; border: 1.5px solid var(--panel-border); color: var(--ivory-dim); font-family: var(--font-mono); font-size: 0.76rem; padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: 0.2s ease; }
.worker-logout:hover { border-color: var(--clay); color: var(--clay); }
