:root {
  --surface-1:      #fcfcfb;
  --page-plane:     #f9f9f7;
  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --text-muted:     #898781;
  --gridline:       #e1e0d9;
  --border:         rgba(11,11,11,0.10);

  --slot-blue:    #2a78d6;
  --slot-aqua:    #1baf7a;
  --slot-yellow:  #eda100;
  --slot-green:   #008300;
  --slot-violet:  #4a3aa7;
  --slot-red:     #e34948;

  --status-good:     #0ca30c;
  --status-warning:  #fab219;
  --status-serious:  #ec835a;
  --status-critical: #d03b3b;

  --accent: #2a78d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-1:      #1a1a19;
    --page-plane:     #0d0d0d;
    --text-primary:   #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted:     #898781;
    --gridline:       #2c2c2a;
    --border:         rgba(255,255,255,0.10);

    --slot-blue:    #3987e5;
    --slot-aqua:    #199e70;
    --slot-yellow:  #c98500;
    --slot-green:   #008300;
    --slot-violet:  #9085e9;
    --slot-red:     #e66767;

    --status-good:     #0ca30c;
    --status-warning:  #fab219;
    --status-serious:  #ec835a;
    --status-critical: #d03b3b;

    --accent: #3987e5;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* top navigation bar */
.topbar {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
}
.brand {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.brand .accent { color: var(--accent); }
.brand .app-version {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  vertical-align: 2px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.nav-links a:hover {
  background: var(--page-plane);
  color: var(--text-primary);
}
.nav-links a.active {
  background: var(--accent);
  color: #fff;
}
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.topbar-user .user-name {
  color: var(--text-secondary);
  font-weight: 500;
}
.topbar-user .logout-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.topbar-user .logout-link:hover {
  color: var(--text-primary);
  background: var(--page-plane);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
header.page-header { margin-bottom: 28px; }
header.page-header h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}
header.page-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}
section h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
}
section .subtitle {
  color: var(--text-secondary);
  font-size: 12.5px;
  margin: 0 0 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--gridline);
}
tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--gridline);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
td.mono, .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; }

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px 4px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* формы */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  max-width: 560px;
  background: var(--page-plane);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-primary);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.field input[type="text"]:focus,
.field input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
}
.form-actions { margin-top: 4px; }

/* служебные сообщения */
.notice {
  background: rgba(12,163,12,0.10);
  border: 1px solid var(--status-good);
  color: var(--status-good);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
}
.notice.error {
  background: rgba(208,59,59,0.10);
  border-color: var(--status-critical);
  color: var(--status-critical);
}

footer {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-tagline { margin-bottom: 8px; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.footer-legal .footer-org { font-weight: 600; color: var(--text-primary); }
.footer-legal .footer-sep { color: var(--text-muted); }
.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--accent); }

/* ============================================================
   Корпоративный стиль КИТ
   ============================================================ */

/* Логотип-марка «дельфин КИТ» в шапке */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}
.brand-mark { width: 28px; height: 24px; color: var(--accent); flex: none; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: 0.14em; }
.brand-divider { width: 1px; height: 20px; background: var(--border); }
.brand-app { font-weight: 600; font-size: 14px; color: var(--text-secondary); }

/* большие кнопки */
.btn-lg { padding: 11px 22px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Титульная страница (лендинг) ---- */
.landing { background: transparent; border: none; padding: 0; margin: 0; }
.landing-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  min-height: calc(100vh - 220px);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.landing-title {
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0 0 18px;
}
.landing-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 22px;
}
.landing-points {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  max-width: 520px;
}
.landing-points li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--text-primary);
}
.landing-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.landing-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dev-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--status-warning);
  border: 1px solid var(--status-warning);
  border-radius: 999px;
  padding: 5px 12px;
}

/* панель с дельфином (строгий морской градиент) */
.landing-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(130% 130% at 30% 15%, #10456b 0%, #0a2a43 58%, #071d2f 100%);
  border-radius: 20px;
  padding: 48px;
  overflow: hidden;
  min-height: 360px;
}
.landing-art::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
}
.dolphin-hero {
  width: 76%;
  max-width: 300px;
  color: #eaf6ff;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,0.4));
}
.landing-art-caption {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(234,246,255,0.6);
}

/* ---- Страница входа (Dashboard) ---- */
.auth {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(10,42,67,0.12);
}
.auth-mark { width: 60px; height: 52px; color: var(--accent); margin-bottom: 14px; }
.auth-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.auth-sub { font-size: 13px; color: var(--text-secondary); margin: 0 0 22px; }
.auth-form { text-align: left; }
.auth-form .field input[type="text"],
.auth-form .field input[type="password"] {
  max-width: none;
  font-family: inherit;
}
.auth .notice { text-align: left; }
.auth-note { font-size: 12px; color: var(--text-muted); margin: 18px 0 0; }

/* адаптив */
@media (max-width: 820px) {
  .landing-grid { grid-template-columns: 1fr; gap: 28px; min-height: 0; }
  .landing-art { order: -1; min-height: 240px; padding: 36px; }
  .landing-title { font-size: 44px; }
  .brand-app { display: none; }
}
