:root {
  --bg-1: #0f172a;
  --bg-2: #1e1b4b;
  --bg-3: #312e81;
  --card: rgba(255, 255, 255, 0.08);
  --card-solid: #ffffff;
  --text: #e2e8f0;
  --text-dark: #1e293b;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-2: #ec4899;
  --ok: #22c55e;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

html.app-loading .container { visibility: hidden; }
html.app-ready .container { visibility: visible; }
html.nav-kilavuz-off .nav-kilavuz-link { display: none !important; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
body.has-topbar .topbar {
  position: fixed; left: 0; right: 0; top: 0;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
body.has-topbar {
  padding-top: var(--topbar-h, 0px);
}
.topbar:has(.header-fx-layer) {
  background: linear-gradient(180deg, #bae6fd 0%, #7dd3fc 38%, #0891b2 52%, #0e7490 100%);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  isolation: isolate;
}
.header-fx-layer {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.header-fx-canvas { display: block; width: 100%; height: 100%; }
.topbar .inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.topbar:has(.header-fx-layer) .brand h1,
.topbar:has(.header-fx-layer) .brand p,
.topbar:has(.header-fx-layer) .brand-text #monthLabel,
.topbar:has(.header-fx-layer) .topbar-meta .muted {
  color: #f8fafc;
  text-shadow:
    0 1px 2px rgba(0,0,0,.85),
    0 2px 8px rgba(15,23,42,.75),
    0 0 1px rgba(15,23,42,.9);
}
.topbar:has(.header-fx-layer) .topbar-meta .online-badge {
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.online-badge {
  font-size: 12px; font-weight: 700; color: #86efac;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .28);
  white-space: nowrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: transparent;
  display: grid; place-items: center; font-size: 22px; box-shadow: none;
}
.logo.logo-empty,
.hero-lottie.logo-empty,
.lottie-fallback.logo-empty {
  display: none !important;
}
.brand h1 { font-size: 17px; font-weight: 700; letter-spacing: .2px; line-height: 1.1; margin: 0; }
.brand p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.1; }
.brand-text #monthLabel { margin-top: 0; }
.brand-head h1 { line-height: 1.1; }

.btn {
  border: 0; cursor: pointer; font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform .12s ease, opacity .12s ease; text-decoration: none; display: inline-block;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .9; }
.btn.ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); }
.topbar-nav .btn.ghost {
  background: rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.55);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  box-shadow:
    0 0 8px rgba(249, 115, 22, 0.35),
    0 0 18px rgba(251, 146, 60, 0.22);
  animation: navOrangeGlow 3.2s ease-in-out infinite;
}
.topbar-nav .btn.ghost:hover {
  background: rgba(15, 23, 42, 0.32);
  border-color: rgba(253, 186, 116, 0.75);
  box-shadow:
    0 0 12px rgba(249, 115, 22, 0.5),
    0 0 24px rgba(251, 146, 60, 0.35);
}
@keyframes navOrangeGlow {
  0%, 100% {
    box-shadow:
      0 0 6px rgba(249, 115, 22, 0.28),
      0 0 14px rgba(251, 146, 60, 0.16);
  }
  50% {
    box-shadow:
      0 0 12px rgba(249, 115, 22, 0.52),
      0 0 26px rgba(251, 146, 60, 0.34);
  }
}
.topbar-nav {
  flex-shrink: 0;
  margin-left: auto;
  justify-content: flex-end;
  gap: 5px;
}
.topbar-nav .btn {
  padding: 11px 16px;
  font-size: 14px;
  border-radius: 11px;
  line-height: 1.25;
  font-weight: 700;
}
.topbar-nav .btn.danger {
  padding: 11px 16px;
}
.topbar:has(.header-fx-layer) .brand {
  padding-left: 96px;
  gap: 0;
}
.btn.danger { background: linear-gradient(135deg, #ef4444, #f97316); }
.btn.ok { background: linear-gradient(135deg, #22c55e, #16a34a); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero / controls ---------- */
.hero { padding: 16px 0 6px; }
.hero h2 { font-size: 26px; font-weight: 800; margin-bottom: 2px; }
.hero .date-line { color: var(--muted); font-size: 14px; }
.duty-range-row {
  display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.duty-range-row .duty-range {
  flex: 1; min-width: 200px; margin-top: 0;
}
.duty-range {
  margin-top: 0; padding: 7px 12px; border-radius: 10px;
  background: rgba(220, 38, 38, .12); border: 1px solid rgba(220, 38, 38, .3);
  color: #fca5a5; font-size: 11px; line-height: 1.45;
}
.btn.reminder-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dc2626;
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 16px;
  border-radius: 10px;
  white-space: normal;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .35);
}
.reminder-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.reminder-btn-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.btn.reminder-btn:hover {
  box-shadow: 0 6px 18px rgba(249, 115, 22, .45);
}
@keyframes remGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.btn.reminder-btn.outline {
  background: transparent; border: 1px solid rgba(239, 68, 68, .55);
  color: #fca5a5; box-shadow: none;
}
.btn.reminder-btn.outline:hover { background: rgba(220, 38, 38, .15); color: #fff; }
.btn.reminder-btn.full { width: 100%; margin-top: 8px; }
a.rem-calendar-link { display: block; text-align: center; text-decoration: none; color: #fff; box-sizing: border-box; }
a.rem-calendar-link:active { opacity: 0.9; }
.reminder-modal { max-width: 440px; }
.reminder-modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.reminder-modal > label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.reminder-modal select {
  width: 100%; background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 11px 12px; font-size: 14px; outline: none;
}
.reminder-modal select:focus { border-color: #ef4444; }
.rem-checks {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 0;
}
.rem-checks label {
  display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0;
  font-size: 11px; color: var(--text); font-weight: 600; cursor: pointer;
  padding: 5px 4px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  white-space: nowrap; line-height: 1; min-width: 0;
}
.rem-checks input[type="checkbox"] {
  width: 12px; height: 12px; min-width: 12px; flex-shrink: 0;
  accent-color: #ef4444; margin: 0; padding: 0;
}
.rem-name-wrap[hidden] { display: none !important; }
.rem-name-wrap select:disabled { opacity: 0.55; cursor: not-allowed; }
table.mt td.nm.nm-editable { cursor: text; box-shadow: inset 0 -2px 0 rgba(249, 115, 22, .45); }
table.mt td.nm .nm-edit-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: inherit; font-weight: 700;
  color: inherit; background: rgba(255,255,255,.12); border: 1px solid rgba(249,115,22,.6);
  border-radius: 4px; padding: 2px 4px; min-width: 0;
}
table.mt td.nm .nm-edit-input:focus { outline: none; border-color: #f97316; background: rgba(255,255,255,.2); }
.rem-platform { margin-top: 18px; padding-top: 4px; }
.reminder-modal select { margin-bottom: 4px; }
.rem-hint {
  font-size: 12px; color: #fca5a5; line-height: 1.45;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(220, 38, 38, .1); border: 1px solid rgba(220, 38, 38, .22);
  margin-bottom: 4px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.35fr);
  gap: 10px;
  margin: 10px 0 4px;
  align-items: start;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field-date-row { min-width: 0; }
.date-today-row { display: flex; gap: 8px; align-items: center; }
.date-today-row input[type="date"] { flex: 1; min-width: 0; }
.date-today-row .btn { flex-shrink: 0; white-space: nowrap; }

.schedule-search-panel {
  min-width: 0;
  padding: 10px 12px 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(236, 72, 153, .1));
  border: 1px solid rgba(129, 140, 248, .42);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .14);
  position: relative;
  overflow: visible;
  z-index: 1;
}
.schedule-search-panel:focus-within { z-index: 60; }
.search-panel-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: #e0e7ff;
  margin-bottom: 6px; letter-spacing: .2px;
}
.search-panel-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(99, 102, 241, .28); border: 1px solid rgba(129, 140, 248, .35);
}
.search-panel-hint {
  margin: 6px 2px 0; font-size: 11px; color: #a5b4fc; line-height: 1.35;
}
.search-ac-wrap { position: relative; z-index: 2; }
.search-ac-wrap.is-open input[type="search"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: rgba(129, 140, 248, .25);
}
.search-ac-wrap.has-clear-btn input[type="search"] {
  padding-right: 40px;
}
.search-ac-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; padding: 0; border: none; border-radius: 8px;
  background: rgba(255, 255, 255, .1); color: #c7d2fe; font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.search-ac-clear:hover, .search-ac-clear:focus {
  background: rgba(249, 115, 22, .35); color: #fff; outline: none;
}
.search-ac-clear[hidden] { display: none !important; }
.search-ac-wrap input[type="search"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(129, 140, 248, .5);
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-ac-wrap input[type="search"]:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .22);
}
.search-ac-wrap input[type="search"]::-webkit-search-decoration,
.search-ac-wrap input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search-ac-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 80;
  max-height: 260px; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  background: #14172f;
  border: 1px solid rgba(129, 140, 248, .5);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .45);
  padding: 4px 6px 6px;
}
.search-ac-list[hidden] { display: none !important; }
.search-ac-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--text); padding: 10px 10px; font-size: 14px; cursor: pointer;
  border-radius: 10px;
}
.search-ac-item + .search-ac-item { margin-top: 2px; }
.search-ac-item:hover, .search-ac-item:focus {
  background: rgba(99, 102, 241, .22); outline: none;
}
.search-ac-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  color: #a5b4fc;
}
.search-ac-text {
  font-size: 14px; font-weight: 700; color: #f8fafc; line-height: 1.3;
  white-space: normal; word-break: break-word;
}
.search-ac-empty {
  padding: 12px; font-size: 13px; color: var(--muted); text-align: center;
}
.field label { font-size: 12px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.field input, .field select {
  background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.15); border-radius: 12px;
  padding: 10px 12px; font-size: 15px; min-width: 0; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field select option { color: #111; }

.notice {
  margin: 8px 0; padding: 10px 12px; border-radius: var(--radius);
  background: rgba(250, 204, 21, .12); border: 1px solid rgba(250, 204, 21, .35);
  color: #fde68a; font-size: 14px;
}
.notice.empty { background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.3); color: var(--muted); }

/* ---------- Cards grid ---------- */
.grid {
  display: grid; gap: 10px; margin-top: 6px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  position: relative; border-radius: var(--radius); padding: 16px 16px 18px;
  color: #fff; box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-3px); }
.grid.has-search-focus .card.search-focus-card {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 380px;
  justify-self: center;
  margin-bottom: 6px;
  border: 2px solid #fb923c !important;
  box-shadow:
    0 0 0 3px rgba(249, 115, 22, .75),
    0 0 36px rgba(249, 115, 22, .8),
    0 12px 40px rgba(249, 115, 22, .35);
  animation: search-card-glow 2s ease-in-out infinite;
  z-index: 3;
  filter: none;
  opacity: 1;
}
.grid.has-search-focus .card.search-focus-card:hover { transform: translateY(-2px) scale(1.01); }
.grid.has-search-focus .card.search-focus-card .name { font-size: 22px; }
.grid.has-search-focus .card.search-dimmed {
  filter: grayscale(0.9) brightness(0.38) saturate(0.25);
  opacity: 0.48;
  border-color: rgba(148, 163, 184, .22);
  box-shadow: none;
  transform: none;
  transition: filter .25s ease, opacity .25s ease;
}
.grid.has-search-focus .card.search-dimmed:hover { transform: none; }
@keyframes search-card-glow {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(249, 115, 22, .65),
      0 0 28px rgba(249, 115, 22, .65),
      0 10px 32px rgba(249, 115, 22, .28);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(251, 146, 60, 1),
      0 0 48px rgba(249, 115, 22, .95),
      0 14px 44px rgba(249, 115, 22, .45);
  }
}
.card .name.search-focus-name {
  display: inline-block; margin-top: 6px; padding: 5px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, .32);
  box-shadow: 0 0 18px rgba(249, 115, 22, .7), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.card .branch { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; opacity: .92; }
.card .name { font-size: 19px; font-weight: 800; margin-top: 8px; line-height: 1.25; }
.card .none { font-size: 15px; font-weight: 600; opacity: .85; margin-top: 8px; }
.card .card-note {
  margin-top: 8px; padding: 6px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, .18); font-size: 11px; line-height: 1.35;
  font-weight: 600; opacity: .95;
}
.card .pill {
  display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.22); padding: 4px 10px; border-radius: 999px;
}
.card .glow {
  position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  background: rgba(255,255,255,.18); border-radius: 50%; filter: blur(8px);
}

