:root {
  --teal: #1ba7b6;
  --teal-dark: #14818d;
  --ink: #38322e;
  --cream: #f3ecdd;
  --cream-dark: #e5d5b8;
  --bg: #f7f6f3;
  --line: #e3ded4;
  --red: #b4432f;
  --green: #2e7d32;
  --card: #fff;
  --hover: #fbfaf7;
  --muted: #857d73;
  --input-bg: #fff;
  --input-border: #cfc9be;
}
:root.dark {
  --ink: #e6e2da;
  --cream: #2a3138;
  --cream-dark: #454e58;
  --bg: #14181c;
  --line: #39404a;
  --card: #20262c;
  --hover: #262d34;
  --muted: #9aa2ab;
  --input-bg: #1a1f24;
  --input-border: #4a525c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Tahoma, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; }
a { color: var(--teal-dark); text-decoration: none; }
:root.dark a { color: var(--teal); }
:root.dark a.btn { color: #fff; }
:root.dark a.btn.secondary { color: var(--ink); }
a:hover { text-decoration: underline; }

/* ---------- Sol menü düzeni ---------- */
.lay { display: flex; min-height: 100vh; }
.sidebar { width: 212px; flex: 0 0 212px; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; }
.sbrand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 3px solid var(--teal); }
.sbrand img { height: 42px; max-width: 70px; object-fit: contain; }
.sbrand span { color: var(--ink); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; line-height: 1.35; }
.sidenav { flex: 1; padding: 10px 9px; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { padding: 9px 12px; border-radius: 7px; color: var(--ink); font-weight: 500; }
.sidenav a:hover { background: var(--cream); text-decoration: none; }
.sidenav a.active { background: var(--teal); color: #fff; }
.sidefoot { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.8; }
.sidefoot .cikis { color: var(--red); }
:root.dark .sidefoot .cikis { color: #f0937e; }
.maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 18px; height: 54px; position: sticky; top: 0; z-index: 30; }
.menubtn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); padding: 4px 9px; border-radius: 8px; }
.menubtn:hover { background: var(--cream); }
.tophotel { font-weight: 600; font-size: 14px; color: var(--muted); margin-right: auto; }
.sideoverlay { display: none; }
.themebtn { background: none; border: 0; font-size: 19px; cursor: pointer; padding: 6px 8px; border-radius: 8px; line-height: 1; }
.themebtn:hover { background: var(--cream); }
.login-theme { position: fixed; top: 14px; right: 14px; font-size: 22px; z-index: 30; }
.bellwrap { position: relative; }
.bellbtn { position: relative; background: none; border: 0; font-size: 21px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.bellbtn:hover { background: var(--cream); }
.bellbadge { position: absolute; top: 0; right: 0; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 10px; padding: 0 4px; }
.belldrop { display: none; position: absolute; right: 0; top: 42px; width: 360px; max-width: 90vw; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,.18); z-index: 50; max-height: 70vh; overflow-y: auto; }
.belldrop.open { display: block; }
.bellhead { padding: 10px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--teal-dark); border-bottom: 2px solid var(--teal); }
:root.dark .bellhead { color: var(--teal); }
.bellitem { display: block; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.bellitem:hover { background: var(--hover); text-decoration: none; }
.bellitem span { color: var(--muted); font-size: 12px; }
.bellitem.bugun { border-left: 4px solid #d99b18; }
.bellitem.gecti { border-left: 4px solid var(--red); }
.bellitem.gecti span b { color: var(--red); }
.bellitem.bellall { text-align: center; color: var(--teal-dark); font-weight: 600; }

.container { max-width: 1560px; margin: 24px auto 60px; padding: 0 20px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0 28px; }
.flash { background: #e5f5ee; border: 1px solid #bfe5d2; color: var(--green); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
:root.dark .flash { background: #1e3328; border-color: #2e5b40; color: #8fd79a; }

h1 { font-size: 22px; margin: 0 0 18px; }
h1 small { color: var(--muted); font-weight: 400; font-size: 14px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.pagehead h1 { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.card.warncard { border: 2px solid var(--red); background: #fbeae6; }
:root.dark .card.warncard { background: #42221c; }
.card h2 { font-size: 16px; margin: 0 0 14px; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .5px; }
:root.dark .card h2 { color: var(--teal); }

.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: 1fr 1fr; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--input-border); border-radius: 7px; font: inherit; background: var(--input-bg); color: var(--ink);
}
input[type=color] { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--input-border); border-radius: 7px; background: var(--input-bg); cursor: pointer; }
input[type=file] { width: 100%; font: inherit; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
textarea { resize: vertical; }

.btn { display: inline-block; background: var(--teal); color: #fff; border: 0; padding: 10px 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--teal-dark); text-decoration: none; }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--input-border); }
.btn.secondary:hover { background: var(--cream); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 6px; }

.table-wrap, .card { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }

/* Sığan tablo: yatay kaydırma yok, hücreler sarar, ekran daraldıkça kolonlar gizlenir */
.card.fitcard { overflow-x: visible; }
table.sozliste { table-layout: auto; min-width: 0 !important; }
table.sozliste th { white-space: nowrap; }
table.sozliste td { white-space: normal; overflow-wrap: anywhere; }
table.sozliste .grp { max-width: 260px; }
table.sozliste .frm { max-width: 220px; }
table.sozliste td.sel { width: 1%; padding-right: 0; }
table.sozliste td.sel input { width: 16px; height: 16px; margin: 0; }
table.sozliste td.acts { white-space: nowrap; width: 1%; }
table.sozliste td.acts .actwrap { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
table.sozliste td.acts .btn { display: inline-flex; align-items: center; justify-content: center; height: 30px; min-width: 52px; padding: 0 10px; margin: 0; line-height: 1; font-size: 13px; }
table.sozliste td.acts .btn.danger svg { margin-right: 0; }
@media (max-width: 1100px) { table.sozliste td.acts .actwrap { flex-direction: column; align-items: stretch; gap: 4px; } }
table.sozliste select.badge-sel { max-width: 130px; font-size: 12.5px; }
@media (max-width: 1240px) { table.sozliste th:nth-child(5), table.sozliste td:nth-child(5) { display: none; } }
@media (max-width: 900px) {
  table.sozliste th:nth-child(3), table.sozliste td:nth-child(3) { display: none; }
  table.sozliste th, table.sozliste td { padding: 6px 4px; font-size: 12.5px; }
  table.sozliste select.badge-sel { max-width: 104px; font-size: 12px; }
}
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 9px 8px; border-bottom: 2px solid var(--line); }
table.list td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:hover td { background: var(--hover); }
table.list input, table.list select { padding: 6px 8px; }
/* Liste içindeki kontroller kolonu şişirmesin — tablo ekrana sığsın, yatay kaydırma olmasın */
table.list input[type=date] { width: 128px; }
table.list select { width: auto; max-width: 140px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.BEKLEMEDE { background: #fdf3d7; color: #8a6d1a; }
.badge.OPSIYON { background: #dcf1f4; color: var(--teal-dark); }
.badge.OPS_GECTI { background: #fde7d9; color: #b3471c; }
.badge.OK { background: #e2f2e3; color: var(--green); }
.badge.CNC { background: #f8e2dd; color: var(--red); }
:root.dark .badge.BEKLEMEDE { background: #423a1e; color: #e8c96a; }
:root.dark .badge.OPSIYON { background: #173a40; color: #6fd3de; }
:root.dark .badge.OPS_GECTI { background: #45281a; color: #f2a072; }
:root.dark .badge.OK { background: #1e3a22; color: #8fd79a; }
:root.dark .badge.CNC { background: #42221c; color: #f0937e; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; padding: 16px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--cream) 0%, var(--bg) 60%); }
.login-box { width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 36px; box-shadow: 0 10px 40px rgba(0,0,0,.08); text-align: center; }
.login-box img { max-height: 110px; max-width: 240px; object-fit: contain; margin-bottom: 10px; }
.login-box h1 { font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--teal-dark); }
:root.dark .login-box h1 { color: var(--teal); }
.login-box form { text-align: left; margin-top: 18px; }
.login-box .btn { width: 100%; margin-top: 14px; }
.login-err { background: #f8e2dd; color: var(--red); border-radius: 8px; padding: 9px; font-size: 14px; margin-top: 14px; }
:root.dark .login-err { background: #42221c; color: #f0937e; }

.logo-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { max-height: 90px; max-width: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }

.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filterbar > div { min-width: 150px; }
.filterbar .fbreak { flex-basis: 100%; height: 0; min-width: 0; margin: 0; } /* filtreleri alt satıra geçirir */

/* Orta genişlik (dizüstü) — tablolar sıkışsın, yatay kaydırma hiç çıkmasın */
@media (max-width: 1450px) {
  table.list th, table.list td { padding: 8px 5px; font-size: 13.5px; }
  table.list th { font-size: 11.5px; }
  table.list input[type=date] { width: 116px; }
  table.list select { max-width: 124px; }
  table.list .btn.sm { padding: 4px 7px; font-size: 12.5px; }
}

/* Dar dizüstü — teklif listesi yine sığsın: Hazırlayan kolonu gizlenir, tarihler sarar */
@media (max-width: 1240px) {
  .tekliste th:nth-child(9), .tekliste td:nth-child(9) { display: none; }
  .tekliste td:nth-child(5) { white-space: normal; }
}
@media (max-width: 1060px) {
  table.list th, table.list td { padding: 6px 4px; font-size: 13px; }
  table.list input[type=date] { width: 106px; font-size: 12.5px; }
  table.list select { max-width: 112px; font-size: 12.5px; }
}

/* ---------- Mobil uyum ---------- */
@media (max-width: 900px) {
  body { font-size: 14px; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  body.navopen .sidebar { transform: none; }
  .sideoverlay { position: fixed; inset: 0; background: rgba(20,18,16,.45); z-index: 35; }
  body.navopen .sideoverlay { display: block; }
  .menubtn { display: block; }
  .topbar { padding: 0 10px; height: 50px; }
  .tophotel { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .container { margin: 12px auto 40px; padding: 0 10px; }
  .card { padding: 14px; border-radius: 8px; }
  .pagehead { flex-direction: column; align-items: stretch; }
  .pagehead .btn { text-align: center; }
  .stats { grid-template-columns: 1fr 1fr !important; }
  .stat b { font-size: 20px; }
  table.list { min-width: 640px; } /* kart içinde yatay kaydırma */
  table.list th, table.list td { padding: 8px 7px; font-size: 13px; }
  .filterbar > div { flex: 1 1 45%; min-width: 120px; }
  .btn { padding: 9px 14px; }
  h1 { font-size: 18px; }
  iframe#prev { height: 800px !important; }
  .login-box { width: 92vw; padding: 24px; }
  .cond-item { flex-wrap: wrap; }
  .cond-item > textarea, form .cond-item .cond-texts { min-width: 100%; flex-basis: 100%; order: -1; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .grid { gap: 10px; }
  .topbar nav a { padding: 6px 8px; }
}

/* Ciro sayfası — aylık çubuk grafik */
.rvlegend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; align-items: center; }
.rvlegend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.rvchart { position: relative; display: flex; gap: 6px; align-items: flex-end; padding: 8px 2px 0; overflow-x: auto; min-height: 222px; }
.rvtarget { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--red); opacity: .55; pointer-events: none; }
.rvcol { flex: 1; min-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rvpair { display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; }
.rvstack { display: flex; flex-direction: column; align-items: center; width: 58%; max-width: 40px; }
.rvbar { width: 100%; }
.rvbar.ok { background: var(--teal); border-radius: 0 0 3px 3px; }
.rvbar.ok:only-child { border-radius: 4px 4px 3px 3px; }
.rvbar.pot { background: var(--cream-dark); border-radius: 4px 4px 0 0; }
.rvbar.pot:only-child { border-radius: 4px 4px 3px 3px; }
.rvbar.prev { background: var(--line); width: 22%; max-width: 14px; border-radius: 3px 3px 0 0; }
.rvval { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.rvmon { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* Doluluk takvimi */
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calhead div { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.calcell { min-height: 84px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: var(--card); overflow: hidden; }
.calempty { background: none; border-color: transparent; }
.caltoday { border-color: var(--teal); border-width: 2px; }
.calday { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.caltoday .calday { color: var(--teal-dark); }
.calchip { display: block; font-size: 11px; color: #fff; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calchip:hover { text-decoration: none; opacity: .85; }
.calchip.OK { background: var(--green); }
.calchip.OPSIYON { background: var(--teal); }
.calchip.OPS_GECTI { background: #e0662a; }
.calchip.BEKLEMEDE { background: var(--cream-dark); color: var(--ink); }
/* Aralık görünümü: ay ayracı, gün yanındaki kısa ay adı, chip içi tahmini ciro */
.calmonth { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .5px; border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 2px 2px; }
:root.dark .calmonth { color: var(--teal); }
.calgrid > .calmonth:first-child { border-top: none; margin-top: 0; }
.calday .calmon { font-weight: 600; color: var(--teal-dark); }
:root.dark .calday .calmon { color: var(--teal); }
.calchip .rev { float: right; margin-left: 6px; opacity: .8; font-size: 10px; }
@media (max-width: 1060px) { .calchip .rev { display: none; } }
/* Özet tablosu — yatay kaydırma yok, hücreler sarar, dar ekranda kolon gizlenir */
table.calsumtbl { table-layout: auto; min-width: 0 !important; }
table.calsumtbl td { white-space: normal; overflow-wrap: anywhere; }
table.calsumtbl td:nth-child(4), table.calsumtbl td:nth-child(5), table.calsumtbl th:nth-child(4), table.calsumtbl th:nth-child(5) { width: 1%; white-space: nowrap; }
table.caltot { max-width: 460px; }
.calsum tr[hidden] { display: none; }
@media (max-width: 1060px) { table.calsumtbl th:nth-child(2), table.calsumtbl td:nth-child(2) { display: none; } }
@media (max-width: 760px) { table.calsumtbl th:nth-child(5), table.calsumtbl td:nth-child(5) { display: none; } }
@media (max-width: 900px) { .calcell { min-height: 56px; } .calchip { font-size: 10px; } }

.cond-item { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.cond-item textarea { flex: 1; min-height: 38px; padding: 7px 10px; }
/* TR + EN metin çifti: EN satırı soluk etiketle altta, dar ekranda da yatay taşmaz */
.cond-item .cond-texts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cond-item .cond-en { display: flex; gap: 6px; align-items: flex-start; }
.cond-item .cond-en textarea { min-height: 32px; padding: 5px 10px; font-size: 12.5px; color: var(--muted); border-style: dashed; }
.cond-item .cond-en textarea:focus { color: inherit; border-style: solid; }
.cond-item .cond-en-tag { flex: none; font-size: 10px; font-weight: 700; color: var(--muted); padding-top: 9px; width: 18px; }
/* Şart maddesi tutma sapı — sürükleme yalnızca buradan başlar (textarea'da metin seçimi bozulmasın) */
.cond-item .drag {
  cursor: grab; color: var(--muted); padding: 8px 2px 0; font-size: 15px; line-height: 1.2;
  flex: none; user-select: none; -webkit-user-select: none; touch-action: none;
}
.cond-item .drag:active { cursor: grabbing; }
.cond-item.cond-dragging {
  opacity: .45; outline: 2px dashed var(--teal); outline-offset: 2px; border-radius: 6px;
}
.muted { color: var(--muted); font-size: 13px; }
/* Gizlenen satır/bölüm — kalıcı silme yerine geri alınabilir gizleme */
.row-hidden { opacity: .45; }
.row-hidden input, .row-hidden textarea, .row-hidden select { text-decoration: line-through; }
.row-hidden button { text-decoration: none; }
input.mult { width: 55px; text-align: center; color: var(--muted); font-size: 12.5px; padding-left: 4px; padding-right: 4px; }
.chips span { display: inline-block; background: var(--cream); border: 1px solid var(--cream-dark); border-radius: 6px; padding: 2px 8px; margin: 1px 4px 1px 0; font-size: 12.5px; white-space: nowrap; color: var(--ink); }
.chips span b { color: var(--teal-dark); font-weight: 600; margin-right: 3px; }
:root.dark .chips span b { color: var(--teal); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.inline-form { display: inline; }
/* Çakışma kontrol penceresi — durum filtresi butonları */
.ovf-bar .ovf.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.ovf-bar .ovf.active .muted { color: rgba(255,255,255,.8); }
/* Şart Maddeleri Kütüphanesi — maddenin belgedeki sıra numarası */
.cond-item .cond-no { flex: none; width: 22px; text-align: right; color: var(--muted); font-size: 12.5px; padding-top: 9px; }
/* Kademeli teklif tipi seçimi (Kategori → Alt kategori → Tür) */
.type-level + .type-level { margin-top: 6px; }
/* Teklif tipleri tablosu (Ayarlar) — daraldıkça bilgi kolonları gizlenir, yatay kaydırma çıkmaz */
table.tiplist td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1240px) { table.tiplist th:nth-child(3), table.tiplist td:nth-child(3) { display: none; } }
@media (max-width: 1060px) { table.tiplist th:nth-child(2), table.tiplist td:nth-child(2) { display: none; } }
/* Takvim legend = filtre */
.calfilter .lg { background: none; border: 1px solid transparent; border-radius: 6px; padding: 2px 7px; font: inherit; color: inherit; cursor: pointer; line-height: 1.5; }
.calfilter .lg:hover { border-color: var(--input-border); background: var(--hover); }
.calfilter .lg.off { opacity: .45; text-decoration: line-through; }
.calfilter .lg.off i { background: var(--line) !important; }
.calfilter .lgall { color: var(--teal); font-weight: 600; }
.calchip[hidden] { display: none; }

/* Acente kartı / acente listesi tabloları — ekrana sığar, yatay kaydırma yok */
table.agtbl { table-layout: auto; min-width: 0 !important; }
table.agtbl th { white-space: nowrap; }
table.agtbl td { white-space: normal; overflow-wrap: anywhere; }
table.agtbl td.acts { white-space: nowrap; width: 1%; }
table.agtbl td.acts .btn { display: block; text-align: center; margin: 2px 0; }
table.agtbl input { width: 100%; min-width: 0; }
.agsub { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 1240px) { table.agtbl th.opt1, table.agtbl td.opt1 { display: none; } }
@media (max-width: 900px) {
  table.agtbl th.opt2, table.agtbl td.opt2 { display: none; }
  table.agtbl th, table.agtbl td { padding: 6px 4px; font-size: 12.5px; }
}

/* ---------- Kullanım Chartı (tesis × gün) ---------- */
.ftabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ftab { padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 13.5px; }
.ftab:hover { background: var(--cream); text-decoration: none; }
.ftab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chartcard { padding: 10px; }
/* Izgara: 31 gün kolonu ekrana sığar — yatay kaydırma yok */
table.fchart { width: 100%; table-layout: fixed; border-collapse: collapse; }
table.fchart th, table.fchart td { border: 1px solid var(--line); padding: 0; height: 26px; vertical-align: top; }
table.fchart th { background: var(--hover); font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.1; padding: 2px 0; }
table.fchart th .dn { display: block; }
table.fchart th .dw { display: block; font-weight: 400; font-size: 9px; opacity: .75; }
table.fchart th.we, table.fchart td.we { background: var(--cream); }
table.fchart th.td, table.fchart td.td { outline: 2px solid var(--teal); outline-offset: -2px; }
table.fchart td.fname, table.fchart th.fname { width: 15%; padding: 3px 6px; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; text-align: left; }
table.fchart td.fname.passive { color: var(--muted); font-weight: 400; }
.fchip { display: block; font-size: 9.5px; line-height: 1.5; color: #fff; padding: 1px 2px; margin: 1px 0; border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: clip; }
.fchip.cont { border-radius: 0; }
.fchip.ops { opacity: .62; }
.fdot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chartnarrow { display: none; margin: 0; }
/* Rezervasyon listesi — sarar, sığar, dar ekranda kolon gizlenir */
table.fbooktbl { table-layout: auto; min-width: 0 !important; }
table.fbooktbl td { white-space: normal; overflow-wrap: anywhere; }
table.fbooktbl td.acts { white-space: nowrap; width: 1%; }
table.fbooktbl td.acts .btn { display: block; text-align: center; margin: 2px 0; }
table.ftbl { table-layout: auto; min-width: 0 !important; }
table.ftbl td.acts { white-space: nowrap; width: 1%; }
.fpick { display: flex; flex-wrap: wrap; gap: 8px; }
.fpickitem { display: flex; align-items: center; gap: 6px; border: 1px solid var(--input-border); border-radius: 7px;
  padding: 7px 11px; font-size: 13.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0; cursor: pointer; }
.fpickitem input { width: auto; margin: 0; }
@media (max-width: 1240px) {
  table.fchart td.fname, table.fchart th.fname { width: 18%; font-size: 11px; }
  .fchip { font-size: 9px; }
  table.fbooktbl th:nth-child(7), table.fbooktbl td:nth-child(7) { display: none; }
}
/* Dar ekran: ızgara yerine alttaki rezervasyon listesi kullanılır */
@media (max-width: 900px) {
  table.fchart { display: none; }
  .chartnarrow { display: block; }
  table.fbooktbl th:nth-child(5), table.fbooktbl td:nth-child(5) { display: none; }
}

/* Chart yazdırma — A4 yatay, tek sayfa genişliği */
@media print {
  .noprint, .sidebar, .topbar, .footer, .sideoverlay, .flash { display: none !important; }
  .container { max-width: none; margin: 0; padding: 0; }
  .card { border: 0; padding: 0; margin: 0 0 8px; box-shadow: none; }
  .printhead[hidden] { display: block !important; font-size: 12px; margin-bottom: 6px; }
  table.fchart { display: table !important; font-size: 8px; }
  table.fchart th, table.fchart td { height: auto; }
  .chartnarrow { display: none !important; }
  .fchip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 landscape; margin: 8mm; }
}

/* ================= Modern arayüz: gruplu kenar çubuğu, panel, efektler ================= */
:root { --sb-bg: #22262b; --sb-bg2: #2c3238; --sb-text: #cfd5db; --sb-muted: #8d959e; --sb-hover: rgba(255,255,255,.06); --shadow: 0 6px 24px rgba(30,25,20,.07); --shadow-hover: 0 14px 34px rgba(30,25,20,.13); }
:root.dark { --sb-bg: #0f1215; --sb-bg2: #171b20; --sb-text: #d5dae0; --sb-muted: #7f8892; --sb-hover: rgba(255,255,255,.05); --shadow: 0 6px 24px rgba(0,0,0,.35); --shadow-hover: 0 14px 34px rgba(0,0,0,.5); }

.sidebar { width: 236px; flex: 0 0 236px; background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg2) 100%); border-right: 0; color: var(--sb-text); }
.sbrand { border-bottom: 1px solid rgba(255,255,255,.08); padding: 16px 16px 14px; position: relative; }
.sbrand::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--teal), transparent); }
.sbrand img { height: 40px; background: #fff; border-radius: 9px; padding: 4px; }
.sbrand span { color: #fff; }
.sidenav { padding: 10px 10px 14px; gap: 4px; }
.navsolo { display: flex; flex-direction: column; gap: 2px; }
.navgroup { border-radius: 10px; }
.navhead { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; color: var(--sb-muted); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; padding: 12px 12px 6px; cursor: pointer; border-radius: 8px; }
.navhead:hover { color: #fff; }
.navhead .chev { transition: transform .25s ease; opacity: .7; }
.navgroup.open .navhead .chev { transform: rotate(180deg); }
.navitems { display: flex; flex-direction: column; gap: 2px; }
.sidenav a.navlink { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px; color: var(--sb-text); font-weight: 500; font-size: 14px; position: relative; transition: background .15s ease, color .15s ease, transform .15s ease; }
.sidenav a.navlink .nicon { flex: 0 0 18px; opacity: .8; }
.sidenav a.navlink:hover { background: var(--sb-hover); color: #fff; text-decoration: none; transform: translateX(2px); }
.sidenav a.navlink.active { background: linear-gradient(90deg, var(--teal), var(--teal-dark)); color: #fff; box-shadow: 0 6px 16px rgba(27,167,182,.35); }
.sidenav a.navlink.active .nicon { opacity: 1; }
.sidenav a.navlink.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--teal); }
.sidefoot { border-top: 1px solid rgba(255,255,255,.08); color: var(--sb-muted); }
.sidefoot b { color: #fff; }
.sidefoot a { color: var(--teal); }
.sidefoot .cikis { color: #f0937e; }
/* Dar ekranda kapalı grupların içeriğini tamamen gizle (gride güvenme) */
/* Süzülerek açılıp kapanma: yükseklik + saydamlık + hafif kayma */
.navitems { overflow: hidden; max-height: 640px; opacity: 1; transition: max-height .38s cubic-bezier(.4,0,.2,1), opacity .28s ease .06s; }
.navitems > .navlink { transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .25s ease, background .15s ease; }
.navgroup:not(.open) .navitems { max-height: 0; opacity: 0; pointer-events: none; transition: max-height .38s cubic-bezier(.4,0,.2,1), opacity .28s ease; }
.navgroup:not(.open) .navitems > .navlink { transform: translateX(-8px); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .navitems, .navitems > .navlink { transition: none !important; } }

.topbar { backdrop-filter: blur(8px); background: color-mix(in srgb, var(--card) 86%, transparent); box-shadow: 0 1px 0 var(--line); }
.card { border-radius: 14px; box-shadow: var(--shadow); border-color: transparent; transition: box-shadow .2s ease, transform .2s ease; }
:root.dark .card { border-color: var(--line); }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cardhead h2 { margin: 0; }
.btn { transition: transform .12s ease, box-shadow .15s ease, background .15s ease; box-shadow: 0 4px 12px rgba(27,167,182,.22); }
.btn:hover { transform: translateY(-1px); }
.btn.secondary, .btn.sm { box-shadow: none; }
.stat { border-radius: 14px; box-shadow: var(--shadow); border-color: transparent; }

/* Giriş efekti: kartlar sırayla belirir */
.fx { animation: fxin .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes fxin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fx, .bar, .seg, .arealine, .dot, .navhead .chev, .navlink { animation: none !important; transition: none !important; } }

/* Panel */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 26px; margin-bottom: 18px; border-radius: 16px; color: #fff;
  background: linear-gradient(115deg, #1f6f78 0%, var(--teal) 55%, #6fd0da 100%); box-shadow: 0 12px 34px rgba(27,167,182,.28); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero::before { content: ""; position: absolute; right: 120px; bottom: -120px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero > * { position: relative; }
.hero h1 { margin: 2px 0 4px; font-size: 24px; color: #fff; }
.hero .muted { color: rgba(255,255,255,.82); margin: 0; }
.hero-eyebrow { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; opacity: .85; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn, :root.dark .hero a.btn { background: #fff; color: var(--teal-dark); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.hero .btn.secondary, :root.dark .hero a.btn.secondary { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn.secondary:hover { background: rgba(255,255,255,.26); }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; display: block; background: var(--card); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--shadow); color: var(--ink); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
:root.dark .kpi { border: 1px solid var(--line); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); text-decoration: none; }
.kpi-ic { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--c, var(--teal)); background: color-mix(in srgb, var(--c, var(--teal)) 14%, transparent); }
.kpi > b { display: block; font-size: 26px; line-height: 1.15; letter-spacing: -.5px; }
.kpi > span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.kpi small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kpi small em { font-style: normal; font-weight: 700; margin-left: 4px; }
.kpi small em.up { color: var(--green); } .kpi small em.down { color: var(--red); }
.kpi-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--line); display: block; }
.kpi-bar > i { display: block; height: 100%; transition: width 1s ease; }

.dashrow { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.dashrow.lists { grid-template-columns: 1fr 1fr; }
.dashrow > .card { margin-bottom: 18px; min-width: 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .val { fill: var(--ink); font-size: 11px; font-weight: 700; }
.chart.bars .bar { transform-box: fill-box; transform-origin: bottom; animation: growy .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart.bars rect:hover { filter: brightness(1.12); }
.chart .arealine { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .areafill { animation: fxin 1.2s ease both; }
.chart .dot { fill: var(--card); stroke: var(--teal); stroke-width: 2.5; transition: r .15s ease; }
.chart .dot:hover { r: 6; }
.donutwrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 150px; flex: 0 0 150px; }
.donut-bg { fill: none; stroke: var(--line); stroke-width: 14; }
.donut .seg { fill: none; stroke-width: 14; animation: segin 1s ease both; }
@keyframes segin { from { stroke-dasharray: 0 1000; } }
.donut-n { font-size: 24px; font-weight: 800; fill: var(--ink); }
.donut-l { font-size: 10px; fill: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; }
.donut-legend li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.donut-legend li:last-child { border-bottom: 0; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.donut-legend b { margin-left: auto; }
.typebars { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.typebar { display: grid; grid-template-columns: 1fr 90px 28px; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.typebar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typebar > i { display: block; height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.typebar > i > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-dark)); border-radius: 4px; animation: growx .9s ease both; }
@keyframes growx { from { width: 0 !important; } }
.typebar b { text-align: right; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li a { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 10px; color: var(--ink); transition: background .15s ease; }
.tl li a:hover { background: var(--hover); text-decoration: none; }
.tl-date { flex: 0 0 82px; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 4px; border-radius: 8px; background: var(--cream); color: var(--ink); }
.tl-date.soon { background: #fdf3d7; color: #8a6d1a; }
.tl-date.late { background: #f8e2dd; color: var(--red); }
.tl-date.now { background: #e2f2e3; color: var(--green); }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-body small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 14px 0; margin: 0; }
table.dashtbl { table-layout: auto; min-width: 0 !important; }
table.dashtbl td { overflow-wrap: anywhere; }
@media (max-width: 1450px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1240px) { table.dashtbl .opt1 { display: none; } .dashrow { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } .dashrow.lists { grid-template-columns: 1fr; } .hero { padding: 18px; } .hero h1 { font-size: 20px; } table.dashtbl .opt2 { display: none; } table.dashtbl { min-width: 0 !important; } .donutwrap { flex-direction: column; } }
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr; } }

/* ================= İç sayfalar: geniş içerik alanı + ortak modern görünüm ================= */
.container { max-width: none; margin: 20px 0 60px; padding: 0 28px; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
h1 small { font-size: 13px; letter-spacing: 0; }
.pagehead { margin-bottom: 16px; }
.pagehead .btn { box-shadow: 0 6px 16px rgba(27,167,182,.22); }
label { letter-spacing: .5px; }
input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], select, textarea { border-radius: 9px; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27,167,182,.18); }
.btn { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); border-radius: 9px; }
.btn:hover { background: linear-gradient(135deg, var(--teal-dark), var(--teal-dark)); }
.btn.secondary { background: var(--card); border: 1px solid var(--input-border); }
.btn.secondary:hover { background: var(--cream); border-color: var(--teal); }
.btn.danger, a.btn.danger, :root.dark a.btn.danger { background: linear-gradient(135deg, #e04a35, #bf3521); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(191,53,33,.22); }
.btn.danger:hover, a.btn.danger:hover { background: #b02f1c; color: #fff; }
.btn.danger.sm { box-shadow: none; }
.btn.danger svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.sm { border-radius: 7px; }
.card h2 { font-size: 15px; letter-spacing: .7px; }
.card h2::after { content: ""; display: block; width: 34px; height: 2px; margin-top: 6px; background: linear-gradient(90deg, var(--teal), transparent); border-radius: 2px; }
.cardhead h2::after, .pagehead h2::after { display: none; }
table.list th { background: var(--hover); border-bottom: 1px solid var(--line); font-size: 11.5px; padding: 10px 8px; }
table.list th:first-child { border-radius: 8px 0 0 8px; }
table.list th:last-child { border-radius: 0 8px 8px 0; }
table.list tr:hover td { background: color-mix(in srgb, var(--teal) 5%, var(--card)); }
table.list td { transition: background .12s ease; }
.filterbar { background: var(--card); padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow); align-items: end; }
:root.dark .filterbar { border: 1px solid var(--line); }
.badge { padding: 4px 11px; font-size: 11.5px; letter-spacing: .2px; }
.stats { gap: 14px; }
.stat { transition: transform .18s ease, box-shadow .18s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat b { font-size: 28px; letter-spacing: -.5px; }
.flash { border-radius: 12px; border-left: 4px solid var(--green); box-shadow: var(--shadow); }
.card.warncard { box-shadow: 0 10px 30px rgba(180,67,47,.15); }
.sidefoot { font-size: 12.5px; }
.footer { font-size: 11.5px; letter-spacing: .3px; }

/* Tesisler: ölçü kolonları — dar ekranda önce not/zemin/kapasite, sonra ölçüler gizlenir; yatay kaydırma yok */
table.ftbl th.dim, table.ftbl td.dim { width: 82px; }
table.ftbl td.dim input { width: 78px; text-align: right; }
table.ftbl td input[type=text] { min-width: 0; }
@media (max-width: 1450px) { table.ftbl th.opt2, table.ftbl td.opt2 { display: none; } }
@media (max-width: 1240px) { table.ftbl th.opt1, table.ftbl td.opt1 { display: none; } }
@media (max-width: 1060px) { table.ftbl th.dim:nth-child(4), table.ftbl td.dim:nth-child(4), table.ftbl th.dim:nth-child(5), table.ftbl td.dim:nth-child(5) { display: none; } }
table.fchart td.fname .fdims { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; line-height: 1.25; margin-top: 1px; }
@media (max-width: 1240px) { table.fchart td.fname .fdims { display: none; } }

/* ================= Takvim: gruplu renkler, giriş/çıkış uçları, özel gün şeritleri, ipucu kartı, giriş animasyonu ================= */
.calcell { animation: calin .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(min(var(--i, 0), 80) * 9ms); transition: box-shadow .18s ease, transform .18s ease; }
.calcell:not(.calempty):hover { box-shadow: var(--shadow-hover, 0 8px 22px rgba(0,0,0,.10)); border-color: var(--input-border); }
.calwe { background: color-mix(in srgb, var(--cream) 45%, var(--card)); }
:root.dark .calwe { background: color-mix(in srgb, var(--cream) 35%, var(--card)); }
/* Grubun oteldeki her günü: hücre zemini ve çerçevesi grup rengini alır; birden çok grup varsa üstte dilimli şerit */
.calcell.calstay { --gc: var(--teal); background: color-mix(in srgb, var(--gc) 9%, var(--card)); border-color: color-mix(in srgb, var(--gc) 45%, var(--line)); position: relative; }
.calcell.calstay::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gbar, var(--gc)); border-radius: 6px 6px 0 0; }
.calcell.calstay .calday { color: color-mix(in srgb, var(--gc) 70%, var(--ink)); }
:root.dark .calcell.calstay { background: color-mix(in srgb, var(--gc) 16%, var(--card)); }
.calcell.calstay.caltoday { border-color: var(--teal); }
@keyframes calin { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Grup chip'i: acenteye/gruba özel yumuşak renk (--c), sol kenar dolu; durum küçük nokta ile */
.calchip.grp { --c: var(--teal); background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--ink); border-left: 3px solid var(--c); border-radius: 3px; padding-left: 5px; font-weight: 600; transition: background .15s ease, transform .12s ease; }
:root.dark .calchip.grp { background: color-mix(in srgb, var(--c) 28%, var(--card)); }
.calchip.grp:hover { background: color-mix(in srgb, var(--c) 30%, var(--card)); opacity: 1; transform: translateX(1px); }
.calchip.grp .st { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--muted); }
.calchip.grp.OK .st { background: var(--green); }
.calchip.grp.OPSIYON .st { background: var(--teal); }
.calchip.grp.OPS_GECTI .st { background: #e0662a; }
.calchip.grp.OPS_GECTI { border-left-style: dashed; }
.calchip.grp.BEKLEMEDE .st { background: var(--cream-dark); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.calchip.grp.OPSIYON { border-left-style: dashed; }
.calchip.grp.BEKLEMEDE { border-left-style: dotted; opacity: .85; }
.calchip.grp.cs { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.calchip.grp.ce { border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-right: 3px solid var(--c); }
.calchip.grp .io { font-size: 9px; color: var(--c); margin: 0 3px; filter: brightness(.8); }
:root.dark .calchip.grp .io { filter: brightness(1.3); }
.calchip.grp .rev { color: var(--muted); opacity: 1; }
.calchip.grp.ctr { background: color-mix(in srgb, var(--c) 22%, var(--card)); border-left-width: 4px; }

/* Özel gün şeridi: hücrenin üst kısmında ince renkli bant; aralığın ilk günü ve her Pazartesi adı yazar */
.calspec { --c: #d99b18; font-size: 10px; font-weight: 700; line-height: 15px; height: 15px; margin: -2px -4px 3px; padding: 0 6px; color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 88%, #000), var(--c)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .2px; cursor: default; }
.calspec + .calspec { margin-top: -1px; }
.calspec.cs { margin-left: 0; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.calspec.ce { margin-right: 0; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.calspec[hidden] { display: none; }
.calhasspec { border-top-color: transparent; }

/* İpucu kartı */
.caltip { position: absolute; z-index: 500; max-width: 300px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 12px 30px rgba(0,0,0,.16); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.caltip.on { opacity: 1; transform: none; }
.caltip b { display: block; margin-bottom: 3px; font-size: 13px; }
.caltip div { color: var(--muted); }
.caltip div:last-child { color: var(--ink); }
.caltip[hidden] { display: none; }

/* Özel Günler sayfası */
.sdpreset { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.sdpreset:hover { transform: scale(1.15); }
tr.sdpast td { opacity: .6; }
table.sdtbl input[type=date] { width: 150px; }
@media (max-width: 900px) { .calspec { font-size: 9px; } .caltip { max-width: 240px; } }
@media (prefers-reduced-motion: reduce) { .calcell { animation: none !important; } .calchip.grp, .caltip { transition: none !important; } }

/* Liste sayfalayıcı (Teklifler / Sözleşmeler / Arşiv) */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.pager .pager-info { padding: 0 6px; white-space: nowrap; }
.pager .btn.disabled { opacity: .45; pointer-events: none; cursor: default; }
