/* style.css — Idenfit Panel ortak stiller */

:root {
  --paper: #f6f3ec;
  --paper-2: #fffdf8;
  --ink: #1d1b16;
  --ink-soft: #5c574c;
  --line: #e3ddd0;
  --line-strong: #d3ccba;
  --accent: #0f7a5a;
  --accent-deep: #0a5b43;
  --accent-soft: #e4f1eb;
  --danger: #b23b2e;
  --danger-soft: #f7e6e3;
  --warn: #b07d10;
  --shadow: 0 1px 2px rgba(29, 27, 22, 0.06), 0 8px 24px rgba(29, 27, 22, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Bricolage Grotesque', Georgia, serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(15, 122, 90, 0.05), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(176, 125, 16, 0.045), transparent 32%);
  min-height: 100vh;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
a { color: var(--accent-deep); }

/* --- Butonlar --- */
.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* Siralanabilir sutun basliklari */
th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]:hover { color: var(--ink); }
.sortarrow { font-size: 10px; color: var(--line-strong); margin-left: 3px; }
.sortarrow.active { color: var(--accent-deep); }

/* Loglar arac cubugu: filtre/arama, Yenile butonuyla ayni yukseklik/uyumda */
#logType, #logSearch { font-size: 14px; padding: 9px 13px; margin: 0; height: 40px; }
#logSearch { background-image: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* --- Form alanlari --- */
label { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 6px; }
input, select {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { margin-bottom: 16px; }

/* --- Bildirim --- */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 50;
  background: var(--ink); color: var(--paper-2);
  padding: 13px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s;
  max-width: 360px;
  pointer-events: none; /* gorunmezken (ve gorunurken) altindaki ogeleri engellemez */
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--accent-deep); }

