/* ============================================================
   Euro Diamond Hotel — Unified Design System
   Navy + Gold luxury theme · Mobile-first · Responsive
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #0a1021;
  --bg-2: #0f172a;
  --card: #162131;
  --card-2: #1e2b40;
  --card-inset: #0f1826;
  --border: #2a3650;
  --border-2: #334155;

  /* Brand & accents */
  --gold: #f4c75e;
  --gold-2: #d4a52e;
  --gold-dim: #8a6d2e;
  --emerald: #10b981;
  --emerald-2: #059669;
  --ruby: #ef4444;
  --ruby-2: #b91c1c;
  --sapphire: #3b82f6;
  --sapphire-2: #2563eb;
  --amber: #f59e0b;
  --plum: #a855f7;

  /* Status backgrounds (soft) */
  --bg-warn: #451a03;
  --bg-warn-fg: #fb923c;
  --bg-ok: #064e3b;
  --bg-ok-fg: #6ee7b7;
  --bg-info: #1e3a5f;
  --bg-info-fg: #60a5fa;

  /* Text */
  --txt: #f5f7fa;
  --mut: #94a3b8;
  --subtle: #64748b;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #0a1021 0%, #162131 55%, #0a1021 100%);
  --grad-gold: linear-gradient(135deg, #f4c75e 0%, #d4a52e 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #047857 100%);
  --grad-card: linear-gradient(180deg, #192436 0%, #131c2c 100%);

  /* Motion & radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,.35);
  --shadow-glow: 0 0 0 2px rgba(244,199,94,.2);

  /* Spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;

  /* Safe area */
  --safe-t: env(safe-area-inset-top, 0);
  --safe-b: env(safe-area-inset-bottom, 0);
  --safe-l: env(safe-area-inset-left, 0);
  --safe-r: env(safe-area-inset-right, 0);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, button { font: inherit; color: inherit; }

/* ---------- Typography ---------- */
.h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.h2 { font-size: 18px; font-weight: 700; }
.h3 { font-size: 15px; font-weight: 700; }
.label { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.muted { color: var(--mut); }
.mono-num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: var(--s-4); }
.container-sm { max-width: 480px; margin: 0 auto; padding: var(--s-4); }
.stack { display: flex; flex-direction: column; gap: var(--s-3); }
.row { display: flex; gap: var(--s-3); align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-3); }

/* ---------- App Bar (top) ---------- */
.appbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--safe-t) + 10px) var(--s-4) 10px;
  background: rgba(15, 23, 42, .85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.appbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.appbar .brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad-gold); color: #111; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; letter-spacing: -.02em; flex-shrink: 0;
}
.appbar h1 { font-size: 15px; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.appbar .sub { font-size: 11px; color: var(--mut); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.bell { position: relative; width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--card); display: grid; place-items: center; font-size: 18px; transition: .15s; }
.bell:hover { border-color: var(--gold); }
.bell .count { position: absolute; top: -4px; right: -4px; background: var(--ruby); color: #fff;
  font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: var(--r-pill); min-width: 18px; text-align: center; }

.iconlink {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--r-md);
  border: 1px solid var(--border); color: var(--mut);
  font-size: 12px; font-weight: 600; background: var(--card);
  transition: .15s;
}
.iconlink:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Hero (branded header for public pages) ---------- */
.hero {
  background: var(--grad-hero);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--safe-t) + 18px) var(--s-4) 18px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px circle at 20% -20%, rgba(244,199,94,.08), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero .brand-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hero .brand-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero .brand-line .txt { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 2.5px; text-transform: uppercase; }
.hero h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.hero .date { font-size: 12px; color: var(--mut); margin-top: 4px; }

/* ---------- Cards ---------- */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  box-shadow: var(--shadow-sm);
}
.card.padless { padding: 0; }
.card-elev { background: var(--card-2); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: var(--s-4); }
.card-hero { background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-5); position: relative; overflow: hidden; }
.card-hero::before {
  content: ""; position: absolute; top: -30%; right: -10%; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(244,199,94,.15), transparent 70%);
  pointer-events: none;
}

