:root {
  --blue-700: #1652b0;
  --blue-600: #1f67d1;
  --blue-500: #2b7de9;
  --blue-50: #eef5ff;
  --orange-600: #ef5a22;
  --orange-500: #ff6b2c;
  --orange-50: #fff3ec;
  --ink: #152033;
  --muted: #667085;
  --line: #e6ebf2;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --sidebar-w: 272px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(22, 82, 176, 0.08);
  --shadow-lg: 0 24px 60px rgba(21, 32, 51, 0.16);
  --danger: #d92d20;
  --success: #039855;
  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(255, 107, 44, 0.12), transparent 55%),
    radial-gradient(800px 380px at -10% 0%, rgba(43, 125, 233, 0.14), transparent 50%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 45%, #eef3f9 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Auth / Login ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: #0d2f6b;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(15, 52, 120, 0.55), rgba(12, 35, 82, 0.85)),
    radial-gradient(circle at 70% 20%, rgba(255, 107, 44, 0.35), transparent 40%),
    linear-gradient(145deg, #1652b0, #0d2f6b 60%, #0a224e);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.45;
  pointer-events: none;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  animation: riseIn 0.7s ease both;
}

.auth-visual h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.05;
  margin: 1.25rem 0 0.75rem;
  letter-spacing: -0.03em;
}

.auth-visual p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  max-width: 36ch;
}

.auth-logo-lg {
  width: min(220px, 55vw);
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.25));
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(500px 240px at 80% 0%, rgba(255, 107, 44, 0.1), transparent 60%),
    #f7f9fc;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
  animation: riseIn 0.55s ease 0.08s both;
}

.auth-card-logo {
  width: 120px;
  margin: 0 auto 1rem;
}

.auth-brand {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.2rem;
  text-align: center;
  color: var(--blue-700);
}

.auth-brand span { color: var(--orange-600); }

.auth-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Shell ---------- */
.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, #123f95 0%, #0e3278 45%, #0b275f 100%);
  color: #f4f8ff;
  padding: 1rem 0.9rem 1.1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 8px 0 30px rgba(11, 39, 95, 0.18);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 0.85rem;
}

.brand-block img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 0.25rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.brand-block .brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-block .brand-text strong {
  display: block;
  font-size: 1.05rem;
  color: #fff;
}

.brand-block .brand-text span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-500);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.2rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.nav-group {
  margin: 0.95rem 0.55rem 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  font-weight: 700;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 0.85rem;
  margin-bottom: 0.2rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.82);
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-link-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-link-item.active {
  background: linear-gradient(90deg, rgba(255,107,44,0.22), rgba(255,255,255,0.08));
  border-color: rgba(255,107,44,0.35);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--orange-500);
}

.nav-link-item.sub {
  margin-left: 0.55rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  opacity: 0.92;
}

.sidebar-footer {
  margin-top: 0.75rem;
  padding: 0.9rem 0.75rem 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange-500), #ff8f57);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.user-chip small {
  display: block;
  opacity: 0.7;
  font-size: 0.72rem;
}

.main {
  padding: 1.35rem 1.6rem 2.5rem;
  min-width: 0;
}

.main-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin: -0.25rem 0 1rem;
}

.notif-root {
  position: relative;
}

.notif-bell {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--ink);
}

