:root {
  color-scheme: light;
  --ink: #172223;
  --muted: #627173;
  --line: #d6dfdc;
  --surface: #ffffff;
  --surface-soft: #f4f8f6;
  --canvas: #edf3f1;
  --brand: #075c57;
  --brand-dark: #06443f;
  --brand-soft: #dff1ec;
  --morning: #e8b400;
  --morning-soft: #fff3b0;
  --evening: #b8489b;
  --evening-soft: #f4b6e0;
  /* Orta vardiya (21 / 140 / 240): akşamın orta vardiyası, turuncu.
     Tatil turuncusundan (--holiday-soft) koyu ve doygun. */
  --mid: #e46c00;
  --mid-soft: #ff9d47;
  --off: #b4c3bf;
  --off-soft: #ffffff;
  --overtime: #d61f26;
  --overtime-soft: #ff8c8c;
  --maneuver: #6f7679;
  --leave: #3f9b46;
  --maneuver-soft: #dcdcdc;
  --leave-soft: #a8e6a0;
  /* Rapor mavisi. FS/FA'nın soluk mavisinden (--extra-soft) ayrılsın diye
     daha koyudur; yazısı beyazdır. */
  --report-soft: #2f7fc4;
  /* Vardiya kapat: otomatik mesainin asla dokunmayacağı gün. */
  --closed: #e07b00;
  --closed-soft: #ffc07a;
  /* FS / FA: o gün numara yetişmeyen fazla personel. */
  --extra: #1f6fb2;
  --extra-soft: #a9d3f5;
  /* Bayram / resmi tatil turuncu, arefesi sarı; ayarlardan elle girilir. */
  --holiday-soft: #ffb066;
  --holiday-head: #e0700a;
  --eve-soft: #ffe680;
  --eve-head: #d6a400;
  --shadow: 0 16px 40px rgba(15, 42, 39, 0.08);
  --radius: 16px;
  --p1: 52px;
  --p2: 78px;
  --p3: 252px;
  --p4: 132px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 2% -15%, #cfece3 0, transparent 31rem),
    linear-gradient(180deg, #f5f8f7 0%, var(--canvas) 38rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(7, 92, 87, 0.27);
  outline-offset: 2px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 17px clamp(20px, 4vw, 64px);
  color: #f9fffd;
  background: linear-gradient(112deg, #043c39, #0b625a 65%, #19746a);
  box-shadow: 0 6px 16px rgba(7, 62, 57, 0.17);
}

.brand,
.header-actions,
.month-control,
.schedule-heading,
.section-heading,
.dialog-heading,
.dialog-actions,
.notice,
.pool-preview,
.legend,
.app-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  color: #ffe69a;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.brand .eyebrow,
.print-heading .eyebrow {
  color: #a9e7d8;
}

h1,
h2,
p {
  margin-top: 0;
}

.brand h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(18px, 2vw, 23px);
  letter-spacing: -0.025em;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.app-shell {
  width: min(1600px, calc(100% - 36px));
  margin: 24px auto 48px;
}

.control-bar,
.settings-panel,
.schedule-section,
.people-section,
.view-tabs,
.notice {
  border: 1px solid rgba(205, 220, 215, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.control-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 5px;
  box-shadow: 0 8px 22px rgba(15, 42, 39, 0.06);
}

.view-tab {
  min-height: 39px;
  padding: 8px 17px;
  border: 0;
  border-radius: 10px;
  color: #526966;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.view-tab:hover {
  color: var(--brand-dark);
  background: #edf7f4;
}

.view-tab.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 10px rgba(5, 92, 87, 0.18);
}

.app-view[hidden] {
  display: none !important;
}

.month-control {
  gap: 6px;
}

/* Ay alanı: yazı büyük ve ORTALI; başlık da onunla hizalı. */
.month-control label {
  display: grid;
  gap: 2px;
  min-width: 176px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.month-control input {
  width: 100%;
  padding: 3px 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.control-divider {
  width: 1px;
  height: 30px;
  margin: 0 2px;
  background: var(--line);
}

.autosave-status {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.button,
.icon-button,
.link-button {
  border: 0;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 10px rgba(5, 92, 87, 0.18);
}

.button-primary:hover {
  background: var(--brand-dark);
}

.button-quiet {
  border-color: #ccdbd6;
  color: #254442;
  background: #fff;
}

.button-quiet:hover {
  border-color: #8ebeb3;
  background: #f3fbf8;
}

/* Geri al / İleri al: adım kalmayınca düğme soluk görünür (kullanıcı
   04.10.2026: "10 kere geri gitme bitince buton soluk olsun, Excel'deki gibi").
   Kapalı düğme üzerinde hover kalkması ve el imleci de yok. */
.button:disabled,
.button-quiet:disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* OTOMATİK / MANUEL — tek düğme, iki bölme. Etkin kip dolu görünür;
   manuel kip turuncudur ki otomasyonun kapalı olduğu gözden kaçmasın. */
.mode-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ccdbd6;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}

.mode-toggle span {
  padding: 6px 13px;
  border-radius: 7px;
  color: #526966;
  font-size: 14px;
  font-weight: 800;
  transition: background 150ms ease, color 150ms ease;
}

.mode-toggle:not(.is-manual) .mode-auto {
  color: #fff;
  background: var(--brand);
}

.mode-toggle.is-manual .mode-manual {
  color: #fff;
  background: #c2410c;
}

.button-danger {
  color: #ad2635;
  background: #fff1f2;
}

.button-danger:hover {
  background: #ffe1e4;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cedcd8;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #fff;
  font-size: 25px;
  line-height: 1;
}

/* ---------- Çizelge başındaki sayaçlar ---------- */
/* Özet sekmesi kaldırıldı; sayılar çizelgenin başında kompakt olarak durur.
   Kartlar tabloyu aşağı itmesin diye alçaktır. */
.stat-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin: 0 0 14px;
}

.stat-card {
  padding: 9px 13px;
  border: 1px solid rgba(209, 221, 217, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 12px rgba(14, 49, 45, 0.04);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin: 2px 0 1px;
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}


.stat-card--overtime strong { color: #c83d49; }
.stat-card--extra strong { color: #1f6fb2; }
.stat-card--holiday strong { color: #b35c00; }
.stat-card--eve strong { color: #8a6b00; }
/* Toplam mesai: fazla mesai + bayram + resmi tatil + arefe. */
.stat-card--total { border-color: rgba(200, 61, 73, 0.35); background: #fff6f6; }
.stat-card--total strong { color: #9f1f2c; }

.notice {
  /* Sayfa aşağı kaydırılırken uyarılar EKRANIN ÜSTÜNDE KALIR; operatör
     çizelgede gezerken açık uyarıyı gözden kaçırmasın. Altındaki yapışkan
     yatay kaydırma çubuğu --notice-offset kadar aşağı iner. */
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 12px;
  margin: 0 0 18px;
  padding: 13px 16px;
  border-color: #f2c98b;
  background: #fff8e9;
  box-shadow: 0 6px 16px rgba(15, 42, 39, 0.10);
}

.notice-icon {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #7b4a00;
  background: #ffe0a8;
  font-weight: 900;
}

.notice strong {
  font-size: 14.5px;
}

.notice p {
  margin: 2px 0 0;
  color: #765822;
  font-size: 12px;
}

/* UYARI KUTUSU GİZLENEBİLMELİ.
   .notice yukarıda display:flex alıyor; tarayıcının [hidden]{display:none}
   kuralıyla aynı ağırlıkta olduğu için yazar kuralı kazanıyor ve kutu
   hiç kapanmıyordu: çizelge düzeldikten sonra bile ESKİ uyarı metni
   ekranda kalıyordu. .app-view ve .cell-menu için bu kural zaten vardı. */
.notice[hidden] { display: none !important; }

.notice-body {
  flex: 1 1 auto;
  min-width: 0;
}

.notice-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

.notice-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid #e3bd82;
  border-radius: 999px;
  background: #ffefd3;
  color: #7b4a00;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.notice-toggle[hidden] { display: none !important; }
.notice-toggle:hover { background: #ffe4b5; }

.notice-caret { transition: transform 0.15s ease; }
.notice[data-open="true"] .notice-caret { transform: rotate(180deg); }

/* Kapalı: tam 2 satır (2 x 17.4px). Açık: kendi içinde kaydırılır. */
.notice-list {
  max-height: 38px;
  margin: 3px 0 0;
  overflow: hidden;
}

.notice[data-open="true"] .notice-list {
  max-height: 228px;
  padding-right: 4px;
  overflow-y: auto;
}

.notice .notice-line {
  margin: 0;
  overflow: hidden;
  color: #14110c;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice[data-open="true"] .notice-line { white-space: normal; }

.settings-panel {
  margin: 0 0 18px;
  overflow: clip;
}

.settings-panel summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.settings-panel summary::-webkit-details-marker {
  display: none;
}

.settings-panel summary::before {
  content: "+";
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #b6ccc5;
  border-radius: 50%;
  color: var(--brand);
  font-size: 17px;
  font-weight: 400;
}

.settings-panel[open] summary::before {
  content: "−";
}

.settings-title {
  color: #183c39;
  font-size: 15px;
  font-weight: 800;
}

.settings-hint {
  color: var(--muted);
  font-size: 12px;
}

.settings-body {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(210px, 0.8fr) minmax(260px, 1fr);
  gap: 18px;
  padding: 2px 18px 18px;
  border-top: 1px solid #e1e9e6;
}

.setting-group {
  padding-top: 15px;
}

.setting-group h2 {
  margin: 0 0 10px;
  color: #38524f;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid--compact {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

label {
  display: grid;
  gap: 5px;
}

label > span {
  color: #5c6b6a;
  font-size: 11px;
  font-weight: 750;
}

input,
select {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #cbd9d5;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

input:hover,
select:hover {
  border-color: #97bcb3;
}

.toggle-label {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 9px;
  padding-top: 1px;
  cursor: pointer;
}

.toggle-label input {
  width: 17px;
  min-height: 17px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.toggle-label span {
  display: grid;
  gap: 1px;
  color: var(--ink);
}

.toggle-label strong {
  font-size: 12px;
}

.toggle-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.form-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.cycle-strip-field {
  display: grid;
  gap: 5px;
}

.cycle-strip-title {
  color: #5c6b6a;
  font-size: 11px;
  font-weight: 750;
}

.cycle-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cycle-day {
  display: grid;
  gap: 1px;
  justify-items: center;
  padding: 5px 1px;
  border-radius: 6px;
  line-height: 1.15;
}

.cycle-day b {
  font-size: 12px;
  font-weight: 850;
}

.cycle-day small {
  font-size: 9px;
  font-weight: 700;
  opacity: 0.7;
}

.cycle-day--morning {
  color: #775400;
  background: var(--morning-soft);
}

.cycle-day--evening {
  color: #673f83;
  background: var(--evening-soft);
}

.cycle-day--off {
  color: #276247;
  background: var(--off-soft);
}

.quick-pick-field {
  display: grid;
  gap: 5px;
}

.quick-pick-field > span {
  color: #5c6b6a;
  font-size: 11px;
  font-weight: 750;
}

.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-pick {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.quick-pick:hover {
  border-color: currentColor;
}

.quick-pick--leave {
  color: #3c5468;
  background: var(--leave-soft);
}

.quick-pick--maneuver {
  color: #146378;
  background: var(--maneuver-soft);
}

.cycle-preview,
.dialog-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pool-preview {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.legend-chip {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.legend-chip--morning {
  color: #775400;
  background: var(--morning-soft);
}

.legend-chip--evening {
  color: #673f83;
  background: var(--evening-soft);
}

.legend-chip--overtime {
  color: #9b2635;
  background: var(--overtime-soft);
}

.legend-chip--maneuver {
  color: #146378;
  background: var(--maneuver-soft);
}

.legend-chip--leave {
  color: #3c5468;
  background: var(--leave-soft);
}

.legend-chip--extra {
  color: #0b3c6b;
  background: var(--extra-soft);
}

.legend-chip--off {
  color: #276247;
  background: var(--off-soft);
}

.group-settings {
  display: grid;
  gap: 8px;
}

.group-setting-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 1.1fr;
  align-items: center;
  gap: 8px;
}

.group-setting-row label {
  min-width: 0;
}

.group-setting-row input,
.group-setting-row select {
  min-height: 32px;
  padding-block: 5px;
  font-size: 12px;
}

.schedule-section,
.people-section {
  overflow: hidden;
}

.schedule-heading,
.section-heading {
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px 11px;
}

.schedule-heading h2,
.section-heading h2 {
  margin: 0;
  color: #163f3b;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.legend {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  color: #566968;
  font-size: 11px;
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot--morning { background: var(--morning); }
.legend-dot--evening { background: var(--evening); }
.legend-dot--off { background: var(--off); }
.legend-dot--overtime { background: var(--overtime); }
.legend-dot--maneuver { background: var(--maneuver); }
.legend-dot--leave { background: var(--leave); }

.schedule-tip {
  margin: 0;
  padding: 0 20px 13px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-top: 1px solid #dce6e2;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #9cbab3 #edf3f1;
  scrollbar-width: auto;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.schedule-scroll::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.schedule-scroll::-webkit-scrollbar-track {
  background: #e7efec;
}

.schedule-scroll::-webkit-scrollbar-thumb {
  border: 3px solid #e7efec;
  border-radius: 999px;
  background: #87aaa2;
}

.schedule-table {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  font-size: 11px;
}

.schedule-table th,
.schedule-table td {
  height: 37px;
  padding: 3px 5px;
  border-right: 1px solid #d7e1de;
  border-bottom: 1px solid #d7e1de;
  text-align: center;
  vertical-align: middle;
}

.schedule-table th {
  z-index: 10;
  color: #fff;
  background: #155e58;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.schedule-table th.day-header {
  width: 44px;
  min-width: 44px;
  padding: 4px 2px;
}

.day-number {
  display: block;
  line-height: 1;
  font-size: 12px;
}

.day-name {
  display: block;
  margin-top: 3px;
  color: #c5e7dd;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.schedule-table th.weekend-header {
  color: #fff5d0;
  background: #104c47;
}

.schedule-table td {
  width: 44px;
  min-width: 44px;
  color: #243131;
  background: #fff;
}

.schedule-table tbody:last-child tr:last-child td {
  border-bottom: 0;
}

.pin {
  position: sticky;
  z-index: 4;
  background: #f8fbfa !important;
}

.schedule-table th.pin {
  z-index: 14;
  background: #155e58 !important;
}

/* Sıra / Sicil / Adı soyadı / Servis başlıkları: sütun genişliği elverdiğince
   büyük ve kalın olsun, uzaktan okunsun. Harf aralığı kısılıp taşma engellenir. */
.schedule-table th.p1,
.schedule-table th.p2,
.schedule-table th.p3,
.schedule-table th.p4 {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p1 { left: 0; width: var(--p1) !important; min-width: var(--p1) !important; }
.p2 { left: var(--p1); width: var(--p2) !important; min-width: var(--p2) !important; }
.p3 { left: calc(var(--p1) + var(--p2)); width: var(--p3) !important; min-width: var(--p3) !important; text-align: left !important; }
.p4 { left: calc(var(--p1) + var(--p2) + var(--p3)); width: var(--p4) !important; min-width: var(--p4) !important; text-align: left !important; box-shadow: 2px 0 4px rgba(17, 63, 59, 0.08); }

.group-title td {
  height: 29px;
  padding: 5px 10px;
  border-right: 0;
  color: #fbfffd;
  background: #0f7168;
  text-align: left;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.group-title--maneuver td {
  background: #216b7b;
}

.row-number,
.registry {
  color: #4c5d5c;
  font-variant-numeric: tabular-nums;
}

.person-name {
  /* En uzun isimler (ör. MAHMUT SARIMEHMETOĞLU) kesilmeden sığsın. */
  color: #223b39;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: -0.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service {
  color: #607270;
}

/* Hafta sonu hafif bir beyaz perde alır; izin ve kapalı hücreler bunun
   dışındadır, yoksa Yİ bazı günlerde açık yeşil görünüyordu. */
.weekend:not(.cell--off):not(.cell--leave):not(.cell--report):not(.cell--closed):not(.cell--extra):not(.cell--overtime):not(.cell--maneuver-morning):not(.cell--maneuver-evening):not(.cell--mid):not(.day-holiday):not(.day-official):not(.day-eve) {
  background-image: linear-gradient(rgba(241, 247, 244, 0.42), rgba(241, 247, 244, 0.42));
}

.schedule-cell {
  position: relative;
  padding: 2px !important;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

.schedule-cell:hover {
  z-index: 3;
  filter: brightness(0.96) saturate(1.08);
  outline: 2px solid rgba(6, 92, 87, 0.32);
  outline-offset: -2px;
}

.schedule-cell:focus-visible {
  z-index: 3;
  outline: 3px solid #074e49;
  outline-offset: -3px;
}

.cell-value {
  display: block;
  color: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.cell-meta {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
}

.cell--morning { color: #4a3a00 !important; background-color: var(--morning-soft) !important; }
.cell--evening { color: #56184a !important; background-color: var(--evening-soft) !important; }
.cell--off { color: #9aa8a4 !important; background-color: var(--off-soft) !important; }
.cell--overtime { color: #6b0007 !important; background-color: var(--overtime-soft) !important; font-weight: 850 !important; }
.cell--maneuver { color: #2f3436 !important; background-color: var(--maneuver-soft) !important; }
/* MS sabahçılığın, MA akşamcılığın rengini alır; GM manevra grisinde kalır. */
.cell--maneuver-morning { color: #4a3a00 !important; background-color: var(--morning-soft) !important; }
.cell--maneuver-evening { color: #56184a !important; background-color: var(--evening-soft) !important; }
/* Orta vardiya (21 / 140 / 240) turuncu: sabah grubunun hücresi ama yönü
   sabahtan sonra, akşamdan önce. */
.cell--mid { color: #3d1c00 !important; background-color: var(--mid-soft) !important; }
.cell--leave { color: #124b18 !important; background-color: var(--leave-soft) !important; }
.cell--report { color: #ffffff !important; background-color: var(--report-soft) !important; }
.cell--plain { color: #4a5a5a !important; background-color: #eef2f1 !important; }
.cell--closed { color: #5c3000 !important; background-color: var(--closed-soft) !important; }
/* FS / FA türü ne olursa olsun mavi kalır; bu yüzden en sonda. */
.cell--extra { color: #0b3c6b !important; background-color: var(--extra-soft) !important; }

/* BAYRAM / RESMİ TATİL ve ARİFE: sütunun tamamı renklenir. Vardiya rengini
   bastırır, çünkü o gün herkes için özel bir gündür. Renk sınıfları en sonda
   olduğu için hücre türünün !important kuralını geçer. */
.schedule-table td.day-holiday,
.schedule-table td.day-official { color: #5c3000 !important; background-color: var(--holiday-soft) !important; }
.schedule-table td.day-eve { color: #5a4600 !important; background-color: var(--eve-soft) !important; }

.schedule-table th.day-holiday,
.schedule-table th.day-official { background: var(--holiday-head) !important; }
.schedule-table th.day-eve { color: #4a3a00 !important; background: var(--eve-head) !important; }

/* Hafta sonu: yalnız TARİH BAŞLIĞI kırmızı olur, hücreler değişmez.
   Başlıktaki sınıf adı weekend degil weekend-header. */
.schedule-table th.day-header.weekend-header { background: #c62828 !important; }
.schedule-table th.day-header.weekend-header.day-holiday,
.schedule-table th.day-header.weekend-header.day-official { background: var(--holiday-head) !important; }
.schedule-table th.day-header.weekend-header.day-eve { color: #4a3a00 !important; background: var(--eve-head) !important; }

.schedule-table { user-select: none; }

.schedule-cell.is-selected {
  position: relative;
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.section-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid #dce6e2;
}

.section-heading p:not(.eyebrow) {
  max-width: 700px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.people-section {
  margin-top: 18px;
}

#peopleView {
  margin-top: 0;
}

.mobile-scroll-hint {
  display: none;
  color: var(--brand);
  font-weight: 800;
}

.people-table-wrap {
  /* position: tablo başlığındaki görünmez (sr-only) etiket bu kutunun
     içinde kalsın; yoksa telefonda sayfayı yana doğru genişletiyordu. */
  position: relative;
  overflow-x: auto;
}

.people-table {
  width: 100%;
  min-width: 760px;
  border-spacing: 0;
  border-collapse: collapse;
}

.people-table th,
.people-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e1e9e6;
  text-align: left;
}

.people-table th {
  color: #59706c;
  background: #f5f9f7;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.people-table tr:last-child td {
  border-bottom: 0;
}

/* GRUP AYRACI (kullanıcı 02.10.2026): her grubun başında ana çizelgedeki
   grup başlığıyla aynı renkte bir satır; hangi satır hangi grupta belli olur. */
.people-table .people-group-row th {
  padding: 7px 12px;
  border-bottom: 0;
  color: #fbfffd;
  background: #0f7168;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

/* SIRA sütunu: kişinin grubundaki yeri (çizelgedeki Sıra ile aynı). Hücre
   aynı zamanda TUTAMAKTIR: tutup sürükleyince kişinin yeri değişir. */
.people-table .people-row-number {
  width: 62px;
  color: #4c5d5c;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.people-table .people-row-number[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.people-table .people-row-number[draggable="true"]::before {
  content: "⠿";
  margin-right: 6px;
  color: #9db3ae;
  font-size: 13px;
}

.people-table .people-row-number[draggable="true"]:hover::before { color: var(--brand); }

.people-table tbody tr.is-dragging > td { opacity: 0.45; }

/* Bırakılacak yer: satırın üstünde / altında kalın çizgi; ayraçta sarı çizgi. */
.people-table tbody tr.drop-before > td,
.people-table-wrap .people-table tbody tr.drop-before > td:first-child { box-shadow: inset 0 3px 0 var(--brand); }

.people-table tbody tr.drop-after > td,
.people-table-wrap .people-table tbody tr.drop-after > td:first-child { box-shadow: inset 0 -3px 0 var(--brand); }

.people-table tbody tr.drop-into > th,
.people-table tbody tr.drop-into > td { box-shadow: inset 0 -4px 0 #ffd66b; }

.people-table .people-group-row--maneuver th {
  background: #216b7b;
}

.people-table .people-empty-row td {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* SIRALAMA BAŞLIĞI: "Sicil" ve "Ad soyad" başlıkları düğmedir. */
.people-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  margin: -3px -7px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.people-sort::after {
  content: "⇅";
  font-size: 12px;
  letter-spacing: 0;
  opacity: 0.55;
}

.people-sort:hover,
.people-sort:focus-visible {
  color: var(--brand);
  background: #e3efeb;
}

.people-sort:hover::after,
.people-sort:focus-visible::after {
  opacity: 1;
}

/* PERSONEL ARAMA: tablonun hemen üstünde tek kutu. */
.people-search {
  padding: 0 20px 14px;
}

.people-search input {
  width: 100%;
  max-width: 360px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #ccdbd6;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.people-search input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(6, 92, 87, 0.18);
  outline-offset: 0;
}

/* FARE HANGİ SATIRDAYSA o satır baştan sona hafifçe renklenir (ana
   çizelgedeki gibi); düzenlenen satır da belli olur. Kutulara yazmak ve
   seçmek etkilenmez. */
.people-table tbody tr:hover > td,
.people-table tbody tr:focus-within > td {
  background-color: rgba(6, 92, 87, 0.07);
}

.people-table tbody tr:hover > td:first-child,
.people-table tbody tr:focus-within > td:first-child {
  box-shadow: inset 3px 0 0 var(--brand);
}

.people-table input,
.people-table select {
  width: 100%;
  min-height: 31px;
  padding: 5px 7px;
  border-color: transparent;
  background: transparent;
  font-size: 12px;
}

.people-table input:hover,
.people-table select:hover,
.people-table input:focus,
.people-table select:focus {
  border-color: #a9c5bd;
  background: #fff;
}

.mini-button {
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  color: #a22b38;
  background: #fff0f1;
  font-size: 11px;
  font-weight: 800;
}

.mini-button:hover {
  background: #ffdfe2;
}

.app-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 17px 3px;
  color: var(--muted);
  font-size: 12px;
}

.app-footer p {
  margin: 0;
}

.link-button {
  padding: 3px 0;
  color: #9b3038;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dialog {
  width: min(490px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 17px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 80px rgba(1, 43, 40, 0.28);
}

.dialog::backdrop {
  background: rgba(10, 47, 44, 0.45);
  backdrop-filter: blur(2px);
}

.dialog form {
  margin: 0;
}

.dialog-heading {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 15px;
  border-bottom: 1px solid #e2ebe8;
}

.dialog-heading h2 {
  margin: 0;
  color: #164640;
  font-size: 19px;
}

.dialog-heading p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dialog-close {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 8px;
  color: #4e5e5c;
  background: #f0f5f3;
  font-size: 24px;
  line-height: 1;
}

.dialog-close:hover {
  color: #234743;
  background: #e2ece8;
}

.dialog-body {
  padding: 18px 20px;
}

.form-span-2 {
  grid-column: span 2;
}

.dialog-actions {
  gap: 8px;
  padding: 14px 20px 20px;
  border-top: 1px solid #e2ebe8;
}

.dialog-actions-spacer {
  flex: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.only-print {
  display: none;
}

@media (min-width: 761px) {
  :root {
    /* Sol sütunlar mümkün olduğunca dar: sıra ve sicil rakam genişliği
       kadar, ad soyad en uzun ismi (21 karakter) kesmeden alacak kadar. */
    --p1: 26px;
    --p2: 46px;
    --p3: 162px;
    --p4: 92px;
  }

  .app-shell {
    width: calc(100% - 24px);
    max-width: none;
  }

  .schedule-table {
    /* Sütunlar colgroup genişliklerini korur; tablo daralmaz, gerekirse
       yatay kayar. width:100% verilirse sabit sütunlar ezilir ve sticky
       konumlarıyla kayar. */
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
  }

  .schedule-table th.day-header,
  .schedule-table td.schedule-cell {
    padding-inline: 1px !important;
  }

  .schedule-cell,
  .day-header,
  .cell-value,
  .p3,
  .p4 {
    overflow: hidden;
  }

  .cell-value,
  .day-name,
  .p3,
  .p4 {
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@media (max-width: 1050px) {
  .settings-body {
    grid-template-columns: 1fr 1fr;
  }

  .settings-body .setting-group:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --p1: 43px;
    --p2: 62px;
    --p3: 155px;
    --p4: 105px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 16px 18px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .app-shell {
    width: min(100% - 22px, 1600px);
    margin-top: 13px;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tab {
    flex: 1;
  }

  .control-bar {
    align-items: stretch;
  }

  .month-control {
    width: 100%;
  }

  .month-control label {
    flex: 1;
  }

  .control-divider,
  .autosave-status {
    display: none;
  }

  .control-bar > .button {
    flex: 1 1 145px;
  }

  .stat-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
  }

  .settings-panel summary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  .settings-hint {
    width: calc(100% - 30px);
    margin-left: 30px;
  }

  .settings-body {
    grid-template-columns: 1fr;
  }

  .settings-body .setting-group:last-child {
    grid-column: auto;
  }

  .form-grid--compact {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid--compact label:first-child {
    grid-column: span 2;
  }

  .schedule-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 15px 15px 10px;
  }

  .legend {
    justify-content: flex-start;
  }

  .schedule-tip {
    padding-inline: 15px;
  }

  .schedule-table th,
  .schedule-table td {
    font-size: 10px;
  }

  .schedule-scroll {
    overflow-x: scroll;
  }

  .mobile-scroll-hint {
    display: inline;
  }

  .schedule-table .p1,
  .schedule-table .p2,
  .schedule-table .p4 {
    display: none;
  }

  .schedule-table .p3 {
    left: 0;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .schedule-table {
    min-width: 1112px;
  }

  .schedule-table th.day-header,
  .schedule-table td.schedule-cell {
    width: 32px;
    min-width: 32px;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  /* Varsayılan sayfa. Kalabalık kadroda JS bu kuralı #printPageStyle ile
     büyütür; amaç her hâlükârda TEK sayfa. */
  @page {
    size: 297mm 210mm;
    margin: 6mm;
  }

  /* RENKLER BASILSIN. Bu olmadan tarayıcı bütün dolguları atar ve PDF
     bomboş/biçimsiz çıkar — masaüstünde de telefonda da. */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Sol sütunlar milimetre: çıktı ekranın piksel ölçüsüne bağlı kalmasın. */
  :root {
    --p1: 8mm;
    --p2: 13mm;
    --p3: 27mm;
    --p4: 17mm;
  }

  html,
  body {
    height: auto;
    overflow: visible;
    background: #fff;
  }

  body {
    font-size: 9px;
  }

  /* ÇİZELGENİN TAMAMI TEK SAYFADA. Satır yüksekliği ve gün sütunu
     genişliği, o ayın satır/gün sayısına göre yazdırmadan hemen önce
     JS tarafından hesaplanır (--print-row / --print-col / --print-font).
     Hiçbir öge sayfa bölünmesine izin vermez. */
  /* YALNIZ SATIR bölünmez. Her grup ayrı bir <tbody>; dördüne birden
     break-inside:avoid verilince tarayıcı grupları bir arada tutmak için
     sayfalara dağıtıyor ve çizelge tek sayfaya sığacakken 3 sayfa
     çıkıyordu. */
  .schedule-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .app-shell,
  .app-view,
  .schedule-section,
  .schedule-scroll,
  .schedule-table,
  .schedule-table tbody {
    page-break-inside: auto;
    break-inside: auto;
    page-break-before: auto;
    break-before: auto;
    page-break-after: auto;
    break-after: auto;
  }

  .no-print,
  .app-header,
  .settings-panel,
  .people-section,
  .app-footer,
  .notice {
    display: none !important;
  }

  .only-print {
    display: flex;
  }

  .app-shell {
    width: 100%;
    margin: 0;
  }

  /* Başlık ORTADA ve büyük: "EYLÜL 2026 MAKİNİST ÇİZELGESİ". */
  .print-heading {
    display: block;
    margin: 0 0 2mm;
    color: #103d38;
    text-align: center;
  }

  .print-heading p {
    display: none;
  }

  .print-heading h1 {
    margin: 0;
    color: #103d38;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.02em;
  }

  .schedule-section {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .schedule-heading {
    display: block;
    padding: 0 0 2mm;
  }

  .schedule-heading h2 {
    font-size: 14px;
  }

  .legend {
    margin-top: 1mm;
  }

  .schedule-scroll {
    overflow: visible;
    border: 1px solid #aebfbb;
  }

  .schedule-table {
    width: 100%;
    table-layout: fixed;
    /* Yazdırmada kenarlıklar birleşir: satır yüksekliği hesapla birebir
       tutsun, ayrık kenarlık yüzünden tablo uzayıp ikinci sayfa açmasın. */
    border-collapse: collapse;
    border-spacing: 0;
    font-size: var(--print-font, 7px);
  }

  /* Ekrandaki sabit piksel sütun genişlikleri dosyada DAHA SONRA geldiği
     için !important şart. */
  .schedule-table .col-day {
    width: var(--print-col, 6mm) !important;
  }

  .schedule-table th,
  .schedule-table td {
    width: auto !important;
    min-width: 0 !important;
    height: var(--print-row, 4mm) !important;
    padding: 0 0.4mm !important;
    line-height: 1.02 !important;
    font-size: var(--print-font, 7px) !important;
  }

  /* Sol sütunların kendi punto kuralları var (11 / 10 / 12,5 px); baskıda
     hepsi hesaplanan puntoya iner, yoksa satır yüksekliği onlardan gelir. */
  .schedule-table .pin,
  .schedule-table .row-number,
  .schedule-table .registry,
  .schedule-table .person-name,
  .schedule-table .service,
  .schedule-table th.p1,
  .schedule-table th.p2,
  .schedule-table th.p3,
  .schedule-table th.p4 {
    padding-inline: 0.7mm !important;
    font-size: var(--print-font, 7px) !important;
  }

  .schedule-table th.day-header {
    width: auto;
    min-width: 0 !important;
  }

  .pin,
  .schedule-table th.pin {
    position: static;
    box-shadow: none;
  }

  .day-number {
    font-size: var(--print-font, 7px) !important;
  }

  .day-name {
    display: none !important;
  }

  .group-title td {
    height: var(--print-row, 4mm) !important;
    padding: 0 1mm !important;
    font-size: var(--print-font, 7px) !important;
  }

  .cell-value {
    display: block;
    overflow: hidden;
    font-size: var(--print-font, 7px) !important;
    line-height: 1.02 !important;
    /* İçerik sarmasın: sardığı an satır uzar ve sayfa taşar. */
    white-space: nowrap;
  }

  .cell-meta {
    margin-top: 0;
    font-size: 5px;
  }
}

/* ---------- Başlık ---------- */
.app-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.schedule-tip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Ayarlar ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  align-items: start;
}

.settings-card {
  padding: 16px 18px 18px;
  border: 1px solid #e1e9e6;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.settings-card--wide { grid-column: 1 / -1; }

.settings-card h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef3f1;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.settings-card-body { display: grid; gap: 12px; }

.settings-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.inline-form input,
.inline-form select { flex: 1 1 140px; min-width: 0; }

.group-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) auto auto;
  align-items: center;
  gap: 7px;
}

.group-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

/* ---------- Görev numaraları ---------- */
.duty-editors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.duty-scope h4 {
  margin: 0 0 8px;
  color: #38524f;
  font-size: 12px;
  text-transform: uppercase;
}

.duty-row {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  padding: 10px 11px;
  border: 1px solid #e7eeeb;
  border-radius: 10px;
  background: #fbfdfc;
}

.duty-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.duty-row-head span { color: var(--muted); font-size: 11px; }

.duty-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 152px;
  overflow-y: auto;
}

.duty-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.duty-chip i { font-style: normal; opacity: 0.5; }
.duty-chip:hover { border-color: currentColor; }
.duty-chip:hover i { opacity: 1; }
.duty-chip--morning { color: #4a3a00; background: var(--morning-soft); }
.duty-chip--mid { color: #3d1c00; background: var(--mid-soft); }
.duty-chip--evening { color: #56184a; background: var(--evening-soft); }

.duty-empty { color: var(--muted); font-size: 11px; }

@media (max-width: 720px) {
  .group-setting-row { grid-template-columns: 1fr 1fr; }
  .group-setting-row input { grid-column: 1 / -1; }
}

@media print {
  .schedule-scroll { overflow: visible; }
}


/* ---------- Giriş sayfası ---------- */
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  background:
    radial-gradient(1200px 680px at 8% -12%, #17726a 0%, transparent 60%),
    radial-gradient(880px 560px at 108% 112%, #0a4642 0%, transparent 56%),
    #062826;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.login-shell {
  width: 100%;
  max-width: 400px;
}

.login-card {
  padding: 32px 30px 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38), 0 2px 6px rgba(0, 0, 0, 0.12);
}

.login-head {
  margin-bottom: 24px;
  text-align: center;
}

.login-badge {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0f766e, #0b4d4b);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 77, 75, 0.32);
}

.login-eyebrow {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 0 0 8px;
  color: #10201f;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0;
  color: #677977;
  font-size: 13px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field > span {
  color: #3d5250;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #d7e3e0;
  border-radius: 11px;
  background: #fbfdfc;
  color: #10201f;
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-field input::placeholder { color: #a9b9b7; }

.login-field input:hover:not(:disabled) { border-color: #bcd2ce; }

.login-field input:focus {
  outline: none;
  border-color: #0f766e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.login-field input:disabled {
  background: #f1f4f3;
  color: #9aa8a6;
  cursor: not-allowed;
}

.login-submit {
  min-height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #0f766e, #0b5450);
  color: #fff;
  font-size: 14.5px;
  font-weight: 750;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 10px 22px rgba(11, 77, 75, 0.26);
}

.login-submit:hover:not(:disabled) { filter: brightness(1.07); }
.login-submit:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 5px 12px rgba(11, 77, 75, 0.24); }
.login-submit:focus-visible { outline: 2px solid #0f766e; outline-offset: 3px; }

.login-submit:disabled {
  background: #cfdad8;
  color: #7b8a88;
  box-shadow: none;
  cursor: not-allowed;
}

.login-error {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f0b4b9;
  border-radius: 11px;
  background: #fdecee;
  color: #8f1f28;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
}

.login-error svg { flex: 0 0 auto; margin-top: 1px; }

.login-foot {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #edf2f1;
  color: #8496947a;
  color: #849694;
  font-size: 11.5px;
  line-height: 1.55;
}

.login-foot svg { flex: 0 0 auto; margin-top: 2px; }

@media (max-width: 460px) {
  .login-card { padding: 26px 20px 20px; border-radius: 16px; }
  .login-card h1 { font-size: 18px; }
}

/* Sütun şablonu: sabit sütunların genişliği ile sticky left değerleri
   birebir aynı olmalı, yoksa sütunlar kayar. */
.schedule-table .col-p1 { width: var(--p1); }
.schedule-table .col-p2 { width: var(--p2); }
.schedule-table .col-p3 { width: var(--p3); }
.schedule-table .col-p4 { width: var(--p4); }
.schedule-table .col-day { width: 40px; }

/* ---------- Yapışkan yatay kaydırma çubuğu ---------- */
/* Çubuk ekranın ALTINDA sabittir; yeri ve genişliği JS'te tablonun
   kutusuna göre verilir (syncHorizontalScrollBar). Tablonun alt kenarı
   ekrana girince gizlenir: iki çubuk üst üste görünmez. */
.hscroll-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 60;
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  border-radius: 7px 7px 0 0;
  background: #e3ebe8;
  box-shadow: 0 -2px 8px rgba(15, 42, 39, 0.16);
  scrollbar-color: #7fa39b #e3ebe8;
}

.hscroll-bar[hidden] { display: none; }

.hscroll-bar > div { height: 1px; }

/* ---------- Daha sıkı hücreler ---------- */
.schedule-table td,
.schedule-table th {
  padding: 2px 3px;
}

.schedule-table .pin {
  padding-inline: 6px;
}

.schedule-table .col-day { width: 34px; }
.schedule-table td { width: 34px; min-width: 34px; }

.schedule-table .row-number,
.schedule-table .registry {
  padding-inline: 1px;
  text-align: center;
}

.schedule-table .person-name,
.schedule-table .service {
  padding-inline: 3px;
}

.schedule-table .service {
  font-size: 10px;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Fare hangi satırdaysa o satır komple vurgulanır ---------- */
/* Vurgu SATIRIN TAMAMINI kaplar: numara hucreleri kendi renklerini
   !important ile koydugu ve hafta sonu perdesi daha yuksek ozgullukte
   oldugu icin buradaki katman da !important olmak zorunda. */
.schedule-table tbody tr.row-hover > td,
.schedule-table tbody tr.row-hover > th,
.schedule-table .col-hover {
  background-image: linear-gradient(rgba(6, 92, 87, 0.2), rgba(6, 92, 87, 0.2)) !important;
}

/* Satır ve sütunun kesiştiği hücre biraz daha koyu: imlecin yeri belli olsun. */
.schedule-table tbody tr.row-hover > td.col-hover {
  background-image: linear-gradient(rgba(6, 92, 87, 0.34), rgba(6, 92, 87, 0.34)) !important;
}

.schedule-table tbody tr.row-hover > .p1 {
  box-shadow: inset 3px 0 0 var(--brand);
}

/* ---------- Bayram ve resmi tatil ayarı ---------- */

/* ---------- Sağ klik menüsü ---------- */
.cell-menu {
  position: fixed;
  z-index: 90;
  min-width: 176px;
  padding: 4px;
  border: 1px solid rgba(17, 63, 59, 0.16);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 42, 39, 0.22);
}

.cell-menu[hidden] { display: none; }

.cell-menu-title {
  margin: 2px 8px 6px;
  color: #7b8c8a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cell-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #21403d;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.cell-menu-item:hover,
.cell-menu-item:focus-visible {
  background: rgba(6, 92, 87, 0.1);
  outline: none;
}

.cell-menu-sep {
  margin: 4px 6px;
  border: 0;
  border-top: 1px solid rgba(17, 63, 59, 0.12);
}

.cell-menu-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 850;
}

.cell-menu-swatch--leave { color: #124b18; background: var(--leave-soft); }
.cell-menu-swatch--report { color: #ffffff; background: var(--report-soft); }
.cell-menu-swatch--closed { background: var(--closed-soft); }
.cell-menu-swatch--clear { background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 63, 59, 0.22); }
.cell-menu-swatch--holiday { background: var(--holiday-soft); }
.cell-menu-swatch--overtime { background: var(--overtime-soft); }
/* Vardiya izni: numara silinir, hücre beyaz kalır (kod yazılmaz). */
.schedule-table td.cell--shift-leave { background-color: #fff !important; }
.cell-menu-swatch--eve { background: var(--eve-soft); }

/* Gün başlığından açılan menüde hücreye özel komutlar gizlenir: orada
   seçili olan bir hücre değil, günün tamamıdır. */
.cell-menu[data-scope="date"] .cell-menu-item--cell { display: none; }

/* Gün başlığı tıklanabilir: sütunu seçer, sağ klik tatil menüsünü açar. */
.schedule-table th.day-header { cursor: pointer; }
.cell-menu-swatch--auto { background: #eef2f1; box-shadow: inset 0 0 0 1px rgba(17, 63, 59, 0.14); }

/* ---------- Hücre içi yazım kutusu ---------- */
.cell-inline-input {
  position: fixed;
  z-index: 95;
  padding: 0 2px;
  border: 2px solid var(--brand);
  border-radius: 3px;
  background: #fff;
  color: #14312e;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.cell-inline-input[hidden] { display: none; }

.schedule-cell { line-height: 1.15; }
/* Numaralar kalın ve bir tık büyük: operatör tabloya uzaktan bakarken rahat
   okusun. Gün sütunu 34px; üç haneli numara bu boyutta taşmıyor, harf aralığı
   hafif kısılarak güvenli tarafta kalınıyor. */
.schedule-table .cell-value {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.schedule-table .cell-meta { font-size: 7.5px; }

/* ---------- Sekmeler + çizelge kontrolleri tek satırda ---------- */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid #dfe9e6;
  border-radius: 12px;
  background: #fff;
}

.top-bar .view-tabs {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
}

.top-bar .control-bar {
  flex: 1 1 380px;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.top-bar .control-divider {
  width: 1px;
  height: 22px;
  background: #dde7e4;
}

.top-bar .month-control label > span { display: none; }

/* ÜST BAR HİZASI (kullanıcı 30.09.2026: "biri aşağıda biri yukarıda,
   eşitle"). Sekmeler gölgesiz ve düğmelerle aynı yükseklikte; kayıt durumu
   yazısı şeridin DIŞINDA, altında küçük bir satırdır — ikinci satıra düşüp
   şeridi iki katına çıkarmaz, sekmeleri aşağı itmez. */
.top-bar .view-tabs {
  align-self: center;
  box-shadow: none;
}

.top-bar .control-bar {
  align-items: center;
}

.app-shell > .autosave-status {
  margin: -6px 6px 8px auto;
  text-align: right;
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .app-shell > .autosave-status { display: none; }
}

@media screen {
  .schedule-table .day-number {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  .schedule-table .day-name {
    font-size: 9px;
    font-weight: 800;
  }
}

/* ---------- BAĞLANTI DURUMU (çevrimdışı çalışma) ---------- */
/* Sunucuya ulaşılamayınca turuncu uyarı; bağlantı dönünce yeşil bilgi. */
.connection-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid #f0b36b;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c3a06;
  box-shadow: 0 6px 16px rgba(124, 58, 6, 0.08);
}

.connection-notice[hidden] { display: none !important; }

.connection-notice[data-state="online"] {
  border-color: #86cfa4;
  background: #effaf3;
  color: #14532d;
}

.connection-notice[data-state="session"] {
  border-color: #f2a4ad;
  background: #fff1f2;
  color: #8a1c2b;
}

.connection-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: #ea8a1a;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
}

.connection-icon::before { content: '!'; }
.connection-notice[data-state="online"] .connection-icon { background: #2f9e5a; }
.connection-notice[data-state="online"] .connection-icon::before { content: '✓'; }
.connection-notice[data-state="session"] .connection-icon { background: #c83d49; }

.connection-text {
  flex: 1 1 auto;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.connection-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Menülerde silme kırmızı; altında kısa ipucu. */
.cell-menu-item--danger { color: #a3202f; }
.cell-menu-item--danger:hover,
.cell-menu-item--danger:focus-visible { background: rgba(200, 61, 73, 0.1); }

.cell-menu-hint {
  margin: 4px 8px 3px;
  color: #7b8c8a;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- ONAY PENCERESİ ---------- */
.dialog--confirm { width: min(520px, calc(100% - 28px)); }

.confirm-text p {
  margin: 0 0 10px;
  color: #22403d;
  font-size: 14.5px;
  line-height: 1.5;
}

.confirm-text p:last-child { margin-bottom: 0; }

.confirm-move {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f1f7f5;
  font-weight: 750;
}

.confirm-move span {
  padding: 3px 9px;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 63, 59, 0.14);
}

.confirm-move b { color: #0b7a70; }

.button-danger-solid,
.button-primary.button-danger-solid {
  background: #b3261e;
  box-shadow: 0 4px 10px rgba(179, 38, 30, 0.22);
}

.button-danger-solid:hover,
.button-primary.button-danger-solid:hover { background: #8f1d17; }

/* ---------- PERSONEL EKLEME: kutu kutu satırlar ---------- */
.dialog--wide { width: min(980px, calc(100% - 28px)); }

.person-rows-head,
.person-row {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.6fr 1.3fr 1fr 32px;
  gap: 8px;
  align-items: start;
}

.person-rows-head {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.person-rows {
  display: grid;
  gap: 8px;
}

.person-row input,
.person-row select {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #ccdbd6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}

.person-row-group {
  display: grid;
  gap: 5px;
}

.person-row-group select[hidden] { display: none; }

.person-row-remove {
  width: 32px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f5ecec;
  color: #a3202f;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.person-row-remove[hidden] { visibility: hidden; display: block; }

.person-row-add {
  margin-top: 10px;
  min-width: 46px;
  font-size: 20px;
  line-height: 1;
}

.dialog-note.is-error {
  color: #a3202f;
  font-weight: 700;
}

@media (max-width: 760px) {
  .person-rows-head { display: none; }
  .person-row {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
    border: 1px solid #e2ebe8;
    border-radius: 10px;
  }
  .person-row-remove { grid-column: 2; justify-self: end; }
}

/* ---------- NUMARA SABİTLEME PANELİ (Kadro Yönetimi) ---------- */
.pin-panel {
  margin: 0 0 16px;
  padding: 14px 16px 16px;
  border: 1px solid #dfe9e6;
  border-radius: 14px;
  background: #fbfdfc;
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.pin-card {
  padding: 12px;
  border: 1px solid #e2ebe8;
  border-radius: 12px;
  background: #fff;
}

.pin-card h4 {
  margin: 0 0 10px;
  color: #0b4d4b;
  font-size: 14px;
}

.pin-field {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.pin-field:last-child { margin-bottom: 0; }

.pin-field > span {
  color: #4c5d5c;
  font-size: 12px;
  font-weight: 800;
}

.pin-field small {
  color: var(--muted);
  font-weight: 650;
}

.pin-field select {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #ccdbd6;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

/* Numara sabitleme kartında grubun SIRALI manevra yedekleri: ad, üste al,
   çıkar. Yedek yalnız buradan seçilir (tabloda sütun yok). */
.pin-backups {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-backups li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 9px;
  border-radius: 8px;
  background: #f1f7f5;
}

.pin-backups b {
  min-width: 20px;
  color: #0b4d4b;
  font-weight: 900;
}

.pin-backup-name {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 750;
}

.pin-backups button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 77, 75, 0.12);
  color: #0b4d4b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.pin-backups button:hover { background: rgba(11, 77, 75, 0.22); }

.pin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- İNDİR / ÇIKTI MENÜSÜ (kullanıcı 02.10.2026) ----------
   Excel, CSV ve Yazdır/PDF tek düğmenin altında. Menü düğmenin hemen
   altında açılır (cell-menu görünümü, sabit konum). */
.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-caret {
  color: #5c7471;
  font-size: 11px;
  line-height: 1;
}

.menu-button[aria-expanded="true"] {
  border-color: #8ebeb3;
  background: #f3fbf8;
}

.export-menu { min-width: 210px; }

/* ---------- LOG RENKLERİ ----------
   Operatör değişikliği mavi, otomatik değişim turuncu: bir bakışta ayrılsın. */
:root {
  --log-operator: #1d5fae;
  --log-operator-soft: #e3eefb;
  --log-auto: #b45309;
  --log-auto-soft: #fdecd3;
}

/* ---------- AY SEKMELERİ (kullanıcı 02.10.2026) ----------
   Tablonun sol üstünde, "1. Grup" başlığının hemen üstünde: açık aylar
   Excel sayfaları gibi sekme sekme, "+" sonraki ayı açar. */
.month-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 10px 0;
  border-bottom: 1px solid #d3e0dc;
  background: #f6faf8;
  overflow-x: auto;
  scrollbar-width: thin;
}

.month-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #d3e0dc;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #e9f1ee;
}

.month-tab-button {
  padding: 7px 12px 6px;
  border: 0;
  background: transparent;
  color: #4d6764;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.month-tab:hover { background: #f1f7f5; }

.month-tab.is-active {
  position: relative;
  top: 1px;
  border-color: #c7d8d3;
  background: #fff;
  box-shadow: inset 0 3px 0 var(--brand);
}

.month-tab.is-active .month-tab-button { color: #0f3f3b; }

.month-tab--manual .month-tab-button::after {
  content: ' · manuel';
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
}

.month-tab-close {
  width: 22px;
  height: 22px;
  margin-right: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7f7c;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.month-tab-close:hover {
  background: rgba(214, 31, 38, 0.1);
  color: #b42318;
}

.month-tab-add {
  flex: 0 0 auto;
  width: 32px;
  height: 30px;
  margin-bottom: 3px;
  border: 1px dashed #9fbfb8;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.month-tab-add:hover {
  border-style: solid;
  background: #effaf6;
}

.month-tab-button:focus-visible,
.month-tab-close:focus-visible,
.month-tab-add:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* ---------- LOG KAYITLARI (kullanıcı 02.10.2026) ---------- */
.log-view {
  overflow: hidden;
  border: 1px solid rgba(205, 220, 215, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.log-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 420px;
}

.log-months {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid #dce6e2;
  background: #f6faf8;
}

.log-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #33504c;
  font: inherit;
  font-size: 13.5px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.log-month b {
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e3eeeb;
  color: #355a55;
  font-size: 11.5px;
  text-align: center;
}

.log-month:hover { background: #edf6f3; }

.log-month.is-active {
  border-color: #bfd8d1;
  background: #fff;
  color: #0f3f3b;
  box-shadow: inset 3px 0 0 var(--brand);
}

.log-main {
  min-width: 0;
  padding: 14px 18px 20px;
}

.log-title {
  margin: 0 0 10px;
  color: #163f3b;
  font-size: 17px;
}

.log-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.log-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.log-chip {
  padding: 6px 11px;
  border: 1px solid #ccdbd6;
  border-radius: 999px;
  background: #fff;
  color: #33504c;
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
}

.log-chip b {
  margin-left: 4px;
  font-weight: 900;
}

.log-chip--operator { border-color: rgba(29, 95, 174, 0.35); color: var(--log-operator); }
.log-chip--auto { border-color: rgba(180, 83, 9, 0.35); color: var(--log-auto); }

.log-chip.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.log-chip--operator.is-active {
  border-color: var(--log-operator);
  background: var(--log-operator);
}

.log-chip--auto.is-active {
  border-color: var(--log-auto);
  background: var(--log-auto);
}

.log-search {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 7px 10px;
  border: 1px solid #ccdbd6;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

.log-refresh {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12.5px;
}

/* LOG LİSTESİ (kullanıcı 02.10.2026: "çok karışık, çok yazı birikiyor"):
   her işlem TEK SATIR — saat + cümle; otomatik değişimler kapalı bir
   "+N otomatik değişim" satırının altında, tıklanınca açılır. Günler ince
   bir başlıkla ayrılır. Sol kenar çizgisi: operatör mavi, otomatik turuncu. */
.log-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe9e6;
  border-radius: 11px;
  background: #fff;
  list-style: none;
}

.log-day {
  padding: 6px 12px;
  border-top: 1px solid #e3ebe8;
  background: #f1f6f4;
  color: #48605d;
  font-size: 12px;
  font-weight: 800;
}

.log-day:first-child { border-top: 0; }

.log-entry {
  padding: 6px 12px 6px 10px;
  border-top: 1px solid #eef3f1;
  border-left: 3px solid #c9d6d2;
}

.log-day + .log-entry { border-top: 0; }

.log-entry--operator { border-left-color: var(--log-operator); }
.log-entry--auto { border-left-color: var(--log-auto); }

.log-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}

.log-row time {
  flex: 0 0 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.log-sentence {
  min-width: 0;
  color: #1f3532;
  overflow-wrap: anywhere;
}

.log-sep {
  margin-right: 3px;
  color: var(--muted);
}

.log-who { font-weight: 800; }

.log-when {
  color: #48605d;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.log-what {
  color: #10302d;
  font-weight: 750;
}

.log-details { margin: 2px 0 0 50px; }

.log-details summary {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 1px 6px 1px 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.log-details summary::-webkit-details-marker { display: none; }

.log-details summary::before {
  content: "▸";
  font-size: 11px;
}

.log-details[open] summary::before { content: "▾"; }

.log-details summary:hover { background: #f1f6f4; }

.log-count--operator { color: var(--log-operator); }
.log-count--auto { color: var(--log-auto); }

.log-lines {
  margin: 4px 0 3px;
  padding: 0;
  list-style: none;
}

.log-line {
  padding: 2px 0 2px 9px;
  border-left: 3px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.log-line--operator { border-left-color: var(--log-operator); }

.log-line--auto { border-left-color: var(--log-auto); }

.log-more,
.log-empty {
  margin: 8px 12px;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 760px) {
  .log-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 0;
  }

  .log-months {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #dce6e2;
  }

  .log-month { flex: 0 0 auto; }

  .log-main { padding: 12px; }

  .log-details { margin-left: 0; }
}

/* ---------- MESAİ SÜTUNLARI (kullanıcı 03.10.2026) ---------- */
/* Servis'in yanında Yıllık (p5) ve Aylık (p6) sabit sütunlar; çizelgenin
   sonunda FM / RT / TA / BT / TP saat sütunları. Yalnız ekranda: yazdırmada
   gizlidir (no-print), ekran görüntüsü ve Excel çıktısı değişmez. */
:root {
  --p5: 46px;
  --p6: 46px;
}

.schedule-table .col-p5 { width: var(--p5); }
.schedule-table .col-p6 { width: var(--p6); }
.schedule-table .col-sum { width: 40px; }

.p5 { left: calc(var(--p1) + var(--p2) + var(--p3) + var(--p4)); width: var(--p5) !important; min-width: var(--p5) !important; }
.p6 { left: calc(var(--p1) + var(--p2) + var(--p3) + var(--p4) + var(--p5)); width: var(--p6) !important; min-width: var(--p6) !important; }

/* Sabit alanın gölgesi artık son sabit sütundadır. */
.p4 { box-shadow: none; }
.p6 { box-shadow: 2px 0 4px rgba(17, 63, 59, 0.08); }

.schedule-table th.p5,
.schedule-table th.p6 {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  cursor: help;
}

.schedule-table td.sum-year,
.schedule-table td.sum-month {
  padding-inline: 2px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 900;
  color: #243131;
}

/* Aylıkta grubunda en az olandan fazlası olan kırmızı; eşitlenince beyaz. */
.schedule-table td.sum-month--over {
  background: var(--overtime-soft) !important;
  color: #6b0007;
}

.schedule-table th.sum-header {
  width: 40px;
  min-width: 40px;
  font-size: 11px;
  font-weight: 900;
  cursor: help;
}

.schedule-table th.sum-header--total { background: #0c4b46; }

.schedule-table td.sum-cell {
  width: 40px;
  min-width: 40px;
  padding-inline: 2px;
  color: #243131;
  background: #f8fbfa;
  font-size: 12px;
  font-weight: 800;
}

.schedule-table td.sum-cell--total {
  background: #eef5f3;
  font-weight: 900;
}

/* Satır vurgusu bu hücreleri de kapsar (!important'lı arka planlar). */
.schedule-table tbody tr.row-hover > td.sum-month--over {
  background-image: linear-gradient(rgba(6, 92, 87, 0.2), rgba(6, 92, 87, 0.2)) !important;
}

@media (max-width: 760px) {
  /* Telefonda yalnız ad sabit kalır; Yıllık / Aylık adın yanında akar. */
  .schedule-table .p5,
  .schedule-table .p6 {
    position: static;
    width: 36px !important;
    min-width: 36px !important;
    box-shadow: none;
  }
}

/* ---------- ÜST BAR: LOG KAYITLARI SAĞDA ---------- */
.top-bar .view-tabs--end {
  margin-left: auto;
}

@media (max-width: 760px) {
  .top-bar .view-tabs--end { width: auto; margin-left: 0; }
}

/* ---------- PERSONEL HAKEDİŞ ---------- */
.hakedis-body {
  display: grid;
  gap: 16px;
}

.hakedis-card {
  /* Izgara ögesi içeriğinden dar olamıyordu; tablo kutusu kendi içinde kaysın. */
  min-width: 0;
  padding: 14px 16px 16px;
  border: 1px solid #dfe9e6;
  border-radius: 14px;
  background: #fff;
}

.hakedis-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.hakedis-head h3 {
  margin: 0;
  color: #14312e;
  font-size: 15px;
  font-weight: 900;
}

.hakedis-month {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hakedis-month strong {
  min-width: 110px;
  text-align: center;
  color: #14312e;
  font-size: 13.5px;
  font-weight: 850;
}

.hakedis-search {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 360px;
  padding: 7px 10px;
  border: 1px solid #ccdbd6;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

.hakedis-actions {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.hakedis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hakedis-chip {
  padding: 6px 11px;
  border: 1px solid #ccdbd6;
  border-radius: 999px;
  background: #fff;
  color: #33504c;
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
}

.hakedis-chip b { margin-left: 4px; font-weight: 900; }

.hakedis-chip.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.hakedis-table {
  width: 100%;
  min-width: 640px;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 13px;
}

.hakedis-table th,
.hakedis-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #e1e9e6;
  text-align: left;
  white-space: nowrap;
}

.hakedis-table thead th {
  color: #59706c;
  background: #f5f9f7;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hakedis-table thead th[title] { cursor: help; }

.hakedis-table .people-group-row th {
  padding: 7px 12px;
  border-bottom: 0;
  color: #fbfffd;
  background: #0f7168;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.hakedis-table .people-empty-row td {
  color: #7b8c8a;
  font-style: italic;
}

.hakedis-table .hakedis-sira,
.hakedis-table .hakedis-sicil { width: 1%; color: #59706c; font-weight: 700; }
.hakedis-table .hakedis-ad { font-weight: 800; color: #14312e; }
.hakedis-table .hakedis-sayi { width: 1%; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.hakedis-table .hakedis-aylik { background: #fff6f6; color: #9f1f2c; font-weight: 900; }
.hakedis-table .hakedis-yillik { background: #f1f6f4; font-weight: 900; }
.hakedis-table .hakedis-saat { color: #33504c; }
.hakedis-table .hakedis-islem { width: 1%; text-align: right; }
.hakedis-zero { color: #a9b8b4; font-weight: 600; }

.hakedis-table tbody tr.hakedis-row:hover > td { background: #f3f8f6; }
.hakedis-table tbody tr.is-open > td { background: #eef5f3; }

.hakedis-detail-row > td {
  padding: 8px 10px 14px 34px;
  background: #f8fbfa;
}

.hakedis-history {
  width: auto;
  min-width: 520px;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 12.5px;
}

.hakedis-history th,
.hakedis-history td {
  padding: 4px 9px;
  border-bottom: 1px solid #e1e9e6;
  text-align: left;
  white-space: nowrap;
}

.hakedis-history th {
  color: #59706c;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hakedis-history .hakedis-ay { font-weight: 800; color: #14312e; }
.hakedis-history .hakedis-gunler { color: #33504c; white-space: normal; }
.hakedis-history .hakedis-history-total td { border-bottom: 0; font-weight: 900; color: #14312e; }

@media (max-width: 760px) {
  .hakedis-actions { margin-left: 0; }
  .hakedis-search { max-width: none; }
}

/* ---------- MESAİ ALANLARI ÇİZELGEDEN AYRI DURSUN (kullanıcı 03.10.2026) ---------- */
/* "Mesailer" (Yıllık / Aylık) ve "Mesai Planı" (FM…TP) bölümleri: grup
   başlığında kendi adları, başlıklarında ayrı renk, çizelgeyle birleştikleri
   kenarda belirgin bir ayraç. Genişlik değişmez. */
:root {
  --sum-head: #2d4a6b;
  --sum-head-dark: #223b57;
  --sum-line: #2d4a6b;
  --sum-soft: #f3f6fa;
}

/* Grup başlığı satırının parçaları (gövdeyle aynı hücre yapısı). Sabit
   hücreler yeşil kalır (.pin'in açık zemini burada geçersiz); grup adı p1'den
   sağa taşarak yazılır, telefonda p3'teki kopya görünür. */
.schedule-table .group-title td.pin {
  background: #0f7168 !important;
  color: #fbfffd;
}

.schedule-table .group-title--maneuver td.pin {
  background: #216b7b !important;
}

.schedule-table .group-title td.group-title-name {
  z-index: 5;
  padding: 0;
  overflow: visible;
  white-space: nowrap;
  text-align: left !important;
}

/* Grup adı mutlak konumludur: sütunun genişliğini etkilemez, sağa taşar. */
.group-title-text {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.schedule-table .group-title td.group-title-fill {
  padding: 0;
  box-shadow: none;
}

.group-title-phone { display: none; }

.schedule-table .group-title td.group-title-sum {
  left: calc(var(--p1) + var(--p2) + var(--p3) + var(--p4));
  width: calc(var(--p5) + var(--p6)) !important;
  min-width: calc(var(--p5) + var(--p6)) !important;
  padding-inline: 4px;
  border-left: 3px solid var(--sum-line);
  background: var(--sum-head-dark) !important;
  text-align: center;
  letter-spacing: 0.06em;
}

.schedule-table .group-title td.group-title-plan {
  padding-inline: 4px;
  border-left: 3px solid var(--sum-line);
  background: var(--sum-head-dark) !important;
  text-align: center;
  letter-spacing: 0.06em;
}

/* Sütun başlıkları: Yıllık / Aylık ve FM…TP kendi renginde. */
.schedule-table th.p5,
.schedule-table th.p6,
.schedule-table th.sum-header {
  background: var(--sum-head) !important;
}

.schedule-table th.sum-header--total { background: var(--sum-head-dark) !important; }

/* Ayraçlar: Yıllık'ın sol kenarı ve FM'in sol kenarı; Aylık'ın sağ kenarı. */
.schedule-table .p5 {
  border-left: 3px solid var(--sum-line) !important;
}

.schedule-table .p6 {
  border-right: 2px solid var(--sum-line) !important;
}

.schedule-table .sum-header--first,
.schedule-table .sum-cell--first {
  border-left: 3px solid var(--sum-line) !important;
}

/* Gövde hücreleri hafif mavi-gri zeminde: çizelgenin beyazından ayrılır. */
.schedule-table td.sum-year,
.schedule-table td.sum-month {
  background: var(--sum-soft) !important;
}

.schedule-table td.sum-cell { background: var(--sum-soft); }
.schedule-table td.sum-cell--total { background: #e9eef5; }

/* Satır vurgusu bu hücrelerde de görünür (arka plan !important). */
.schedule-table tbody tr.row-hover > td.sum-year,
.schedule-table tbody tr.row-hover > td.sum-month,
.schedule-table tbody tr.row-hover > td.sum-cell {
  background-image: linear-gradient(rgba(45, 74, 107, 0.16), rgba(45, 74, 107, 0.16)) !important;
}

@media (max-width: 760px) {
  .group-title-phone { display: inline; }

  /* Gizlenen sütunların <col> öğeleri de gizlenir; yoksa kalan sütunlar
     onların genişliğini alıyordu (Aylık 155px, 1. gün 105px). */
  .schedule-table .col-p1,
  .schedule-table .col-p2,
  .schedule-table .col-p4 { display: none; }
  .schedule-table .col-p3 { width: 120px; }
  .schedule-table .col-p5,
  .schedule-table .col-p6 { width: 36px; }

  .schedule-table .group-title td.p3.group-title-fill { padding-left: 8px; }

  .schedule-table .group-title td.group-title-sum {
    position: static;
    width: auto !important;
    min-width: 0 !important;
  }
}

/* Ay sekmeleri: "+" düğmesi sekmelerle aynı yükseklik ve taban çizgisinde;
   çevresinde çizgi ve zemin yok, yalnız "+" (kullanıcı 04.10.2026). */
.month-tab-add {
  height: 33px;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Fare üstüne gelince hafif gölgeli zemin: üstünde olunduğu anlaşılsın. */
.month-tab-add:hover {
  border: 0;
  border-radius: 8px;
  background: rgba(7, 92, 87, 0.12);
  color: var(--brand-dark);
}

@media print {
  .group-title-text {
    position: static;
    transform: none;
  }

  .schedule-table .group-title td.group-title-name { padding: 0 1mm !important; }
}

/* ---------- HÜCRE AÇIKLAMALARI (kullanıcı 04.10.2026) ----------
   Excel'deki gibi: açıklamalı hücrenin sağ üst köşesinde kırmızı üçgen;
   üzerine gelince balon (metin + Düzenle / Sil). Yazdırmada işaret çıkmaz. */
.schedule-cell.cell--note::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 7px 7px 0;
  border-color: transparent #c62828 transparent transparent;
  pointer-events: none;
}

.cell-menu-swatch--note { background: #c62828; }

.note-popover {
  position: fixed;
  z-index: 60;
  max-width: 300px;
  padding: 8px 10px;
  border: 1px solid #e3c9a8;
  border-radius: 8px;
  background: #fffbe8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  color: #2b2b2b;
}

.note-popover[hidden] { display: none; }
.note-popover-text { margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.note-popover-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini-button--danger { color: #9f1f2c; border-color: #e3b7bb; }

.note-text {
  width: 100%;
  min-height: 96px;
  padding: 8px 10px;
  border: 1px solid #ccdbd6;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

.notes-table .notes-day { white-space: nowrap; }
.notes-table .notes-text { max-width: 440px; white-space: pre-wrap; word-break: break-word; }
.notes-table .notes-time,
.notes-table .notes-state { width: 1%; white-space: nowrap; color: #59706c; }
.notes-table tr.is-removed td { color: #8a9a97; }
.notes-table tr.is-removed .notes-text { text-decoration: line-through; }
.notes-hint { margin: 10px 0 0; color: #59706c; font-size: 13px; }

@media print {
  .schedule-cell.cell--note::after { display: none; }
}

/* ---------- ÜST BAR: HER GENİŞLİKTE DÜZGÜN (kullanıcı 04.10.2026) ----------
   "Sayfa %90'da bozuluyor; tasarım kendini ayarlasın, yazılar gerekirse
   daralsın; cihaz, telefon, tarayıcı fark etmez." Ölçülen genişlikler:
   geniş düzen 1720 px, sıkışık 1292 px, çok sıkışık ~1140 px. Tarayıcı
   yakınlaştırması (%80, %90, %110…) pencere genişliğini değiştirdiği için
   eşikler piksel cinsindendir ve yakınlaştırmayı da kapsar. Hiçbir düğme
   küçülmez / üst üste binmez: yine de sığmazsa kontrol çubuğu BÜTÜN olarak
   alt satıra iner (bozuk görünüm yerine iki düzenli sıra). */
.top-bar { flex-wrap: wrap; }
.top-bar .control-bar { flex: 1 1 auto; flex-wrap: nowrap; }
.top-bar .view-tabs,
.top-bar .view-tabs--end { flex: 0 0 auto; }
@media (min-width: 761px) {
  .top-bar .control-bar > * { flex: 0 0 auto; }
}
.btn-icon { font-size: 15px; line-height: 1; }
.btn-text-short,
.tab-text-short { display: none; }
.app-footer[hidden] { display: none; }

/* Sıkışık düzen: 1900 px altı (1366'lık ekranda %80–%90, 1536'lık ekranda %100). Geniş düzen
   sayfa kenar boşluklarıyla 1776 px ister; kademe sınırları ölçülüp 60 px pay bırakıldı.
   Geri al / İleri al yalnız ok, "Ekran görüntüsü al" → "Görüntü al". */
@media (max-width: 1899px) {
  .top-bar { gap: 6px 8px; padding: 6px 8px; }
  .top-bar .view-tabs { gap: 2px; padding: 3px; }
  .top-bar .view-tab { min-height: 36px; padding: 7px 8px; font-size: 13px; }
  .top-bar .control-bar { gap: 5px; }
  .top-bar .button { min-height: 36px; padding: 7px 9px; font-size: 13px; }
  .top-bar .icon-button { width: 32px; height: 32px; font-size: 22px; }
  .top-bar .month-control label { min-width: 120px; }
  .top-bar .month-control input { font-size: 16px; }
  .top-bar .mode-toggle span { padding: 6px 9px; font-size: 13px; }
  .top-bar #undoButton .btn-text,
  .top-bar #redoButton .btn-text { display: none; }
  .top-bar #screenshotButton .btn-text-long { display: none; }
  .top-bar #screenshotButton .btn-text-short { display: inline; }
}

/* Çok sıkışık düzen: 1440 px altı (1366'lık ekranda %100 — kaydırma çubuğuyla 1349 px —, 1280'lik
   ekran, 1366'da %110). Sıkışık düzen kenar boşluklarıyla ~1340 px ister.
   Yazılar küçülür, "İndir / Çıktı" → "İndir", "Log Kayıtları" → "Log". */
@media (max-width: 1439px) {
  .top-bar { gap: 4px 6px; padding: 5px 6px; }
  .top-bar .view-tab { min-height: 34px; padding: 6px 7px; font-size: 12px; }
  .top-bar .control-bar { gap: 4px; }
  .top-bar .button { min-height: 34px; padding: 6px 8px; font-size: 12px; }
  .top-bar .icon-button { width: 30px; height: 30px; font-size: 20px; }
  .top-bar .month-control label { min-width: 104px; }
  .top-bar .month-control input { font-size: 15px; }
  .top-bar .mode-toggle span { padding: 5px 7px; font-size: 12px; }
  .top-bar #exportButton .btn-text-long,
  .top-bar #logTab .tab-text-long { display: none; }
  .top-bar #exportButton .btn-text-short,
  .top-bar #logTab .tab-text-short { display: inline; }
}

/* İki düzenli sıra: 1220 px altı (tablet, 1366'da %125): üstte sekmeler ve
   sağda Log, altta kontroller tam genişlikte. */
@media (max-width: 1219px) {
  .top-bar .view-tabs--end { margin-left: auto; }
  .top-bar .control-bar { flex: 1 1 100%; order: 3; }
}

/* Telefon: kontroller kendi içinde sarılır (ay satırı, altında düğmeler). */
@media (max-width: 760px) {
  .top-bar .control-bar { flex-wrap: wrap; }
}

/* ---------- AÇIKLAMALAR: DURUM RENKLERİ (kullanıcı 04.10.2026) ---------- */
.notes-table .notes-state { font-weight: 800; }
.notes-table .notes-state--gecerli,
.notes-table tr.is-removed td.notes-state--gecerli { color: #1b7f4b; }
.notes-table .notes-state--silindi,
.notes-table tr.is-removed td.notes-state--silindi { color: #b3261e; }
.notes-table .notes-state--duzenlendi,
.notes-table tr.is-removed td.notes-state--duzenlendi { color: #a05a00; }
.notes-table .notes-state small { display: block; color: #8a9a97; font-weight: 600; }

/* ---------- AÇIKLAMA PENCERESİ: BAŞLIK TEK SATIR ---------- */
#noteDialog .dialog-heading > div { flex: 1 1 auto; min-width: 0; }
#noteDialog .dialog-heading h2 {
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- TEST MODU DÜĞMESİ (kullanıcı 04.10.2026) ---------- */
.view-tab--test { color: #9f1f2c; }
.view-tab--test:hover { background: #fdecec; color: #8a1a16; }
.view-tab--test.is-active {
  color: #fff;
  background: #c62828;
  box-shadow: 0 4px 10px rgba(198, 40, 40, 0.28);
}

/* ---------- LOG: METİN İFADE (kullanıcı 04.10.2026) ---------- */
.log-chip--metin { border-color: rgba(27, 127, 75, 0.35); color: #1b7f4b; }
.log-chip--metin.is-active { background: #1b7f4b; border-color: #1b7f4b; color: #fff; }
.log-list--ifade .log-ifade {
  padding: 6px 10px;
  border-left: 3px solid #d7e3df;
  margin: 2px 0;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  color: #1f2d2b;
}
.log-list--ifade .log-ifade time { margin-right: 6px; color: #59706c; font-weight: 700; font-variant-numeric: tabular-nums; }
.log-list--ifade .log-ifade b { font-weight: 800; color: #14312e; }
.log-list--ifade .log-ifade--daha { color: #8a9a97; font-style: italic; }
.ifade-yeni { color: #1b7f4b; font-weight: 800; }
.ifade-mesai { color: #b3261e; font-weight: 800; }
.ifade-izin { color: #1d5fae; font-weight: 800; }
.ifade-sil { color: #8a9a97; }

/* ---------- LOG: DAHA FAZLA GÖSTER (kullanıcı 04.10.2026) ---------- */
.log-more-wrap { display: flex; justify-content: center; padding: 12px 0 4px; }
.log-more-button b { margin-left: 6px; font-weight: 800; }

/* ---------- LOG: ANA SATIRLAR HÜCRE BİÇİMİNDE (kullanıcı 04.10.2026) ---------- */
.log-sentence .log-lines--main { margin: 0; }
.log-sentence .log-lines--main .log-line { padding: 1px 0 1px 9px; font-size: 13.5px; }
.log-details summary .log-count--auto { font-weight: 800; }

/* ---------- MANUEL AY: SAYFA ZEMİNİ (kullanıcı 04.10.2026) ----------
   Seçili ay manuelken bütün sayfanın zemini hafif sıcak tona döner; operatör
   düğmeye bakmadan manuelde olduğunu anlar. Yazdırmada etkisiz. */
body.is-manual-month { background: linear-gradient(180deg, #fbf1dc 0%, #f7eedd 100%); }
body.is-manual-month .top-bar { border-color: #e8d4a8; background: #fffaf0; }
body.is-manual-month .schedule-section { box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.25); }
@media print { body.is-manual-month { background: #fff; } }

/* ---------- LOG: DOĞRUDAN SATIRLAR, SEBEP CÜMLESİ, HIZ (kullanıcı 04.10.2026) ---------- */
.log-cause {
  margin: 3px 0 1px;
  padding-left: 12px;
  color: var(--log-auto);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.35;
}
.log-lines--auto { margin-top: 2px; }
.log-expand {
  margin: 2px 0 0 9px;
  padding: 1px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.log-expand:hover { background: #f1f6f4; color: #163f3b; }
/* Ekran dışındaki kayıtlar çizilmez / yerleşmez: kaydırma ve açılış hızlanır. */
.log-entry { content-visibility: auto; contain-intrinsic-size: auto 46px; }
.log-list--ifade .log-ifade { content-visibility: auto; contain-intrinsic-size: auto 32px; }

/* ---------- PERSONEL HAKEDİŞ: ÜSTTE KATEGORİLER (kullanıcı 04.10.2026) ---------- */
.hakedis-kategoriler { gap: 8px; }
.hakedis-kategoriler .hakedis-chip { padding: 7px 14px; font-size: 13px; }
.hakedis-adet { margin-left: 6px; color: var(--muted); font-size: 12.5px; font-weight: 750; }

/* "Geçmiş kapalı / Geçmiş açık" düğmesi (kullanıcı 04.10.2026): "Test"ten uzun yazı
   üst barı ikinci sıraya taşırmasın; her kademede biraz daha sıkı. */
.top-bar .view-tab--test { padding-left: 10px; padding-right: 10px; font-size: 13px; }
@media (max-width: 1899px) {
  .top-bar .view-tab--test { padding: 7px 6px; font-size: 12.5px; }
}
@media (max-width: 1439px) {
  .top-bar .view-tab--test { padding: 6px 4px; font-size: 11px; letter-spacing: -0.1px; }
}

/* LOG AY LİSTESİ (kullanıcı 04.10.2026: "bütün rakamları kaldır, kafa karıştırıyor"): ay adları sayısız. */
.log-month b { display: none; }

/* PERSONEL HAKEDİŞ başlığının altındaki gri çizgi kalktı (kullanıcı 04.10.2026). */
#hakedisView .section-heading { border-bottom: 0; padding-bottom: 6px; }

/* AY SEÇİCİ (kullanıcı 04.10.2026: "ay tasarımı daha düzgün yapılabilir mi"): tek parça
   kutu, oklar içinde, ay adı tam ortada; tarayıcının takvim simgesi gizli (ay adına basınca
   takvim açılır). Eskisinden birkaç piksel dar: üst bar kademeleri bozulmaz. */
.top-bar .month-control {
  gap: 0;
  border: 1px solid #cedcd8;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.top-bar .month-control .icon-button {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.top-bar .month-control .icon-button:hover { background: #edf7f4; }
.top-bar .month-control #previousMonth { border-right: 1px solid #e3ece9; }
.top-bar .month-control #nextMonth { border-left: 1px solid #e3ece9; }
.top-bar .month-control label { padding: 0 6px; }
.top-bar .month-control input { cursor: pointer; }
.top-bar .month-control input::-webkit-calendar-picker-indicator { display: none; }

/* Gizli menü satırı gerçekten gizli (display:flex, hidden işaretini eziyordu: "Açıklamayı
   sil" açıklama yokken de görünüyordu). */
.cell-menu-item[hidden] { display: none; }

/* SAĞ KLİK MENÜLERİ (kullanıcı 04.10.2026): Sil iki menüde de en altta (HTML sırası).
   Tatil satırları yalnız gün başlığı menüsünde; hücre menüsünde görünmez. */
.cell-menu[data-scope="cell"] .cell-menu-item--date { display: none; }

/* ---------- ÇALIŞAN TALEPLERİ: ZİL VE PANEL (kullanıcı 04.10.2026) ---------- */
.talep-zil {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-height: 39px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #526966;
}
.talep-zil:hover { color: var(--brand-dark); background: #edf7f4; }
.talep-zil.has-talep { color: #b3261e; }
.talep-zil[aria-expanded="true"],
.talep-zil.has-talep[aria-expanded="true"] { color: #fff; background: var(--brand); }
.talep-rozet {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d32f2f;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
.talep-rozet[hidden] { display: none; }
.talep-zil.is-yeni svg { animation: talep-salla 0.9s ease-in-out 2; transform-origin: 50% 12%; }
@keyframes talep-salla {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .talep-zil.is-yeni svg { animation: none; }
}
.talep-zil svg { width: 18px; height: 18px; }
@media (max-width: 1899px) {
  .top-bar .talep-zil { min-height: 36px; }
}
@media (max-width: 1439px) {
  .top-bar .talep-zil { min-height: 34px; }
}

/* ZİLE YER — TASARIM KORUNUR (kullanıcı 04.10.2026: "tasarımımızı bozmasın"). Sekme ve
   düğme boşlukları eski hâlindedir; zil kompakttır (30 px). Ölçüm: eski tasarımda her
   kademenin en dar ucunda (1900, 1440, 1220 px) yalnız 23–27 px boş yer vardı, zil
   ~32 px ister. Bu yüzden YALNIZ aşağıdaki dar bantlarda boşluklar 1–2 px daralır
   (şerit ikinci sıraya taşmasın); 1920, 1536, 1366, 1280 gibi yaygın ekranlarda hiçbir
   ölçü değişmez. */
@media (min-width: 1900px) and (max-width: 1917px) {
  .top-bar .view-tab:not(.view-tab--test) { padding-left: 15px; padding-right: 15px; }
}
@media (min-width: 1440px) and (max-width: 1454px) {
  .top-bar { column-gap: 6px; }
  .top-bar .view-tab:not(.view-tab--test) { padding-left: 7px; padding-right: 7px; }
  .top-bar .control-bar .button { padding-left: 8px; padding-right: 8px; }
}
@media (min-width: 1220px) and (max-width: 1238px) {
  .top-bar { column-gap: 4px; }
  .top-bar .view-tab:not(.view-tab--test) { padding-left: 6px; padding-right: 6px; }
  .top-bar .control-bar .button { padding-left: 7px; padding-right: 7px; }
}

.talep-panel {
  position: fixed;
  z-index: 85;
  top: 64px;
  right: 16px;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: calc(100vw - 16px);
  max-height: 72vh;
  border: 1px solid rgba(17, 63, 59, 0.16);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 42, 39, 0.24);
}
.talep-panel[hidden] { display: none; }
.talep-panel-bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #e6eeeb;
}
.talep-panel-bas h2 { margin: 0; font-size: 15px; font-weight: 800; }
.talep-panel-kapat {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #627173;
  font-size: 20px;
  line-height: 1;
}
.talep-panel-kapat:hover { background: #f1f6f4; color: var(--ink); }
.talep-govde { overflow-y: auto; padding: 10px 12px 12px; }
.talep-bos { margin: 14px 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.talep-mesaj { margin: 0 0 10px; padding: 9px 11px; border-radius: 9px; font-size: 13px; font-weight: 650; }
.talep-mesaj--tamam { background: #e5f4ec; color: #145c37; }
.talep-mesaj--hata { background: #fdecee; color: #8f1f28; }
.talep-mesaj--bilgi { background: #f1f6f4; color: #2c4a47; }
.talep-liste { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.talep-kart {
  padding: 11px 12px;
  border: 1px solid #e1eae7;
  border-left: 4px solid var(--leave);
  border-radius: 10px;
  background: #fbfdfc;
}
.talep-kart--kapat { border-left-color: var(--closed); }
.talep-kart-ust { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.talep-ad { font-size: 14px; }
.talep-sicil { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.talep-kart p { margin: 5px 0 0; font-size: 13px; }
.talep-tur { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.talep-tur--izin { background: #e7f5e5; color: #23722f; }
.talep-tur--kapat { background: #fff1dd; color: #9a5300; }
.talep-kart .talep-not { padding: 6px 9px; border-radius: 8px; background: #fffbe8; color: #4a3b12; white-space: pre-wrap; word-break: break-word; }
.talep-kart .talep-zaman { color: #7b8c8a; font-size: 12px; }
.talep-kart .talep-uyari { color: #9f1f2c; font-weight: 700; }
.talep-dugmeler { display: flex; gap: 8px; margin-top: 10px; }
.talep-dugmeler .button { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.talep-red { margin-top: 10px; }
.talep-red label { display: grid; gap: 5px; color: #3d5250; font-size: 12.5px; font-weight: 750; }
.talep-red textarea {
  width: 100%;
  min-height: 60px;
  padding: 7px 9px;
  border: 1px solid #ccdbd6;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
  resize: vertical;
}

/* Log: çalışan talebi onayı satırların üstünde (kullanıcı 04.10.2026). */
.log-talep {
  margin: 0 0 6px;
  padding: 5px 10px;
  border-radius: 7px;
  background: #e7f5e5;
  color: #1d5e26;
  font-size: 13px;
  font-weight: 800;
}
.ifade-talep { color: #1d5e26; font-weight: 800; }

/* ---------- LOG: ÇALIŞAN TALEBİ BAŞLIĞI (kullanıcı 04.10.2026) ----------
   Talep geldi (mor), onaylandı (yeşil), reddedildi (kırmızı); açıklaması altında. */
.log-chip--talep { border-color: rgba(91, 58, 156, 0.35); color: #5b3a9c; }
.log-chip--talep.is-active { background: #5b3a9c; border-color: #5b3a9c; color: #fff; }
.log-entry--talep { border-left-color: #7c5cc4; }
.log-talep--g { background: #efe9fb; color: #4b2f86; }
.log-talep--r { background: #fdecee; color: #8f1f28; }
.log-talep-ek {
  margin: -2px 0 6px;
  padding: 0 10px;
  color: #4a5b59;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ifade-talep--g { color: #4b2f86; }
.ifade-talep--r { color: #8f1f28; }
.ifade-talep-ek { color: #4a5b59; }
