:root {
  --bg: #f2f5f9;
  --card-bg: #ffffff;
  --text: #101828;
  --muted: #667085;
  --border: #e4e7ec;
  --primary: #0a4dc2;
  --primary-dark: #06316e;
  --primary-light: #eaf1fd;
  --accent: #12b8a6;
  --danger: #dc2626;
  --ok: #15803d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */
.topbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 2px 8px rgba(6, 49, 110, 0.25);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
}
.brand {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.brand-text { font-weight: 400; opacity: 0.9; }
.topnav { display: flex; align-items: center; gap: 16px; font-size: 0.9rem; flex-wrap: wrap; }
.who { opacity: 0.95; display: flex; align-items: center; gap: 8px; }
.who-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.link-btn {
  background: none; border: none; color: white; text-decoration: none;
  cursor: pointer; font-size: 0.9rem; padding: 4px 10px; font-weight: 600;
  border-radius: 6px; opacity: 0.9; transition: background 0.15s, opacity 0.15s;
}
.link-btn:hover { background: rgba(255, 255, 255, 0.15); opacity: 1; }

.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }

.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.page-head h1 { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; font-size: 1.05rem; font-weight: 700; }

.login-wrap { display: flex; justify-content: center; padding-top: 60px; }
.login-card {
  max-width: 380px; width: 100%; box-shadow: var(--shadow-md);
  text-align: center;
}
.login-logo-wrap {
  display: inline-flex;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.login-card .login-logo { height: 40px; display: block; }
.login-card h1 { font-size: 1.35rem; margin-bottom: 4px; }
.login-card form { text-align: left; margin-top: 18px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; color: #344054; }
.stack input, .stack textarea, label input, label textarea {
  font-family: inherit; font-size: 0.98rem; font-weight: 400;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stack input:focus, .stack textarea:focus, label input:focus, label textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.checkbox-label input { width: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-span-2 { grid-column: 1 / -1; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1 1 auto; min-width: 0; }
.input-row select { flex: 0 0 auto; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.94rem; text-decoration: none; cursor: pointer; background: #eef1f4;
  color: var(--text); transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-small { padding: 6px 12px; font-size: 0.84rem; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 1px 2px rgba(10, 77, 194, 0.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: white; border-color: var(--border); color: #344054; }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }

.actions-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.95rem; border: 1px solid transparent; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.ok-text { color: var(--ok); }
.error-text { color: var(--danger); }

.table-card, .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 560px; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }
tbody tr:hover { background: #fafbfc; }
.actions { display: flex; gap: 8px; }

.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-off { background: #f2f4f7; color: #667085; }

.danger-zone { border-color: #fecaca; }
.danger-zone h2 { color: #991b1b; }

.voucher-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.voucher-chip {
  background: var(--primary-light); border: 1px solid #bfdbfe; border-radius: 8px; padding: 9px 13px;
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.95rem; color: var(--primary-dark);
}

.voucher-print-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.voucher-card {
  border: 1.5px dashed #9ca3af; border-radius: 12px; padding: 18px; text-align: center; background: white;
}
.voucher-hotel { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.voucher-code {
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: 1.4rem; font-weight: 700; margin: 10px 0;
  letter-spacing: 0.03em; color: var(--primary-dark);
}
.voucher-wifi { font-size: 0.78rem; color: var(--primary-dark); margin: 2px 0 8px; }
.voucher-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.voucher-ref { font-size: 0.8rem; font-weight: 600; color: var(--primary-dark); margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--border); }

.site-footer { text-align: center; color: var(--muted); font-size: 0.82rem; padding: 24px; }

@media print {
  .topbar, .site-footer, .no-print { display: none !important; }
  body { background: white; }
  .container { padding: 0; max-width: none; }
  .voucher-card { break-inside: avoid; }
}