.notif-bell:hover {
  border-color: #c9ddff;
  background: var(--blue-50);
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  width: min(360px, 88vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 40;
  overflow: hidden;
}

.notif-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.notif-panel-head strong {
  font-size: 0.92rem;
}

.notif-panel-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notif-list {
  max-height: 360px;
  overflow: auto;
}

.notif-item {
  display: block;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item.unread {
  background: #eff6ff;
}

.notif-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.notif-item span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.notif-item small {
  display: block;
  margin-top: 0.35rem;
  color: #94a3b8;
  font-size: 0.74rem;
}

.notif-empty {
  padding: 1.1rem 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.notif-panel-foot {
  padding: 0.65rem 0.9rem;
  border-top: 1px solid var(--line);
  text-align: center;
  background: #f8fafc;
}

.notif-row-unread td {
  font-weight: 600;
  background: #f8fbff;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  animation: riseIn 0.4s ease both;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}

.page-sub {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  animation: riseIn 0.45s ease both;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.table-wrap { overflow-x: auto; }

.table-wrap.fixed-grid {
  max-height: min(62vh, 640px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.search-box {
  flex: 1;
  min-width: min(100%, 280px);
  max-width: 420px;
}

.search-box input[type="search"],
.search-bar input[type="search"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.search-box input[type="search"]:focus,
.search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(43, 125, 233, 0.14);
}

.search-bar {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-bar .search-field {
  flex: 1 1 280px;
  min-width: 0;
}

.search-bar .search-field label {
  margin-bottom: 0.45rem;
}

.search-bar .search-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.search-bar .search-actions .btn {
  min-height: 48px;
  padding-inline: 1.2rem;
}

select.customer-select-list {
  width: 100%;
  min-height: 220px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.45;
  padding: 0.35rem;
}

select.customer-select-list option {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #eef2f7;
}

.result-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 800;
  background: #f8fafc;
}

.table-wrap.fixed-grid table.data thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  box-shadow: 0 1px 0 var(--line);
}

table.data th:first-child { border-top-left-radius: 10px; }
table.data th:last-child { border-top-right-radius: 10px; }

.table-wrap.fixed-grid table.data th:first-child,
.table-wrap.fixed-grid table.data th:last-child {
  border-radius: 0;
}

table.data tbody tr {
  transition: background 0.15s ease, transform 0.15s ease;
}

table.data tbody tr:hover {
  background: var(--blue-50);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  padding: 0.62rem 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 999px;
  background: var(--blue-600);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--blue-700);
  box-shadow: 0 8px 18px rgba(31, 103, 209, 0.22);
}

.btn-accent {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: #fff;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #ff7a40, #e64f18);
  box-shadow: 0 8px 18px rgba(239, 90, 34, 0.28);
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--blue-50);
  border-color: #c9d8f0;
  box-shadow: none;
}

.btn-danger {
  background: #fff5f5;
  border-color: #fecdca;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fee4e2;
  box-shadow: none;
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
}

.actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="search"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(43, 125, 233, 0.14);
}

.alert {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  animation: riseIn 0.35s ease both;
}

.alert-success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: var(--success);
}

.alert-error {
  background: #fef3f2;
  border-color: #fecdca;
  color: var(--danger);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
}

.badge-ok { background: #ecfdf3; color: var(--success); }
.badge-blocked { background: #fef3f2; color: var(--danger); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.2rem 1.15rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: riseIn 0.5s ease both;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--orange-500), var(--blue-600));
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(22, 82, 176, 0.12);
  border-color: #d5e4fb;
}

.stat-card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-size: 1.2rem;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hero-band {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  animation: riseIn 0.45s ease both;
}

.hero-copy {
  background:
    linear-gradient(135deg, rgba(22, 82, 176, 0.96), rgba(15, 55, 130, 0.95)),
    radial-gradient(circle at 90% 20%, rgba(255,107,44,0.35), transparent 40%);
  color: #fff;
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.hero-copy h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.hero-copy p {
  margin: 0;
  color: rgba(255,255,255,0.84);
  max-width: 48ch;
  position: relative;
  z-index: 1;
}

.hero-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.hero-side img {
  width: min(180px, 70%);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1.25rem;
}

.detail-item dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.2rem;
  font-weight: 800;
}

.detail-item dd {
  margin: 0;
  font-weight: 700;
}

.field-validation-error,
.validation-summary-errors {
  color: var(--danger);
  font-size: 0.88rem;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Public book-service page ---------- */
.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.public-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 0.2rem;
  border: 1px solid var(--line);
}

.public-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.public-brand span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.public-main {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  flex: 1;
}

.public-hero {
  margin-bottom: 1.25rem;
  animation: riseIn 0.4s ease both;
}

.public-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}

.public-hero p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.public-card {
  animation: riseIn 0.45s ease both;
}

.public-form {
  max-width: none;
}

.public-section {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.public-form textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  border-radius: 12px;
  resize: vertical;
  min-height: 96px;
}

.consent-box {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.public-ticket {
  display: inline-block;
  margin: 0 auto;
  padding: 0.85rem 1.4rem;
  border-radius: 14px;
  background: var(--blue-50);
  border: 1px solid #c9ddff;
  color: var(--blue-700);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.public-footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .auth-shell,
  .admin-shell,
  .hero-band {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 260px;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .sidebar-nav {
    max-height: 320px;
  }
}