/* ===== GIRIS EKRANI ===== */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 34px;
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 20px;
}
.brand-name { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-sub { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.login-card h1 { font-size: 23px; margin-bottom: 4px; }
.login-card .lede { color: var(--ink-soft); font-size: 14px; margin-bottom: 26px; }

/* ===== UYGULAMA DUZENI ===== */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { margin-bottom: 0; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.navtoggle {
  display: none; /* masaüstünde gizli, mobilde görünür */
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink); font-size: 20px; cursor: pointer;
  place-items: center; line-height: 1;
}
.navtoggle:hover { background: var(--paper-2); }
.nav-overlay { display: none; }
.brand-mark.sm { width: 32px; height: 32px; font-size: 17px; border-radius: 9px; }
.userchip { display: flex; align-items: center; gap: 12px; font-size: 14px; position: relative; }
.userchip .who { text-align: right; }
.userchip .who .nm { font-weight: 600; }
.userchip .who .rl { font-size: 12px; color: var(--ink-soft); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; font-weight: 700; font-family: var(--display);
}

/* Hesap menusu (acilir kapanir) */
.acct-menu {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  min-width: 236px; padding: 8px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transform-origin: top right; animation: acctIn .15s ease;
}
@keyframes acctIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.acct-menu[hidden] { display: none; }
.acct-head { padding: 10px 12px 8px; }
.acct-head .nm {
  font-family: var(--display); font-weight: 700; font-size: 15.5px;
  color: var(--ink); letter-spacing: -0.01em; line-height: 1.2;
}
.acct-head .rl { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.acct-sep { height: 1px; background: var(--line); margin: 6px 6px; }
.acct-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent;
  text-align: left; font-family: var(--body); font-size: 14px; font-weight: 600;
  color: var(--ink); border-radius: var(--radius-sm); cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.acct-item:hover { background: var(--accent-soft); color: var(--accent-deep); }
.acct-item .ic {
  display: grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--paper); color: var(--ink-soft);
  transition: background .14s ease, color .14s ease, border-color .14s ease;
  border: 1px solid var(--line);
}
.acct-item .ic svg { width: 16px; height: 16px; display: block; }
.acct-item:hover .ic { background: #fff; color: var(--accent-deep); border-color: var(--accent-soft); }

/* Acik oturumlar listesi */
.sess-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.sess-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.sess-item.current { border-color: var(--accent-deep); background: var(--accent-soft); }
.sess-meta { font-size: 13px; line-height: 1.5; }
.sess-meta .dev { font-weight: 600; }
.sess-meta .sub { color: var(--ink-soft); font-size: 12.5px; }
.sess-badge {
  font-size: 11px; font-weight: 600; color: var(--accent-deep);
  background: #fff; border: 1px solid var(--accent-deep);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}

.layout { display: flex; flex: 1; }
.sidenav {
  width: 232px; padding: 22px 16px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,253,248,.6), transparent);
}
.navlink {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; margin-bottom: 4px;
}
.navlink:hover { background: var(--paper); color: var(--ink); }
.navlink.active { background: var(--accent-soft); color: var(--accent-deep); }
.navlink .ic { width: 20px; height: 20px; display: grid; place-items: center; flex-shrink: 0; }
.navlink .ic svg { width: 18px; height: 18px; display: block; }

/* Entegrasyon gibi acilir-kapanir menu gruplari */
.navgroup { margin-bottom: 4px; }
.navparent .navcaret { margin-left: auto; display: inline-flex; transition: transform .15s ease; color: var(--ink-soft); }
.navparent .navcaret svg { width: 14px; height: 14px; display: block; }
.navgroup.open .navparent .navcaret { transform: rotate(90deg); }
.navsub { display: none; }
.navgroup.open .navsub { display: block; }
.navsub .navchild { padding-left: 30px; }
.nav-soon { font-size: 11px; color: var(--warn); background: #fbf3dd;
  padding: 1px 7px; border-radius: 20px; margin-left: auto; font-weight: 700; }

.content { flex: 1; min-width: 0; padding: 30px 36px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-head h1 { font-size: 27px; }
.page-head .sub { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

/* --- Kart & tablo --- */
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); font-weight: 700; padding: 14px 18px; border-bottom: 1px solid var(--line); }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
/* Tutarlilik icin son satirda da alt cizgi kalsin (kart kenarina kadar) */
tr:hover td { background: rgba(15, 122, 90, 0.02); }
.uname { font-weight: 600; }
.umono { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }

.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.badge-admin { background: var(--accent-soft); color: var(--accent-deep); }
.badge-user { background: #ece7db; color: var(--ink-soft); }
.badge-on { background: var(--accent-soft); color: var(--accent-deep); }
.badge-off { background: var(--danger-soft); color: var(--danger); }

.row-actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }
.empty { padding: 40px 18px; text-align: center; color: var(--ink-soft); }

/* --- Modal --- */
.modal-back {
  position: fixed; inset: 0; background: rgba(29,27,22,.42);
  display: none; place-items: center; z-index: 40; padding: 20px;
}
.modal-back.show { display: grid; }
.modal {
  width: 100%; max-width: 440px; background: var(--paper-2);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 28px;
  max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 20px; margin-bottom: 6px; }
.modal .lede { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.hidden { display: none !important; }

/* --- Yeni ekran ogeleri --- */
/* Checkbox/radio: genel input stilinden (genislik, kenarlik, golge, gecis) tamamen ayir.
   Aksi halde tiklayinca focus golgesi+gecis "titreme" yapiyor. */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  margin: 0 7px 0 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  vertical-align: middle;
  cursor: pointer;
  transition: none;
  flex: none;
}
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; outline: none; }

/* Gun secim cipleri (gorev modali) */
.daychip {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
  font-weight: 600; font-size: 13px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 20px; padding: 7px 13px; cursor: pointer; user-select: none;
}
.daychip input { margin: 0; }

/* Tablo olmayan (form/icerik) kartlari */
.card-form { padding: 24px; }

/* Test/calisma sonucu hucresinde rozet + tarih dikey istiflensin */
.stackcell { display: inline-flex; flex-direction: column; gap: 3px; }

/* Tarih/saat/sayi alanlari tum genisligi kaplamasin */
input[type="date"], input[type="time"], input[type="number"] { max-width: 260px; }

/* Soft renkli durum isigi (emoji yerine) */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; vertical-align: middle; margin-right: 5px; }
.dot-on { background: #3aa37f; }
.dot-off { background: #cf6b5f; }
.dot-muted { background: #c7c0b0; }
.dot-warn { background: #d9a521; }
.ic-inline { display: inline-flex; vertical-align: -3px; }
.ic-inline svg { width: 16px; height: 16px; }
.ic-inline.ok { color: var(--accent); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Arama kutusu (ikon iceride) */
.list-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.searchbox { position: relative; width: 320px; max-width: 100%; }
.searchbox-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-soft); pointer-events: none;
}
.searchbox input { padding-left: 36px; margin: 0; }
@media (max-width: 720px) {
  .list-toolbar { justify-content: stretch; }
  .searchbox { width: 100%; }
}

/* Toplu secim (dagitim listesi) */
.selcell { width: 38px; text-align: center; }
.selcell input[type="checkbox"] { margin: 0; }
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bulkbar[hidden] { display: none; }
.bulkbar-count { font-weight: 600; font-size: 14px; color: var(--accent-deep); }

/* Aranabilir ozel acilir liste (combobox) */
.combo { position: relative; }
.combo-control {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--body); font-size: 15px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 13px; cursor: pointer; text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.combo.open .combo-control { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.combo-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-val.placeholder { color: var(--ink-soft); }
.combo-caret { display: inline-flex; color: var(--ink-soft); transition: transform .15s ease; flex-shrink: 0; }
.combo-caret svg { width: 16px; height: 16px; }
.combo.open .combo-caret { transform: rotate(180deg); }
.combo-pop {
  position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 8px; max-height: 340px; display: flex; flex-direction: column;
}
.combo-pop[hidden] { display: none; }
.combo-search { position: relative; margin-bottom: 6px; }
.combo-search .searchbox-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-soft); pointer-events: none; }
.combo-search input { width: 100%; padding-left: 34px; margin: 0; }
.combo-list { overflow-y: auto; }
.combo-opt { padding: 9px 11px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--ink); }
.combo-opt:hover { background: var(--accent-soft); color: var(--accent-deep); }
.combo-opt.selected { font-weight: 600; }
.combo-empty { padding: 10px 11px; color: var(--ink-soft); font-size: 13.5px; }
.statuscell { display: inline-flex; align-items: center; font-weight: 600; color: var(--ink); }

/* Dagitim listesinde degisen satirlar */
tr.row-new td { background: #eaf6f0; }
tr.row-removed td { background: #fbecea; }

@media (max-width: 720px) {
  .navtoggle { display: grid; }

  /* Yan menü mobilde kayarak açılan çekmece olur */
  .sidenav {
    display: block;
    position: fixed; top: 0; left: 0;
    width: 250px; height: 100vh; z-index: 45;
    background: var(--paper-2);
    border-right: 1px solid var(--line);
    padding: 18px 16px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .sidenav.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.25); }

  .nav-overlay {
    display: block;
    position: fixed; inset: 0; z-index: 44;
    background: rgba(29, 27, 22, .42);
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
  }
  .nav-overlay.show { opacity: 1; pointer-events: auto; }

  .content { padding: 18px 14px; }
  .userchip .who { display: none; }
  .topbar { padding: 12px 16px; }

  .page-head { flex-direction: column; align-items: stretch; }
  .page-head h1 { font-size: 24px; }
  .page-head .btn { width: 100%; justify-content: center; }

  /* Tabloyu mobilde kartlara cevir: her satir bir kart, her hucre etiketli */
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  .card { border: none; background: transparent; box-shadow: none; }
  tr {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
  }
  tr:hover td { background: transparent; }
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--line);
  }
  td:last-child { border-bottom: none; }
  td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-soft);
    text-align: left;
    flex-shrink: 0;
  }
  .row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .modal { padding: 22px; }

  /* Form/icerik kartlari mobilde de kart gorunumunu korusun (tablo kartlari seffaflasir, bunlar olmaz) */
  .card-form {
    border: 1px solid var(--line) !important;
    background: var(--paper-2) !important;
    box-shadow: var(--shadow) !important;
    border-radius: var(--radius) !important;
    padding: 18px 16px;
  }
  /* Mobilde stackcell sag hizali (hucre flex satirinda dogru otursun) */
  .stackcell { align-items: flex-end; }

  /* Bos/yukleniyor satiri mobilde de ortali kalsin (flex td'den etkilenmesin) */
  td.empty { display: block; text-align: center; }
  td.empty::before { content: none; }

  tr.row-new { background: #eaf6f0; }
  tr.row-removed { background: #fbecea; }
}

/* ===== Mesaj Sablonu ekrani ===== */
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.tpl-vars-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); margin-bottom: 11px;
}
.tpl-vars-label span { font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .8; }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tpl-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper-2);
  font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--accent-deep);
  cursor: pointer; transition: background .14s ease, border-color .14s ease, transform .08s ease;
}
.tpl-chip:hover { background: var(--accent-soft); border-color: var(--accent); }
.tpl-chip:active { transform: translateY(1px); }
.tpl-chip code { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 600; }

