:root {
  --bg: #0B0C0C;
  --bg-2: #121414;
  --surface: #181B1A;
  --surface-2: #202423;
  --emerald: #059674;
  --emerald-light: #10B981;
  --emerald-deep: #046C53;
  --emerald-glow: rgba(5, 150, 116, 0.25);
  --text: #EEF2F0;
  --text-dim: #9EA8A3;
  --line: rgba(5, 150, 116, 0.2);
  --danger: #ef4444;
  --danger-light: #f87171;
  --display: 'Bebas Neue', sans-serif;
  --body: 'Inter', sans-serif;
  --sidebar-w: 250px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--body); font-size: 0.95rem; }
button, input, select, textarea { font-family: var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.03em; text-transform: uppercase; }
::selection { background: var(--emerald); color: #fff; }
a { color: var(--emerald-light); text-decoration: none; }

/* ---------------- LOGIN SCREEN ---------------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top, #101312 0%, #050606 70%);
  padding: 1.5rem;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 2.5rem; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-logo { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.5rem; }
.login-logo strong { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.08em; display: block; }
.login-logo span { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.login-card h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.muted { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 1.5rem; }
.login-card label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 1rem 0 0.4rem; }
.login-card input, .login-card select, .login-card textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.75rem 0.9rem; color: var(--text); transition: border-color 0.2s;
}
.login-card input:focus { outline: none; border-color: var(--emerald-light); }
.btn-primary {
  margin-top: 1.5rem; background: linear-gradient(180deg, var(--emerald-light), var(--emerald-deep));
  border: none; color: #fff; padding: 0.8rem 1.4rem; border-radius: 4px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { box-shadow: 0 6px 18px var(--emerald-glow); transform: translateY(-1px); }
.form-error { color: var(--danger-light); font-size: 0.82rem; margin-top: 0.8rem; display: none; }
.back-link { display: block; text-align: center; margin-top: 1.5rem; font-size: 0.82rem; color: var(--text-dim); }

/* ---------------- ADMIN SHELL / SIDEBAR ---------------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: transform 0.3s;
}
.sidebar-brand { display: flex; align-items: center; gap: 0.6rem; padding: 1.5rem 1.3rem; border-bottom: 1px solid var(--line); }
.sidebar-brand span { font-family: var(--display); letter-spacing: 0.06em; font-size: 1.1rem; }
.sidebar-brand em { color: var(--emerald-light); font-style: normal; }
.sidebar-brand small { display: block; font-family: var(--body); text-transform: uppercase; font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.15em; }

.sidebar-nav { flex: 1; padding: 1rem 0.8rem; display: flex; flex-direction: column; gap: 0.2rem; }
.nav-section-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin: 1rem 0.6rem 0.4rem; }
.nav-section-label:first-child { margin-top: 0.2rem; }

.nav-link {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  background: none; border: none; color: var(--text-dim); padding: 0.65rem 0.8rem;
  border-radius: 6px; font-size: 0.88rem; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: rgba(5, 150, 116, 0.12); color: var(--emerald-light); font-weight: 600; }

.sidebar-footer { padding: 1rem 0.8rem 1.5rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.2rem; }
.logout-link { color: var(--danger-light); }
.logout-link:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger-light); }

/* ---------------- TOPBAR ---------------- */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 70px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; border-bottom: 1px solid var(--line); background: var(--bg-2);
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 1.6rem; letter-spacing: 0.04em; flex: 1; }
.burger-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; margin-right: 1rem; }
.topbar-user { position: relative; display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: var(--text-dim); cursor: pointer; user-select: none; }
.avatar-circle {
  width: 34px; height: 34px; border-radius: 50%; background: var(--emerald); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}
.avatar-menu {
  display: none; position: absolute; top: calc(100% + 0.6rem); right: 0; min-width: 160px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4); z-index: 50;
}
.avatar-menu.open { display: block; }
.avatar-menu-item {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left; background: none; border: none;
  color: var(--danger-light); padding: 0.6rem 0.7rem; border-radius: 4px; font-size: 0.85rem; cursor: pointer;
}
.avatar-menu-item:hover { background: rgba(239, 68, 68, 0.1); }

