/* ==========================================================================
   Ev Programları — Stil dosyası
   Tailwind estetiğinde (slate/indigo palet, yuvarlak köşeler, yumuşak gölgeler),
   framework bağımlılığı olmadan saf CSS. Mobil öncelikli, responsive.
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --line: #eef1f6;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --edit: #f59e0b;
  --edit-50: #fffbeb;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, .28);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
kbd { font: 11px/1 var(--font); padding: 2px 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: #fff; }

.app { max-width: 1440px; margin: 0 auto; padding: 16px 20px 32px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.spacer { flex: 1; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: none; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--primary-600); }
.btn.ghost { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: #cbd5e1; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.danger-ghost { background: var(--danger-50); color: var(--danger); border-color: #fecaca; }
.btn.danger-ghost:hover { background: #fee2e2; }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .evt:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 0; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--line); color: var(--text); }
.icon-btn.sm { width: 24px; height: 24px; border-radius: 6px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.icon-btn.danger:hover { background: var(--danger-50); color: var(--danger); }
.link { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }

/* ---------- Üst çubuk ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .7); }
.brand h1 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }

/* Düzenleme modu anahtarı */
.mode-toggle {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 8px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); cursor: pointer; user-select: none; font-weight: 600; transition: all .2s;
}
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.mode-toggle input:checked + .switch { background: var(--edit); }
.mode-toggle input:checked + .switch::after { transform: translateX(16px); }
.mode-toggle input:focus-visible + .switch { outline: 2px solid var(--primary); outline-offset: 2px; }
.mode-label .edit-txt { display: none; }
.is-editing .mode-toggle { background: var(--edit-50); border-color: #fcd34d; color: #92400e; }
.is-editing .mode-label .edit-txt { display: inline; }
.is-editing .mode-label .view-txt { display: none; }

.edit-only { display: none !important; }
.is-editing .edit-only { display: inline-flex !important; }

.edit-banner {
  display: none; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--edit-50); border: 1px solid #fde68a; color: #78350f;
  animation: slideDown .2s ease;
}
.is-editing .edit-banner { display: flex; }
.edit-banner-actions { display: flex; gap: 8px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Ev sekmeleri ---------- */
.house-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.tab {
  --accent: var(--primary);
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600;
  white-space: nowrap; box-shadow: var(--shadow-sm); transition: all .15s;
}
.tab:hover { border-color: #cbd5e1; }
.tab.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.tab-count { font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 999px; background: var(--line); color: var(--muted); }
.tab.is-active .tab-count { background: var(--accent); color: #fff; }
.house-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Araç çubuğu ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.nav-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range-title { font-size: 17px; font-weight: 700; margin-left: 8px; letter-spacing: -.01em; }
.tool-right { display: flex; align-items: center; gap: 8px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: #e9edf3; }
.segmented button { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; }
.segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.filter-toggle { display: none; }

.filter-panel {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); background: #fff; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); min-width: 0; }
.select, .field input, .field select, .field textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; outline: 0;
}
.select { min-width: 180px; }
.select:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.color-filter { display: flex; align-items: center; gap: 8px; }
.color-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.color-chip { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sw-border); background: var(--sw-bg); padding: 0; transition: transform .12s; }
.color-chip:hover { transform: scale(1.12); }
.color-chip.is-active { background: var(--sw-border); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sw-border); }

.result-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px;
  border-radius: var(--radius-sm); background: var(--primary-50); color: #3730a3; font-size: 13px; }

/* ---------- Takvim kapsayıcı ---------- */
.calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.calendar[data-view="list"] { background: transparent; border: 0; box-shadow: none; overflow: visible; }

/* ---------- Program kartı ---------- */
.evt {
  position: relative; border-radius: 8px; background: var(--c-bg); color: var(--c-text);
  border-left: 4px solid var(--c-border); padding: 5px 8px; cursor: pointer; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.evt:hover { box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--c-border) 55%, transparent); z-index: 3; }