/* ---------- KPI cards ---------- */
.kpi { background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.kpi .l { font-size: 10px; color: var(--mut); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.kpi .v { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; color: var(--mut); font-weight: 500; letter-spacing: 0; }
.kpi .v .pct { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--grad-gold); color: #111; font-size: 11px; font-weight: 800; vertical-align: middle; }
.kpi .v .acil { color: var(--ruby); }
.kpi .v .yeni { color: var(--gold); }
.kpi .v .ok { color: var(--emerald); }

.kpi-strip { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.kpi-strip::-webkit-scrollbar { display: none; }
.kpi-strip .kpi { min-width: 128px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r-md); font-size: 14px; font-weight: 700;
  border: 1px solid transparent; transition: .15s; min-height: 44px; white-space: nowrap;
  cursor: pointer; background: var(--card); color: var(--txt);
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-gold); color: #111; border-color: transparent; }
.btn-primary:hover { box-shadow: var(--shadow-md); filter: brightness(1.03); }
.btn-ok { background: var(--grad-emerald); color: #fff; }
.btn-danger { background: var(--ruby); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--mut); }
.btn-ghost:hover { color: var(--gold); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 12px; min-height: 36px; }
.btn-xs { padding: 5px 10px; font-size: 11px; min-height: 28px; border-radius: 6px; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field .lbl { display: block; font-size: 11px; color: var(--mut); text-transform: uppercase;
  letter-spacing: .6px; font-weight: 600; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; background: var(--card-inset);
  border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--txt); font-size: 15px; outline: none; transition: border .15s, box-shadow .15s;
  min-height: 44px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: var(--shadow-glow); }
.textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }

/* ---------- Tabs (pill style) ---------- */
.tabs { display: flex; gap: 4px; background: var(--card-inset); padding: 4px; border-radius: var(--r-md);
  border: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 9px 14px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700; color: var(--mut);
  white-space: nowrap; cursor: pointer; transition: .15s; border: none; background: transparent; }
.tab.active { background: var(--grad-gold); color: #111; }
.tab:not(.active):hover { color: var(--gold); }

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- Chip (filter buttons) ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--card); color: var(--mut); font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s; }
.chip.active { background: var(--grad-gold); color: #111; border-color: transparent; }
.chip:not(.active):hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.badge-gold { background: var(--grad-gold); color: #111; }
.badge-ok { background: var(--bg-ok); color: var(--bg-ok-fg); }
.badge-warn { background: var(--bg-warn); color: var(--bg-warn-fg); }
.badge-info { background: var(--bg-info); color: var(--bg-info-fg); }
.badge-danger { background: var(--ruby-2); color: #fee2e2; }
.badge-neutral { background: var(--card-inset); color: var(--mut); }

/* Status helpers */
.st-yeni { background: var(--bg-warn); color: var(--bg-warn-fg); }
.st-isleniyor { background: var(--bg-info); color: var(--bg-info-fg); }
.st-tamamlandi { background: var(--bg-ok); color: var(--bg-ok-fg); }
.st-iptal { background: var(--card-inset); color: var(--mut); }

/* ---------- Progress bar ---------- */
.bar { background: var(--card-inset); height: 8px; border-radius: var(--r-pill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--grad-gold); transition: width .4s; }

/* ---------- Talep (request) card ---------- */
.talep { background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px 16px; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start;
  border-left: 4px solid var(--border); transition: .15s; }
.talep:hover { border-color: var(--border-2); }
.talep.onc-acil { border-left-color: var(--ruby); }
.talep.onc-normal { border-left-color: var(--sapphire); }
.talep.onc-dusuk { border-left-color: var(--border); }
.talep .sol { flex: 1; min-width: 0; }
.talep .oda-no { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.talep .kat-badge { display: inline-block; font-size: 11px; background: var(--card-inset);
  padding: 3px 10px; border-radius: var(--r-pill); margin-left: 6px; color: var(--mut); font-weight: 600; vertical-align: middle; }
.talep .detay { font-size: 13px; margin-top: 4px; color: var(--txt); }
.talep .zaman { font-size: 11px; color: var(--mut); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.talep .zaman .sep { color: var(--subtle); }
.talep .sag { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.talep .aksiyon { display: flex; gap: 4px; }

/* ---------- Empty / loading states ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--mut); font-size: 14px; }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%);
  background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--r-md); height: 60px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Modal (bottom sheet on mobile) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,10,20,.75); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center; z-index: 1000; padding: 0; }
.modal-bg.show { display: flex; animation: fadein .15s; }
.modal { background: var(--grad-card); border: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; padding: 20px 20px calc(24px + var(--safe-b)); position: relative;
  animation: slideup .2s ease-out; }
.modal .handle { width: 40px; height: 4px; background: var(--border-2); border-radius: 999px; margin: -8px auto 14px; }
.modal .close { position: absolute; top: 14px; right: 14px; background: var(--card-inset); border: 1px solid var(--border);
  color: var(--txt); width: 36px; height: 36px; border-radius: 50%; font-size: 20px;
  display: grid; place-items: center; cursor: pointer; }
.modal .close:hover { color: var(--gold); border-color: var(--gold); }
@media (min-width: 640px) {
  .modal-bg { align-items: center; padding: 20px; }
  .modal { border-radius: var(--r-xl); max-height: 85vh; }
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Notification panel ---------- */
.notif-panel { position: fixed; top: 0; right: -360px; width: 340px; height: 100vh; background: var(--card);
  border-left: 1px solid var(--border); z-index: 100; transition: right .25s; overflow-y: auto;
  padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 16px); }
.notif-panel.show { right: 0; box-shadow: -10px 0 30px rgba(0,0,0,.5); }
@media (max-width: 400px) { .notif-panel { width: 88vw; right: -100vw; } }
.notif-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; display: none; }
.notif-overlay.show { display: block; }

.notif-item { background: var(--card-inset); border-radius: var(--r-md); padding: 10px 12px;
  margin-bottom: 6px; border-left: 3px solid var(--sapphire); }
.notif-item.unread { border-left-color: var(--gold); background: #1a2332; }
.notif-item .nb { font-size: 13px; font-weight: 700; }
.notif-item .nm { font-size: 12px; color: var(--mut); margin-top: 2px; line-height: 1.4; }
.notif-item .nt { font-size: 10px; color: var(--subtle); margin-top: 6px; }

/* ---------- Info rows ---------- */
.info-list { background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.info-list > .row-item { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.info-list > .row-item:last-child { border-bottom: none; }
.info-list .k { color: var(--mut); }
.info-list .v { font-weight: 600; }

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; color: var(--mut); font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; padding: 10px 8px; border-bottom: 1px solid var(--border); font-weight: 700; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--card-inset); }
.tbl tr:hover td { background: rgba(244,199,94,.04); }

/* ---------- Bottom safe padding ---------- */
.pb-safe { padding-bottom: calc(90px + var(--safe-b)); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-mut { color: var(--mut); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.hide-sm { }
@media (max-width: 600px) { .hide-sm { display: none !important; } }
.show-sm { display: none; }
@media (max-width: 600px) { .show-sm { display: block; } }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 420px) {
  .h1 { font-size: 20px; }
  .kpi .v { font-size: 20px; }
  .btn { padding: 11px 14px; font-size: 13px; }
  .container { padding: 12px; }
}
