/* myEnsim Reminder web arayüzü — bağımlılıksız, tek tema (aydınlık). */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #dfe4ec;
  --text: #1c2431;
  --muted: #64748b;
  --brand: #1f4b99;
  --brand-2: #163a78;
  --brand-soft: #e6eefb;
  --danger: #c2410c;
  --danger-soft: #fff1ea;
  --success: #15803d;
  --success-soft: #e9f8ef;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --info: #0369a1;
  --info-soft: #e6f4fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
}
a {
  color: var(--brand);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
code,
pre {
  font-family: var(--mono);
  font-size: 12.5px;
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* ---------- iskelet ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
}
.brand b {
  color: var(--brand);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}
.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}
.chip.on .dot {
  background: var(--success);
}
.chip strong {
  color: var(--text);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
}

.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.nav-group + .nav-group {
  margin-top: 18px;
}
.nav-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 10px 6px;
}
.nav-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.nav-link:hover {
  background: var(--surface-2);
}
.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-2);
  font-weight: 600;
}
.content {
  flex: 1;
  min-width: 0;
  padding: 24px;
  max-width: 1200px;
}

/* ---------- giriş ekranı: oturum yokken tam sayfa, sade ---------- */
.app.locked .topbar,
.app.locked .sidebar,
.app.locked .nav-toggle,
.app.locked .topbar-right {
  display: none !important;
}
.app.locked {
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(31, 75, 153, 0.14), transparent 60%),
    radial-gradient(50rem 36rem at 110% 110%, rgba(31, 75, 153, 0.12), transparent 55%),
    var(--bg);
}
.app.locked .layout {
  align-items: center;
  justify-content: center;
}
.app.locked .content {
  max-width: none;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 32px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.1);
  text-align: center;
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.login-title {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.login-title b {
  color: var(--brand);
  font-weight: 700;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
/* Simgeli alan: sol tarafta ikon, parolada sağda göster/gizle. */
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon > svg {
  position: absolute;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
}
/* `input[type='text']` genel kuralıyla aynı öncelikte kalmasın diye [type] seçicisi eklendi:
   aksi halde sol boşluk uygulanmıyor ve metin simgenin altına giriyor. */
.input-icon > input[type] {
  height: 46px;
  padding: 0 14px 0 40px;
  border-radius: 10px;
  font-size: 15px;
}
.input-icon > input[type='password'] {
  padding-right: 46px;
}
.input-icon > input[type]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 75, 153, 0.15);
}
.input-icon > .reveal {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}
.input-icon > .reveal:hover {
  background: var(--surface-2);
  color: var(--text);
}
.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  white-space: pre-line;
}
.login-error[hidden] {
  display: none !important;
}
.btn.block {
  width: 100%;
  justify-content: center;
  height: 46px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

/* ---------- başlık, kart, bölüm ---------- */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
}
.page-header p {
  margin: 4px 0 0;
  color: var(--muted);
}
.page-header .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card,
.section + .section {
  margin-top: 16px;
}
.section h2 {
  font-size: 15px;
  margin: 0 0 10px;
  font-weight: 650;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.stat .label {
  color: var(--muted);
  font-size: 12.5px;
}
.stat .value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.stat.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.stat.danger .value {
  color: var(--danger);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 12px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.callout {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.callout.warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}
.instructions {
  margin-top: 16px;
  background: var(--surface-2);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px 16px;
}
.instructions h3 {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.instructions p {
  margin: 0;
  white-space: pre-wrap;
}

/* ---------- tablo ---------- */
.table-wrap {
  overflow-x: auto;
}
/* Uzun tablolar kendi içinde kayar; sayfa aşağı kaymaz. */
.table-wrap.scroll {
  max-height: 420px;
  overflow-y: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover td {
  background: #f6f8fc;
}
td .title {
  font-weight: 600;
}
td .sub {
  color: var(--muted);
  font-size: 12.5px;
}
.nowrap {
  white-space: nowrap;
}
.kv {
  width: 100%;
}
.kv td:first-child {
  white-space: nowrap;
  color: var(--muted);
  width: 190px;
}

/* ---------- rozetler ---------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2f7;
  color: #334155;
  white-space: nowrap;
}
.badge.Scheduled,
.badge.Pending {
  background: var(--info-soft);
  color: var(--info);
}
.badge.Processing {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.Sent,
.badge.Delivered {
  background: var(--success-soft);
  color: var(--success);
}
.badge.Read {
  background: #ecfdf5;
  color: #047857;
}
.badge.Snoozed {
  background: #f3e8ff;
  color: #6b21a8;
}
.badge.Completed {
  background: #e2e8f0;
  color: #334155;
}
.badge.Cancelled {
  background: #f1f5f9;
  color: #64748b;
}
.badge.Failed,
.badge.overdue {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge.prio-Low {
  background: #f1f5f9;
  color: #475569;
}
.badge.prio-Normal {
  background: var(--brand-soft);
  color: var(--brand-2);
}
.badge.prio-High {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.prio-Critical {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.field > label {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field .hint,
.form-section > .hint {
  color: var(--muted);
  font-size: 12px;
}
/* Açıklamalar "i" düğmesinin arkasında: ekran sade kalır. */
.info-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.info-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='url'],
input[type='search'],
input[type='datetime-local'],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 75, 153, 0.15);
}
textarea {
  resize: vertical;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.check input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 14px;
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}
.form-section + .form-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.form-section h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
}
.form-section > .hint {
  margin: 0 0 10px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.filters .field > label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.duration {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}
.kv-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kv-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 8px;
  align-items: center;
}
.rrule {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rrule-custom {
  display: flex;
  gap: 8px;
  align-items: center;
}

.follow-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.follow-up[hidden] {
  display: none !important;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
}
.field-error[hidden] {
  display: none !important;
}

.preview {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.preview-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-2);
}
.preview-first {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.preview-rest,
.preview-note {
  font-size: 12.5px;
  color: var(--muted);
}

.req {
  color: var(--danger);
  font-weight: 600;
  font-size: 12px;
  margin-left: 6px;
}

/* ---------- düğmeler ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover {
  background: var(--surface-2);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover {
  background: var(--brand-2);
}
.btn.danger {
  color: var(--danger);
  border-color: #f3c7b3;
}
.btn.danger:hover {
  background: var(--danger-soft);
}
.btn.sm {
  padding: 5px 10px;
  font-size: 12.5px;
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- alıcı seçici ---------- */
.picker {
  position: relative;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 8px;
}
.chip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-size: 13px;
}
.chip-item.self {
  background: var(--success-soft);
  color: var(--success);
}
.chip-item .flag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}
.chip-item .flag.warn {
  color: var(--danger);
}
.chip-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 4px;
  color: inherit;
  opacity: 0.7;
}
.chip-remove:hover {
  opacity: 1;
}
.picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.picker-panel {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px;
}
.picker-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}
.picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.picker-item:hover {
  background: var(--surface-2);
}
.picker-item.selected {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.picker-item .check-box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--brand);
  background: #fff;
  flex: 0 0 18px;
}
.picker-item .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.picker-item .who .title {
  font-weight: 600;
}
.picker-item .who .sub {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-item .flags {
  white-space: nowrap;
}

/* ---------- kanallar ---------- */
.channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}
.check.channel {
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.check.channel input {
  margin-top: 3px;
}
.check.channel .hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- takvim ---------- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-grid.head {
  margin-bottom: 6px;
}
.cal-head {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 4px 0;
}
.cal-cell {
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.cal-cell.empty {
  border: none;
  background: transparent;
}
.cal-cell.today {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.cal-cell.has-items {
  background: var(--surface-2);
}
.cal-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--muted);
}
.cal-item {
  display: block;
  font-size: 11.5px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-2);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-item .time {
  font-weight: 700;
}
.cal-item.prio-High {
  background: var(--warn-soft);
  color: var(--warn);
}
.cal-item.prio-Critical {
  background: var(--danger-soft);
  color: var(--danger);
}
.cal-item.prio-Low {
  background: #f1f5f9;
  color: #475569;
}
.cal-more {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- detay ---------- */
.detail-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.detail-head h1 {
  margin: 0;
  font-size: 20px;
}
.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 20px;
  margin-top: 16px;
}
.prop .k {
  font-size: 12px;
  color: var(--muted);
}
.prop .v {
  font-weight: 500;
  word-break: break-word;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 18px 0 12px;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 500;
}
.tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
}
.url-box {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.url-box pre {
  flex: 1;
}

/* ---------- bildirim ve modal ---------- */
.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
  max-width: min(420px, 90vw);
}
.toast {
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s;
  white-space: pre-line;
  font-size: 13px;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error {
  background: #7f1d1d;
}
.toast.success {
  background: #14532d;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 16px;
}
/* [hidden] `display:flex` tarafından ezilmemeli: gizli arka plan sayfayı karartırdı. */
.modal-backdrop[hidden] {
  display: none !important;
}
.modal {
  background: var(--surface);
  border-radius: 12px;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.modal.wide {
  width: min(820px, 100%);
}
.modal header {
  padding: 16px 20px 0;
  font-size: 16px;
  font-weight: 650;
}
.modal .modal-body {
  padding: 14px 20px;
}
.modal footer {
  padding: 0 20px 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.secret-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
  font-family: var(--mono);
  word-break: break-all;
}

/* ---------- mobil ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s;
    z-index: 30;
    overflow-y: auto;
  }
  .sidebar.open {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  .content {
    padding: 16px;
  }
  .topbar-right .chip .label-text {
    display: none;
  }
  .cal-cell {
    min-height: 72px;
  }
  .cal-item {
    font-size: 10.5px;
  }
  .kv-row {
    grid-template-columns: 1fr 1fr auto;
  }
}
