* { box-sizing: border-box; }

:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #f9fbff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #5b7cff;
  --primary-2: #7f56d9;
  --accent: #00b8a9;
  --success: #0f9d58;
  --warning: #f59e0b;
  --danger: #e11d48;
  --shadow: 0 20px 60px rgba(31, 41, 55, 0.08);
  --radius: 22px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91,124,255,0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(127,86,217,0.14), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}

img { max-width: 100%; }

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
  font-weight: 800;
}

.brand h1,
.brand h2,
.brand p {
  margin: 0;
}

.nav-actions,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: stretch;
  padding: 14px 0 34px;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(229,231,235,0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px;
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3.6rem);
  line-height: 1.03;
  margin: 0 0 14px;
}

.hero p.lead {
  font-size: 1.06rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.badge {
  background: #f0f4ff;
  color: #3651d4;
  border: 1px solid #dce6ff;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat {
  padding: 18px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid #e9eef8;
  border-radius: 18px;
}

.stat .label {
  font-size: 0.88rem;
  color: var(--muted);
}

.stat .value {
  font-size: 1.55rem;
  font-weight: 800;
  margin-top: 8px;
}

.section {
  padding: 20px 0 28px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel {
  padding: 24px;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.93rem;
  font-weight: 700;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d9e0ec;
  border-radius: 16px;
  background: #fff;
  outline: none;
  transition: 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(91,124,255,0.7);
  box-shadow: 0 0 0 4px rgba(91,124,255,0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(91,124,255,0.22);
}

.btn-soft {
  color: var(--text);
  background: #eef3ff;
  border: 1px solid #d9e4ff;
}

.btn-success {
  color: white;
  background: linear-gradient(135deg, #11a36f, #0f9d58);
}

.btn-danger {
  color: white;
  background: linear-gradient(135deg, #ef476f, var(--danger));
}

.btn-outline {
  color: var(--primary);
  background: white;
  border: 1px solid #d6e0ff;
}

.notice,
.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.notice {
  background: #effaf5;
  border: 1px solid #cceedd;
  color: #0c6e48;
}

.alert {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid #edf0f5;
  border-radius: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: #fff;
}

th, td {
  text-align: left;
  padding: 14px 15px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
}

th {
  background: #f8fbff;
  color: #44516a;
  font-size: 0.9rem;
}

td small {
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
}

.status-pending_payment,
.status-pending { background: #fff7ed; color: #b45309; }
.status-confirmed,
.status-paid { background: #effaf5; color: #0f766e; }
.status-in_progress { background: #eef2ff; color: #4338ca; }
.status-completed { background: #ecfdf3; color: #15803d; }
.status-cancelled,
.status-failed,
.status-expired,
.status-no_show { background: #fff1f2; color: #be123c; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi {
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid #e7edf6;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.kpi .title {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.kpi .num {
  font-size: 1.9rem;
  font-weight: 800;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-track {
  width: 100%;
  height: 12px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px;
}

.login-card {
  width: min(560px, 100%);
  padding: 28px;
}

.split {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty {
  padding: 28px;
  border-radius: 20px;
  border: 1px dashed #d8e1ee;
  background: #fbfdff;
  color: var(--muted);
  text-align: center;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.tag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: #f4f8ff;
  border: 1px solid #d8e5ff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
}

hr.sep {
  border: 0;
  border-top: 1px solid #edf0f5;
  margin: 22px 0;
}

@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-3,
  .grid-4,
  .kpis,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 24px;
  }

  table {
    min-width: 720px;
  }
}
