/* Lokomotif Film · Ajans Takip — arayüz */
@font-face {
  font-family: 'Archivo';
  src: url('../assets/Archivo-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #111111;
  --surface: #191918;
  --surface-2: #222220;
  --surface-3: #2a2a28;
  --line: #30302E;
  --text: #F3EFE6;
  --muted: #B3B0A9;
  --dim: #85827b;
  --accent: #F2A23A;
  --accent-soft: rgba(242, 162, 58, .14);
  --ok: #7BC47F;
  --bad: #E5654B;
  --info: #7FA7D9;
  --radius: 14px;
  --radius-sm: 9px;
  --side: 236px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { flex: none; }
svg[aria-hidden="true"] { width: 18px; height: 18px; }
.ic-in { width: 15px !important; height: 15px !important; vertical-align: -2px; }
.item > svg { color: var(--muted); }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 118%; letter-spacing: -.01em; line-height: 1.15; }
h2 { font-size: 17px; }
h3 { font-size: 15px; font-stretch: 110%; }
p { margin: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.accent { color: var(--accent); }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- uygulama kabuğu ---------- */
#app { min-height: 100vh; }
#side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: #0c0c0c; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 20;
}
#side .brand { padding: 0 10px 22px; }
#side .brand img { height: 26px; width: auto; }
#side .brand small { display: block; margin-top: 8px; color: var(--dim); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
#side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; position: relative;
}
.nav-link svg { width: 19px; height: 19px; flex: none; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.on { background: var(--surface-2); color: var(--text); }
.nav-link.on svg { color: var(--accent); }
.nav-link .badge-dot { margin-left: auto; }
#side .side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); }
#side .side-foot .who { font-weight: 600; font-size: 14px; }

#content { margin-left: var(--side); min-height: 100vh; }
#top {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--safe-t)) 28px 14px;
  background: rgba(17, 17, 17, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
#top.scrolled { border-bottom-color: var(--line); }
#top h1 { font-size: 22px; font-weight: 900; font-stretch: 125%; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#top .back { display: none; }
#top .back.show { display: inline-flex; }
#actions { display: flex; gap: 8px; }
#main { padding: 8px 28px 48px; max-width: 1240px; }

#tabs { display: none; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; }
.btn.primary:hover { background: #f5b257; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: rgba(229, 101, 75, .12); }
.btn.wa { color: #8fd694; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- kartlar ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { flex: 1; }
.card.flush .card-head { padding: 16px 18px 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.top { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid > *, .stack > * { min-width: 0; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: start; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.stat .k { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-size: 24px; font-weight: 800; font-stretch: 115%; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { color: var(--dim); font-size: 12px; margin-top: 2px; }
.stat.hl { border-color: rgba(242, 162, 58, .45); background: linear-gradient(180deg, rgba(242, 162, 58, .1), transparent 70%), var(--surface); }
.stat.hl .v { color: var(--accent); }

/* ---------- listeler ---------- */
.list { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-top: 1px solid var(--line); min-width: 0;
}
.list > .item:first-child { border-top: 0; }
a.item:hover, .item.click:hover { background: var(--surface-2); cursor: pointer; }
.item .t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s.wrap-s { white-space: normal; }
.item .meta { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.card .list .item { padding-left: 18px; padding-right: 18px; }
.empty { color: var(--dim); padding: 22px 18px; text-align: center; font-size: 14px; }
.empty.big { padding: 56px 20px; }
.empty.big svg { width: 40px; height: 40px; color: var(--line); margin: 0 auto 12px; display: block; }

.datebox {
  width: 50px; flex: none; text-align: center; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--line); padding: 6px 0 5px; line-height: 1;
}
.datebox b { display: block; font-size: 20px; font-weight: 800; font-stretch: 112%; }
.datebox span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; font-weight: 600; }
.datebox.today { background: var(--accent); border-color: var(--accent); color: #111; }
.datebox.today span { color: #111; }

/* ---------- rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--muted);
  --c: var(--muted);
}
.badge.c { color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.badge-dot { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #111; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: 12px; margin: 2px 4px 2px 0; }
.s-teklif { --c: #a29f97; } .s-onaylandi { --c: #7FA7D9; } .s-on_hazirlik { --c: #A98FD8; } .s-cekim { --c: #F2A23A; }
.s-kurgu { --c: #5FB7AE; } .s-revizyon { --c: #E58A4B; } .s-teslim { --c: #7BC47F; } .s-kapandi { --c: #6d6a64; } .s-iptal { --c: #E5654B; }
.p-bekliyor { --c: #F2A23A; } .p-onayladi { --c: #7BC47F; } .p-reddetti { --c: #E5654B; }

/* ---------- avatar ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--text);
  font-stretch: 110%;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }
.avatars { display: flex; }
.avatars .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }

/* ---------- filtre çipleri / sekmeler ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: #111; border-color: var(--text); }
.chip .n { opacity: .6; font-weight: 500; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); min-width: 220px; flex: 1; max-width: 360px;
}
.search svg { width: 17px; height: 17px; color: var(--dim); flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; height: 100%; }

/* ---------- form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 14px; }
.field { grid-column: span 6; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.half { grid-column: span 3; }
.field.third { grid-column: span 2; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field .help { font-size: 12px; color: var(--dim); }
.input, .field input:not([type=checkbox]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); outline: none; transition: border-color .15s; font-size: 15px;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; padding: 4px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.with-btn { display: flex; gap: 8px; }
.with-btn select, .with-btn input { flex: 1; }
.photo-field { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-field .ph { width: 76px; height: 96px; border-radius: 9px; position: relative; overflow: hidden; background: var(--surface-3); }
.photo-field .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-field .ph:not(.cover) { cursor: pointer; }
.photo-field .ph button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.photo-field .ph button svg { width: 13px; height: 13px; }
.photo-field .ph.cover::after { content: 'Kapak'; position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; background: var(--accent); color: #111; padding: 1px 5px; border-radius: 4px; }
.photo-field label.add { width: 76px; height: 96px; border-radius: 9px; border: 1.5px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; gap: 4px; cursor: pointer; }
.photo-field label.add svg { width: 22px; height: 22px; }
.photo-field input[type=file] { display: none; }

/* ---------- modal ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .66);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .15s ease;
}
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 560px;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop .18s ease;
}
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; }
.modal-head h2 { flex: 1; font-size: 18px; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.modal-foot .grow { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.pick-list { display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; margin: 0 -20px; border-top: 1px solid var(--line); }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick:hover { background: var(--surface-2); }
.pick input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pick .qty { width: 64px; height: 34px; text-align: center; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.pick.disabled { opacity: .45; }

/* ---------- bildirim ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: #111; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: pop .2s ease; max-width: 90vw; }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- uyarı kutusu ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(229, 101, 75, .4); background: rgba(229, 101, 75, .08); }
.alert svg { width: 20px; height: 20px; color: var(--bad); flex: none; margin-top: 1px; }
.alert.warn { border-color: rgba(242, 162, 58, .4); background: var(--accent-soft); }
.alert.warn svg { color: var(--accent); }
.alert.info { border-color: var(--line); background: var(--surface-2); }
.alert.info svg { color: var(--muted); }
.alert b { display: block; margin-bottom: 2px; }

/* ---------- tablo ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click:hover td { background: var(--surface-2); cursor: pointer; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .r { text-align: right; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.money-lines { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.money-lines .ml { display: flex; justify-content: space-between; gap: 12px; }
.money-lines .ml span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.money-lines .ml.total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 16px; }
.money-lines .ml.total span:last-child { font-weight: 800; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

/* ---------- cast ızgarası ---------- */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.cast-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.cast-card:hover { border-color: #4a4a47; transform: translateY(-2px); }
.cast-card .ph { aspect-ratio: 3 / 4; background: var(--surface-2); position: relative; }
.cast-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.cast-card .ph .ini { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 800; font-stretch: 120%; color: var(--line); }
.cast-card .ph .badge { position: absolute; left: 8px; top: 8px; background: rgba(17,17,17,.78); }
.cast-card .info { padding: 10px 12px 12px; }
.cast-card .info .t { font-weight: 700; font-stretch: 105%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast-card .info .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-head { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.gallery .main-ph { aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.gallery .main-ph img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main-ph .ini { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 80px; font-weight: 800; color: var(--line); }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery .thumbs img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .65; border: 2px solid transparent; }
.gallery .thumbs img.on { opacity: 1; border-color: var(--accent); }
.measures { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.measure { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.measure .k { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.measure .v { font-weight: 700; margin-top: 2px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 150; display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ---------- ekipman ---------- */
.eq-thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); flex: none; object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.eq-thumb svg { width: 20px; height: 20px; }
.eq-ctrl { display: flex; align-items: center; gap: 8px; flex: none; }
.stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.toggle { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; background: transparent; white-space: nowrap; }
.toggle svg { width: 14px; height: 14px; }
.toggle.on { background: rgba(123, 196, 127, .14); border-color: rgba(123, 196, 127, .5); color: var(--ok); }
.day-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--dim); cursor: pointer; background: transparent; white-space: nowrap; }
.day-chip.on { background: var(--accent-soft); border-color: rgba(242,162,58,.55); color: var(--accent); }

/* ---------- takvim ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-head h2 { font-size: 20px; font-stretch: 120%; min-width: 180px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--surface); padding: 8px 10px; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.cal .cell { background: var(--bg); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .cell.out { background: #0d0d0d; }
.cal .cell.out .d { color: #444; }
.cal .cell .d { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 2px 4px; }
.cal .cell.today .d { color: #111; background: var(--accent); border-radius: 6px; display: inline-block; align-self: flex-start; }
.cal .cell.conflict { box-shadow: inset 0 0 0 1.5px rgba(229, 101, 75, .7); }
.cal .ev { display: block; font-size: 12px; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); border-left: 3px solid var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.del { border-left-style: dashed; background: transparent; color: var(--muted); }
.agenda { display: none; }

/* ---------- mesajlaşma ---------- */
.chat { display: flex; flex-direction: column; height: min(70vh, 640px); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.chat .msg { display: flex; gap: 10px; max-width: 86%; }
.chat .msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat .bubble { background: var(--surface-2); border-radius: 14px; padding: 9px 13px; min-width: 0; }
.chat .msg.mine .bubble { background: #3a2c17; }
.chat .msg .who { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 2px; display: flex; gap: 8px; align-items: center; }
.chat .msg .who .r { color: var(--dim); font-weight: 500; }
.chat .msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat .msg .when { font-size: 11px; color: var(--dim); margin-top: 3px; display: flex; gap: 10px; align-items: center; }
.chat .msg .when .pin-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); }
.ic-xs { width: 12px !important; height: 12px !important; }
.chat .msg .when button { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 0; font-size: 11px; }
.chat .msg .when button:hover { color: var(--text); }
.chat .pinned { border-bottom: 1px solid var(--line); padding: 10px 18px; background: var(--accent-soft); font-size: 13.5px; }
.chat .pinned b { color: var(--accent); }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat textarea { flex: 1; min-height: 42px; max-height: 140px; resize: none; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; outline: none; line-height: 1.4; }
.chat textarea:focus { border-color: var(--accent); }
.chat .day-sep { align-self: center; font-size: 11.5px; color: var(--dim); background: var(--surface-2); padding: 3px 10px; border-radius: 99px; }

/* ---------- giriş ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth .box { width: 100%; max-width: 400px; }
.auth .logo { height: 34px; width: auto; margin: 0 auto 10px; }
.auth .sub { text-align: center; color: var(--dim); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; margin-bottom: 28px; }
.auth .card { padding: 22px; }
.auth h1 { font-size: 20px; margin-bottom: 6px; }

/* ---------- portal ---------- */
body.mode-portal #side, body.mode-portal #tabs { display: none !important; }
body.mode-portal #content { margin-left: 0; }
body.mode-portal #main { max-width: 760px; margin: 0 auto; }
body.mode-portal #top { max-width: 760px; margin: 0 auto; }
.hello { padding: 6px 0 4px; }
.hello h2 { font-size: 26px; font-weight: 900; font-stretch: 125%; }
.shoot-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.shoot-card:hover { border-color: #4a4a47; }
.shoot-card .when { display: flex; align-items: baseline; gap: 10px; }
.shoot-card .when b { font-size: 22px; font-weight: 900; font-stretch: 122%; }
.info-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.info-line svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--dim); }
.info-line b { color: var(--text); font-weight: 600; }
.note-box { background: var(--accent-soft); border: 1px solid rgba(242,162,58,.35); border-radius: 12px; padding: 12px 14px; }
.note-box .k { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-actions .btn { height: 50px; font-size: 15px; }
.btn.yes.on { background: var(--ok); border-color: var(--ok); color: #111; }
.btn.no.on { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- yazdırma: çekim föyü / teklif ---------- */
.paper { background: #fff; color: #111; border-radius: 12px; padding: 36px 40px; max-width: 900px; font-size: 13.5px; }
.paper .ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 3px solid #111; padding-bottom: 16px; margin-bottom: 18px; }
.paper .ph-head img { height: 30px; width: auto; }
.paper .ph-head .co { text-align: right; font-size: 12px; color: #444; line-height: 1.5; }
.paper h1 { font-size: 26px; font-weight: 900; font-stretch: 125%; color: #111; }
.paper h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #111; margin: 22px 0 8px; font-weight: 800; }
.paper .big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid #111; border-radius: 10px; overflow: hidden; margin-top: 14px; }
.paper .big > div { padding: 12px 14px; border-right: 1px solid #ccc; }
.paper .big > div:last-child { border-right: 0; }
.paper .big .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #666; font-weight: 700; }
.paper .big .v { font-size: 20px; font-weight: 800; font-stretch: 115%; margin-top: 2px; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #666; border-bottom: 2px solid #111; padding: 6px 8px; }
.paper td { border-bottom: 1px solid #ddd; padding: 7px 8px; vertical-align: top; }
.paper .r { text-align: right; }
.paper .box { border: 1px solid #ccc; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.paper .chk { display: inline-block; width: 13px; height: 13px; border: 1.5px solid #111; border-radius: 3px; vertical-align: -2px; }
.paper .foot { margin-top: 26px; padding-top: 10px; border-top: 1px solid #ccc; font-size: 11px; color: #777; display: flex; justify-content: space-between; }
.paper .tot td { font-weight: 800; font-size: 15px; border-bottom: 0; }
.paper a { color: #111; text-decoration: underline; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  #side, #tabs, #top, .no-print, #toast-root, #modal-root { display: none !important; }
  #content { margin: 0 !important; }
  #main { padding: 0 !important; max-width: none !important; }
  .paper { border-radius: 0; padding: 0; max-width: none; }
}

/* ---------- mobil ---------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.main-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  #side { display: none; }
  #content { margin-left: 0; padding-bottom: calc(var(--tabbar) + var(--safe-b)); }
  #top { padding: calc(10px + var(--safe-t)) 16px 10px; }
  #top h1 { font-size: 19px; }
  #main { padding: 6px 16px 32px; }
  #tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(12, 12, 12, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  #tabs a, #tabs button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; font-weight: 600; color: var(--dim); background: none; border: 0; position: relative; cursor: pointer;
  }
  #tabs svg { width: 22px; height: 22px; }
  #tabs .on { color: var(--text); }
  #tabs .on svg { color: var(--accent); }
  #tabs .badge-dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 10px; }
  .stats.s3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.s3 > :last-child { grid-column: span 2; }
  .item.eq-row { flex-wrap: wrap; row-gap: 8px; }
  .item.eq-row > .grow { flex: 1 1 0; }
  .item.eq-row > .eq-ctrl { width: 100%; padding-left: 56px; }
  .item.eq-row > .eq-ctrl .btn { margin-left: auto; }
  .stat { padding: 13px; }
  .stat .v { font-size: 20px; }
  .item { padding: 12px 14px; }
  .card { padding: 15px; }
  .card.flush .card-head { padding: 14px 15px 0; }
  .card .list .item { padding-left: 15px; padding-right: 15px; }
  .field.half, .field.third { grid-column: span 6; }
  .form-grid.keep .field.half { grid-column: span 3; }
  .form-grid.keep .field.third { grid-column: span 2; }
  .modal-wrap { align-items: flex-end; padding: 0; }
  .modal { max-width: none !important; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: var(--safe-b); }
  .profile-head { grid-template-columns: 1fr; }
  .gallery .main-ph { max-width: 360px; }
  .cal { display: none; }
  .agenda { display: block; }
  .search { max-width: none; min-width: 0; }
  .kv { grid-template-columns: 110px 1fr; }
  .paper { padding: 20px 16px; }
  .paper .big { grid-template-columns: 1fr; }
  .paper .big > div { border-right: 0; border-bottom: 1px solid #ccc; }
  .hide-m { display: none !important; }
  .cast-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  #actions .btn .lbl { display: none; }
  #actions .btn { width: 40px; padding: 0; }
  #actions .btn.primary { width: auto; padding: 0 12px; }
  #actions .btn.primary .lbl { display: inline; }
  .chat { height: calc(100vh - 260px); min-height: 380px; }
  .tbl th, .tbl td { padding: 9px 10px; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
