/* ============================================
   BOOKING SYSTEM - CORE STYLES
   Mobile-first, IST
   ============================================ */

:root {
  --brand: #4F46E5;
  --brand-dark: #4338CA;
  --brand-light: #EEF2FF;
  --brand-ring: rgba(79, 70, 229, 0.15);

  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-mid: #475569;
  --text-dim: #94A3B8;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --green: #10B981;
  --green-bg: #ECFDF5;
  --red: #EF4444;
  --red-bg: #FEF2F2;
  --amber: #F59E0B;
  --amber-bg: #FFFBEB;
  --blue: #3B82F6;
  --blue-bg: #EFF6FF;

  --r: 12px;
  --r-lg: 16px;
  --r-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 4px 12px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 30px rgba(15,23,42,.10);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.wrap-sm { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wrap-xs { max-width: 440px; margin: 0 auto; padding: 0 16px; }

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ---------- CARD ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 16px; font-weight: 650; }
.card-body { padding: 20px; }

/* ---------- TYPO ---------- */
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--text-mid); }
.dim   { color: var(--text-dim); }
.small { font-size: 13px; }
.tiny  { font-size: 12px; }
.mono  { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.bold  { font-weight: 650; }
.tc    { text-align: center; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger { background: var(--red); }
.btn-danger:hover { background: #DC2626; }

.btn-green { background: var(--green); }
.btn-green:hover { background: #059669; }

.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 14px 24px; font-size: 16px; width: 100%; }
.btn-block { width: 100%; }

/* ---------- FORM ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.field .hint { font-size: 12.5px; color: var(--text-dim); margin-top: 5px; line-height: 1.45; }
.req { color: var(--red); }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 15px;  /* 16px-ish prevents iOS zoom; 15 is ok w/ meta */
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.textarea { min-height: 90px; resize: vertical; }
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 17px;
  padding-right: 36px;
}

.input-group { display: flex; }
.input-group .prefix {
  display: flex; align-items: center;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  font-size: 14px;
  color: var(--text-mid);
  font-weight: 600;
  white-space: nowrap;
}
.input-group .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.row { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: repeat(3, 1fr); }
}

.check {
  display: flex; align-items: flex-start; gap: 9px;
  cursor: pointer; font-size: 14px; line-height: 1.45;
}
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }

/* ---------- ALERT ---------- */
.alert {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
  line-height: 1.5;
}
.alert-ok   { background: var(--green-bg); color: #065F46; border-color: #A7F3D0; }
.alert-err  { background: var(--red-bg);   color: #991B1B; border-color: #FECACA; }
.alert-warn { background: var(--amber-bg); color: #92400E; border-color: #FDE68A; }
.alert-info { background: var(--blue-bg);  color: #1E40AF; border-color: #BFDBFE; }

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: #065F46; }
.badge-red   { background: var(--red-bg);   color: #991B1B; }
.badge-amber { background: var(--amber-bg); color: #92400E; }
.badge-blue  { background: var(--blue-bg);  color: #1E40AF; }
.badge-gray  { background: #F1F5F9;         color: #475569; }

/* ---------- TABLE ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 11px 14px;
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFC; }

/* ---------- EMPTY ---------- */
.empty { padding: 48px 20px; text-align: center; color: var(--text-dim); }
.empty .icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty h3 { color: var(--text-mid); margin-bottom: 6px; font-size: 15px; }
.empty p { font-size: 13.5px; }

/* ---------- UTIL ---------- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.wrap-flex { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.hide { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
