:root {
  --cream: #FBF8F3;
  --paper: #F4EFE6;
  --ink: #1A1612;
  --ink-soft: #5C534A;
  --ink-muted: #8B8278;
  --teal: #1F4F4A;
  --teal-dark: #163936;
  --coral: #C7484B;
  --coral-light: #F0DADB;
  --purple: #6B4A8B;
  --purple-light: #E8DEF0;
  --amber: #C7763B;
  --yellow: #D4A52A;
  --yellow-light: #F5EAC4;
  --green: #4A6B3F;
  --indigo: #3F4C6B;
  --indigo-light: #DDE3EE;
  --blue: #2F6F8F;
  --blue-light: #DCEBF2;
  --red: #B83E42;
  --red-light: #F2DADB;
  --line: #D9D2C5;
  --line-light: #ECE6D8;
  --shadow: 0 1px 3px rgba(26, 22, 18, 0.04), 0 4px 16px rgba(26, 22, 18, 0.04);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--cream); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: 'Segoe UI', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: 30px; line-height: 1.1; font-variation-settings: "opsz" 72; }
h2 { font-size: 21px; line-height: 1.2; margin-bottom: 14px; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 600; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; letter-spacing: 0; }
p { color: var(--ink-soft); }
code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 0.9em; background: var(--paper); padding: 1px 5px; border-radius: 3px; }
.container {
  max-width: 920px;
  margin: 0 auto;
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-light);
  padding: 32px 28px;
}
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-light);
  gap: 16px;
  flex-wrap: wrap;
}
.header-bar .subtitle {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--paper);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
}
.user-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* Forms */
.form-group { margin-bottom: 16px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: white;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 79, 74, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--teal);
  color: white;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--paper); }