.content { padding: 2rem; flex: 1; }

/* ---------------- STAT CARDS ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.4rem; }
.stat-card .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.stat-card .value { font-family: var(--display); font-size: 2.4rem; color: var(--emerald-light); margin-top: 0.3rem; }

/* ---------------- CARDS / PANELS ---------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; margin-bottom: 1.6rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 0.8rem; }
.panel-head h2 { font-size: 1.5rem; letter-spacing: 0.03em; }

.btn-add {
  background: var(--emerald); border: none; color: #fff; padding: 0.55rem 1rem; border-radius: 4px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 0.03em;
}
.btn-add:hover { background: var(--emerald-deep); }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text); padding: 0.55rem 1rem;
  border-radius: 4px; cursor: pointer; font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald-light); }

/* ---------------- TABLE ---------------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.data-table th {
  text-align: left; padding: 0.7rem 0.7rem; color: var(--text-dim); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data-table td { padding: 0.8rem 0.7rem; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
table.data-table tr:hover td { background: rgba(255,255,255,0.015); }

.badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 20px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-vip { background: rgba(16, 185, 129, 0.15); color: var(--emerald-light); border: 1px solid var(--emerald); }
.badge-standard { background: rgba(158, 168, 163, 0.1); color: var(--text-dim); border: 1px solid var(--line); }
.badge-urgent { background: rgba(239, 68, 68, 0.15); color: var(--danger-light); border: 1px solid var(--danger); }
.badge-cancelled { background: rgba(239, 68, 68, 0.1); color: var(--danger-light); border: 1px solid var(--danger); }
.badge-confirmed { background: rgba(16, 185, 129, 0.15); color: var(--emerald-light); border: 1px solid var(--emerald); }

.action-btns { display: flex; gap: 0.5rem; }
.btn-small { padding: 0.4rem 0.75rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; cursor: pointer; border-radius: 4px; letter-spacing: 0.03em; }
.btn-edit { background: transparent; border: 1px solid var(--emerald); color: var(--emerald-light); }
.btn-edit:hover { background: var(--emerald); color: #fff; }
.btn-delete { background: transparent; border: 1px solid var(--danger); color: var(--danger-light); }
.btn-delete:hover { background: var(--danger); color: #fff; }

.empty-row td { text-align: center; padding: 2.5rem; color: var(--text-dim); }

/* ---------------- FORMS (used inside modal & account page) ---------------- */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.7rem 0.85rem; color: var(--text); transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--emerald-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.4rem; }

.service-check-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 220px; overflow-y: auto; padding: 0.2rem; }
.service-check-row {
  display: flex; align-items: center; gap: 0.6rem; background: var(--bg); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.6rem 0.8rem; font-size: 0.85rem; cursor: pointer;
}
.service-check-row:hover { border-color: var(--emerald); }
.service-check-row input[type="checkbox"] { accent-color: var(--emerald); width: 16px; height: 16px; flex-shrink: 0; }

/* ---------------- IMAGE UPLOADS & THUMBNAILS ---------------- */
.thumb-preview {
  width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block;
}
.thumb-empty {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: 6px;
  color: var(--text-dim); font-size: 0.62rem; text-align: center; text-transform: uppercase; letter-spacing: 0.03em;
}
.current-photo { margin-bottom: 0.6rem; }
.current-photo img {
  width: 110px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block;
}
input[type="file"] {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.6rem 0.7rem; color: var(--text-dim); font-size: 0.82rem; cursor: pointer;
}

/* ---------------- MODAL ---------------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; z-index: 2000; padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2rem;
  max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto; position: relative;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; }
.modal-box h2 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 1.5rem; }

/* ---------------- TOAST ---------------- */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--surface-2); border: 1px solid var(--emerald);
  color: var(--text); padding: 0.9rem 1.3rem; border-radius: 6px; font-size: 0.85rem; z-index: 3000;
  opacity: 0; transform: translateY(10px); transition: opacity 0.25s, transform 0.25s; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: var(--danger); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 100; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-nav { flex: 0 1 auto; }
  .burger-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .content { padding: 1.2rem; }
  .topbar { padding: 0 1.2rem; }
}
