/* ============================================================
   Evimiz Control - Panel tasarım sistemi
   (NORON Otoyol / PTS kalıbı: gradient hero > istatistik kartları >
   filtre kartı > sonuç tablosu kartı). Bağımsız CSS; inline stil yok.
   ============================================================ */

:root {
    --sidebar-w: 256px;
    --topbar-h: 60px;
    --page-bg: #f5f7fa;

    --ink: #0f172a;
    --ink-2: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --surface: #ffffff;

    --g-indigo: linear-gradient(135deg, #4338ca, #6366f1);
    --g-blue:   linear-gradient(135deg, #1e40af, #3b82f6);
    --g-green:  linear-gradient(135deg, #15803d, #22c55e);
    --g-red:    linear-gradient(135deg, #b91c1c, #ef4444);
    --g-amber:  linear-gradient(135deg, #b45309, #f59e0b);
    --g-teal:   linear-gradient(135deg, #0f766e, #14b8a6);
    --g-cyan:   linear-gradient(135deg, #0e7490, #06b6d4);
    --g-purple: linear-gradient(135deg, #7e22ce, #a855f7);
    --g-rose:   linear-gradient(135deg, #be123c, #f43f5e);
    --g-slate:  linear-gradient(135deg, #475569, #94a3b8);

    --shadow-card: 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-pop: 0 10px 30px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--page-bg);
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; color: var(--ink); }
p { margin: 0 0 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================ Kabuk */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    z-index: 40;
}
.sidebar-brand {
    padding: 14px 16px 12px;
    display: flex; align-items: center; gap: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0; color: #fff;
}
.sidebar-brand:hover { color: #fff; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: #fff; padding: 3px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(67, 56, 202, .4);
    flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { min-width: 0; }
.brand-name { font-size: 15px; font-weight: 800; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: #64748b; font-weight: 700; }

.sidebar-nav {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 0 12px;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) rgba(0, 0, 0, .25);
}
.nav-section { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: #475569; padding: 12px 20px 5px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 18px;
    color: #cbd5e1; font-size: 13.5px; font-weight: 600;
    border-left: 3px solid transparent;
    transition: background .14s, color .14s, border-color .14s;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item .nav-ico {
    width: 27px; height: 27px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; color: #fff; flex-shrink: 0; opacity: .9;
}
.nav-item.active { background: rgba(99, 102, 241, .16); border-left-color: #818cf8; color: #fff; }
.nav-item.active .nav-ico { opacity: 1; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }

.sidebar-credit {
    margin: 10px 14px; padding: 11px 13px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
    display: flex; align-items: center; gap: 11px; flex-shrink: 0;
}
.sidebar-credit .nav-ico { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; }
.sidebar-credit b { display: block; color: #fff; font-size: 16px; font-variant-numeric: tabular-nums; }
.sidebar-credit small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; font-weight: 700; }
.sidebar-foot { padding: 9px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 10.5px; color: #64748b; flex-shrink: 0; }

@media (max-height: 760px) {
    .brand-sub, .sidebar-foot { display: none; }
    .nav-section { padding: 8px 20px 3px; }
    .nav-item { padding: 5px 18px; font-size: 13px; }
    .sidebar-credit { margin: 6px 14px; padding: 8px 11px; }
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 14px; padding: 0 22px;
    position: sticky; top: 0; z-index: 30;
}
.topbar .burger { display: none; background: none; border: none; cursor: pointer; font-size: 20px; color: #334155; padding: 4px 8px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs .sep { color: #cbd5e1; }
.crumbs strong { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }

.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 10px 5px 5px; border-radius: 30px;
    background: #f8fafc; border: 1px solid var(--line);
    cursor: pointer; position: relative; font-family: inherit; font-size: inherit; color: inherit;
}
.user-chip:hover { background: #f1f5f9; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--g-indigo); color: #fff; font-weight: 800; font-size: 13px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-chip .who { line-height: 1.15; text-align: left; }
.user-chip .who b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 700; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: 10.5px; color: var(--muted); }
.user-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop);
    min-width: 220px; padding: 6px; z-index: 60; display: none; text-align: left;
}
.user-menu.open { display: block; }
.user-menu a, .user-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border-radius: 7px; border: none; background: none; cursor: pointer;
    color: #334155; font-size: 13px; font-weight: 600; font-family: inherit;
}
.user-menu a:hover, .user-menu button:hover { background: #f1f5f9; }
.user-menu i { width: 16px; text-align: center; color: var(--muted); }
.user-menu .danger { color: #b91c1c; }
.user-menu .danger i { color: #ef4444; }
.user-menu hr { border: none; border-top: 1px solid var(--line); margin: 5px 8px; }
.user-menu form { margin: 0; }

.page { padding: 20px 24px 40px; flex: 1; }

/* ============================================================ Hero */
.hero {
    border-radius: 12px; padding: 22px 26px; color: #fff; margin-bottom: 18px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
    background: var(--g-indigo); box-shadow: 0 6px 20px rgba(67, 56, 202, .25);
}
.hero.blue   { background: var(--g-blue);   box-shadow: 0 6px 20px rgba(30, 64, 175, .25); }
.hero.green  { background: var(--g-green);  box-shadow: 0 6px 20px rgba(21, 128, 61, .25); }
.hero.red    { background: var(--g-red);    box-shadow: 0 6px 20px rgba(185, 28, 28, .25); }
.hero.amber  { background: var(--g-amber);  box-shadow: 0 6px 20px rgba(180, 83, 9, .25); }
.hero.teal   { background: var(--g-teal);   box-shadow: 0 6px 20px rgba(15, 118, 110, .25); }
.hero.cyan   { background: var(--g-cyan);   box-shadow: 0 6px 20px rgba(14, 116, 144, .25); }
.hero.purple { background: var(--g-purple); box-shadow: 0 6px 20px rgba(126, 34, 206, .25); }
.hero.rose   { background: var(--g-rose);   box-shadow: 0 6px 20px rgba(190, 18, 60, .25); }
.hero.slate  { background: var(--g-slate);  box-shadow: 0 6px 20px rgba(71, 85, 105, .25); }
.hero-icon {
    width: 56px; height: 56px; flex-shrink: 0; background: rgba(255, 255, 255, .18);
    border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 25px;
}
.hero-text { min-width: 220px; flex: 1 1 260px; }
.hero h2 { font-size: 21px; font-weight: 800; color: #fff; margin-bottom: 4px; word-break: break-word; }
.hero p { margin: 0; font-size: 13px; opacity: .88; }
.hero-side { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .85); margin-bottom: 6px; }
.hero-back:hover { color: #fff; }
.hero .live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .18); }

/* ============================================================ İstatistik */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stats.c2 { grid-template-columns: repeat(2, 1fr); }
.stats.c3 { grid-template-columns: repeat(3, 1fr); }
.stats.c5 { grid-template-columns: repeat(5, 1fr); }
.stat {
    background: var(--surface); border-radius: 10px; padding: 16px 18px;
    display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-card);
    transition: transform .14s, box-shadow .14s; color: inherit;
}
a.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 23, 42, .12); color: inherit; }
.stat-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; word-break: break-word; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-top: 2px; }
.stat-sub { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }

.g-indigo { background: var(--g-indigo); } .g-blue { background: var(--g-blue); } .g-green { background: var(--g-green); }
.g-red { background: var(--g-red); } .g-amber { background: var(--g-amber); } .g-teal { background: var(--g-teal); }
.g-cyan { background: var(--g-cyan); } .g-purple { background: var(--g-purple); } .g-rose { background: var(--g-rose); }
.g-slate { background: var(--g-slate); }

/* ============================================================ Hızlı erişim */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--surface); border-radius: 10px; padding: 20px 16px; text-align: center; box-shadow: var(--shadow-card); transition: transform .14s, box-shadow .14s; display: block; color: inherit; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15, 23, 42, .13); color: inherit; }
.tile-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; }
.tile-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.tile-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ============================================================ Kart */
.card { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-card); margin-bottom: 18px; overflow: hidden; }
.card-head {
    padding: 13px 18px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--g-indigo); flex-wrap: wrap;
}
.card-head.blue { background: var(--g-blue); } .card-head.green { background: var(--g-green); } .card-head.red { background: var(--g-red); }
.card-head.amber { background: var(--g-amber); } .card-head.teal { background: var(--g-teal); } .card-head.cyan { background: var(--g-cyan); }
.card-head.purple { background: var(--g-purple); } .card-head.rose { background: var(--g-rose); } .card-head.slate { background: var(--g-slate); }
.card-head h4 { margin: 0; font-size: 14px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 9px; }
.card-head .head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count-badge { background: rgba(255, 255, 255, .2); border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.head-btn {
    background: rgba(255, 255, 255, .2); border: none; border-radius: 7px; color: #fff !important; cursor: pointer;
    padding: 6px 13px; min-height: 32px; font-size: 12px; font-weight: 700; font-family: inherit;
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.head-btn:hover { background: rgba(255, 255, 255, .32); }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); background: #fcfdfe; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.card.collapsible > .card-head { cursor: pointer; user-select: none; }
.card.collapsible > .card-head .collapse-ico { transition: transform .2s; }
.card.collapsible.collapsed > .card-head .collapse-ico { transform: rotate(-90deg); }
.card.collapsible.collapsed > .card-body, .card.collapsible.collapsed > .card-foot { display: none; }

.panel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.panel-grid > .card { margin-bottom: 0; }
.panel-grid .span-all { grid-column: 1 / -1; }
.stack > * + * { margin-top: 18px; }

/* ============================================================ Buton */
.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.actions.left { justify-content: flex-start; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    border: none; cursor: pointer; border-radius: 8px; padding: 11px 24px;
    font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    color: #fff !important; min-height: 42px; font-family: inherit; text-decoration: none;
    transition: transform .15s, box-shadow .15s, filter .15s; background: var(--g-indigo);
}
.btn:hover { transform: translateY(-1px); color: #fff; }
.btn:active { transform: translateY(0); }
.btn.add    { background: var(--g-green);  box-shadow: 0 4px 12px rgba(21, 128, 61, .25); }
.btn.info   { background: var(--g-blue);   box-shadow: 0 4px 12px rgba(30, 64, 175, .25); }
.btn.edit   { background: var(--g-blue);   box-shadow: 0 4px 12px rgba(30, 64, 175, .25); }
.btn.warn   { background: var(--g-amber);  box-shadow: 0 4px 12px rgba(180, 83, 9, .25); }
.btn.del    { background: var(--g-red);    box-shadow: 0 4px 12px rgba(185, 28, 28, .25); }
.btn.purple { background: var(--g-purple); box-shadow: 0 4px 12px rgba(126, 34, 206, .25); }
.btn.teal   { background: var(--g-teal);   box-shadow: 0 4px 12px rgba(15, 118, 110, .25); }
.btn.slate  { background: var(--g-slate);  box-shadow: 0 4px 12px rgba(71, 85, 105, .25); }
.btn.glass  { background: rgba(255, 255, 255, .18); box-shadow: none; border: 1px solid rgba(255, 255, 255, .28); }
.btn.glass:hover { background: rgba(255, 255, 255, .28); }
.btn.ghost { background: #fff; color: #334155 !important; border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: #f8fafc; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 15px; min-height: 34px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }
.rbtn {
    padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700;
    color: #fff !important; cursor: pointer; border: none;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    transition: transform .14s, filter .14s; font-family: inherit; text-decoration: none;
}
.rbtn:hover { transform: translateY(-1px); color: #fff; }
.rbtn.edit { background: var(--g-blue);   box-shadow: 0 2px 6px rgba(30, 64, 175, .25); }
.rbtn.del  { background: var(--g-red);    box-shadow: 0 2px 6px rgba(185, 28, 28, .25); }
.rbtn.view { background: var(--g-indigo); box-shadow: 0 2px 6px rgba(67, 56, 202, .25); }
.rbtn.ok   { background: var(--g-green);  box-shadow: 0 2px 6px rgba(21, 128, 61, .25); }
.rbtn.warn { background: var(--g-amber);  box-shadow: 0 2px 6px rgba(180, 83, 9, .25); }
.rbtn.slate { background: var(--g-slate); box-shadow: 0 2px 6px rgba(71, 85, 105, .25); }
.rbtn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ============================================================ Form */
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.filters { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { min-width: 0; }
.field > label:not(.switch-row), .field-label {
    display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--muted); margin-bottom: 5px;
}
.field > label:not(.switch-row) i, .field-label i { color: #3b82f6; margin-right: 4px; }
.input, select.input, textarea.input {
    width: 100%; border: 1.5px solid #cbd5e1; border-radius: 7px; background: #fff;
    padding: 9px 12px; font-size: 14px; color: var(--ink-2); font-family: inherit;
    transition: border-color .15s, box-shadow .15s; min-height: 40px;
}
.input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.input:disabled, .input[readonly] { background: #f8fafc; color: #94a3b8; }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.55; }
.input.hero-field {
    font-size: 20px; font-weight: 800; letter-spacing: 1.5px; text-align: center;
    padding: 12px; font-family: "Courier New", monospace; background: #fffbeb; border-color: #fbbf24;
}
input[type="file"].input { padding: 8px 11px; cursor: pointer; }
input[type="file"].input::-webkit-file-upload-button {
    background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 7px; color: #4338ca;
    font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 13px; margin-right: 11px; cursor: pointer;
}
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group > .input { flex: 1; min-width: 0; }
.input-group > .addon {
    display: flex; align-items: center; padding: 0 12px; border-radius: 7px;
    background: #f1f5f9; border: 1.5px solid #cbd5e1; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap;
}
.hint { font-size: 11.5px; color: #94a3b8; margin-top: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.switch-row {
    display: flex; align-items: center; gap: 11px; padding: 10px 13px;
    background: #f8fafc; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer;
    transition: border-color .14s, background .14s; margin: 0;
}
.switch-row:hover { border-color: #cbd5e1; }
.switch-row input { width: 17px; height: 17px; accent-color: #3b82f6; cursor: pointer; flex-shrink: 0; }
.switch-row b { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.switch-row small { font-size: 11.5px; color: var(--muted); }
.switch-row.on, .switch-row:has(input:checked) { background: #eff6ff; border-color: #93c5fd; }

/* Cihaz ayarları: durum + tek tık aç/kapa */
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.toggle-card {
    display: flex; align-items: center; gap: 12px; margin: 0;
    padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #f8fafc;
}
.toggle-card.on { background: #f0fdf4; border-color: #bbf7d0; }
.toggle-card .t-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex-shrink: 0; }
.toggle-card .t-text { flex: 1; min-width: 0; }
.toggle-card .t-text b { display: block; font-size: 13px; color: var(--ink); }
.toggle-card .t-text small { font-size: 11.5px; color: var(--muted); }
.switch-btn {
    width: 46px; height: 26px; border-radius: 20px; border: none; cursor: pointer; flex-shrink: 0;
    background: #cbd5e1; position: relative; transition: background .2s;
}
.switch-btn:after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .2s;
}
.switch-btn.on { background: #22c55e; }
.switch-btn.on:after { left: 23px; }

/* ============================================================ Tablo */
.table-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; margin: 0; }
table.tbl thead th {
    background: #f8fafc; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--muted); padding: 11px 12px; text-align: left; border-bottom: 2px solid var(--line); white-space: nowrap;
}
table.tbl thead th.right, table.tbl tbody td.right { text-align: right; }
table.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; color: var(--ink-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: #f8fafc; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr.is-deleted td { background: #fff7f7; }
table.tbl tbody tr.edit-row td { background: #f8fafc; padding: 12px 14px; }
.num { font-variant-numeric: tabular-nums; }
.dim { color: #94a3b8; }
.strong { font-weight: 700; color: var(--ink); }
.cell-main { font-weight: 700; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); }
td.check { width: 36px; }
td.check input, th.check input { width: 17px; height: 17px; accent-color: #3b82f6; }

/* Kod rozetleri: cihaz ID (lacivert), kart/QR/telefon (sarı plaka) */
.code {
    font-family: "Courier New", monospace; font-weight: 700; font-size: 13px; letter-spacing: .5px;
    background: #eef2ff; border: 1.5px solid #c7d2fe; color: #3730a3;
    border-radius: 5px; padding: 3px 9px; display: inline-block; white-space: nowrap;
}
.code.lg { font-size: 18px; padding: 6px 14px; }
.plate {
    font-family: "Courier New", monospace; font-weight: 700; background: #fef3c7; border: 1.5px solid #fbbf24;
    border-radius: 5px; padding: 3px 10px; display: inline-block; font-size: 13px; letter-spacing: .5px;
    white-space: nowrap; color: #78350f;
}
.chip { font-size: 12.5px; color: #475569; background: var(--line-soft); border-radius: 5px; padding: 3px 10px; display: inline-block; white-space: nowrap; }
.pill {
    display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 3px 11px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
.pill.green  { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #15803d; }
.pill.red    { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #b91c1c; }
.pill.blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.pill.amber  { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.pill.teal   { background: linear-gradient(135deg, #ccfbf1, #99f6e4); color: #0f766e; }
.pill.cyan   { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0e7490; }
.pill.purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; }
.pill.indigo { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4338ca; }
.pill.rose   { background: linear-gradient(135deg, #ffe4e6, #fecdd3); color: #be123c; }
.pill.slate  { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #475569; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; display: inline-block; flex-shrink: 0; }
.dot.on { background: #22c55e; animation: dotPulse 1.8s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); } }

.qr-thumb { width: 64px; height: 64px; border-radius: 6px; border: 1.5px solid var(--line); background: #fff; display: block; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty i { font-size: 42px; color: #cbd5e1; margin-bottom: 12px; display: block; }
.empty h4 { margin: 0 0 6px; color: #334155; font-size: 15px; }
.empty p { margin: 0; font-size: 13px; }

/* ============================================================ Sekmeler */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; background: #fff; padding: 6px; border-radius: 10px; box-shadow: var(--shadow-card); }
.tabs a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 7px;
    font-size: 13px; font-weight: 700; color: #475569; white-space: nowrap;
}
.tabs a:hover { background: #f1f5f9; color: var(--ink); }
.tabs a.active { background: var(--g-indigo); color: #fff; box-shadow: 0 3px 10px rgba(67, 56, 202, .3); }
.tabs a .n { background: rgba(15, 23, 42, .08); border-radius: 12px; padding: 0 8px; font-size: 11.5px; }
.tabs a.active .n { background: rgba(255, 255, 255, .22); }

/* ============================================================ Sayfalama */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 18px; border-top: 1px solid var(--line-soft); background: #fcfdfe; }
.pager .info { font-size: 12.5px; color: var(--muted); }
.pager .pages { display: flex; gap: 5px; flex-wrap: wrap; }
.pager .pages a, .pager .pages span {
    min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 7px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: #475569; padding: 0 9px;
}
.pager .pages a:hover { border-color: #3b82f6; color: #1d4ed8; }
.pager .pages .current { background: var(--g-blue); border-color: transparent; color: #fff; }
.pager .pages .disabled { opacity: .4; pointer-events: none; }

/* ============================================================ Bildirim / bant */
.alerts { position: fixed; top: 74px; right: 22px; z-index: 200; width: 360px; max-width: calc(100vw - 44px); }
.alert {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 10px; margin-bottom: 10px;
    background: #fff; box-shadow: var(--shadow-pop); border-left: 4px solid #64748b; font-size: 13.5px; animation: slideIn .28s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.alert i { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.alert .msg { flex: 1; min-width: 0; color: var(--ink-2); }
.alert .x { background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 17px; padding: 0 2px; line-height: 1; }
.alert.success { border-left-color: #22c55e; } .alert.success i { color: #16a34a; }
.alert.danger  { border-left-color: #ef4444; } .alert.danger i { color: #dc2626; }
.alert.warning { border-left-color: #f59e0b; } .alert.warning i { color: #d97706; }
.alert.info    { border-left-color: #3b82f6; } .alert.info i { color: #2563eb; }
.alert.inline { position: static; box-shadow: none; animation: none; border: 1px solid var(--line); border-left-width: 4px; }

.banner { display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.banner i { font-size: 16px; margin-top: 1px; }
.banner.warn    { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.banner.danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.banner.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.banner.mb0 { margin-bottom: 0; }

/* ============================================================ Bilgi ızgarası */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line-soft); }
.kv .kv-item { background: #fff; padding: 13px 16px; }
.kv .kv-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }
.kv .kv-v { font-size: 14px; color: var(--ink); font-weight: 600; word-break: break-word; }

.big-num { font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.big-num small { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 6px; }
.person { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.person .avatar { width: 44px; height: 44px; font-size: 17px; }
.person b { display: block; color: var(--ink); font-size: 14.5px; }
.person span { font-size: 12.5px; color: var(--muted); }

/* Gizli değer (maskeli parola) */
.secret-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.secret-box { border: 1.5px dashed #cbd5e1; border-radius: 9px; padding: 10px 13px; background: #fcfdfe; }
.secret-box .kv-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }
.secret-box .s-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.secret-value { font-family: "Courier New", monospace; font-weight: 700; letter-spacing: 1px; color: var(--ink); word-break: break-all; }
.link-btn { background: none; border: none; padding: 0; cursor: pointer; color: #2563eb; font-weight: 700; font-size: 12.5px; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; }
.link-btn:hover { color: #1d4ed8; }

.sec-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); padding-bottom: 8px; margin: 22px 0 13px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 8px; }
.sec-title:first-child { margin-top: 0; }
.sec-title i { color: #3b82f6; }

.collapse-box { display: none; }
.collapse-box.show { display: block; }

.contract-text { white-space: pre-line; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-size: 13px; max-height: 320px; overflow: auto; }
.debug-box { white-space: pre-wrap; word-break: break-all; text-align: left; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; }

/* GSM sonuç paneli */
.result-box { border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-card); border-left: 5px solid #94a3b8; }
.result-box.ok { border-left-color: #22c55e; }
.result-box.err { border-left-color: #ef4444; }
.result-box .r-title { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.result-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; font-size: 13px; }
.result-box dt { color: var(--muted); font-weight: 700; }
.result-box dd { margin: 0; font-family: "Courier New", monospace; }

/* ============================================================ Giriş (bölünmüş ekran) */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: #0b1120; }
.login-art {
    position: relative; overflow: hidden; padding: 54px 56px; display: flex; flex-direction: column; justify-content: center; color: #fff;
    background:
        radial-gradient(1000px 620px at 12% -12%, rgba(99, 102, 241, .55), transparent 62%),
        radial-gradient(820px 520px at 105% 105%, rgba(14, 165, 233, .34), transparent 58%),
        radial-gradient(700px 520px at 85% -5%, rgba(168, 85, 247, .28), transparent 62%),
        linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #172554 100%);
}
.login-art:before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(circle at 28% 42%, #000 25%, transparent 78%);
    mask-image: radial-gradient(circle at 28% 42%, #000 25%, transparent 78%);
}
.login-art:after {
    content: ""; position: absolute; width: 540px; height: 540px; right: -170px; top: -190px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(129, 140, 248, .34), transparent 66%);
    animation: authGlow 11s ease-in-out infinite alternate;
}
@keyframes authGlow { from { transform: translate(0, 0) scale(1); } to { transform: translate(-46px, 46px) scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .login-art:after, .dot.on { animation: none; } }
.art-inner { position: relative; z-index: 2; max-width: 490px; }
.art-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 30px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
    font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #c7d2fe; margin-bottom: 20px;
}
.art-badge i { color: #818cf8; }
.art-logo { width: 74px; height: 74px; border-radius: 18px; background: #fff; padding: 6px; margin-bottom: 20px; display: block; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.login-art h1 { color: #fff; font-size: 33px; font-weight: 800; line-height: 1.18; letter-spacing: -.4px; margin-bottom: 13px; }
.login-art h1 .grad { background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-art .lead { font-size: 14.5px; line-height: 1.7; color: rgba(255, 255, 255, .74); margin: 0 0 28px; max-width: 440px; }
.login-features { display: grid; gap: 11px; }
.lf { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); transition: background .2s, transform .2s; }
.lf:hover { background: rgba(255, 255, 255, .1); transform: translateX(4px); }
.lf-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.lf-txt b { display: block; font-size: 13.5px; font-weight: 700; color: #fff; }
.lf-txt small { font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.login-side { background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 40px 32px; position: relative; }
.login-box { width: 100%; max-width: 400px; }
.lb-head { text-align: center; margin-bottom: 24px; }
.lb-mark { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--g-indigo); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 25px; box-shadow: 0 8px 22px rgba(67, 56, 202, .35); }
.lb-mark.red { background: var(--g-red); box-shadow: 0 8px 22px rgba(185, 28, 28, .35); }
.lb-mark.teal { background: var(--g-teal); box-shadow: 0 8px 22px rgba(15, 118, 110, .35); }
.lb-head h2 { font-size: 23px; margin-bottom: 6px; letter-spacing: -.2px; }
.lb-head p { color: var(--muted); font-size: 13.5px; margin: 0; }
.login-box .field { margin-bottom: 15px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; pointer-events: none; transition: color .15s; }
.input-icon .input { padding-left: 42px; height: 50px; border-radius: 10px; }
.input-icon .input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, .13); }
.input-icon:focus-within > i { color: #6366f1; }
.input-icon .input.code-input { text-align: center; letter-spacing: 8px; font-size: 22px; font-weight: 800; padding-left: 12px; }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer;
    color: #94a3b8; font-size: 15px; width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { color: #475569; background: #f1f5f9; }
.login-submit {
    width: 100%; border: none; cursor: pointer; border-radius: 10px; padding: 15px; font-family: inherit;
    font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #fff;
    background: linear-gradient(135deg, #4338ca, #6366f1); box-shadow: 0 8px 20px rgba(67, 56, 202, .3);
    transition: transform .15s, box-shadow .15s; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 4px;
}
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(67, 56, 202, .4); }
.login-submit.red { background: linear-gradient(135deg, #b91c1c, #ef4444); box-shadow: 0 8px 20px rgba(185, 28, 28, .3); }
.login-submit.teal { background: linear-gradient(135deg, #0f766e, #14b8a6); box-shadow: 0 8px 20px rgba(15, 118, 110, .3); }
.login-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.login-links a, .login-links button { font-weight: 600; }
.login-foot { text-align: center; margin-top: 24px; font-size: 12px; color: #94a3b8; padding-top: 18px; border-top: 1px solid var(--line); }
.login-foot .sec { display: block; margin-top: 6px; font-size: 11px; color: #cbd5e1; }
.login-box .alert { position: static; box-shadow: none; animation: none; border: 1px solid var(--line); border-left-width: 4px; }
.steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.steps span { width: 34px; height: 5px; border-radius: 3px; background: #e2e8f0; }
.steps span.on { background: #6366f1; }

/* Hata sayfası */
.error-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #172554 100%); }
.error-card { background: #fff; border-radius: 14px; padding: 36px 30px; text-align: center; max-width: 460px; width: 100%; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.error-card .code-big { font-size: 56px; font-weight: 900; line-height: 1; background: var(--g-indigo); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.error-card p { color: var(--muted); margin-bottom: 20px; }

/* ============================================================ Yardımcılar */
.mb0 { margin-bottom: 0 !important; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.text-muted { color: var(--muted); }
.small { font-size: 12.5px; }
.break { word-break: break-word; }
.w-100 { width: 100%; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.inline-form .field { flex: 1 1 140px; }
form { margin: 0; }

/* ============================================================ Duyarlı */
@media (max-width: 1200px) {
    .stats, .stats.c5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .stats, .stats.c3, .stats.c5 { grid-template-columns: repeat(2, 1fr); }
    .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); }
    .panel-grid { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-art { padding: 30px 22px 26px; justify-content: flex-start; }
    .login-art:after { display: none; }
    .login-art h1 { font-size: 24px; margin-bottom: 8px; }
    .login-art .lead { font-size: 13px; margin-bottom: 16px; }
    .art-logo { width: 54px; height: 54px; margin-bottom: 14px; }
    .login-features { grid-template-columns: 1fr 1fr; gap: 9px; }
    .lf { padding: 10px 12px; gap: 10px; }
    .lf:hover { transform: none; }
    .lf-ico { width: 32px; height: 32px; font-size: 14px; border-radius: 9px; }
    .lf-txt small { display: none; }
    .login-side { padding: 30px 18px 40px; }
}
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -100%; top: 0; width: 272px; transition: left .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
    body.nav-open .sidebar { left: 0; }
    body.nav-open .nav-backdrop { display: block; }
    .topbar .burger { display: block; min-width: 44px; min-height: 44px; }
    .topbar { padding: 0 12px; }
    .crumbs { display: none; }
    .user-chip .who { display: none; }
    .user-chip { min-height: 44px; }
    .page { padding: 15px 13px 34px; }
    .hero { flex-direction: column; text-align: center; padding: 16px; gap: 12px; }
    .hero-text { flex: 0 0 auto; width: 100%; min-width: 0; }
    .hero-icon { width: 46px; height: 46px; font-size: 21px; }
    .hero h2 { font-size: 17.5px; }
    .hero-side { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 0; }
    .hero-side .btn, .hero-side form, .hero-side form .btn { width: 100%; }
    .stats, .stats.c2, .stats.c3, .stats.c5 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 12px 13px; gap: 10px; }
    .stat-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
    .stat-num { font-size: 19px; }
    .stat > div:last-child { min-width: 0; }
    .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
    .span2 { grid-column: auto; }
    .input, select.input, textarea.input { font-size: 16px; min-height: 46px; }
    .btn { min-height: 46px; }
    .actions .btn { width: 100%; }
    .rbtn { min-height: 38px; padding: 9px 14px; font-size: 12.5px; }
    .card-head { padding: 13px 14px; }
    .card-body { padding: 14px; }
    .tabs a { flex: 1 1 auto; justify-content: center; }
    .alerts { left: 12px; right: 12px; width: auto; top: 68px; }
    .pager .pages a, .pager .pages span { min-width: 42px; height: 42px; }

    /* Tablolar kart görünümüne döner */
    table.tbl thead { display: none; }
    table.tbl tbody tr { display: block; border: 1px solid var(--line); border-radius: 9px; margin: 10px; padding: 5px 13px; background: #fff; }
    table.tbl tbody tr.edit-row { margin-top: -6px; }
    table.tbl tbody td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: none; padding: 8px 0; min-height: 40px; text-align: right; }
    table.tbl tbody td:before { content: attr(data-label); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-align: left; flex-shrink: 0; }
    table.tbl tbody td:not([data-label]):before { content: none; }
    table.tbl tbody td.check { width: auto; }
    table.tbl tbody tr.edit-row td { display: block; text-align: left; }
    table.tbl tbody tr.collapse-box:not(.show) { display: none; }
    .row-actions { justify-content: flex-end; }
}
@media (max-width: 400px) {
    .stats, .stats.c2, .stats.c3, .stats.c5 { grid-template-columns: 1fr; }
    .hero-side { grid-template-columns: 1fr; }
    .login-features { grid-template-columns: 1fr; }
}
@media (hover: none) {
    .stat:hover, .tile:hover, .btn:hover, .rbtn:hover { transform: none; }
}
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 35; border: none; }
.mini-ico { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11.5px; flex-shrink: 0; }
.topbar .sidebar-brand { border: 0; padding: 0; }
.d-none { display: none !important; }
tr.collapse-box { display: none; }
tr.collapse-box.show { display: table-row; }
@media (max-width: 768px) { tr.collapse-box.show { display: block; } }
.sync-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sync-box .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tbl .check-head { width: 36px; }
.d-block { display: block; }
.brand-name, .brand-sub { display: block; }
.panel-grid > div > .card, .panel-grid > form > .card { margin-bottom: 0; }
.tiles.compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tiles.compact .tile { padding: 16px 12px; }

/* Ayarlar: log temizligi ilerleme cubugu */
.pbar { height: 10px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.pbar span { display: block; height: 100%; width: 0; background: #dc2626; transition: width .3s ease; }
/* Kullanici yonetimi: tekrarlayan kayit notu */
.dup-note { font-size: 12px; color: #b45309; }

/* ---- Dil secici ---- */
.lang-switch {
    display: flex; align-items: center; gap: 6px; position: relative; cursor: pointer;
    padding: 7px 11px; border-radius: 30px; background: #f8fafc; border: 1px solid var(--line);
    font-size: 12px; font-weight: 700; color: #334155; margin-right: 10px; user-select: none;
    align-self: center; line-height: 1; white-space: nowrap;
}
.lang-switch:hover { background: #f1f5f9; }
.lang-switch > .fa-globe { color: var(--muted); font-size: 14px; }
.lang-switch > .fa-angle-down { color: var(--muted); }
.lang-menu {
    position: absolute; right: 0; top: calc(100% + 8px); display: none; z-index: 70;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop);
    min-width: 170px; padding: 6px; text-align: left;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu a {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px;
    color: #334155; font-size: 13px; font-weight: 600; text-decoration: none;
}
.lang-menu a:hover { background: #f1f5f9; }
.lang-menu a.active { background: #eef2ff; color: #3730a3; }
.lang-menu .lang-code {
    display: inline-block; min-width: 26px; padding: 2px 0; border-radius: 5px; text-align: center;
    background: #e2e8f0; color: #475569; font-size: 10.5px; font-weight: 800;
}
.lang-menu a.active .lang-code { background: #6366f1; color: #fff; }
.lang-switch.lang-guest { position: absolute; top: 18px; right: 18px; margin: 0; background: #fff; }
@media (max-width: 768px) {
    .lang-switch { padding: 6px 9px; margin-right: 6px; }
    .lang-switch.lang-guest { top: 10px; right: 10px; }
}
.rbtn.fw   { background: var(--g-teal);   box-shadow: 0 2px 6px rgba(15, 118, 110, .25); }

/* ---- Yazilim guncelleme ---- */
.mt4 { margin-top: 4px; }
.gap8 { gap: 8px; }
.text-danger { color: #b91c1c; }
.tbl th.w1, .tbl td.w1 { width: 1%; white-space: nowrap; }
.fw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.fw-toolbar .input { max-width: 260px; }
.fw-toolbar .fw-count { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-left: auto; }
.fw-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.fw-state.s-done { color: #15803d; }
.fw-state.s-started, .fw-state.s-sending, .fw-state.s-queued { color: #1d4ed8; }
.fw-state.s-rejected, .fw-state.s-failed, .fw-state.s-noresponse, .fw-state.s-timeout { color: #b91c1c; }
.fw-detail { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; white-space: normal; }
.fw-ver { font-weight: 800; }
.fw-ver.old { color: #b45309; }
.fw-ver.same { color: #15803d; }
.fw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fw-summary { margin-top: 10px; }
tr.fw-hidden { display: none; }

/* ---- Giris ekrani dil secimi (belirgin) ---- */
.lang-pick { margin-top: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.lang-pick-title { text-align: center; font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 10px; letter-spacing: .2px; }
.lang-pick-title .fa { color: #6366f1; margin-right: 4px; }
.lang-pick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lang-pick a {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border-radius: 9px;
    border: 1.5px solid var(--line); background: #f8fafc; color: #334155; text-decoration: none; transition: border-color .15s, background .15s, transform .15s;
}
.lang-pick a:hover { border-color: #a5b4fc; background: #eef2ff; transform: translateY(-1px); }
.lang-pick .lp-code { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 5px; background: #e2e8f0; color: #475569; letter-spacing: .5px; }
.lang-pick .lp-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.lang-pick a.active { border-color: #6366f1; background: #eef2ff; color: #3730a3; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.lang-pick a.active .lp-code { background: #6366f1; color: #fff; }
@media (max-width: 420px) {
    .lang-pick-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Dialog (native <dialog>) ---- */
.dlg { border: none; padding: 0; border-radius: 14px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(15, 23, 42, .35); color: var(--ink); }
.dlg::backdrop { background: rgba(15, 23, 42, .55); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dlg-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px; flex-shrink: 0; }
.dlg-title { flex: 1; min-width: 0; }
.dlg-title h3 { margin: 0; font-size: 16px; }
.dlg-title small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.dlg-x { border: none; background: none; font-size: 24px; line-height: 1; color: #94a3b8; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.dlg-x:hover { background: #f1f5f9; color: #475569; }
.dlg-body { padding: 16px 18px; }
.dlg-loading { color: var(--muted); padding: 18px 0; text-align: center; }
.dlg-sec { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.dlg-sec:first-child { padding-top: 0; }
.dlg-sec-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #64748b; margin-bottom: 8px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }
.dlg .banner { margin: 12px 0 0; }
.sms-code { font-family: Consolas, "Courier New", monospace; font-size: 30px; font-weight: 800; letter-spacing: 8px; color: #3730a3; background: #eef2ff; border-radius: 10px; text-align: center; padding: 10px; margin-bottom: 6px; }
.sms-code.empty { font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--muted); background: #f8fafc; }
/* Hesap dialogu: uzun (BG/RO) cihaz kimligi rozeti dialog disina tasmasin */
#acc-phoneid .pill { white-space: normal; line-height: 1.35; max-width: 100%; }

/* ---- Cihaz paneli ust cubugu: menu + kredi ---- */
.dev-nav { display: flex; gap: 6px; margin-left: 18px; }
.dev-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 8px; font-size: 13px; font-weight: 700; color: #475569; text-decoration: none; }
.dev-nav a:hover { background: #f1f5f9; }
.dev-nav a.active { background: #eef2ff; color: #3730a3; }
.dev-credit { display: flex; align-items: center; gap: 9px; padding: 5px 13px 5px 6px; border-radius: 30px; background: #fffbeb; border: 1px solid #fde68a; margin-right: 10px; }
.dev-credit b { display: block; font-size: 15px; line-height: 1.1; color: #92400e; }
.dev-credit small { display: block; font-size: 10.5px; color: #b45309; font-weight: 700; }
.dev-credit .nav-ico { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex-shrink: 0; }
@media (max-width: 768px) {
    .dev-nav { margin-left: 6px; }
    .dev-nav a { padding: 7px 9px; font-size: 12px; }
    .dev-credit { padding: 4px 9px 4px 4px; margin-right: 6px; }
    .dev-credit small { display: none; }
}
.dev-nav a, .dev-credit small, .dev-credit b { white-space: nowrap; }
.topbar form .btn { white-space: nowrap; }
@media (max-width: 1000px) {
    .topbar .sidebar-brand .brand-text { display: none; }
    .dev-credit small { display: none; }
}

/* ---- Bagli Kayitlar: kayit turu aciklamalari ---- */
.rec-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rec-help-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; background: #fff; border: 1px solid var(--line); }
.rec-help-item.active { border-color: #a5b4fc; background: #f5f7ff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .10); }
.rec-help-item b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.rec-help-item p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #475569; }
.rec-help-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; flex-shrink: 0; }
