/* ═══ Salon Yönetim — Tasarım Sistemi ═══ */
:root {
  --bg: #FAF8F5;
  --card: #FFFFFF;
  --ink: #2B2521;
  --muted: #94897F;
  --line: #EDE7DF;
  --gold: #B08D42;
  --gold-soft: #F5EDDD;
  --gold-deep: #8F7134;
  --rose: #C98A80;
  --rose-soft: #F9EEEC;
  --green: #5E8C61;
  --green-soft: #EAF2EA;
  --red: #B85C50;
  --red-soft: #F8ECEA;
  --blue: #6B87A6;
  --blue-soft: #EBF0F5;
  --shadow: 0 1px 2px rgba(43,37,33,.04), 0 8px 24px rgba(43,37,33,.06);
  --shadow-lg: 0 4px 12px rgba(43,37,33,.08), 0 16px 48px rgba(43,37,33,.12);
  --radius: 16px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }

/* ─── Giriş ekranı ─── */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 80% -10%, #F3EBDD 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #F7EEEA 0%, transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 44px 38px 38px;
  text-align: center;
}
.login-mark {
  width: 58px; height: 58px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #D4B571 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--serif); font-size: 26px;
  box-shadow: 0 6px 18px rgba(176,141,66,.35);
}
.login-card h1 { font-size: 26px; margin-bottom: 4px; }
.login-card .tagline { color: var(--muted); font-size: 13px; margin-bottom: 30px; }
.field { text-align: left; margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; color: var(--ink); background: #FDFCFA;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,141,66,.13);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: none; border-radius: 12px;
  font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .1s, box-shadow .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #C6A45C 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(176,141,66,.3);
}
.btn-gold:hover { box-shadow: 0 6px 20px rgba(176,141,66,.4); }
.btn-ghost { background: transparent; color: var(--gold-deep); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-soft); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #F0DBD7; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.login-error { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; }

/* ─── Uygulama düzeni ─── */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: 236px; flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 26px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; height: 100dvh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, #D4B571 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--serif); font-size: 17px;
}
.brand-name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--muted); text-decoration: none; font-weight: 500;
  transition: background .12s, color .12s;
}
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--gold-soft); color: var(--gold-deep); font-weight: 600; }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; }
.sidebar-foot .who { font-weight: 600; margin-bottom: 2px; }
.sidebar-foot .sub { color: var(--muted); font-size: 12px; margin-bottom: 10px; }

