/* dash.css — dashboard layout shell */

/* ── Layout ───────────────────────────────────────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  grid-column: 1;
  display: flex; flex-direction: column;
  background: rgba(12,12,12,.94);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 1.6rem 1.35rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.brand-logo  { font-size: 1.08rem; font-weight: 750; letter-spacing: 0; }
.brand-tag   { display: block; font-size: .65rem; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .08em; }

.sidebar-nav {
  flex: 1; display: flex; flex-direction: column;
  padding: 1rem .85rem;
  gap: .28rem;
}
.nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: .72rem .78rem;
  border-radius: var(--radius);
  font-size: .92rem; color: var(--muted);
  transition: background .15s, color .15s;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: var(--fg); }
.nav-item--active { background: var(--accent); color: var(--fg); font-weight: 650; }
.nav-item-icon { flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: .75rem;
}
.settings-link { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .88rem; padding: .65rem .72rem; border: 1px solid var(--border); border-radius: var(--radius); }
.settings-link:hover { color: var(--fg); background: var(--accent); }
.sidebar-footer .sidebar-logout { justify-self: end; margin-top: -2rem; }
.sidebar-user { display: flex; align-items: center; gap: 0.5rem; font-size: .8rem; color: var(--muted); overflow: hidden; }
.sidebar-user-icon { flex-shrink: 0; }
.sidebar-username  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout    { color: var(--muted); transition: color .2s; flex-shrink: 0; }
.sidebar-logout:hover { color: var(--red); }

/* ── Topbar (mobile only) ─────────────────────────────────────────────────── */
.topbar {
  display: none;
  grid-column: 1 / -1;
  align-items: center; justify-content: space-between;
  padding: 0.875rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.topbar-hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; padding: 2px;
}
.topbar-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--fg); border-radius: 2px;
}
.topbar-title  { font-size: .875rem; font-weight: 600; }
.topbar-logout { color: var(--muted); transition: color .2s; }
.topbar-logout:hover { color: var(--red); }

/* ── Main content ─────────────────────────────────────────────────────────── */
.dash-main { grid-column: 2; min-height: 100vh; overflow-y: auto; }
.dash-content { width: 100%; margin: 0 auto; padding: 3.25rem clamp(1.25rem, 3vw, 3.5rem); box-sizing: border-box; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .topbar { display: flex; }
  .sidebar {
    display: none; position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; z-index: 50;
  }
  .sidebar--open { display: flex; }
  .dash-main { grid-column: 1; }
  .dash-content { padding: 1.5rem 1rem; }
}

