/* SADA One — arayuz stilleri
   Tema mimarisi: html[data-theme] vurgu rengini, html[data-mode] acik/koyu zemini belirler. */

:root {
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(10, 15, 25, .06), 0 4px 16px rgba(10, 15, 25, .05);
  --sidebar-w: 236px;
}

/* -------- Zemin: acik / koyu -------- */
html[data-mode="light"] {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-2: #eef0ea;
  --ink: #171a21;
  --muted: #6b7078;
  --border: #e2e4dd;
  --border-strong: #c9ccc3;
}
html[data-mode="dark"] {
  --bg: #0f1114;
  --surface: #171a1f;
  --surface-2: #1f232a;
  --ink: #e9ebee;
  --muted: #969ca6;
  --border: #272b33;
  --border-strong: #3a3f49;
}

/* -------- Vurgu temalari -------- */
html[data-theme="lime"] {
  --accent: #b1fb01;
  --on-accent: #182f5d;
  --accent-text: #5f8a00;
  --accent-soft: rgba(177, 251, 1, .16);
}
html[data-theme="lime"][data-mode="dark"] { --accent-text: #c4ff45; }

html[data-theme="navy"] {
  --accent: #182f5d;
  --on-accent: #ffffff;
  --accent-text: #23407a;
  --accent-soft: rgba(24, 47, 93, .10);
}
html[data-theme="navy"][data-mode="dark"] {
  --accent: #2c4a8c;
  --accent-text: #9db4e4;
  --accent-soft: rgba(90, 124, 196, .16);
}

html[data-theme="cream"] {
  --accent: #f8f2cb;
  --on-accent: #182f5d;
  --accent-text: #8a7a25;
  --accent-soft: rgba(216, 200, 120, .18);
}
html[data-theme="cream"][data-mode="dark"] { --accent-text: #e8dfa8; }

html[data-theme="bordo"] {
  --accent: #610714;
  --on-accent: #f8f2cb;
  --accent-text: #7d1523;
  --accent-soft: rgba(97, 7, 20, .10);
}
html[data-theme="bordo"][data-mode="dark"] {
  --accent: #7d1523;
  --accent-text: #e58a97;
  --accent-soft: rgba(160, 40, 58, .18);
}

/* -------- Genel -------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 .5em; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* -------- Iskelet -------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { padding: 18px 16px 14px; border-bottom: 1px solid var(--border); }
.brand a { text-decoration: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: .5px; color: var(--ink); }
.brand-one { background: var(--accent); color: var(--on-accent); padding: 1px 7px 2px; border-radius: 6px; margin-left: 5px; }
.brand-img { max-height: 40px; max-width: 180px; }
.nav { padding: 10px 8px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0; border-radius: 8px;
  color: var(--ink); font-weight: 500; font-size: 13.5px;
  transition: background .12s;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item.active { background: var(--accent); color: var(--on-accent); }
.nav-ic { width: 18px; text-align: center; opacity: .75; }
.nav-item.active .nav-ic { opacity: 1; }
.sidebar-foot { padding: 10px 16px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.page-title { font-size: 19px; margin: 0; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
.content { padding: 22px; max-width: 1440px; width: 100%; }

.icon-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 34px; height: 34px; cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  text-decoration: none; position: relative;
}
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.bell-count {
  position: absolute; top: -6px; right: -6px;
  background: #d33; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 3px;
}
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.user-chip:hover { text-decoration: none; }
.user-chip-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-weight: 700; object-fit: cover; flex: 0 0 auto;
}
img.avatar { background: var(--surface-2); }

.avail-select {
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px;
  background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.av-musait { border-color: #3a3; color: #2a7a2a; }
.av-yogun { border-color: #d90; color: #a70; }
.av-cekimde { border-color: #85f; color: #74d; }
.av-izinli, .av-disarida { border-color: #999; color: var(--muted); }

/* -------- Kartlar / paneller -------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card h2 { font-size: 16px; margin-bottom: 12px; }
.card h3 { font-size: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}
.stat .num { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 12.5px; }

/* -------- Tablolar -------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 8px 10px; color: var(--muted); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; }

/* -------- Rozetler -------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.st-beklemede { background: var(--surface-2); color: var(--muted); }
.st-devam { background: rgba(40, 110, 220, .12); color: #2a6ad0; border-color: rgba(40,110,220,.3); }
.st-revizyon { background: rgba(230, 140, 0, .13); color: #c07600; border-color: rgba(230,140,0,.3); }
.st-onay_bekliyor { background: rgba(140, 80, 220, .12); color: #8a50d8; border-color: rgba(140,80,220,.3); }
.st-onaylandi { background: rgba(30, 160, 90, .13); color: #1d9455; border-color: rgba(30,160,90,.3); }
.st-tamamlandi { background: #1d9455; color: #fff; border-color: #1d9455; }
.st-iptal { background: rgba(210, 50, 50, .12); color: #c33; border-color: rgba(210,50,50,.3); }
.st-planlandi { background: rgba(40,110,220,.12); color: #2a6ad0; }
.st-yeni { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.pr-dusuk { color: var(--muted); }
.pr-orta { background: rgba(40,110,220,.1); color: #2a6ad0; }
.pr-yuksek { background: rgba(230,140,0,.13); color: #c07600; }
.pr-acil { background: #c33; color: #fff; border-color: #c33; }

.mention { color: var(--accent-text); font-weight: 700; }

/* -------- Formlar -------- */
label.fld { display: block; margin-bottom: 12px; font-weight: 600; font-size: 12.5px; }
label.fld > span { display: block; margin-bottom: 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=url],
select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13.5px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-text); outline: none; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }
.checkbox-line input { width: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; text-decoration: none; transition: filter .12s;
}
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn-danger { background: transparent; color: #c33; border-color: #c33; }
.btn-danger:hover { background: rgba(210,50,50,.08); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; justify-content: center; }

.flash { padding: 10px 16px; border-radius: var(--radius); margin-bottom: 14px; font-weight: 600; }
.flash-ok { background: rgba(30,160,90,.12); color: #1d9455; border: 1px solid rgba(30,160,90,.35); }
.flash-err { background: rgba(210,50,50,.1); color: #c33; border: 1px solid rgba(210,50,50,.35); }

/* -------- Sekmeler -------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 8px 8px 0 0; font-weight: 600; font-size: 13px;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.active { color: var(--accent-text); border-bottom-color: var(--accent-text); }

/* -------- Kanban -------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kanban-col {
  flex: 0 0 260px; background: var(--surface-2); border-radius: var(--radius-lg);
  border-top: 4px solid var(--accent); padding: 10px; min-height: 120px;
}
.kanban-col h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.kanban-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); font-size: 13px;
}
.kanban-card .t { font-weight: 600; margin-bottom: 4px; }
.kanban-card .m { color: var(--muted); font-size: 11.5px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kanban-col.dragover { outline: 2px dashed var(--accent-text); outline-offset: -4px; }

/* -------- Takvim -------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px; font-weight: 700; }
.cal-day {
  min-height: 96px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 6px; font-size: 11.5px;
}
.cal-day.other { opacity: .38; }
.cal-day.today { border-color: var(--accent-text); border-width: 2px; }
.cal-day .d { font-weight: 700; color: var(--muted); }
.cal-ev {
  display: block; margin: 2px 0; padding: 1px 5px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-ev.ev-shoot { background: rgba(140,80,220,.14); color: #8a50d8; }
.cal-ev.ev-date { background: rgba(230,140,0,.14); color: #c07600; }
.cal-ev.ev-studio { background: rgba(40,110,220,.12); color: #2a6ad0; }

/* -------- Mesajlasma -------- */
.chat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; min-height: 60vh; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.chat-list a {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: 13px;
}
.chat-list a:hover { background: var(--surface-2); text-decoration: none; }
.chat-list a.active { background: var(--accent); color: var(--on-accent); }
.chat-box { display: flex; flex-direction: column; height: 65vh; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 6px 2px; }
.msg { display: flex; gap: 10px; margin-bottom: 12px; }
.msg-body { background: var(--surface-2); border-radius: 4px 12px 12px 12px; padding: 8px 12px; max-width: 75%; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-body { background: var(--accent-soft); border-radius: 12px 4px 12px 12px; }
.msg .who { font-size: 11px; font-weight: 700; color: var(--accent-text); }
.msg .when { font-size: 10.5px; color: var(--muted); }
.chat-input { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.chat-input textarea { min-height: 42px; max-height: 120px; }

/* -------- Ilerleme / grafikler -------- */
.progress { background: var(--surface-2); border-radius: 999px; height: 10px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 12.5px; }
.bar-row .bl { width: 150px; flex: 0 0 150px; text-align: right; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { flex: 1; background: var(--surface-2); border-radius: 6px; height: 18px; position: relative; }
.bar-row .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; min-width: 2px; }
.bar-row .bv { width: 60px; font-weight: 700; }

/* -------- Modal -------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 12, 16, .5); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); padding: 22px;
  width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* -------- Giris / sade sayfalar -------- */
body.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand-word { font-size: 30px; }
.pub-wrap { width: 100%; max-width: 760px; }

/* -------- Cesitli -------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mb0 { margin-bottom: 0; }
.mt { margin-top: 14px; }
.right { text-align: right; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 30px; display: block; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filter-bar label.fld { margin-bottom: 0; min-width: 140px; }
.star { color: #e6a700; font-size: 15px; letter-spacing: 1px; }
.theme-swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--border-strong); cursor: pointer; display: inline-block; }
.theme-swatch.sel { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.step-num { width: 24px; height: 24px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step-list li.done .step-num { background: #1d9455; color: #fff; }
.step-list li.done .step-name { text-decoration: line-through; color: var(--muted); }
.timeline { border-left: 2px solid var(--border-strong); margin-left: 8px; padding-left: 16px; }
.timeline .ti { margin-bottom: 10px; font-size: 12.5px; position: relative; }
.timeline .ti::before { content: ''; position: absolute; left: -21px; top: 5px; width: 8px; height: 8px; border-radius: 99px; background: var(--accent); }

/* -------- Yazdirma (cekim plani vs.) -------- */
@media print {
  .sidebar, .topbar, .no-print, .flash { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* -------- Mobil -------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 90; left: calc(-1 * var(--sidebar-w) - 10px); transition: left .18s; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .sidebar.open { left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 14px; }
  .user-chip-name { display: none; }
  .avail-form { display: none; }
  .chat-box { height: 55vh; }
}