.main { flex: 1; min-width: 0; padding: 30px 36px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h2 { font-size: 26px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* ─── Kartlar / ızgara ─── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card h3 { font-size: 17px; margin-bottom: 14px; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.stat { padding: 20px 22px; }
.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat .value { font-family: var(--serif); font-size: 30px; font-weight: 600; margin-top: 4px; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.3; }

/* ─── Tablolar / listeler ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #F4F0EA; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #FCFAF7; }
tr.clickable { cursor: pointer; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-gold { background: var(--gold-soft); color: var(--gold-deep); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: #F1EEE9; color: var(--muted); }
.badge-rose { background: var(--rose-soft); color: var(--rose); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

/* ─── Arama ─── */
.search-bar { position: relative; }
.search-bar input {
  width: 100%; padding: 12px 16px 12px 42px;
  border: 1.5px solid var(--line); border-radius: 13px;
  font: inherit; background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.search-bar input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,66,.13); }
.search-bar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }

/* ─── Takvim ─── */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-toolbar .title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0 6px; min-width: 150px; }
.seg { display: inline-flex; background: #F1EDE6; border-radius: 11px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 7px 15px; border-radius: 9px; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(43,37,33,.1); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-size: 16px; }
.icon-btn:hover { border-color: var(--gold); }

.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { padding: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #FCFAF7; }
.cal-cell { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; cursor: pointer; transition: background .1s; }
.cal-cell:hover { background: var(--gold-soft); }
.cal-cell .d { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-cell.other { background: #FBFAF8; } .cal-cell.other .d { color: #C9C1B8; }
.cal-cell.today .d { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #fff; align-items: center; justify-content: center; }
.cal-evt { font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cal-more { font-size: 11px; color: var(--gold-deep); font-weight: 600; margin-top: 2px; }

.cal-week { border-top: 1px solid var(--line); }
.cal-week-day { border-bottom: 1px solid var(--line); padding: 12px 6px; }
.cal-week-day .wd-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.wd-head .n { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.wd-head .l { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.appt-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; margin-bottom: 5px; background: #FCFAF7; border: 1px solid #F1EDE6; cursor: pointer; transition: border-color .12s; }
.appt-row:hover { border-color: var(--gold); }
.appt-row .t { font-weight: 700; font-size: 13px; min-width: 44px; }
.appt-row .who { font-weight: 600; }
.appt-row .what { color: var(--muted); font-size: 13px; }
.appt-row .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* ─── Modal ─── */
.modal-back {
  position: fixed; inset: 0; background: rgba(43,37,33,.4);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 100; padding: 0; backdrop-filter: blur(3px);
}
.modal-back.open { display: flex; }
.modal {
  background: var(--card); border-radius: 22px 22px 0 0;
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  padding: 28px 26px 34px;
  animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 20px; margin-bottom: 18px; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 640px) {
  .modal-back { align-items: center; padding: 24px; }
  .modal { border-radius: 22px; }
}

/* ─── Toast ─── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-weight: 600; font-size: 14px; opacity: 0; transition: all .25s; z-index: 200;
  box-shadow: var(--shadow-lg); max-width: 90vw; text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ─── Mesai ızgarası ─── */
.shift-grid { display: grid; grid-template-columns: 150px repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 760px; }
.shift-grid > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; min-height: 52px; }
.shift-head { background: #FCFAF7; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; min-height: auto !important; }
.shift-staff { font-weight: 600; display: flex; align-items: center; }
.shift-cell { cursor: pointer; transition: background .1s; }
.shift-cell:hover { background: var(--gold-soft); }
.shift-chip { font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 7px; margin-bottom: 3px; }

/* ─── Paket kartları ─── */
.pkg-card { border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; background: #FCFAF7; }
.pkg-card.pkg-done { opacity: .72; }
.pkg-bar { height: 8px; border-radius: 99px; background: #EDE7DF; margin-top: 10px; overflow: hidden; }
.pkg-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #C6A45C, var(--gold)); transition: width .3s; }
.pkg-done .pkg-bar span { background: var(--green); }
.pkg-pay { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.pkg-pay-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.pkg-pay-row b { color: var(--ink); }
.pkg-bar-pay { height: 6px; margin-top: 7px; background: #EFE9E0; }
.pkg-bar-pay span { background: linear-gradient(90deg, #7FB77E, var(--green)); }
.pay-info { background: #FBF7F0; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }

/* ─── Uyarı bandı ─── */
.alert-bar { display: flex; align-items: center; gap: 12px; background: var(--red-soft); color: var(--red); border: 1px solid #F0D5D0; border-radius: 13px; padding: 12px 16px; margin-bottom: 20px; font-weight: 500; }
.alert-bar b { color: var(--red); }
.alert-bar .btn { margin-left: auto; white-space: nowrap; }

/* ─── Boş durum ─── */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 8px; }

.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.flex { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.gold-text { color: var(--gold-deep); font-weight: 600; }
a.plain { color: var(--gold-deep); text-decoration: none; font-weight: 600; }

/* ─── Mobil ─── */
.mobile-top { display: none; }
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 18px 16px 96px; }
  .mobile-top {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
    background: rgba(250,248,245,.92); backdrop-filter: blur(10px);
    padding: 14px 16px; border-bottom: 1px solid var(--line);
  }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 600;
    border-radius: 10px;
  }
  .mobile-nav a svg { width: 21px; height: 21px; }
  .mobile-nav a.active { color: var(--gold-deep); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 22px; }
  .cal-cell { min-height: 64px; padding: 4px; }
  .cal-evt { display: none; }
  .cal-dotline { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 4px; }
  .cal-dotline i { width: 6px; height: 6px; border-radius: 50%; }
  .modal .row { grid-template-columns: 1fr; }
}
@media (min-width: 901px) { .cal-dotline { display: none; } }