.btn-danger { background: var(--coral); }
.btn-danger:hover { background: #a73a3d; }
.btn-ghost { background: transparent; color: var(--ink-soft); padding: 8px 12px; }
.btn-ghost:hover { background: var(--paper); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 3px solid;
}
.alert-info { background: var(--paper); border-color: var(--teal); color: var(--ink-soft); }
.alert-warning { background: #FBF1E3; border-color: var(--amber); color: #6B4517; }
.alert-success { background: #EDF1E8; border-color: var(--green); color: #2F4226; }
.alert-danger { background: var(--coral-light); border-color: var(--coral); color: #6B2024; }

/* Tabs */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab.active { border-bottom-color: var(--teal); color: var(--ink); }
.tab:hover { color: var(--ink); }
.tab.cat-nobet.active { border-bottom-color: var(--coral); }
.tab.cat-izin.active { border-bottom-color: var(--purple); }
.tab.cat-kongre.active { border-bottom-color: var(--yellow); }
.tab.cat-rotasyon.active { border-bottom-color: var(--indigo); }
.tab.cat-ders.active { border-bottom-color: var(--blue); }
.tab.cat-rapor.active { border-bottom-color: var(--red); }
.tab.cat-ozelnobet.active { border-bottom-color: var(--green); }

/* Month navigator */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  background: var(--paper);
  border-radius: 10px;
}
.month-nav select {
  width: auto;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}
.month-nav button {
  background: white;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
  font-family: inherit;
}
.month-nav button:hover { background: var(--cream); }

/* Calendar */
.calendar-wrap {
  background: var(--paper);
  border-radius: 12px;
  padding: 18px 14px;
  margin: 14px 0;
}
.calendar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.day-header {
  text-align: center;
  font-size: 11px;
  color: var(--ink-muted);
  padding: 4px 0;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--line-light);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  user-select: none;
  transition: all 0.12s;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.day-cell:hover { transform: translateY(-1px); }
.day-cell.empty {
  background: transparent;
  border: none;
  cursor: default;
}
.day-cell.empty:hover { transform: none; }
.day-cell.weekend { color: var(--ink-muted); }
.day-cell.locked { cursor: not-allowed; opacity: 0.75; }
.day-cell.locked:hover { transform: none; }

/* Category colors */
.day-cell.cat-nobet { background: var(--coral); color: white; border-color: var(--coral); }
.day-cell.cat-izin { background: var(--purple); color: white; border-color: var(--purple); }
.day-cell.cat-kongre { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.day-cell.cat-rotasyon { background: var(--indigo); color: white; border-color: var(--indigo); }
.day-cell.cat-ders { background: var(--blue); color: white; border-color: var(--blue); }
.day-cell.cat-rapor { background: var(--red); color: white; border-color: var(--red); }
.day-cell.cat-ozelnobet { background: var(--green); color: white; border-color: var(--green); }

.day-cell:hover:not(.locked):not(.empty) {
  filter: brightness(0.95);
}

/* Multi-category indicator dots */
.day-cell .indicators {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}
.day-cell .indicators .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

/* Legend */
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 10px;
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 14px; border-radius: 4px; }
.legend-swatch.cat-nobet { background: var(--coral); }
.legend-swatch.cat-izin { background: var(--purple); }
.legend-swatch.cat-kongre { background: var(--yellow); }
.legend-swatch.cat-rotasyon { background: var(--indigo); }
.legend-swatch.cat-ders { background: var(--blue); }
.legend-swatch.cat-rapor { background: var(--red); }
.legend-swatch.cat-ozelnobet { background: var(--green); }

/* Range input */
.range-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 14px;
  background: var(--paper);
  border-radius: 10px;
}
.range-row .range-inputs { display: flex; gap: 8px; align-items: flex-end; flex: 1; min-width: 200px; flex-wrap: wrap; }
.range-row label { margin-bottom: 4px; font-size: 12px; }
.range-row input { padding: 8px 10px; font-size: 14px; }

/* Kongre details section */
.kongre-section {
  margin-top: 16px;
  padding: 14px;
  background: var(--yellow-light);
  border-radius: 10px;
  border-left: 3px solid var(--yellow);
}
.kongre-section h3 { margin-bottom: 8px; font-size: 14px; }


.detail-section {
  margin-top: 16px;
  padding: 14px;
  background: var(--paper);
  border-radius: 10px;
  border-left: 3px solid var(--teal);
}
.detail-section.kongre-detail { background: var(--yellow-light); border-left-color: var(--yellow); }
.detail-section.ders-detail { background: var(--blue-light); border-left-color: var(--blue); }
.detail-section.rapor-detail { background: var(--red-light); border-left-color: var(--red); }
.detail-section.ozelnobet-detail { background: #E7F0E4; border-left-color: var(--green); }
.detail-section.rotasyon-detail { background: var(--indigo-light); border-left-color: var(--indigo); }
.detail-section h3 { margin-bottom: 8px; font-size: 14px; }
.detail-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(200px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(26, 22, 18, 0.08);
}
.detail-row.detail-row-rotasyon {
  grid-template-columns: minmax(170px, 0.8fr) minmax(190px, 1.1fr) minmax(130px, 0.7fr);
}
.detail-row:first-of-type { border-top: none; }
.detail-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.detail-name-input, .detail-type-select { padding: 9px 12px !important; font-size: 14px !important; }
.detail-type-select { min-width: 130px; }
.report-stats, .status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.stat-card {
  background: white;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: 12px;
}
.stat-card .stat-num {
  font-family: 'Segoe UI', Georgia, serif;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}
.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}
.status-table th, .status-table td {
  border-bottom: 1px solid var(--line-light);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}
.status-table th {
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 700;
}
.status-pill {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--paper);
  margin: 1px 2px 1px 0;
  font-variant-numeric: tabular-nums;
}
.status-metrics .status-pill {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 4px 0;
  white-space: nowrap;
}
.status-note {
  display: block;
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.35;
}

/* Resident table */
.resident-list {
  background: white;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  overflow: hidden;
}
.resident-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 14px;
  border-bottom: 1px solid var(--line-light);
}
.resident-row:last-child { border-bottom: none; }
.resident-row .name { font-weight: 600; min-width: 70px; font-variant-caps: small-caps; letter-spacing: 0.05em; }
.resident-row .meta { color: var(--ink-muted); font-size: 13px; flex: 1; }
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
}
.checkbox-wrap input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--green); }