/* ── Tab header ───────────────────────────────────────────────────────────── */
.tab-header { margin-bottom: 1.7rem; }
.tab-eyebrow {
  font-size: .7rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: 0.25rem;
}
.tab-title {
  font-size: 2rem; font-weight: 760; letter-spacing: 0;
  display: flex; align-items: center; gap: 0.6rem;
}
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); border: 1px solid var(--border);
  border-radius: 9999px; padding: 0.1rem 0.6rem;
  font-size: .8rem; font-weight: 500; color: var(--muted);
}
.tab-desc { margin-top: 0.5rem; font-size: .875rem; color: var(--muted); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 4rem 2rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(20,20,20,.55);
}
.empty-icon { color: var(--muted); margin-bottom: 1.25rem; opacity: .5; }
.empty-icon--spin { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.empty-desc  { font-size: .875rem; color: var(--muted); }
.empty-desc a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.full-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.full-table thead tr { background: rgba(255,255,255,.035); }
.full-table th { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.full-table th, .full-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.full-table tr:last-child td { border-bottom: none; }
.widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.widget, .wide-card { background: rgba(20,20,20,.78); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem; box-sizing: border-box; box-shadow: 0 18px 60px rgba(0,0,0,.18); }
.widget { min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .18s, background .18s, transform .18s; }
.widget:hover, .wide-card:hover { border-color: rgba(136,136,136,.34); background: rgba(24,24,24,.85); }
.widget-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.widget-value { font-size: 2.4rem; line-height: 1; font-weight: 760; margin-top: .35rem; }
.widget-hint { color: var(--muted); font-size: .8rem; margin-top: .65rem; }
.sales-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1rem; background: #f4c430; color: #1b1600; border: 1px solid rgba(244,196,48,.45); border-radius: var(--radius); font-weight: 700; margin-bottom: 1.5rem; width: fit-content; min-height: 42px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; align-items: end; }
.form-grid input, .form-grid button, .search-select { width: 100%; min-height: 40px; }
.search-select { appearance: none; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 6px; color: var(--fg); padding: .5rem .75rem; font: inherit; font-size: .82rem; }
.search-select option { background: #1a1a1a; color: var(--fg); }
.landing { min-height: 100vh; padding: clamp(1rem, 4vw, 4rem); background: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px), var(--bg); background-size: 60px 60px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 1rem 0; }
.landing-nav strong { font-size: 1.1rem; }
.landing-nav a { border: 1px solid var(--border); border-radius: var(--radius); padding: .55rem .85rem; color: var(--fg); }
.landing-hero { max-width: 1180px; margin: 14vh auto 0; text-align: center; }
.landing-hero h1 { max-width: 900px; margin-left: auto; margin-right: auto; font-size: clamp(2.4rem, 6vw, 5rem); line-height: .96; letter-spacing: 0; margin-bottom: 1rem; }
.landing-hero p { max-width: 720px; color: var(--muted); font-size: 1.1rem; margin-bottom: 1.5rem; }
.landing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.landing-features { max-width: 1180px; margin: 4.5rem auto 0; }
.landing-features .widget-label { display: flex; align-items: center; gap: .5rem; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 999px; background: var(--emerald); }
.under-card { min-height: 260px; display: flex; flex-direction: column; gap: .75rem; align-items: center; justify-content: center; color: var(--muted); font-size: 1rem; text-align: center; }
.contacts-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.support-status { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .78rem; white-space: nowrap; padding-bottom: .15rem; }
.contacts-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, .62fr); gap: 1rem; align-items: stretch; }
.contact-directory, .manager-panel { background: rgba(19,19,19,.82); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.section-caption { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.table-scroll { overflow-x: auto; }
.contacts-table th, .contacts-table td { padding: 1.1rem 1.25rem; }
.contacts-table tbody tr { transition: background .15s; }
.contacts-table tbody tr:hover { background: rgba(255,255,255,.025); }
.contact-name { font-weight: 650; color: var(--fg); }
.role-mark { display: inline-flex; align-items: center; min-height: 24px; padding: 0 .5rem; color: #c7c7c7; background: rgba(255,255,255,.055); border: 1px solid var(--border); border-radius: 4px; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.role-mark--noc { color: #8ee7c1; background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.18); }
.telegram-link { display: inline-flex; align-items: center; gap: .4rem; }
.manager-panel { position: relative; padding: 1.35rem; display: grid; grid-template-columns: 52px 1fr; gap: 1rem; align-content: start; }
.manager-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--yellow); }
.manager-kicker { grid-column: 1 / -1; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.manager-avatar { width: 52px; height: 52px; display: grid; place-items: center; background: #f4c430; color: #191400; border-radius: 7px; font-size: .9rem; font-weight: 800; }
.manager-panel h3 { margin: .15rem 0 .25rem; font-size: 1.05rem; }
.manager-panel p { color: var(--muted); font-size: .78rem; }
.manager-actions { grid-column: 1 / -1; display: grid; gap: .45rem; padding-top: .5rem; }
.manager-actions a { display: flex; align-items: center; gap: .55rem; min-height: 38px; padding: 0 .7rem; background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: 6px; color: var(--fg); font-size: .82rem; transition: background .15s, border-color .15s; }
.manager-actions a:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
.table-more { margin-top: 1rem; }
.subnet-list { display: grid; gap: .55rem; padding: .4rem; background: rgba(13,13,13,.6); border: 1px solid var(--border); border-radius: var(--radius); }
.subnet-row { min-height: 72px; display: grid; grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(130px, .75fr)); align-items: center; gap: 1rem; padding: .75rem 1rem; background: rgba(21,21,21,.82); border: 1px solid var(--border); border-radius: var(--radius); transition: background .15s, border-color .15s; }
.subnet-row:hover { background: rgba(25,25,25,.9); border-color: rgba(136,136,136,.32); }
.subnet-prefix { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.subnet-prefix > div { display: grid; gap: .15rem; min-width: 0; }
.subnet-prefix code { color: var(--fg); font-size: .86rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.subnet-prefix span, .subnet-field > span { color: var(--muted); font-size: .64rem; text-transform: uppercase; }
.subnet-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: #f4c430; background: rgba(244,196,48,.08); border: 1px solid rgba(244,196,48,.15); border-radius: 6px; }
.subnet-field { min-width: 0; display: grid; gap: .22rem; }
.subnet-field strong { font-size: .78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-value { display: flex; align-items: center; gap: .45rem; }
.country-value b { font-size: 1rem; font-weight: 400; line-height: 1; }
.attacks-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.feed-status { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .72rem; padding-bottom: .2rem; }
.feed-status > span { width: 7px; height: 7px; border-radius: 50%; background: #67d5a5; box-shadow: 0 0 0 3px rgba(52,211,153,.1); }
.attack-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; background: rgba(25,25,25,.76); }
.attack-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.attack-table thead { background: rgba(255,255,255,.035); }
.attack-table th { padding: .8rem 1rem; color: var(--muted); font-size: .65rem; font-weight: 700; text-align: left; text-transform: uppercase; }
.attack-table td { padding: .85rem 1rem; border-top: 1px solid var(--border); font-size: .78rem; vertical-align: middle; }
.attack-table tbody tr:hover { background: rgba(255,255,255,.025); }
.attack-id { color: var(--muted); }
.attack-ip { display: flex; align-items: center; gap: .5rem; }
.attack-ip > span { width: 7px; height: 7px; border-radius: 50%; background: #f07171; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.attack-peak { white-space: nowrap; }
.attack-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.attack-tag { padding: .22rem .42rem; border-radius: 4px; color: #f0bd39; background: rgba(234,179,8,.08); border: 1px solid rgba(234,179,8,.09); font-size: .62rem; font-weight: 700; white-space: nowrap; }
.attack-tag--more { color: var(--muted); background: rgba(255,255,255,.04); border-color: var(--border); }
.attack-time { display: grid; gap: .18rem; min-width: 150px; }
.attack-time strong { font-size: .72rem; }
.attack-time span { color: var(--muted); font-size: .65rem; }
.attack-more { display: inline-flex; align-items: center; gap: .35rem; color: var(--fg); white-space: nowrap; }
.attack-notice, .attack-empty { min-height: 160px; display: flex; align-items: center; justify-content: center; gap: .8rem; padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(26,26,26,.72); }
.attack-notice { color: #f0bd39; }
.attack-notice > div, .attack-empty { flex-direction: column; }
.attack-notice > div { display: grid; gap: .25rem; }
.attack-notice span, .attack-empty span { color: var(--muted); font-size: .78rem; }
.attack-empty { text-align: center; color: var(--muted); }
.attack-empty strong { color: var(--fg); margin-top: .4rem; }

.attacks-filter { display: flex; gap: .6rem; margin-bottom: 1.25rem; max-width: 560px; }
.attacks-filter .form-input { flex: 1; min-height: 40px; }
.attacks-filter .btn { white-space: nowrap; }

.attack-row { cursor: pointer; }
.attack-chevron { transition: transform .2s; }
.attack-row--open .attack-chevron { transform: rotate(90deg); }
.attack-detail-row td { border-top: none !important; padding: 0 1rem 1rem !important; }
.attack-detail-panel { background: rgba(20,20,20,.6); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; font-size: .82rem; display: flex; align-items: center; gap: .5rem; }
.attack-detail-panel:has(.dv-row) { display: block; }
.attack-ports { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.attack-port { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .75rem; background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: 6px; font-size: .75rem; }
.attack-port span { color: var(--muted); }
.settings-password { display: flex; flex-direction: column; gap: .9rem; }
.settings-password h3 { margin-top: .35rem; }
.settings-password .btn { width: fit-content; }
input[type="date"] { color-scheme: dark; position: relative; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(1); opacity: .65; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.full-table a, .account-manager a { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 4px; }
.full-table a:hover, .account-manager a:hover { text-decoration-color: var(--fg); }
@media (max-width: 900px) { .widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .contacts-layout { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .subnet-row { grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(120px, .7fr)); } .subnet-row .subnet-field:last-child { grid-column: 2; } }
@media (max-width: 600px) { .contacts-heading { align-items: start; flex-direction: column; } .contacts-table th, .contacts-table td { padding: .85rem 1rem; } }
@media (max-width: 650px) { .subnet-list { padding: .3rem; } .subnet-row { grid-template-columns: 1fr 1fr; gap: .85rem; } .subnet-prefix { grid-column: 1 / -1; } .subnet-row .subnet-field:last-child { grid-column: auto; } }
@media (max-width: 650px) { .attacks-heading { align-items: start; flex-direction: column; } }