/* ---------- Auth / panel ---------- */
.center-wrap {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
}
body:has(.center-wrap) { padding-bottom: 0; min-height: auto; }
.panel {
  width: 100%; max-width: 420px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12); border-radius: 24px; padding: 28px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.panel.wide { max-width: 920px; }
.panel h2 { margin-bottom: 6px; font-size: 22px; }
.panel .sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group select {
  width: 100%; background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none;
}
.form-group input:focus { border-color: var(--accent); }
.msg { font-size: 14px; margin: 10px 0; padding: 10px 12px; border-radius: 10px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }
.msg.ok { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.4); color: #86efac; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  padding: 10px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--text);
}
.tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Yönetim paneli — sekme görünürlüğü (head'de admin-role-* ile, flash önlenir) */
html.admin-role-user .tab:not([data-tab="edit"]):not([data-tab="nobetedit"]):not([data-tab="aciledit"]):not([data-tab="account"]) {
  display: none !important;
}
html.admin-role-user #panel-upload { display: none !important; }
html.admin-role-user .tab-panel:not(.active) { display: none !important; }
html.admin-role-user .tab-panel.active { display: block !important; }
html.admin-role-admin .tab[data-tab="logs"],
html.admin-role-admin .tab[data-tab="visits"],
html.admin-role-admin .tab[data-tab="appearance"] {
  display: none !important;
}

/* Yönetim paneli — header & renkli sekmeler */
.admin-page .brand-no-logo { gap: 0; }
.admin-page .tab[data-tab="upload"] {
  background: rgba(37, 99, 235, .14); border-color: rgba(59, 130, 246, .38); color: #bfdbfe;
}
.admin-page .tab[data-tab="upload"].active {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="edit"] {
  background: rgba(219, 39, 119, .14); border-color: rgba(236, 72, 153, .38); color: #fbcfe8;
}
.admin-page .tab[data-tab="edit"].active {
  background: linear-gradient(135deg, #be185d, #ec4899); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="nobetupload"] {
  background: rgba(79, 70, 229, .14); border-color: rgba(99, 102, 241, .38); color: #c7d2fe;
}
.admin-page .tab[data-tab="nobetupload"].active {
  background: linear-gradient(135deg, #4338ca, #6366f1); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="nobetedit"] {
  background: rgba(109, 40, 217, .14); border-color: rgba(139, 92, 246, .38); color: #ddd6fe;
}
.admin-page .tab[data-tab="nobetedit"].active {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="acilupload"] {
  background: rgba(220, 38, 38, .14); border-color: rgba(239, 68, 68, .38); color: #fecaca;
}
.admin-page .tab[data-tab="acilupload"].active {
  background: linear-gradient(135deg, #b91c1c, #ef4444); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="aciledit"] {
  background: rgba(234, 88, 12, .14); border-color: rgba(249, 115, 22, .38); color: #fed7aa;
}
.admin-page .tab[data-tab="aciledit"].active {
  background: linear-gradient(135deg, #c2410c, #f97316); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="users"] {
  background: rgba(13, 148, 136, .14); border-color: rgba(20, 184, 166, .38); color: #99f6e4;
}
.admin-page .tab[data-tab="users"].active {
  background: linear-gradient(135deg, #0f766e, #14b8a6); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="visits"] {
  background: rgba(217, 119, 6, .14); border-color: rgba(245, 158, 11, .38); color: #fde68a;
}
.admin-page .tab[data-tab="visits"].active {
  background: linear-gradient(135deg, #b45309, #f59e0b); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="logs"] {
  background: rgba(100, 116, 139, .14); border-color: rgba(148, 163, 184, .38); color: #cbd5e1;
}
.admin-page .tab[data-tab="logs"].active {
  background: linear-gradient(135deg, #475569, #64748b); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="appearance"] {
  background: rgba(8, 145, 178, .14); border-color: rgba(6, 182, 212, .38); color: #a5f3fc;
}
.admin-page .tab[data-tab="appearance"].active {
  background: linear-gradient(135deg, #0e7490, #06b6d4); border-color: transparent; color: #fff;
}
.admin-page .tab[data-tab="account"] {
  background: rgba(22, 163, 74, .14); border-color: rgba(34, 197, 94, .38); color: #bbf7d0;
}
.admin-page .tab[data-tab="account"].active {
  background: linear-gradient(135deg, #15803d, #22c55e); border-color: transparent; color: #fff;
}
.admin-page .tab:hover:not(.active) { filter: brightness(1.08); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.table th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.table tr:hover td { background: rgba(255,255,255,.04); }

/* Giriş kayıtları — filtreler */
.visit-filters {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .45);
  border: 1px solid rgba(129, 140, 248, .28);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.visit-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.visit-filter-row-user { align-items: center; }
.visit-filter-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #a5b4fc;
  min-width: 72px;
  flex-shrink: 0;
}
.visit-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.visit-filter-chip {
  border: 1px solid rgba(129, 140, 248, .35);
  background: rgba(99, 102, 241, .12);
  color: #e0e7ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.visit-filter-chip:hover {
  background: rgba(99, 102, 241, .22);
  border-color: rgba(129, 140, 248, .55);
}
.visit-filter-chip.active {
  background: rgba(99, 102, 241, .38);
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .25);
}
.visit-user-select { min-width: 180px; max-width: 260px; }

/* Giriş kayıtları — IP grupları */
.visit-ip-row { cursor: pointer; }
.visit-ip-row td { transition: background .15s ease, box-shadow .15s ease; }
.visit-ip-row:hover td { background: rgba(255,255,255,.06); }
.visit-ip-chevron { color: #a5b4fc; font-size: 12px; width: 28px; text-align: center; }
.visit-ip-row.is-open td { background: rgba(99, 102, 241, .1); }
.visit-ip-detail-cell { padding: 0 8px 12px 36px !important; background: rgba(15, 23, 42, .35); }
.visit-detail-table { margin-top: 4px; font-size: 13px; }
.visit-detail-table th { font-size: 10px; }
.visit-tag {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
}
.visit-tag.sm { padding: 2px 6px; font-size: 10px; }
.visit-tag-pwa {
  background: rgba(249, 115, 22, .22); color: #fdba74;
  border: 1px solid rgba(249, 115, 22, .45);
}
.visit-tag-freq {
  background: rgba(250, 204, 21, .16); color: #fde68a;
  border: 1px solid rgba(250, 204, 21, .35);
}
.visit-tag-today {
  background: rgba(34, 197, 94, .18); color: #86efac;
  border: 1px solid rgba(34, 197, 94, .4);
}
.visit-tag-yesterday {
  background: rgba(56, 189, 248, .16); color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, .38);
}
.visit-check-cell { width: 36px; text-align: center; }
.visit-check-cell input { width: 16px; height: 16px; cursor: pointer; accent-color: #6366f1; }
.visit-ip-row.visit-ip-pwa td,
.visit-ip-row.visit-ip-frequent td {
  background: rgba(249, 115, 22, .1);
}
.visit-ip-row.visit-ip-pwa td:first-child,
.visit-ip-row.visit-ip-frequent td:first-child {
  box-shadow: inset 4px 0 0 #fb923c;
}
.visit-ip-row.visit-ip-pwa td,
.visit-ip-row.visit-ip-frequent td {
  animation: visit-ip-glow 2.2s ease-in-out infinite;
}
.visit-detail-row.visit-detail-pwa td {
  background: rgba(249, 115, 22, .08);
  box-shadow: inset 3px 0 0 rgba(249, 115, 22, .55);
}
@keyframes visit-ip-glow {
  0%, 100% {
    box-shadow: inset 4px 0 0 #fb923c, inset 0 0 0 0 rgba(249, 115, 22, 0);
  }
  50% {
    box-shadow: inset 4px 0 0 #fdba74, inset 0 0 24px rgba(249, 115, 22, .28);
  }
}

/* ---------- Upload dropzone ---------- */
.drop {
  border: 2px dashed rgba(255,255,255,.25); border-radius: var(--radius);
  padding: 34px; text-align: center; cursor: pointer; transition: all .15s ease;
  background: rgba(255,255,255,.04);
}
.drop:hover, .drop.drag { border-color: var(--accent); background: rgba(99,102,241,.12); }
.drop .big {
  font-size: 22px; font-weight: 800; letter-spacing: .08em;
  margin-bottom: 8px; color: #a5b4fc;
}
.drop p { color: var(--muted); font-size: 14px; }

/* ---------- Day toggles (edit) ---------- */
.daygrid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.day-toggle {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06); color: var(--text); font-size: 13px; cursor: pointer; font-weight: 600;
}
.day-toggle.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }

.edit-row { padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; margin-bottom: 12px; background: rgba(255,255,255,.04); }
.edit-row .head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.edit-row input { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.edit-row input[readonly] { opacity: .65; cursor: not-allowed; background: rgba(255,255,255,.04); }

.edit-picker-row {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 14px;
}
.edit-picker-row .field { min-width: 180px; flex: 1; max-width: 280px; }
.edit-picker-row .field-search { max-width: 320px; }
.edit-picker-row .field-search .search-ac-wrap input[type="search"] {
  width: 100%; background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.15); border-radius: 10px;
  padding: 9px 11px; font-size: 14px; outline: none;
}
.edit-picker-row .field-search .search-ac-wrap input[type="search"]:focus { border-color: var(--accent); }
.edit-row-highlight {
  border-color: #f97316 !important;
  background: rgba(249, 115, 22, .1) !important;
  box-shadow:
    0 0 0 2px rgba(249, 115, 22, .6),
    0 0 20px rgba(249, 115, 22, .45),
    inset 0 0 14px rgba(249, 115, 22, .12);
  animation: edit-row-glow 2.2s ease-in-out infinite;
}
@keyframes edit-row-glow {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(249, 115, 22, .55),
      0 0 16px rgba(249, 115, 22, .38),
      inset 0 0 10px rgba(249, 115, 22, .1);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(249, 115, 22, .9),
      0 0 32px rgba(249, 115, 22, .7),
      inset 0 0 18px rgba(249, 115, 22, .2);
  }
}
.edit-hint { font-size: 12px; color: var(--muted); margin: 8px 0 6px; }
.admin-select, .admin-textarea {
  width: 100%; background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.15); border-radius: 10px;
  padding: 9px 11px; font-size: 14px; outline: none;
}
.admin-select:focus, .admin-textarea:focus { border-color: var(--accent); }
.admin-textarea { line-height: 1.4; resize: vertical; margin-top: 6px; }
#branchNoteEditor label {
  display: block; font-size: 12px; color: var(--muted); margin-top: 10px; font-weight: 600;
}

.branch-notes-panel {
  margin-bottom: 18px; padding: 16px;
  border: 1px solid rgba(249, 115, 22, .28); border-radius: 14px;
  background: rgba(249, 115, 22, .08);
}
.branch-notes-panel h3 { font-size: 16px; margin-bottom: 4px; }
.branch-notes-panel .sub { margin-bottom: 12px; font-size: 12px; }

.branch-browse { margin-top: 4px; }
.branch-browse-lead {
  font-size: 14px; color: var(--muted); margin: 0 0 14px;
  text-align: center; line-height: 1.45;
}
.branch-card-list { display: flex; flex-direction: column; gap: 10px; }
.branch-card {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; cursor: pointer; text-align: left;
  color: #fff; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.branch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.branch-card:active { transform: translateY(0); }
.branch-card-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: rgba(255,255,255,.14);
}
.branch-card-body { flex: 1; min-width: 0; }
.branch-card-name {
  display: block; font-size: 16px; font-weight: 800; letter-spacing: .02em;
  margin-bottom: 4px; word-break: break-word;
}
.branch-card-meta { display: block; font-size: 12px; opacity: .88; }
.branch-card-arrow { font-size: 20px; opacity: .7; flex-shrink: 0; }

.edit-branch-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.edit-branch-title {
  font-size: 17px; font-weight: 800; color: var(--text);
  flex: 1; min-width: 0; word-break: break-word;
}
.edit-person-list-hint {
  font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.45;
}

/* ---------- Floating Save (FAB) ---------- */
.fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 80;
  padding: 15px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(0, 0, 0, .45); }
.fab:active { transform: translateY(0); }
.fab .ico { font-size: 17px; }
@media (max-width: 560px) {
  .fab { left: 14px; right: 14px; bottom: 14px; justify-content: center; padding: 16px; border-radius: 16px; }
}

/* ---------- Aylık tablo (Excel benzeri) ---------- */
.table-section { margin-top: 26px; }
.table-section .head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.table-section h3 { font-size: 18px; font-weight: 800; }
.table-legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legend-dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: middle; }
.legend-dot.today { background: linear-gradient(135deg, #f97316, #ea580c); }
.legend-dot.on { background: rgba(99,102,241,.55); }

.month-table-wrap {
  overflow-x: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  background: rgba(255,255,255,.03); -webkit-overflow-scrolling: touch;
  white-space: nowrap; font-size: 0;
  overscroll-behavior-x: contain;
}
.month-table-wrap table.mt {
  display: inline-table; vertical-align: top; font-size: 12px;
}
.month-table-wrap .month-scroll-tail {
  display: inline-block; vertical-align: top; width: 80vw; min-width: 80vw;
  height: 1px; pointer-events: none;
}
@media (pointer: fine) {
  .month-table-wrap td.day { cursor: grab; }
  .month-table-wrap th.day { cursor: pointer; }
  .month-table-wrap.mt-dragging td.day {
    cursor: grabbing; user-select: none;
  }
}
table.mt { border-collapse: separate; border-spacing: 0; font-size: 12px; width: max-content; }
table.mt th, table.mt td { border-bottom: 1px solid rgba(255,255,255,.07); border-right: 1px solid rgba(255,255,255,.05); white-space: nowrap; }
table.mt thead th {
  position: sticky; top: 0; z-index: 4; background: #1b1c46; color: var(--muted);
  font-weight: 700; padding: 8px 6px; text-align: center;
}
table.mt thead th.col-today { background: #ea580c; color: #fff; }
table.mt thead th.day { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
table.mt thead th.day:hover { background: rgba(99, 102, 241, .4); color: #fff; }
table.mt thead th.day.col-today:hover { background: #f97316; }

table.mt td.br, table.mt th.corner {
  position: sticky; left: 0; z-index: 3; background: #181a3d;
  width: 116px; min-width: 116px; max-width: 116px; padding: 7px 8px;
  font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: .2px;
  color: #fff; vertical-align: middle; white-space: normal; line-height: 1.2; cursor: pointer;
}
table.mt td.nm, table.mt th.nm-h {
  position: sticky; left: 116px; z-index: 2; background: #161832;
  width: 132px; min-width: 132px; max-width: 132px; padding: 7px 8px; color: var(--text);
  white-space: normal; line-height: 1.2; font-size: 11px;
}
/* Seçili günün icapçısı: ismin solunda turuncu çizgi (hover olmadan da belli) */
table.mt tbody tr.octoday td.nm { box-shadow: inset 3px 0 0 #f97316; }
/* Branşa gelince o günün icapçısını belirginleştir */
table.mt tbody tr.oc-hl td.nm { background: #ea580c; color: #fff; font-weight: 800; }
table.mt tbody tr.oc-hl td.br { background: #25275a; color: #fff; }
table.mt tbody tr.oc-hl td.day.on.today { box-shadow: inset 0 0 0 2px #fff; }
table.mt th.corner, table.mt th.nm-h { z-index: 5; }

table.mt td.day { width: 22px; min-width: 22px; text-align: center; color: transparent; padding: 6px 0; }
table.mt td.day.on { background: rgba(99,102,241,.45); color: rgba(255,255,255,.92); font-weight: 700; }
table.mt td.day.col-today { background: rgba(249,115,22,.12); }
table.mt td.day.on.today {
  background: #ea580c; color: #fff; font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
}

/* Not: Genel satır-hover vurgusu kaldırıldı; branş hücresi ilk satıra ait olduğu
   için ilk doktoru yanlışlıkla "seçili" gösteriyordu. Vurgu yalnızca branşa
   gelince o günün icapçısı için (.oc-hl) yapılır. */

/* ---------- Kişiye göre görüntüleme (tablonun üstündeki seçici) ---------- */
.person-search {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 6px; padding: 10px 14px;
  background: #1e1b4b; border: 1px solid rgba(236, 72, 153, .32);
  border-radius: 12px;
  position: sticky; top: var(--topbar-h, 0px); z-index: 50;
}
body.ps-stuck .person-search {
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
.person-search label { font-size: 12px; color: #f9a8d4; font-weight: 700; white-space: nowrap; width: 100%; }
.person-search-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: min(100%, 280px);
}
.person-search select {
  background: rgba(255, 255, 255, .08); color: var(--text);
  border: 1px solid rgba(236, 72, 153, .45); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; min-width: 160px; outline: none;
  flex: 0 1 220px; max-width: 280px;
}
.person-search-hint {
  flex: 1; min-width: min(100%, 220px); margin: 0;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(220, 38, 38, .12); border: 1px solid rgba(220, 38, 38, .32);
  color: #fca5a5; font-size: 13px; line-height: 1.45; font-weight: 600;
}
.person-search select:focus { border-color: #ec4899; }
.person-search select option { color: #111; }
.mt-sticky-head {
  position: fixed; z-index: 45; overflow: hidden;
  display: none; align-items: stretch;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.mt-sticky-head.is-visible { display: flex; }
.mt-sticky-head-left {
  flex-shrink: 0; overflow: hidden; background: #1b1c46;
  box-shadow: 2px 0 8px rgba(0, 0, 0, .3);
  position: relative; z-index: 2;
}
.mt-sticky-head-right {
  flex: 1; min-width: 0; overflow: hidden; background: #1b1c46;
  position: relative; z-index: 1;
}
.mt-sticky-head-days {
  width: max-content;
  transform: translate3d(0, 0, 0);
}
.mt-sticky-head table.mt { margin: 0; }
.mt-sticky-head th.corner,
.mt-sticky-head th.nm-h { position: static; left: auto; }
body.mt-head-fixed .month-table-wrap thead { visibility: hidden; }
.person-info { font-size: 12px; color: #fbcfe8; font-weight: 600; line-height: 1.4; }
.person-info b { color: #fff; }
.person-info .pi-unit { white-space: nowrap; }

/* Seçilen / fareyle üzerine gelinen kişi: SADECE o kişinin dolu hücreleri ve
   ismi pembe olur (sütun boyunca vurgu YOK — kafa karışıklığını önlemek için).
   Kişinin nöbet/icap hücrelerinde gün numarası yazılır. */
table.mt td.day.pink-on {
  background: #db2777 !important;
  font-size: 0; line-height: inherit;
  position: relative; z-index: 1;
}
table.mt td.day.pink-on::after {
  content: attr(data-day); font-size: 9px; color: #fff; font-weight: 800;
  display: block; line-height: 1;
}
/* Seçilen kişinin ismi ve birim/branş hücresi */
table.mt tbody tr.pink-row td.nm { background: #db2777; color: #fff; font-weight: 800; border-left: 3px solid #be185d; }
table.mt tbody tr.pink-row td.br { background: #4a1d3f; color: #fff; }
.legend-dot.person { background: linear-gradient(135deg, #ec4899, #db2777); }

/* İsmin üstündeki toplam nöbet/icap sayacı (yalnızca vurgulu kişide görünür) */
table.mt td.nm .nm-count { display: none; }
table.mt tbody tr.pink-row td.nm .nm-count {
  display: block; width: fit-content; margin: 0 0 3px;
  background: #be185d; color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 7px; letter-spacing: .3px;
}

/* Acil tablosu: birim sütunu yok, isim sütunu sola yapışık (gün başlığı z-index:4 üstünde kalmalı) */
table.mt.acil-no-br th.nm-h { left: 0; z-index: 6; }
table.mt.acil-no-br td.nm { left: 0; z-index: 5; }

/* ---------- İmza ---------- */
.signature {
  display: block; width: fit-content; margin: 18px auto 6px;
  padding: 0; border: none; background: none;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: normal; font-weight: 400; font-size: 13px;
  letter-spacing: 3.5px; text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
  user-select: none;
}
.sig-url {
  display: block; margin-top: 2px; text-align: center;
  font-size: 10px; letter-spacing: 2px;
  color: rgba(255, 255, 255, .25);
  text-transform: lowercase; text-decoration: none;
}
.sig-url:hover { color: rgba(255, 255, 255, .5); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(2, 6, 23, .65); backdrop-filter: blur(4px);
  display: none; place-items: center; z-index: 100; padding: 20px;
}
.modal-overlay.show { display: grid; }
.modal {
  width: 100%; max-width: 420px; background: #1e1b4b;
  border: 1px solid rgba(255,255,255,.15); border-radius: 20px; padding: 24px;
  box-shadow: var(--shadow);
}
.modal h3 { font-size: 19px; margin-bottom: 4px; }
.modal input {
  width: 100%; background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none;
}
.modal input:focus { border-color: var(--accent); }

.pager {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; margin-top: 16px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.pager-info { font-size: 12px; color: var(--muted); }
.pager-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pager-btn.active { background: rgba(99,102,241,.35); border-color: rgba(99,102,241,.55); color: #fff; }

.footer-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 30px; }
.row-actions { display: flex; gap: 8px; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.brand-text {
  min-width: 0; flex: 1;
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
}
.brand-head { display: contents; }
.brand .logo {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}
.brand-head h1 { grid-column: 2; grid-row: 1; line-height: 1; margin: 0; }
.brand-text #monthLabel { grid-column: 2; grid-row: 2; margin: 0; line-height: 1; }
.topbar-meta {
  grid-column: 3; grid-row: 1 / span 2;
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  justify-self: end; align-self: center;
}
.topbar:has(.header-fx-layer) .brand .logo {
  grid-column: 2;
  grid-row: 1;
}
.topbar:has(.header-fx-layer) .brand-head h1 {
  grid-column: 1;
  grid-row: 1;
}
.topbar:has(.header-fx-layer) .brand-text #monthLabel {
  grid-column: 1 / 3;
  grid-row: 2;
  text-align: center;
  justify-self: center;
  width: max-content;
  max-width: 100%;
}
.header-fx-preview {
  position: relative; overflow: hidden; height: 72px; margin-top: 10px;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(15, 23, 42, 0.96);
}

@media (max-width: 768px) {
  .topbar .inner { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .topbar:has(.header-fx-layer) .inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 8px 8px 6px 10px;
  }
  .brand { width: 100%; gap: 8px; }
  .topbar:has(.header-fx-layer) .brand {
    width: auto;
    flex: 1 1 52%;
    min-width: 0;
    gap: 0;
    padding-left: 72px;
  }
  .topbar:has(.header-fx-layer) .brand .logo {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .brand .logo { width: 36px; height: 36px; font-size: 18px; }
  .brand h1 { font-size: 14px; line-height: 1.05; }
  .brand p#monthLabel { font-size: 10px; line-height: 1.05; margin-top: 0; }
  .topbar-meta { flex-direction: column; align-items: flex-end; gap: 3px; align-self: center; }
  .topbar:has(.header-fx-layer) .topbar-meta {
    align-self: start;
    gap: 2px;
  }
  .brand-head h1 { line-height: 1; }
  .brand-text #monthLabel { line-height: 1; }
  .topbar-meta #userLabel { font-size: 10px !important; white-space: nowrap; }
  .topbar-meta .online-badge { font-size: 9px; padding: 2px 6px; }
  .topbar-nav {
    width: 100%; flex-wrap: nowrap; gap: 4px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .topbar:has(.header-fx-layer) .topbar-nav {
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 3px;
    overflow-x: visible;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .topbar-nav .btn { flex: 1 1 0; min-width: 0; padding: 10px 8px; font-size: 12px; border-radius: 10px; text-align: center; white-space: nowrap; font-weight: 700; }
  .topbar:has(.header-fx-layer) .topbar-nav .btn {
    flex: 0 0 auto;
    min-width: 0;
    padding: 9px 11px;
    font-size: 12px;
    border-radius: 9px;
  }

  .person-search {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto;
    gap: 5px 8px; padding: 8px 10px; align-items: center;
  }
  .person-search label { grid-column: 1; grid-row: 1; width: auto; font-size: 11px; }
  .person-search-row { display: contents; }
  .person-search select { grid-column: 2; grid-row: 1; width: 100%; max-width: none; min-width: 0; flex: none; font-size: 12px; padding: 5px 8px; }
  .person-search-hint { grid-column: 1 / -1; grid-row: 2; width: 100%; font-size: 10px; padding: 5px 8px; line-height: 1.3; }
  .person-info { grid-column: 1 / -1; grid-row: 3; font-size: 11px; }
  .person-search #personClear { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 560px) {
  .hero { padding: 12px 0 4px; }
  .duty-range-row { flex-direction: column; gap: 6px; }
  .btn.reminder-btn { width: 100%; text-align: center; }
  .hero h2 { font-size: 20px; }
  .controls { grid-template-columns: 1fr; gap: 8px; margin: 8px 0 2px; }
  .field { width: 100%; }
  .schedule-search-panel { padding: 9px 10px 7px; }
  .field input, .field select { width: 100%; }
  .date-today-row .btn { padding: 10px 12px; font-size: 13px; }

  /* Günün icapçı kartları: 3 sütun yan yana, daha kompakt */
  .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .card { padding: 10px 10px 12px; border-radius: 14px; }
  .card .branch { font-size: 9px; letter-spacing: .3px; }
  .card .name { font-size: 13px; margin-top: 5px; }
  .card .card-note { font-size: 9px; padding: 4px 6px; margin-top: 5px; }
  .card .none { font-size: 11px; margin-top: 5px; }
  .card .pill { font-size: 9px; padding: 3px 7px; margin-top: 8px; }
  .card .glow { width: 70px; height: 70px; right: -20px; top: -20px; }

  /* Aylık tablo: ekrana daha çok sığsın */
  table.mt { font-size: 10px; }
  table.mt td.br, table.mt th.corner { width: 68px; min-width: 68px; max-width: 68px; font-size: 7.5px; padding: 4px 4px; line-height: 1.15; overflow: hidden; word-break: break-all; hyphens: auto; }
  table.mt td.br { font-size: clamp(5.5px, 1.6vw, 7.5px); }
  table.mt td.nm, table.mt th.nm-h { left: 68px; width: 88px; min-width: 88px; max-width: 88px; font-size: 8px; padding: 4px 4px; line-height: 1.15; }
  table.mt.acil-no-br th.nm-h, table.mt.acil-no-br td.nm { left: 0; }
  table.mt td.day { width: 18px; min-width: 18px; font-size: 9px; padding: 4px 0; }
  table.mt thead th { padding: 5px 2px; }
  table.mt tbody tr.octoday td.nm { box-shadow: inset 2px 0 0 #f97316; }

  .table-section h3 { font-size: 16px; }

  .rem-checks { gap: 4px; }
  .rem-checks label { font-size: 10px; padding: 4px 2px; gap: 3px; }
  .rem-checks input[type="checkbox"] { width: 11px; height: 11px; min-width: 11px; }
}

/* ---------- Site tema / Lottie / login arka plan ---------- */
.site-theme-login-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.page-login.login-animated-bg {
  min-height: 100vh;
  background: transparent !important;
}
@keyframes siteLoginBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.gradient-preview {
  height: 52px;
  border-radius: 10px;
  margin: 8px 0 14px;
  border: 1px solid rgba(255,255,255,.15);
  background-size: 400% 400%;
  background-repeat: no-repeat;
  background-position: 0% 50%;
  animation: siteLoginBg 8s ease infinite;
}
.hero-title-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ios-install-btn,
.android-install-btn,
.desktop-install-btn,
.safari-desktop-install-btn,
.chrome-desktop-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.ios-install-btn {
  gap: 10px;
  padding: 9px 16px 9px 10px;
  border: 1px solid rgba(74, 222, 128, .5);
  background: linear-gradient(135deg, #15803d 0%, #16a34a 45%, #22c55e 100%);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55), 0 6px 18px rgba(22, 163, 74, .32);
  animation: ios-install-pulse 2s ease-in-out infinite;
}
.ios-install-btn .pwa-install-apple-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.ios-install-btn .pwa-install-platform-icon {
  width: 16px;
  height: 16px;
}
.ios-install-btn .pwa-install-label {
  text-align: left;
  line-height: 1.25;
  font-size: 11.5px;
  letter-spacing: .15px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}
.android-install-btn,
.desktop-install-btn,
.chrome-desktop-install-btn {
  border: 1px solid rgba(74, 222, 128, .45);
  background: linear-gradient(135deg, rgba(22, 163, 74, .55), rgba(16, 185, 129, .4));
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  animation: android-install-pulse 2.2s ease-in-out infinite;
}
.safari-desktop-install-btn {
  border: 1px solid rgba(56, 189, 248, .45);
  background: linear-gradient(135deg, rgba(14, 116, 144, .55), rgba(2, 132, 199, .4));
  box-shadow: 0 0 0 0 rgba(56, 189, 248, .45);
  animation: safari-desktop-install-pulse 2.2s ease-in-out infinite;
}
.ios-install-btn:hover,
.android-install-btn:hover,
.desktop-install-btn:hover,
.chrome-desktop-install-btn:hover,
.safari-desktop-install-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.ios-install-btn[hidden],
.android-install-btn[hidden],
.desktop-install-btn[hidden],
.chrome-desktop-install-btn[hidden],
.safari-desktop-install-btn[hidden] { display: none !important; }
.pwa-install-platform-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.pwa-install-label { white-space: nowrap; }
@keyframes ios-install-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55), 0 6px 18px rgba(22, 163, 74, .32);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0), 0 8px 24px rgba(74, 222, 128, .42);
  }
}
@keyframes android-install-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55), 0 4px 14px rgba(22, 163, 74, .28);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0), 0 6px 20px rgba(16, 185, 129, .38);
  }
}
@keyframes safari-desktop-install-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, .5), 0 4px 14px rgba(2, 132, 199, .28);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(56, 189, 248, 0), 0 6px 20px rgba(56, 189, 248, .35);
  }
}
.pwa-install-hint {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}
.pwa-install-hint-green,
.pwa-install-hint-ios,
.pwa-install-hint-android {
  background: linear-gradient(135deg, #166534, #14532d 55%, #052e16);
  border: 1px solid rgba(74, 222, 128, .48);
}
.pwa-install-hint.show {
  opacity: 1;
  transform: translateY(0);
}
.pwa-install-hint p { margin: 0; }
.pwa-hint-mark {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
}
.pwa-install-hint-green .pwa-hint-mark,
.pwa-install-hint-ios .pwa-hint-mark,
.pwa-install-hint-android .pwa-hint-mark {
  background: rgba(74, 222, 128, .22);
  color: #bbf7d0;
}
.pwa-install-hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: #e2e8f0;
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 640px) {
  .hero-title-row .ios-install-btn,
  .hero-title-row .android-install-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
  .pwa-install-label { white-space: normal; text-align: center; }
}
.hero-title-row .hero-lottie,
[data-lottie-slot] {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.brand .logo[data-lottie-slot],
.brand .logo .lottie-slot {
  font-size: 22px; overflow: hidden;
}
.brand .logo[data-lottie-slot] svg,
.hero-lottie svg { max-width: 100%; max-height: 100%; }
.brand .logo[data-lottie-slot] img,
.hero-lottie img,
.logo-image img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lottie-fallback { font-size: inherit; }
html.lottie-defer [data-lottie-slot]:not(.logo-ready),
.logo.logo-lottie-loading,
.hero-lottie.logo-lottie-loading {
  opacity: 0 !important;
  visibility: hidden;
}
html.header-fx-boot .topbar:not(:has(.header-fx-layer)) {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  isolation: isolate;
}
html[data-header-fx-type="beach"].header-fx-boot .topbar:not(:has(.header-fx-layer)),
html[data-header-fx-type="sun"].header-fx-boot .topbar:not(:has(.header-fx-layer)) {
  background: linear-gradient(180deg, #bae6fd 0%, #7dd3fc 38%, #0891b2 52%, #0e7490 100%);
}
html.header-fx-boot .topbar:not(:has(.header-fx-layer)) {
  background: linear-gradient(180deg, #081424 0%, #1f9aa8 100%);
}

@keyframes themeGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes navAcilGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Gradient animasyonu ::before katmanında — .btn arka planı animasyonu engellemez */
a.nav-acil-link.nav-acil-glow,
.btn.reminder-btn.theme-gradient-btn:not(.outline) {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: transparent !important;
  background-image: none !important;
}
a.nav-acil-link.nav-acil-glow::before,
.btn.reminder-btn.theme-gradient-btn:not(.outline)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: var(--theme-gradient, linear-gradient(120deg, #b91c1c, #dc2626, #ef4444, #f97316, #b91c1c));
  background-size: 400% 400%;
  background-repeat: no-repeat;
  background-position: 0% 50%;
  animation: themeGradientFlow var(--theme-gradient-dur, 3.5s) ease infinite;
  pointer-events: none;
}

html.is-scrolling a.nav-acil-link.nav-acil-glow::before,
html.is-scrolling .btn.reminder-btn.theme-gradient-btn:not(.outline)::before {
  animation-play-state: paused;
}
a.btn.nav-acil-glow,
a.nav-acil-link.nav-acil-glow {
  border-color: rgba(239, 68, 68, .45) !important;
  color: #fff !important;
  font-weight: 700;
}

.appearance-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
.appearance-card {
  padding: 14px; border-radius: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.appearance-card h4 { font-size: 14px; margin-bottom: 8px; }
.appearance-card label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.appearance-card input[type="number"],
.appearance-card input[type="text"],
.appearance-card input[type="color"] {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: var(--text);
}
.appearance-card input[type="color"] { height: 38px; padding: 4px; cursor: pointer; }
.appearance-preview {
  width: 64px; height: 64px; border-radius: 12px; margin-top: 8px;
  background: rgba(0,0,0,.2); display: grid; place-items: center; overflow: hidden;
}
.color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.color-row input[type="color"] { width: 44px; height: 36px; padding: 2px; }
.color-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 4px 2px 2px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
}
.color-remove {
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px;
  background: rgba(239, 68, 68, .2); color: #fca5a5; font-size: 16px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.color-remove:hover:not(:disabled) { background: rgba(239, 68, 68, .4); color: #fff; }
.color-remove:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Kullanım kılavuzu ---------- */
.guide-edit-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 960px; margin: 12px auto 0; padding: 10px 16px;
  border-radius: 12px; background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .3); font-size: 13px;
}
.guide-save-msg.ok { color: #86efac; }
.guide-save-msg.err { color: #fca5a5; }
.guide-editable-mode .guide-editable {
  cursor: pointer; border-radius: 6px; transition: outline .15s, background .15s;
}
.guide-editable-mode .guide-editable:hover {
  outline: 1px dashed rgba(96, 165, 250, .6); background: rgba(96, 165, 250, .06);
}
.guide-editable-mode .guide-editable.is-editing {
  outline: 2px solid rgba(96, 165, 250, .8); background: rgba(96, 165, 250, .1);
}
.admin-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25);
  color: var(--text); margin-bottom: 10px;
}
.guide-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.guide-hero { text-align: center; padding: 28px 0 20px; }
.guide-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.guide-hero p { color: var(--muted); max-width: 640px; margin: 0 auto; line-height: 1.55; }
.guide-section {
  margin-top: 28px; padding: 20px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.guide-section h2 { font-size: 20px; margin-bottom: 12px; }
.guide-section h3 { font-size: 15px; margin: 16px 0 8px; color: #c4b5fd; }
.guide-section p, .guide-section li { color: var(--muted); line-height: 1.6; font-size: 14px; }
.guide-section ul { padding-left: 18px; margin: 8px 0; }
.guide-diagram {
  margin: 16px 0; padding: 16px; border-radius: 12px;
  background: rgba(0,0,0,.25); border: 1px dashed rgba(255,255,255,.15);
  font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.45;
  overflow-x: auto; white-space: pre; color: #cbd5e1;
}
.guide-flow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0;
}
.guide-flow .step {
  padding: 12px; border-radius: 10px; text-align: center; font-size: 12px;
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3);
}
.guide-flow .arrow { display: none; }
.guide-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: rgba(236,72,153,.2); color: #fbcfe8; margin-right: 6px;
}
.guide-table-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.guide-table-legend span {
  font-size: 12px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.06);
}
.guide-table-legend .on { background: rgba(34,197,94,.2); color: #86efac; }
.guide-table-legend .today { background: rgba(249,115,22,.2); color: #fdba74; }
.guide-table-legend .pink { background: rgba(219,39,119,.25); color: #f9a8d4; }