/* Slot list (admin editable) */
.slot-list-header {
  display: grid;
  grid-template-columns: 28px 1fr 110px 80px 36px;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.slot-list {
  background: white;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  overflow: hidden;
}
.slot-row {
  display: grid;
  grid-template-columns: 28px 1fr 110px 80px 36px;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-light);
}
.slot-row:last-child { border-bottom: none; }
.slot-row:hover { background: #FCFAF5; }
.slot-num {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.slot-name, .slot-pass {
  padding: 7px 10px;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  color: var(--ink);
}
.slot-name:hover, .slot-pass:hover { border-color: var(--line); background: white; }
.slot-name:focus, .slot-pass:focus {
  outline: none;
  border-color: var(--teal);
  background: white;
  box-shadow: 0 0 0 2px rgba(31, 79, 74, 0.1);
}
.slot-name { font-weight: 600; }
.slot-pass { font-family: monospace; }
.slot-meta { font-size: 12px; color: var(--ink-muted); }
.clear-slot-btn {
  padding: 4px 8px !important;
  font-size: 14px !important;
  color: var(--ink-muted);
}
.clear-slot-btn:hover { color: var(--coral); background: var(--coral-light); }

/* Summary */
.summary-box {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: 20px;
  font-size: 13.5px;
  line-height: 1.7;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.summary-resident { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.summary-resident:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.summary-resident .res-name {
  font-weight: 700;
  color: var(--ink);
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
  font-size: 15px;
  margin-bottom: 4px;
}
.summary-resident .res-line {
  margin-left: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}
.summary-resident .res-label {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  min-width: 70px;
}
.summary-resident .empty-tok { color: var(--ink-muted); font-style: italic; }
.summary-resident .kongre-note {
  margin-left: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-style: italic;
}

/* Month-section in summary */
.month-section { margin-bottom: 8px; }
.month-section .mname {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Utility */
.muted { color: var(--ink-muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 28px; }
.mb-2 { margin-bottom: 12px; }
.divider { height: 1px; background: var(--line-light); margin: 24px 0; }
.cred-hint {
  background: var(--paper);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 16px;
  font-family: monospace;
  line-height: 1.7;
}
.cred-hint b { color: var(--ink-soft); }
.cred-hint .role { display: block; margin-top: 4px; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #EDF1E8;
  border-radius: 999px;
  font-size: 11px;
  color: #4A6B3F;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.sync-chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }


/* Maintenance */
.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.maintenance-card {
  background: linear-gradient(135deg, rgba(14, 22, 36, 0.96), rgba(24, 18, 40, 0.94));
  border: 1px solid rgba(83, 229, 255, 0.18);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 0 18px rgba(83, 229, 255, 0.08);
}
.maintenance-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon-cyan);
  font-variant-numeric: tabular-nums;
}
.maintenance-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}
.maintenance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.maintenance-table th, .maintenance-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(83, 229, 255, 0.10);
  text-align: left;
  vertical-align: top;
}
.maintenance-table th {
  color: var(--neon-cyan);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(83, 229, 255, 0.08);
}
.maintenance-table td { font-size: 12px; color: var(--ink-soft); }
.warning-strong { color: #ffb2c2; font-weight: 700; }

@media (max-width: 520px) {
  body { padding: 12px 8px; }
  .container { padding: 22px 18px; }
  h1 { font-size: 24px; }
  .day-cell { font-size: 13px; border-radius: 5px; }
  .calendar-grid { gap: 4px; }
  .slot-list-header { display: none; }
  .slot-row { grid-template-columns: 24px 1fr 90px 30px; }
  .slot-row .slot-meta { display: none; }
  .detail-row { grid-template-columns: 1fr; }
}


/* ============================================================
   RETRO DARK SCI-FI THEME OVERRIDES
   ============================================================ */
:root {
  --cream: #06070B;
  --paper: #0E1118;
  --ink: #F4F7FB;
  --ink-soft: #B8C2D6;
  --ink-muted: #748098;
  --teal: #18E0C3;
  --teal-dark: #0CA993;
  --coral: #FF4D6D;
  --coral-light: rgba(255, 77, 109, 0.16);
  --purple: #B46CFF;
  --purple-light: rgba(180, 108, 255, 0.16);
  --amber: #FF9F1C;
  --yellow: #FFD166;
  --yellow-light: rgba(255, 209, 102, 0.14);
  --green: #78FFB7;
  --indigo: #6A7CFF;
  --indigo-light: rgba(106, 124, 255, 0.16);
  --blue: #3CDFFF;
  --blue-light: rgba(60, 223, 255, 0.15);
  --red: #FF375F;
  --red-light: rgba(255, 55, 95, 0.15);
  --line: rgba(157, 186, 255, 0.20);
  --line-light: rgba(157, 186, 255, 0.11);
  --neon-cyan: #53E5FF;
  --shadow: 0 20px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(96, 140, 255, 0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}
html, body { background: #05060A; color: var(--ink); }
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(60, 223, 255, 0.14) 0, transparent 24%),
    radial-gradient(circle at 87% 12%, rgba(180, 108, 255, 0.13) 0, transparent 25%),
    radial-gradient(circle at 80% 88%, rgba(255, 77, 109, 0.10) 0, transparent 28%),
    linear-gradient(135deg, #05060A 0%, #090B12 42%, #11131C 100%);
  color: var(--ink);
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9), transparent 78%);
  opacity: 0.55;
}
.container {
  background:
    linear-gradient(145deg, rgba(22, 27, 40, 0.92), rgba(9, 11, 17, 0.96)),
    radial-gradient(circle at top left, rgba(24, 224, 195, 0.13), transparent 38%);
  border: 1px solid rgba(131, 165, 255, 0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.header-bar {
  border-bottom: 1px solid rgba(131, 165, 255, 0.16);
}
h1 {
  color: var(--ink);
  text-shadow: 0 0 24px rgba(60, 223, 255, 0.20);
}
.header-bar h1 {
  display: inline-block;
  background: linear-gradient(90deg, #F4F7FB 0%, #75F7E8 36%, #B46CFF 72%, #FFD166 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2, h3 { color: #F7FAFF; }
p, .muted, label { color: var(--ink-soft); }
code {
  background: rgba(255,255,255,0.06);
  color: #9AF6E9;
  border: 1px solid rgba(154,246,233,0.16);
}
.user-chip, .sync-chip {
  background: linear-gradient(135deg, rgba(60,223,255,0.12), rgba(180,108,255,0.11));
  border: 1px solid rgba(131, 165, 255, 0.20);
  color: #DDE7FF;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 18px rgba(60,223,255,0.07);
}
.user-chip .dot, .sync-chip::before { background: #78FFB7; box-shadow: 0 0 10px rgba(120,255,183,0.75); }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  background: linear-gradient(180deg, rgba(12,15,23,0.96), rgba(18,22,32,0.94));
  color: #F4F7FB;
  border: 1px solid rgba(131, 165, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
input::placeholder, textarea::placeholder { color: rgba(184,194,214,0.55); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(24,224,195,0.82);
  box-shadow: 0 0 0 3px rgba(24,224,195,0.12), 0 0 24px rgba(24,224,195,0.13);
}
select option { background: #0E1118; color: #F4F7FB; }
.btn {
  background: linear-gradient(135deg, #14C8B0 0%, #5B6DFF 100%);
  color: white;
  box-shadow: 0 8px 22px rgba(20,200,176,0.18), inset 0 1px 0 rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn:hover { background: linear-gradient(135deg, #20E7C9 0%, #7685FF 100%); }
.btn-secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  color: #DDE7FF;
  border: 1px solid rgba(131, 165, 255, 0.24);
  box-shadow: none;
}
.btn-secondary:hover { background: rgba(131,165,255,0.12); }
.btn-danger { background: linear-gradient(135deg, #FF375F, #A42AFF); }
.btn-danger:hover { background: linear-gradient(135deg, #FF5877, #B951FF); }
.btn-ghost { color: #C6D0E8; background: rgba(255,255,255,0.025); box-shadow: none; }
.btn-ghost:hover { background: rgba(255,255,255,0.075); }
.alert {
  background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid rgba(131,165,255,0.14);
  border-left-width: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.alert-info { border-left-color: #3CDFFF; color: #C9D6F0; }
.alert-warning { border-left-color: #FFD166; color: #FFE3A3; }
.alert-success { border-left-color: #78FFB7; color: #C9FFE0; }
.alert-danger { border-left-color: #FF4D6D; color: #FFC7D1; }
.tab-bar {
  background: rgba(6,8,14,0.78);
  border: 1px solid rgba(131,165,255,0.13);
  border-radius: 14px;
  padding: 6px;
  gap: 6px;
}
.tab {
  border: 1px solid transparent;
  border-radius: 10px;
  color: #98A4BD;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  margin-bottom: 0;
}
.tab:hover { color: #F4F7FB; background: rgba(255,255,255,0.055); }
.tab.active {
  color: #FFFFFF;
  border-color: rgba(60,223,255,0.28);
  background: linear-gradient(135deg, rgba(60,223,255,0.14), rgba(180,108,255,0.12));
  box-shadow: 0 0 20px rgba(60,223,255,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
}
.tab.cat-nobet.active { background: linear-gradient(135deg, rgba(255,77,109,0.28), rgba(255,159,28,0.10)); border-color: rgba(255,77,109,0.35); }
.tab.cat-izin.active { background: linear-gradient(135deg, rgba(180,108,255,0.28), rgba(60,223,255,0.09)); border-color: rgba(180,108,255,0.36); }
.tab.cat-kongre.active { background: linear-gradient(135deg, rgba(255,209,102,0.30), rgba(255,159,28,0.10)); border-color: rgba(255,209,102,0.45); }
.tab.cat-rotasyon.active { background: linear-gradient(135deg, rgba(106,124,255,0.30), rgba(24,224,195,0.09)); border-color: rgba(106,124,255,0.38); }
.tab.cat-ders.active { background: linear-gradient(135deg, rgba(60,223,255,0.28), rgba(24,224,195,0.10)); border-color: rgba(60,223,255,0.40); }
.tab.cat-rapor.active { background: linear-gradient(135deg, rgba(255,55,95,0.32), rgba(180,108,255,0.10)); border-color: rgba(255,55,95,0.45); }
.tab.cat-ozelnobet.active { background: linear-gradient(135deg, rgba(120,255,183,0.30), rgba(255,209,102,0.10)); border-color: rgba(120,255,183,0.45); }
.month-nav, .calendar-wrap, .summary-box, .range-row, .report-stats .stat-card, .resident-list, .slot-list, .detail-section, .kongre-section, .status-table-wrap {
  background: linear-gradient(145deg, rgba(14,18,29,0.92), rgba(8,10,16,0.86));
  border: 1px solid rgba(131,165,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 14px 36px rgba(0,0,0,0.22);
}
.month-nav button {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(131,165,255,0.20);
  color: #F4F7FB;
}
.month-nav button:hover { background: rgba(60,223,255,0.12); }
.day-header { color: #7F8DA8; }
.day-cell {
  background: linear-gradient(180deg, rgba(18,22,32,0.95), rgba(11,13,20,0.95));
  color: #DDE7FF;
  border: 1px solid rgba(131,165,255,0.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.day-cell:hover { box-shadow: 0 0 18px rgba(60,223,255,0.14), inset 0 1px 0 rgba(255,255,255,0.08); }
.day-cell.weekend { color: #79859F; background: linear-gradient(180deg, rgba(12,15,22,0.9), rgba(7,9,14,0.9)); }
.day-cell.empty { background: transparent; box-shadow: none; }
.day-cell.cat-nobet { background: linear-gradient(135deg, #FF375F, #8F1D44); color: #fff; border-color: rgba(255,77,109,0.65); box-shadow: 0 0 16px rgba(255,77,109,0.28); }
.day-cell.cat-nobet-auto { background: linear-gradient(135deg, rgba(255,55,95,0.28), rgba(143,29,68,0.10)); color: #FFD6DE; border-color: rgba(255,77,109,0.35); box-shadow: inset 0 0 0 1px rgba(255,77,109,0.22), 0 0 10px rgba(255,77,109,0.10); }
.day-cell.cat-nobet-auto::after { content: "•"; position: absolute; right: 6px; bottom: 2px; font-size: 13px; color: rgba(255,214,222,0.85); }
.day-cell.cat-izin { background: linear-gradient(135deg, #B46CFF, #5030B6); color: #fff; border-color: rgba(180,108,255,0.65); box-shadow: 0 0 16px rgba(180,108,255,0.25); }
.day-cell.cat-kongre { background: linear-gradient(135deg, #FFD166, #B87300); color: #17120A; border-color: rgba(255,209,102,0.65); box-shadow: 0 0 16px rgba(255,209,102,0.25); }
.day-cell.cat-rotasyon { background: linear-gradient(135deg, #6A7CFF, #23318D); color: #fff; border-color: rgba(106,124,255,0.65); box-shadow: 0 0 16px rgba(106,124,255,0.25); }
.day-cell.cat-ders { background: linear-gradient(135deg, #3CDFFF, #087B91); color: #031014; border-color: rgba(60,223,255,0.65); box-shadow: 0 0 16px rgba(60,223,255,0.24); }
.day-cell.cat-rapor { background: linear-gradient(135deg, #FF4D6D, #9C1535); color: #fff; border-color: rgba(255,77,109,0.70); box-shadow: 0 0 18px rgba(255,77,109,0.28); }
.day-cell.cat-ozelnobet { background: linear-gradient(135deg, #78FFB7, #1B7B55); color: #03140C; border-color: rgba(120,255,183,0.70); box-shadow: 0 0 18px rgba(120,255,183,0.24); }
.day-cell.soft-locked { opacity: 0.38; cursor: not-allowed; background: linear-gradient(180deg, rgba(9,11,17,0.75), rgba(5,6,10,0.85)); border-style: dashed; }
.legend-swatch.cat-nobet { background: linear-gradient(135deg, #FF375F, #8F1D44); }
.legend-swatch.cat-nobet-auto { background: linear-gradient(135deg, rgba(255,55,95,0.34), rgba(143,29,68,0.18)); border: 1px solid rgba(255,77,109,0.45); }
.legend-swatch.cat-izin { background: linear-gradient(135deg, #B46CFF, #5030B6); }
.legend-swatch.cat-kongre { background: linear-gradient(135deg, #FFD166, #B87300); }
.legend-swatch.cat-rotasyon { background: linear-gradient(135deg, #6A7CFF, #23318D); }
.legend-swatch.cat-ders { background: linear-gradient(135deg, #3CDFFF, #087B91); }
.legend-swatch.cat-rapor { background: linear-gradient(135deg, #FF4D6D, #9C1535); }
.legend-swatch.cat-ozelnobet { background: linear-gradient(135deg, #78FFB7, #1B7B55); }
.resident-row, .slot-row {
  border-bottom-color: rgba(131,165,255,0.11);
  background: transparent;
}
.resident-row:hover, .slot-row:hover { background: rgba(60,223,255,0.045); }
.slot-name, .slot-pass {
  color: #F4F7FB;
  background: rgba(255,255,255,0.025);
}
.slot-name:hover, .slot-pass:hover { background: rgba(255,255,255,0.055); border-color: rgba(131,165,255,0.20); }
.summary-resident { border-bottom-color: rgba(131,165,255,0.12); }
.summary-resident .res-name { color: #F7FAFF; text-shadow: 0 0 14px rgba(60,223,255,0.10); }
.summary-resident .res-line, .summary-resident .kongre-note { color: #B8C2D6; }
.summary-resident .res-label { color: #7F8DA8; }
.empty-tok { color: #748098 !important; }
.detail-section.kongre-detail { border-left: 3px solid #FFD166; }
.detail-section.rotasyon-detail { border-left: 3px solid #6A7CFF; }
.detail-section.ders-detail { border-left: 3px solid #3CDFFF; }
.detail-section.rapor-detail { border-left: 3px solid #FF4D6D; }
.detail-section.ozelnobet-detail { border-left: 3px solid #78FFB7; }
.detail-date-badge {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(131,165,255,0.16);
  color: #DDE7FF;
}
.stat-card .stat-num { color: #75F7E8; text-shadow: 0 0 18px rgba(117,247,232,0.22); }
.stat-card .stat-label { color: #9AA8C2; }
.status-table th { color: #75F7E8; background: rgba(60,223,255,0.06); }
.status-table td { border-top-color: rgba(131,165,255,0.10); color: #DDE7FF; }
.divider { background: rgba(131,165,255,0.13); }
.security-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(60,223,255,0.08), rgba(180,108,255,0.05));
  border: 1px solid rgba(131,165,255,0.16);
  color: #AEBAD3;
  font-size: 12px;
}
.password-card {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(14,18,29,0.92), rgba(8,10,16,0.86));
  border: 1px solid rgba(131,165,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 14px 36px rgba(0,0,0,0.22);
}
.password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}
.admin-edit-banner {
  border-left-color: #FFD166;
  background: linear-gradient(135deg, rgba(255,209,102,0.12), rgba(60,223,255,0.04));
}
.status-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.status-table { min-width: 760px; }

/* Maintenance */
.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.maintenance-card {
  background: linear-gradient(135deg, rgba(14, 22, 36, 0.96), rgba(24, 18, 40, 0.94));
  border: 1px solid rgba(83, 229, 255, 0.18);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 0 18px rgba(83, 229, 255, 0.08);
}
.maintenance-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon-cyan);
  font-variant-numeric: tabular-nums;
}
.maintenance-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}
.maintenance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.maintenance-table th, .maintenance-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(83, 229, 255, 0.10);
  text-align: left;
  vertical-align: top;
}
.maintenance-table th {
  color: var(--neon-cyan);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(83, 229, 255, 0.08);
}
.maintenance-table td { font-size: 12px; color: var(--ink-soft); }
.warning-strong { color: #ffb2c2; font-weight: 700; }

@media (max-width: 520px) {
  body { padding: 10px 6px; }
  .container { padding: 18px 12px; border-radius: 10px; }
  .tab { padding: 9px 12px; }
  .status-table { min-width: 720px; }
  .password-grid { grid-template-columns: 1fr; }
}
