@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f0f2f5;
    --surface: #fff;
    --surface-2: #f7f8fa;
    --border: #e2e6ec;
    --border-strong: #d0d5de;
    --text: #12151c;
    --text-soft: #3d4454;
    --muted: #7a8294;
    --primary: #0d9488;
    --primary-2: #0f766e;
    --primary-soft: #e6f7f5;
    --grad: linear-gradient(135deg, #0d9488, #0f766e);
    --green: #059669;
    --green-soft: #ecfdf5;
    --red: #dc2626;
    --red-soft: #fef2f2;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
    --shadow: 0 2px 8px rgba(15, 20, 30, .06), 0 1px 2px rgba(15, 20, 30, .04);
    --shadow-md: 0 8px 20px rgba(15, 20, 30, .08);
    --ring: 0 0 0 3px rgba(13, 148, 136, .18);
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-w: 250px;
    --sidebar-bg: #151922;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background:
        radial-gradient(900px 400px at 0% -5%, rgba(13, 148, 136, .07), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #0f172a 0%, #134e4a 55%, #0f766e 100%);
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    padding: 40px 34px 34px;
    border-radius: 18px;
    box-shadow: 0 28px 60px -18px rgba(0, 0, 0, .45);
    display: flex;
    flex-direction: column;
}
.login-logo {
    width: 58px; height: 58px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; border-radius: 16px; background: var(--grad);
}
.login-card h1 { font-size: 22px; text-align: center; font-weight: 800; }
.login-sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 14px; }
.login-card label { font-size: 12.5px; font-weight: 600; margin: 14px 0 6px; color: var(--text-soft); }
.login-card input {
    padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 15px; background: var(--surface-2);
}
.login-card input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.login-card .btn { margin-top: 24px; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: #a8b0c0;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 20px; font-size: 15px; font-weight: 700; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad); color: #fff; font-size: 15px;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 14px 12px; gap: 3px; flex: 1; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
    color: #a8b0c0;
}
.sidebar-nav a.active { background: rgba(13, 148, 136, .22); color: #5eead4; }
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-ico { width: 20px; text-align: center; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-logout {
    display: block; font-size: 13px; color: #a8b0c0; padding: 8px 12px; border-radius: 8px;
}
.sidebar-logout:hover { color: #fca5a5; background: rgba(220, 38, 38, .12); }

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.topbar {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title { font-size: 18px; font-weight: 800; flex: 1; }
.menu-toggle {
    display: none; background: none; border: none; font-size: 22px; cursor: pointer;
    width: 40px; height: 40px; border-radius: 10px;
}
.topbar-user { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
    background: var(--grad);
}
.user-name { font-size: 13.5px; font-weight: 600; }
.role-badge {
    font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.role-admin { background: var(--primary-soft); color: var(--primary-2); }

.content { padding: 24px 28px 40px; flex: 1; }
.page-center { width: 100%; max-width: 1400px; margin: 0 auto; }
.hit-board {
    display: flex;
    min-height: 560px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.hit-board[hidden] { display: none !important; }
.hit-board__side {
    width: 228px;
    flex-shrink: 0;
    overflow: auto;
    background: #151922;
    padding: 14px 10px;
}
.hit-board__gname {
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #5eead4; padding: 4px 8px 10px;
}
.hit-board__item {
    -webkit-appearance: none; appearance: none;
    width: 100%;
    display: flex; align-items: center; gap: 8px;
    padding: 8px;
    margin-bottom: 4px;
    border: 0; border-radius: 10px;
    background: transparent; color: #c5cdd8;
    font-family: inherit; text-align: left; cursor: pointer;
}
.hit-board__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.hit-board__item.is-on {
    background: rgba(13, 148, 136, .22);
    color: #fff;
    box-shadow: inset 3px 0 0 #2dd4bf;
}
.hit-board__ico {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #1c2430; color: #5eead4; font-size: 12px; font-weight: 800;
}
.hit-board__item.is-on .hit-board__ico { background: #0d9488; color: #fff; }
.hit-board__iname {
    flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hit-board__n {
    font-size: 11px; font-weight: 800;
    background: rgba(255,255,255,.08); color: #a8b0c0;
    padding: 2px 7px; border-radius: 999px;
}
.hit-board__item.is-on .hit-board__n { background: rgba(45, 212, 191, .25); color: #ccfbf1; }
.hit-board__main {
    flex: 1; min-width: 0;
    overflow: auto;
    padding: 16px;
    background: #f7f8fa;
}

.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-success { background: var(--green-soft); color: #047857; border-color: #a7f3d0; }
.alert-error { background: var(--red-soft); color: #b91c1c; border-color: #fecaca; }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}
.form-card__intro { margin-bottom: 20px; text-align: center; }
.form-card__intro h2 { font-size: 1.2rem; margin: 0 0 4px; }
.form-card__intro p { margin: 0; color: var(--muted); font-size: 13.5px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-soft); }
.form-group label small { font-weight: 400; color: var(--muted); }
.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--surface-2);
    color: var(--text);
}
.form-group input:focus,
.form-group select:focus {
    outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring);
}
.field-hint { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.product-card {
    display: flex; flex-direction: column; gap: 4px;
    border: 1px solid var(--border); background: var(--surface-2);
    border-radius: 14px; padding: 14px; cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.product-card:hover { border-color: var(--primary); }
.product-card.is-on,
.product-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: var(--ring);
}
.product-card input { position: absolute; opacity: 0; pointer-events: none; }
.product-card__name { font-weight: 800; font-size: 14px; }
.product-card__hint { font-size: 12px; color: var(--muted); }
.product-card--all { grid-column: 1 / -1; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(13, 148, 136, .7); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }
.btn-copy-link {
    display: inline-flex; align-items: center; height: 34px; padding: 0 12px;
    border: 1px solid var(--border); background: #fff; color: var(--text-soft);
    border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-copy-link:hover { background: var(--primary-soft); color: var(--primary); border-color: #b8e8e2; }
.btn-copy-link.is-ok { color: #047857; border-color: #a7f3d0; background: var(--green-soft); }
.btn-icon {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; cursor: pointer; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; color: var(--text-soft);
}
.btn-icon:hover { background: var(--primary-soft); color: var(--primary); }
.btn-icon.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-mini {
    height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-soft);
}
.btn-mini:hover { background: var(--primary-soft); color: var(--primary); border-color: #b8e8e2; }
.btn-danger-text { color: var(--red); border-color: #fecaca; }
.btn-danger-text:hover { background: var(--red-soft); color: var(--red); }

.inline-form { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }

.status-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--border-strong); background: var(--surface-2);
    border-radius: 10px; padding: 6px 10px; cursor: pointer;
    font-weight: 600; font-size: 12px; color: var(--muted);
}
.status-toggle__sw {
    width: 34px; height: 19px; background: #d3d8e6; border-radius: 20px; position: relative; flex-shrink: 0;
}
.status-toggle__sw::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
    background: #fff; border-radius: 50%; transition: transform .2s;
}
.status-toggle.is-on { color: #047857; border-color: #a7f3d0; background: var(--green-soft); }
.status-toggle.is-on .status-toggle__sw { background: var(--green); }
.status-toggle.is-on .status-toggle__sw::after { transform: translateX(15px); }

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-top: 22px;
}
.data-table { width: 100%; border-collapse: collapse; min-width: 1100px; }
.data-table th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700;
    background: var(--surface-2); white-space: nowrap;
}
.data-table td {
    padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top;
}
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.row-passive { opacity: .55; }
.u-name { font-weight: 700; }
.u-sub { color: var(--muted); font-size: 12.5px; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

.chip {
    display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
    background: var(--blue-soft); color: var(--blue); white-space: nowrap;
}
.chip-boss { background: var(--blue-soft); color: var(--blue); }
.chip-admin { background: #f3e8ff; color: #7c3aed; }
.chip-v3 { background: #fff7ed; color: #c2410c; }
.chip-wp { background: var(--primary-soft); color: var(--primary-2); }
.chip-ex { background: #f1f5f9; color: #334155; }
.chip-all { background: #ecfeff; color: #0e7490; }

.stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 auto 22px;
}
.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
    width: 200px; text-align: center;
}
.stat-card::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad);
}
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat-green::after { background: linear-gradient(180deg, #059669, #34d399); }
.stat-green .stat-value { color: var(--green); }

.refresh-packs {
    display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
    margin: 0 auto 22px; max-width: 860px;
}

.device-count {
    display: inline-flex; align-items: baseline; gap: 4px;
    font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
    border: 1px solid var(--border);
}
.device-count strong { font-size: 18px; line-height: 1; }
.device-count em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .8; }
.device-count.is-empty { background: var(--surface-2); color: var(--muted); }
.device-count.is-on { background: var(--green-soft); color: #047857; border-color: #a7f3d0; }
.device-count.is-full { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.device-cell { min-width: 220px; }
.device-cell__top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.device-drop { min-width: 0; }
.device-drop__btn {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; list-style: none; user-select: none;
}
.device-drop__btn::-webkit-details-marker { display: none; }
.device-drop__chev {
    width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); margin-top: -4px; transition: transform .15s;
}
.device-drop[open] .device-drop__chev { transform: rotate(225deg); margin-top: 2px; }
.device-drop .device-list { margin-top: 10px; }
.device-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.device-list li {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
}
.device-list__name { font-weight: 700; font-size: 13px; color: var(--text); }
.device-list__mac { font-size: 12px; color: var(--text-soft); word-break: break-all; }
.device-list__seen { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.extend-form { margin-top: 8px; }
.limit-form { margin-top: 0; flex-shrink: 0; }
.extend-form input[type=number],
.limit-form input[type=number] {
    width: 64px; height: 30px; padding: 0 8px; border: 1px solid var(--border-strong);
    border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 600;
}

.hit-cat__sub { font-size: 13.5px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.hit-card--taken { opacity: .92; }
.hit-cat__title {
    font-size: 15px; font-weight: 800; margin: 0 0 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border); color: var(--text-soft);
}
.hits-note { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.hit-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 18px;
    max-width: 720px;
}
.hit-search input[type=search] {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    color: var(--text);
}
.hit-search input[type=search]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.hit-search__n {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-2);
    background: var(--primary-soft);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.hit-pop {
    position: fixed;
    z-index: 4000;
    top: 168px;
    right: 24px;
    width: min(1080px, calc(100vw - 40px));
    height: min(700px, calc(100vh - 96px));
    display: flex;
    flex-direction: column;
    background: #0f141c;
    border: 1px solid rgba(94, 234, 212, .22);
    border-radius: 18px;
    box-shadow: 0 28px 70px -16px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255,255,255,.04);
    overflow: hidden;
    color: #e8edf4;
}
.hit-pop[hidden] { display: none !important; }
.hit-pop.is-front { z-index: 5000; box-shadow: 0 32px 80px -14px rgba(13, 148, 136, .35), 0 28px 70px -16px rgba(0, 0, 0, .55); }
.hit-pop__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: linear-gradient(90deg, #0d9488 0%, #134e4a 42%, #151922 100%);
    color: #fff;
    cursor: move;
    user-select: none;
}
.hit-pop__mark {
    width: 28px; height: 28px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.16); font-size: 15px; font-weight: 800;
}
.hit-pop__title { font-weight: 800; font-size: 14px; letter-spacing: .01em; }
.hit-pop__meta { font-size: 12px; font-weight: 700; color: #ccfbf1; margin-right: auto; }
.hit-pop__btn {
    -webkit-appearance: none; appearance: none;
    height: 28px; min-width: 28px; padding: 0 10px;
    border: 0; border-radius: 8px;
    background: rgba(255,255,255,.12); color: #fff;
    font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.hit-pop__btn:hover { background: rgba(255,255,255,.22); }
.hit-pop__btn--x { font-size: 18px; line-height: 1; padding: 0 8px; }
.hit-pop__shell { display: flex; flex: 1; min-height: 0; }
.hit-pop__side {
    width: 228px;
    flex-shrink: 0;
    overflow: auto;
    background: #121722;
    border-right: 1px solid rgba(255,255,255,.06);
    padding: 12px 10px 16px;
}
.hit-pop__g { margin-bottom: 14px; }
.hit-pop__gname {
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #7a8294; padding: 4px 8px 8px;
}
.hit-pop__g--pending .hit-pop__gname { color: #5eead4; }
.hit-pop__g--patlak .hit-pop__gname { color: #fdba74; }
.hit-pop__g--alindi .hit-pop__gname { color: #93c5fd; }
.hit-pop__g--yapildi .hit-pop__gname { color: #6ee7b7; }
.hit-pop__item {
    -webkit-appearance: none; appearance: none;
    width: 100%;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 8px;
    margin-bottom: 4px;
    border: 0; border-radius: 10px;
    background: transparent; color: #c5cdd8;
    font-family: inherit; text-align: left; cursor: pointer;
}
.hit-pop__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.hit-pop__item.is-on {
    background: rgba(13, 148, 136, .22);
    color: #fff;
    box-shadow: inset 3px 0 0 #2dd4bf;
}
.hit-pop__ico {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #1c2430; color: #5eead4; font-size: 12px; font-weight: 800;
}
.hit-pop__item.is-on .hit-pop__ico { background: #0d9488; color: #fff; }
.hit-pop__iname {
    flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hit-pop__n {
    font-size: 11px; font-weight: 800;
    background: rgba(255,255,255,.08); color: #a8b0c0;
    padding: 2px 7px; border-radius: 999px;
}
.hit-pop__item.is-on .hit-pop__n { background: rgba(45, 212, 191, .25); color: #ccfbf1; }
.hit-pop__main {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    background:
        radial-gradient(700px 280px at 100% 0%, rgba(13, 148, 136, .12), transparent 55%),
        #f3f5f8;
    color: var(--text);
}
.hit-pop__head {
    padding: 12px 16px 0;
}
.hit-pop__now {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.hit-pop__now strong { font-size: 16px; font-weight: 800; }
.hit-pop__now em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--primary-2); }
.hit-pop__now span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.hit-pop__body {
    flex: 1;
    overflow: auto;
    padding: 12px 16px 16px;
}
.hit-pop__empty { text-align: center; color: #7a8294; padding: 64px 16px; }
.hit-pop .hit-card { margin-bottom: 0; }
.hit-pop .hit-card__top { display: none; }
.hit-pop .hit-file { background: #fff; }
.hit-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px;
}
.hit-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.hit-card__name { font-weight: 800; font-size: 16px; }
.hit-card__count { font-size: 12px; font-weight: 700; color: var(--primary-2); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.hit-dev { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.hit-dev:first-of-type { margin-top: 4px; }
.hit-dev__name { font-size: 13px; font-weight: 700; color: var(--text-soft); margin: 0 0 8px; }
.hit-file {
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
    margin-bottom: 8px;
}
.hit-file > summary {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    cursor: pointer; list-style: none; user-select: none;
}
.hit-file > summary::-webkit-details-marker { display: none; }
.hit-file > summary::before {
    content: "▸"; color: var(--muted); font-size: 12px; width: 12px; flex-shrink: 0;
}
.hit-file[open] > summary::before { content: "▾"; }
.hit-file__name { font-family: ui-monospace, Consolas, monospace; font-weight: 700; flex: 1; font-size: 13.5px; }
.hit-file__n { font-size: 12px; font-weight: 700; color: var(--primary-2); white-space: nowrap; }
.hit-file__dl { flex-shrink: 0; }
.hit-file__body { padding: 0 12px 12px; }
.hit-lines { list-style: none; max-height: 520px; overflow: auto; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hit-lines li {
    display: flex; gap: 10px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px;
}
.hit-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.hit-row code {
    flex: 1;
    min-width: 0;
    display: block;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: text;
    border-radius: 6px;
}
.hit-row code:hover {
    background: #f8fafc;
}
.hit-row.is-editing code {
    overflow: auto;
    text-overflow: clip;
    outline: none;
    background: #fff;
    border: 1px solid var(--primary);
    padding: 3px 8px;
    box-shadow: var(--ring);
    white-space: nowrap;
}
.hit-row__btns {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.hit-act {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex; align-items: center; justify-content: center;
    height: 28px; padding: 0 10px; border: 0; border-radius: 8px;
    font-size: 12px; font-weight: 700;
    cursor: pointer; white-space: nowrap; text-decoration: none;
    font-family: inherit; line-height: 1;
    background-image: none;
    transition: filter .12s, background .12s, color .12s;
}
.hit-act:hover { filter: brightness(.96); }
.hit-act--patlak { background: #fff4e5; color: #9a3412; }
.hit-act--copy { background: #e8edf4; color: #0f172a; }
.hit-act--copy.is-ok { background: #d1fae5; color: #047857; }
.hit-act--alindi { background: #dbe7ff; color: #1e3a8a; }
.hit-act--yapildi { background: #0d9488; color: #fff !important; }
.hit-act--yapildi:hover { color: #fff !important; }
.hit-act--go { background: #dcfce7; color: #166534; }
.hit-act--sil { background: #fee2e2; color: #b91c1c; }
.hit-dom { margin-bottom: 12px; }
.hit-dom__name {
    font-size: 12.5px; font-weight: 800; color: var(--primary-2);
    margin: 0 0 6px; font-family: ui-monospace, Consolas, monospace;
}
.hit-day { margin-bottom: 28px; }
.hit-day__title {
    font-size: 18px; font-weight: 800; margin: 0 0 14px;
    display: flex; align-items: baseline; gap: 10px;
}
.hit-day__title span { font-size: 13px; font-weight: 700; color: var(--muted); }
.hit-src { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--primary-2); background: #fff; border: 1px solid #b8e8e2; border-radius: 999px; padding: 2px 8px; }
.hit-lines code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.hit-card__actions { display: flex; gap: 10px; align-items: center; }
.hit-take { display: inline-flex; margin: 0; }
.btn-mini.btn-primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn-mini.btn-primary:hover { color: #fff; filter: brightness(1.06); }

.empty-state {
    text-align: center; padding: 64px 20px; background: var(--surface);
    border: 1px dashed var(--border-strong); border-radius: 18px; color: var(--muted);
    margin-top: 22px;
}
.empty-icon {
    width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    background: var(--primary-soft); color: var(--primary);
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .content { padding: 16px; }
    .topbar { padding: 0 14px; }
    .user-name { display: none; }
    .form-card { padding: 20px 16px; }
    .product-grid { grid-template-columns: 1fr 1fr; }
    .stats { justify-content: center; }
    .stat-card { width: 160px; }
}