.tpl-area {
  width: 100%; font-family: var(--body); font-size: 15px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 13px; outline: none;
  resize: vertical; line-height: 1.5; min-height: 84px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tpl-area:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tpl-count { font-size: 12px; color: var(--ink-soft); margin-top: 6px; text-align: right; }
.tpl-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* Onizleme */
.tpl-preview-card { position: sticky; top: 20px; }
.prev-block { margin-bottom: 20px; }
.prev-tag { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.wa-screen {
  background: #e7ded5; border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  background-image: radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 14px 14px;
}
.wa-bubble {
  background: #d9fdd3; color: #111b21; padding: 9px 12px; border-radius: 10px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
  max-width: 88%; align-self: flex-end; box-shadow: 0 1px 1px rgba(0,0,0,.07);
}
.wa-bubble.wa-img {
  background: #fff; color: var(--ink-soft); font-size: 13px;
  display: flex; align-items: center; gap: 8px; align-self: flex-end;
}
.mail-prev { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.mail-subj {
  background: var(--paper); padding: 11px 14px; font-weight: 700; font-size: 14px;
  border-bottom: 1px solid var(--line); word-break: break-word;
}
.mail-body { padding: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; color: var(--ink); word-break: break-word; }
.mail-img { padding: 13px 14px; color: var(--ink-soft); font-size: 13px; border-top: 1px dashed var(--line); }
.tpl-sample { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

@media (max-width: 720px) {
  .tpl-grid { grid-template-columns: 1fr; }
  .tpl-grid > .card {
    border: 1px solid var(--line) !important; background: var(--paper-2) !important;
    box-shadow: var(--shadow) !important; border-radius: var(--radius) !important;
  }
  .tpl-preview-card { position: static; }
}

/* ===== Ana Sayfa (dashboard) ===== */
.home-alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.home-alerts:empty { display: none; }
.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px;
}
.alert-ic { display: inline-flex; flex-shrink: 0; }
.alert-ic svg { width: 20px; height: 20px; }
.alert-text { flex: 1; line-height: 1.4; }
.alert-act {
  flex-shrink: 0; border: 1px solid currentColor; background: transparent; color: inherit;
  font-family: var(--body); font-weight: 600; font-size: 13px; padding: 6px 12px;
  border-radius: 999px; cursor: pointer;
}
.alert-act:hover { background: rgba(0, 0, 0, .06); }
.alert-danger { background: var(--danger-soft); border-color: #e3b5ae; color: #8f2d22; }
.alert-warn { background: #fbf1d8; border-color: #e7d199; color: #7a5710; }
.alert-ok { background: var(--accent-soft); border-color: #bfe0d2; color: var(--accent-deep); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.stat-ic {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; margin-bottom: 13px;
}
.stat-ic svg { width: 20px; height: 20px; }
.stat-val { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-val.ok { color: var(--accent-deep); }
.stat-val.off { color: var(--danger); }
.stat-lbl { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.stat-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.stat-sub:empty { display: none; }

.home-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.home-card-head { font-family: var(--display); font-weight: 700; font-size: 16px; margin-bottom: 14px; }

.home-activity { display: flex; flex-direction: column; }
.act-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-item:last-child { border-bottom: none; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); margin-top: 6px; flex-shrink: 0; }
.act-success .act-dot { background: var(--accent); }
.act-error .act-dot { background: var(--danger); }
.act-warn .act-dot { background: var(--warn); }
.act-msg { font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.act-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.quick-links { display: flex; flex-direction: column; gap: 8px; }
.quick-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 13px; border: 1px solid var(--line); background: var(--paper-2);
  border-radius: var(--radius-sm); font-family: var(--body); font-size: 14px; font-weight: 600;
  color: var(--ink); cursor: pointer; text-align: left;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.quick-link:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.quick-link svg { width: 18px; height: 18px; flex-shrink: 0; }

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .home-cols { grid-template-columns: 1fr; }
  .home-cols > .card {
    border: 1px solid var(--line) !important; background: var(--paper-2) !important;
    box-shadow: var(--shadow) !important; border-radius: var(--radius) !important;
  }
}