.evt-time { white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; }
.evt-repeat svg { width: 11px; height: 11px; }
.evt-title { font-weight: 600; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.evt-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; opacity: .8; margin-top: 2px; }
.evt-meta span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.evt-meta svg { width: 11px; height: 11px; }
.evt-desc { font-size: 12px; opacity: .8; margin-top: 4px; white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.evt-actions { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.evt-actions .icon-btn { background: rgba(255,255,255,.92); color: var(--text-2); box-shadow: var(--shadow-sm); }
.evt:hover .evt-actions, .evt:focus-within .evt-actions { opacity: 1; }
@media (hover: none) { .evt-actions { opacity: 1; } }
.is-editing .evt { outline: 1px dashed color-mix(in srgb, var(--c-border) 60%, transparent); outline-offset: -1px; }

.evt--grid { position: absolute; }
.evt--compact { padding: 2px 6px; display: flex; align-items: center; gap: 6px; }
.evt--compact .evt-time { flex-shrink: 0; }
.evt--compact .evt-title { -webkit-line-clamp: 1; font-size: 12px; }
.evt--compact .evt-meta { display: none; }
.evt--list { margin-top: 6px; padding: 8px 10px; }
.evt--list .evt-title { font-size: 14px; }
.evt--list .evt-actions { top: 6px; right: 6px; }

/* ---------- Saat ızgarası (Hafta / Gün) ---------- */
.tg-scroll { overflow: auto; max-height: calc(100vh - 230px); min-height: 420px; overscroll-behavior: contain; }
.tg-header, .tg-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(var(--col-min), 1fr)); min-width: max-content; }
.tg-header { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--border); }
.tg-corner { position: sticky; left: 0; background: var(--surface); z-index: 2; }
.tg-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 10px 4px; border-left: 1px solid var(--line); }
.tg-head-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.tg-head-sub { font-size: 12px; color: var(--muted); }
.tg-head.is-today .tg-head-sub { color: #fff; background: var(--primary); padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.tg-gutter { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--border); }
.tg-hour { position: relative; }
.tg-hour span { position: absolute; top: -7px; right: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface); padding: 0 2px; }
.tg-hour:first-child span { top: 2px; }
.tg-col { position: relative; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); }
.tg-col.is-today { background-color: #fafaff; }
.is-editing .tg-col { cursor: copy; }
.is-editing .tg-col:hover { background-color: #fffdf5; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 5; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }

/* ---------- Ay görünümü ---------- */
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mc-head { padding: 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .04em; }
.mc { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc:nth-child(7n) { border-right: 0; }
.mc.is-out { background: var(--surface-2); }
.mc.is-out .mc-num { color: #94a3b8; }
.mc-top { display: flex; align-items: center; justify-content: space-between; }
.mc-num { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; font-weight: 600; font-size: 13px; }
.mc-num:hover { background: var(--line); }
.mc.is-today .mc-num { background: var(--primary); color: #fff; }
.mc-add { opacity: .5; }
.mc:hover .mc-add { opacity: 1; }
.is-editing .mc { cursor: copy; }
.mc-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chip { display: flex; gap: 4px; align-items: center; width: 100%; min-width: 0; padding: 2px 6px; border-radius: 5px; border: 0;
  border-left: 3px solid var(--c-border); background: var(--c-bg); color: var(--c-text); font-size: 11.5px; text-align: left; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip b { font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.chip:hover { filter: brightness(.97); }
.mc-more { border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: left; padding: 1px 6px; }
.mc-more:hover { color: var(--primary); }
.mc-dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.mc-dots i { width: 6px; height: 6px; border-radius: 50%; }

/* ---------- Liste (evler yan yana) ---------- */
.list-view { display: grid; grid-template-columns: repeat(var(--cols), minmax(260px, 1fr)); gap: 14px; align-items: start; }
.lc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lc-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 4px solid var(--accent); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.lc-head h3 { font-size: 15px; font-weight: 700; flex: 1; }
.ld { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ld:last-child { border-bottom: 0; }
.ld.is-today { background: #fafaff; }
.ld-head { display: flex; align-items: center; gap: 8px; }
.ld-day { font-weight: 700; font-size: 13px; }
.ld-date { font-size: 12px; color: var(--muted); flex: 1; }
.ld.is-today .ld-date { color: var(--primary); font-weight: 600; }
.ld.is-today .ld-date::after { content: ' · Bugün'; }
.ld-empty { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .16s;
}
.modal-backdrop.is-open { opacity: 1; }
.modal {
  width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.98); transition: transform .16s;
}
.modal-backdrop.is-open .modal { transform: none; }
.modal--sm { max-width: 440px; } .modal--md { max-width: 520px; } .modal--lg { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; }
.modal-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.lead { font-size: 15px; color: var(--text-2); }

/* Form */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field > span em { color: var(--danger); font-style: normal; }
.field > span small { font-weight: 400; color: var(--muted); }
.field textarea { height: auto; padding: 8px 10px; resize: vertical; }
.field.is-disabled { opacity: .45; }
.row { display: grid; gap: 12px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1.4fr 1fr 1fr; }
.hint { font-size: 12px; color: var(--muted); margin-top: -6px; }
.hint:empty { display: none; }
.form-error { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--danger-50); color: var(--danger); font-size: 13px; font-weight: 500; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--primary-50); color: #3730a3; font-size: 13px; }
.note svg { margin-top: 2px; }
.note.warn { background: var(--edit-50); color: #92400e; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 9px; background: var(--sw-bg); border: 2px solid var(--sw-border); cursor: pointer; transition: transform .12s; position: relative; }
.swatch span:hover { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sw-border); }
.swatch input:checked + span::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: var(--sw-border); }
.swatch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 4px; }
.pin-input { letter-spacing: .4em; font-size: 18px !important; text-align: center; height: 44px !important; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Kapsam seçimi */
.scope-list { display: flex; flex-direction: column; gap: 8px; }
.scope-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: all .12s; }
.scope-opt:hover { background: var(--surface-2); }
.scope-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.scope-opt input { margin-top: 3px; accent-color: var(--primary); }
.scope-opt b { display: block; font-size: 14px; }
.scope-opt small { color: var(--muted); font-size: 12.5px; }
.scope-list + .hint { margin-top: 12px; }

/* Detay */
.detail { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.detail > div { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.detail dt { color: var(--muted); padding-top: 1px; }
.detail dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail dd.pre { white-space: pre-line; display: block; }
.detail-swatch { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid; }

/* Ayarlar */
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.house-row { display: flex; gap: 10px; align-items: center; }
.house-row input[type=color] { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.house-row input:not([type=color]) { flex: 1; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: 0; }
.house-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file-btn { cursor: pointer; }
.export-box { width: 100%; font: 12px/1.4 ui-monospace, Menlo, monospace; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }

/* ---------- Toast ---------- */
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: #0f172a; color: #fff; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: all .22s; }
.toast.is-open { opacity: 1; transform: none; }
.toast--success svg { color: #4ade80; }
.toast--error { background: #7f1d1d; }
.toast--info svg { color: #93c5fd; }

/* ---------- FAB ---------- */
.fab { position: fixed; right: 18px; bottom: 22px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--primary); color: #fff; font-size: 26px; box-shadow: 0 10px 25px -6px rgba(79, 70, 229, .6);
  align-items: center; justify-content: center; }
.fab:hover { background: var(--primary-600); }
@media (min-width: 769px) { .is-editing .fab { display: none !important; } }

.footer { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) { .hide-md { display: none; } }

@media (max-width: 768px) {
  .app { padding: 12px 12px 90px; }
  .hide-sm { display: none; }
  .brand-sub { display: none; }
  .brand h1 { font-size: 16px; }
  .brand-logo { width: 36px; height: 36px; }
  .mode-toggle { padding-right: 12px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .nav-group { justify-content: space-between; }
  .range-title { order: -1; width: 100%; margin: 0 0 4px; font-size: 16px; }
  .nav-group .btn { flex: 1; }
  .tool-right { justify-content: space-between; }
  .segmented { flex: 1; }
  .segmented button { flex: 1; padding: 0 6px; }
  .filter-toggle { display: inline-flex; }
  .filter-panel { display: none; }
  .filter-panel.is-open { display: flex; }
  .select { flex: 1; min-width: 0; }
  .tg-scroll { max-height: calc(100vh - 260px); }
  .list-view { grid-template-columns: 1fr; }
  .mc { min-height: 64px; padding: 4px 2px; }
  .mc-list, .mc-add { display: none; }
  .mc-dots { display: flex; }
  .mc-top { justify-content: center; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .row-3 > :first-child { grid-column: 1 / -1; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-foot { border-radius: 0; }
  .edit-banner { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
