:root {
  --ink: #10213c;
  --ink-soft: #53627a;
  --ink-muted: #7a879a;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-blue: #edf5ff;
  --line: #dfe7f2;
  --line-strong: #cbd7e7;
  --brand: #176bff;
  --brand-strong: #0b57d0;
  --brand-dark: #06265d;
  --cyan: #00b9f5;
  --navy: #06132c;
  --navy-soft: #0b2347;
  --success: #0e9f6e;
  --warning: #e28712;
  --danger: #d92d4a;
  --info: #2477e6;
  --shadow-sm: 0 4px 16px rgba(11, 35, 71, .06);
  --shadow: 0 18px 50px rgba(11, 35, 71, .12);
  --shadow-lg: 0 30px 90px rgba(3, 18, 43, .22);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --max: 1220px;
  --sidebar: 256px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid rgba(23, 107, 255, .26); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.hide { display: none !important; }
.muted { color: var(--ink-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-brand { color: var(--brand); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 26px; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: 86px 0; }
.section-tight { padding: 54px 0; }
.section-blue { background: linear-gradient(180deg, #f2f7ff 0%, #fff 100%); }
.section-dark { background: var(--navy); color: #fff; }
.eyebrow { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 14px; }
.section-title { font-size: clamp(30px, 4vw, 46px); line-height: 1.14; letter-spacing: -.035em; margin-bottom: 16px; }
.section-copy { max-width: 720px; color: var(--ink-soft); font-size: 17px; }
.section-dark .section-copy { color: #adbed9; }

/* Buttons */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #0e56dc); color: #fff; }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(23, 107, 255, .28); }
.btn-secondary { border-color: var(--line-strong); background: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-soft { background: var(--surface-blue); color: var(--brand-strong); }
.btn-danger { background: #fff1f3; color: var(--danger); border-color: #ffd3da; }
.btn-dark { background: var(--navy-soft); color: #fff; border-color: #1b3d69; }
.btn-sm { min-height: 34px; padding: 7px 12px; border-radius: 8px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 14px 24px; border-radius: 12px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); }
.icon-btn:hover { color: var(--brand); border-color: #a9c8ff; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* Public header */
.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 18, 42, .94);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.public-header .container { height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; flex: 0 0 auto; text-decoration: none; min-width: 0; }
.brand img { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-name { font-size: 22px; line-height: 1; font-weight: 850; letter-spacing: -.03em; white-space: nowrap; }
.brand-compact img { width: 34px; height: 34px; }
.brand-compact .brand-name { font-size: 20px; }
.public-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.public-nav a { padding: 9px 13px; color: #c7d5e9; font-size: 14px; font-weight: 650; border-radius: 8px; }
.public-nav a:hover, .public-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: #dbe8fa; border-radius: 9px; padding: 8px 10px; font-weight: 700; }
.mobile-menu-button { display: none; background: transparent; border: 0; color: #fff; }
.mobile-menu { display: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(23,107,255,.28), transparent 34%),
    radial-gradient(circle at 82% 35%, rgba(0,185,245,.18), transparent 32%),
    linear-gradient(145deg, #071a3d 0%, #030b1d 54%, #06142d 100%);
  color: #fff;
  padding: 74px 0 132px;
}
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to bottom, #000, transparent); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 54px; }
.hero-copy { max-width: 640px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(75,162,255,.35); background: rgba(23,107,255,.12); border-radius: 999px; color: #9ed7ff; font-size: 13px; font-weight: 750; margin-bottom: 20px; }
.hero h1 { font-size: clamp(42px, 5.4vw, 70px); line-height: 1.06; letter-spacing: -.055em; margin-bottom: 22px; }
.hero p { color: #b9c9df; font-size: 18px; max-width: 600px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; color: #c9d8ed; font-size: 13px; }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-art { position: relative; }
.hero-art img { filter: drop-shadow(0 32px 80px rgba(0, 115, 255, .24)); }
.floating-card { position: absolute; background: rgba(5, 20, 47, .84); border: 1px solid rgba(87,160,255,.32); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); backdrop-filter: blur(14px); padding: 14px 16px; }
.floating-card strong { display: block; color: #fff; font-size: 21px; }
.floating-card small { color: #8eb7ea; }
.float-one { left: -18px; bottom: 40px; }
.float-two { right: -8px; top: 54px; }

.hero-stats-wrap { position: relative; z-index: 2; margin-top: -68px; }
.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.hero-stat { padding: 26px 28px; display: flex; align-items: center; gap: 14px; }
.hero-stat + .hero-stat { border-left: 1px solid var(--line); }
.hero-stat-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: var(--brand); background: var(--surface-blue); }
.hero-stat strong { display: block; font-size: 23px; line-height: 1.15; }
.hero-stat small { color: var(--ink-muted); }

/* Cards / grids */
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 18px; }
.feature-card { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: .22s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: #afcaff; box-shadow: var(--shadow); }
.feature-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-blue); color: var(--brand); margin-bottom: 18px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); margin-bottom: 0; }
.process-card { position: relative; padding: 28px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.process-number { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 850; margin-bottom: 18px; }
.process-card p { color: var(--ink-soft); margin: 0; }

.plan-card { position: relative; display: grid; gap: 18px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.plan-card.featured { border-color: #75a8ff; box-shadow: 0 20px 55px rgba(23,107,255,.12); }
.plan-ribbon { position: absolute; top: 16px; right: -38px; width: 130px; transform: rotate(35deg); background: var(--brand); color: #fff; text-align: center; font-size: 11px; font-weight: 800; padding: 4px; }
.plan-image { height: 150px; border-radius: 13px; background: linear-gradient(145deg, #081b3e, #030a18); display: grid; place-items: center; overflow: hidden; }
.plan-image img { width: 90%; height: 90%; object-fit: contain; }
.plan-card h3 { margin: 0; font-size: 20px; }
.plan-specs { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.plan-spec { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.plan-spec small { display: block; color: var(--ink-muted); }
.plan-return { padding: 16px; border-radius: 12px; background: #fff7ed; border: 1px solid #ffe0b8; }
.plan-return strong { color: #eb6800; font-size: 28px; }
.risk-note { padding: 14px 16px; border-left: 4px solid var(--warning); background: #fff8eb; color: #7a4d0a; border-radius: 8px; font-size: 13px; }

/* Public pages */
.page-hero { background: linear-gradient(145deg, #071a3d, #06122b); color: #fff; padding: 70px 0; }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
.page-hero h1 { font-size: clamp(38px,5vw,60px); letter-spacing: -.045em; line-height: 1.08; margin-bottom: 16px; }
.page-hero p { color: #b9c9df; font-size: 18px; max-width: 700px; }
.page-hero-art { min-height: 260px; display: grid; place-items: center; }
.content-prose { color: var(--ink-soft); font-size: 16px; }
.content-prose h2 { color: var(--ink); margin-top: 32px; }
.content-prose h3 { color: var(--ink); margin-top: 24px; }
.content-prose ul { padding-left: 22px; }
.content-prose li { margin: 8px 0; }
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border: 0; background: #fff; color: var(--ink); font-weight: 750; text-align: left; }
.faq-answer { padding: 0 20px 20px; color: var(--ink-soft); }
.logo-strip { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 36px; color: #68758a; font-size: 24px; font-weight: 850; }
.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; }
.contact-panel { padding: 28px; background: linear-gradient(145deg, #071a3d, #0a2c59); color: #fff; border-radius: 18px; }
.contact-panel p { color: #b9c9df; }
.contact-channel { color: inherit; text-decoration: none; width: fit-content; }
.contact-channel:hover { color: #fff; opacity: .86; }
.contact-channel-whatsapp .icon { color: inherit; }

/* Forms */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  transition: .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,107,255,.1); outline: 0; }
.field-hint { color: var(--ink-muted); font-size: 12px; }
.field-error { color: var(--danger); font-size: 12px; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); }
.checkbox input { margin-top: 3px; }
.auth-page { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.auth-visual { background: radial-gradient(circle at 35% 30%, rgba(23,107,255,.4), transparent 30%), linear-gradient(145deg,#071a3d,#030a18); color: #fff; display: grid; place-items: center; padding: 60px; }
.auth-visual-inner { max-width: 520px; }
.auth-visual h1 { font-size: 46px; line-height: 1.1; }
.auth-visual p { color: #b7c9e2; }
.auth-form-wrap { display: grid; place-items: center; padding: 54px 28px; }
.auth-form { width: min(440px,100%); }
.auth-form h1 { font-size: 34px; margin-bottom: 8px; }
.auth-form > p { color: var(--ink-soft); margin-bottom: 28px; }

/* Dashboard shell */
.dashboard { min-height: 100vh; background: #f3f6fb; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: linear-gradient(180deg,#071a3d,#041126); color: #fff; z-index: 60; display: flex; flex-direction: column; }
.sidebar-brand { height: 76px; display: flex; align-items: center; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand { width: 100%; }
.sidebar-nav { padding: 18px 14px; display: grid; gap: 4px; overflow-y: auto; }
.sidebar-nav a { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #aebed5; font-size: 14px; font-weight: 650; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: rgba(47,124,255,.18); }
.sidebar-nav a.active { box-shadow: inset 3px 0 0 #4da3ff; }
.sidebar-section { padding: 14px 12px 5px; color: #6f86a6; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.sidebar-foot { margin-top: auto; padding: 16px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.user-mini { display: flex; align-items: center; gap: 10px; color: #dbe7f7; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg,#3d89ff,#0cb6e8); color: #fff; font-weight: 800; flex: 0 0 auto; }
.user-mini small { color: #7f96b5; display: block; }
.dashboard-main { margin-left: var(--sidebar); min-height: 100vh; }
.dashboard-topbar { height: 76px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 16px; position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); }
.dashboard-topbar h1 { font-size: 20px; margin: 0; }
.topbar-spacer { flex: 1; }
.topbar-search { width: min(340px,30vw); position: relative; }
.topbar-search input { width: 100%; min-height: 40px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 10px; padding: 9px 12px 9px 38px; }
.topbar-search svg { position: absolute; left: 12px; top: 10px; color: var(--ink-muted); }
.sidebar-toggle { display: none; }
.dashboard-content { padding: 28px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.page-head h1 { font-size: 28px; margin-bottom: 5px; }
.page-head p { color: var(--ink-soft); margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.metric-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.metric-label { color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.metric-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-blue); color: var(--brand); }
.metric-value { font-size: 27px; line-height: 1.2; font-weight: 820; letter-spacing: -.025em; }
.metric-change { font-size: 12px; margin-top: 7px; color: var(--ink-muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.75fr); gap: 20px; }
.chart-box { min-height: 300px; padding: 20px; }
.chart { width: 100%; height: 240px; overflow: visible; }
.chart-grid-line { stroke: #e8eef6; stroke-width: 1; }
.chart-path { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartGradient); opacity: .22; }
.chart-dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; padding: 20px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.donut::after { content: ""; width: 92px; height: 92px; background: #fff; border-radius: 50%; position: absolute; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.legend { display: grid; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 13px 16px; color: var(--ink-muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--line); background: #fafcff; white-space: nowrap; }
.table td { padding: 15px 16px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cell-title { font-weight: 750; }
.cell-sub { color: var(--ink-muted); font-size: 12px; margin-top: 2px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; background: #eef2f7; color: #657287; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-running, .status-active, .status-online, .status-completed, .status-confirmed, .status-distributed, .status-approved, .status-converted, .status-resolved, .status-accepted, .status-published { background: #eaf9f3; color: var(--success); }
.status-pending, .status-submitted, .status-reviewing, .status-contract_pending, .status-processing, .status-deploying, .status-procurement, .status-quoted { background: #fff6e8; color: var(--warning); }
.status-suspended, .status-rejected, .status-failed, .status-offline, .status-error, .status-cancelled, .status-closed, .status-spam { background: #fff0f2; color: var(--danger); }
.status-maintenance, .status-paused, .status-exit_pending, .status-waitlist { background: #eef4ff; color: var(--info); }
.status-idle, .status-draft, .status-new, .status-private, .status-archived, .status-reversed, .status-exited { background: #eef2f7; color: #657287; }
.filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filters .field { min-width: 150px; }
.filters .field input, .filters .field select { min-height: 38px; padding-block: 7px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); }

/* Project and server cards */
.project-list { display: grid; gap: 14px; }
.project-row { display: grid; grid-template-columns: 64px 1.3fr repeat(4,minmax(100px,.7fr)) auto; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.project-thumb { width: 64px; height: 64px; border-radius: 12px; background: linear-gradient(145deg,#081b3e,#030a18); display: grid; place-items: center; color: #53a3ff; }
.project-row strong { display: block; }
.project-data small { color: var(--ink-muted); display: block; }
.project-data span { font-weight: 760; }
.server-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.server-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 20px; }
.server-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.server-icon { width: 48px; height: 48px; border-radius: 12px; background: #071a3d; color: #48a2ff; display: grid; place-items: center; }
.server-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.server-stat { background: var(--surface-soft); border-radius: 9px; padding: 10px; }
.server-stat small { color: var(--ink-muted); display: block; }
.progress { height: 8px; background: #e9eef6; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg,var(--brand),var(--cyan)); border-radius: inherit; }

/* Detail tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button, .tabs a { border: 0; background: transparent; color: var(--ink-soft); padding: 13px 16px; border-bottom: 2px solid transparent; font-weight: 700; white-space: nowrap; }
.tabs button.active, .tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.detail-hero { padding: 22px; display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 20px; }
.detail-image { height: 96px; border-radius: 13px; background: linear-gradient(145deg,#071a3d,#030a18); display: grid; place-items: center; color: #52a3ff; }
.detail-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 18px; }
.detail-kpi { padding: 13px; border-radius: 10px; background: var(--surface-soft); }
.detail-kpi small { color: var(--ink-muted); display: block; }

/* Empty/loading */
.loading { min-height: 240px; display: grid; place-items: center; color: var(--ink-muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #dce7f6; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 54px 20px; color: var(--ink-muted); }
.empty-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 18px; background: var(--surface-blue); color: var(--brand); }

/* Modal, toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(3,11,26,.62); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(720px,100%); max-height: min(88vh,900px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal-sm { width: min(480px,100%); }
.modal-lg { width: min(980px,100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 22px; }
.modal-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fff; }
#toast-root { position: fixed; right: 18px; top: 88px; z-index: 200; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 440px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; animation: toast-in .25s ease; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } }

/* Admin utility */
.admin-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.admin-summary .metric-card { padding: 17px; }
.quick-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.quick-action { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; align-items: center; gap: 11px; font-weight: 700; }
.quick-action:hover { border-color: #a8c7ff; color: var(--brand); }
.json-view { padding: 14px; border-radius: 10px; background: #071a3d; color: #bce5ff; white-space: pre-wrap; font: 12px/1.6 ui-monospace, monospace; overflow: auto; }

/* Footer */
.public-footer { background: #041126; color: #fff; padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 44px; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { color: #8fa5c4; max-width: 360px; }
.footer-col h3 { font-size: 14px; margin-bottom: 15px; }
.footer-col a { display: block; color: #8fa5c4; margin: 8px 0; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 42px; padding-top: 20px; display: flex; justify-content: space-between; gap: 20px; color: #7188a9; font-size: 12px; }

/* Mobile */
@media (max-width: 1100px) {
  .public-nav { display: none; }
  .mobile-menu-button { display: grid; place-items: center; }
  .mobile-menu.open { display: grid; padding: 10px 20px 20px; border-top: 1px solid rgba(255,255,255,.08); }
  .mobile-menu a { color: #c7d5e9; padding: 11px 8px; }
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 680px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .admin-summary { grid-template-columns: repeat(3,1fr); }
  .server-grid { grid-template-columns: repeat(2,1fr); }
  .project-row { grid-template-columns: 56px 1.4fr repeat(2,minmax(100px,.8fr)) auto; }
  .project-row .project-data:nth-of-type(4), .project-row .project-data:nth-of-type(5) { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  :root { --sidebar: 274px; }
  .section { padding: 64px 0; }
  .container { width: min(calc(100% - 28px), var(--max)); }
  .header-actions .btn { display: none; }
  .hero { padding: 58px 0 100px; }
  .hero-stats-wrap { margin-top: -48px; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }
  .hero-stat + .hero-stat { border-left: 0; }
  .hero-stat:nth-child(even) { border-left: 1px solid var(--line); }
  .hero-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-3, .grid-2, .contact-layout { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .sidebar { transform: translateX(-100%); transition: .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .dashboard-main { margin-left: 0; }
  .sidebar-toggle { display: grid; }
  .dashboard-topbar { padding: 0 16px; }
  .topbar-search { display: none; }
  .dashboard-content { padding: 20px 14px; }
  .detail-hero { grid-template-columns: 90px 1fr; }
  .detail-hero > :last-child { grid-column: 1 / -1; }
  .detail-kpis { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .public-header .container { height: 64px; gap: 12px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 19px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 16px; }
  .float-one, .float-two { display: none; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat:nth-child(even) { border-left: 0; }
  .hero-stat + .hero-stat { border-top: 1px solid var(--line); }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .metric-grid, .admin-summary { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .btn { width: 100%; }
  .dashboard-topbar h1 { font-size: 17px; }
  .dashboard-topbar .lang-switch { display: none; }
  .project-row { grid-template-columns: 48px 1fr auto; }
  .project-row .project-data { display: none; }
  .project-row .project-thumb + .project-data { display: block; }
  .project-thumb { width: 48px; height: 48px; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  #toast-root { left: 12px; right: 12px; top: 74px; }
  .toast { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Operational portal additions */
.card-header h2 { margin: 0; font-size: 18px; }
.cell-sub { display: block; margin-top: 3px; color: var(--ink-muted); font-size: 12px; font-weight: 500; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.notification-item { transition: border-color .2s ease, transform .2s ease; }
.notification-unread { border-left: 4px solid var(--brand); background: linear-gradient(90deg, rgba(23,107,255,.045), #fff 28%); }
.dashboard-route { overflow-x: hidden; }
.dashboard-content > .risk-note:first-child { margin-bottom: 18px; }
.card-body > .server-grid { margin: 0; }
.table .progress { min-width: 88px; margin-top: 6px; }
input:disabled, select:disabled, textarea:disabled { background: #eef2f7; color: #657287; }
@media (max-width: 620px) {
  .card-header { align-items: flex-start; }
  .table-actions { min-width: 124px; }
  .notification-item .spread { align-items: flex-start; flex-direction: column; }
}
