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

/* ── Theme tokens ──────────────────────────────────────────────────────────── */
:root {
  --korisec-red:       #ff3435;
  --korisec-red-dim:   #c92728;
  --korisec-ink:       #0f1419;
  --korisec-paper:     #f4f7fb;
  --korisec-muted:     #5b6570;
  --korisec-line:      rgba(15, 20, 25, 0.12);
  --korisec-surface:   #ffffff;
  --korisec-card:      #ffffff;
  --korisec-glow:      rgba(255, 52, 53, 0.14);
  --korisec-ok:        #0f7b4a;
  --korisec-err:       #b42318;
  --korisec-warn:      #b8841a;
  --korisec-ok-bg:     rgba(15, 123, 74, 0.09);
  --korisec-err-bg:    rgba(180, 35, 24, 0.09);
  --korisec-warn-bg:   rgba(232, 179, 76, 0.16);
  --font:              "Plus Jakarta Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* auth form side */
  --af-bg:             #f4f7fb;
  --af-fg:             #0f1419;
  --af-muted:          #5b6570;
  --af-edge:           rgba(15, 20, 25, 0.12);
  --af-card:           #ffffff;
  --af-input-bg:       rgba(0, 0, 0, 0.025);
  --af-input-shadow:   0 0 0 3px rgba(255, 52, 53, 0.13);
  --af-card-shadow:    0 20px 60px rgba(15, 20, 25, 0.08);
}

[data-theme="dark"] {
  --korisec-ink:       #f7f9fd;
  --korisec-paper:     #0b1014;
  --korisec-muted:     #9aa3ad;
  --korisec-line:      rgba(247, 249, 253, 0.10);
  --korisec-surface:   #12181e;
  --korisec-card:      #171e26;
  --korisec-glow:      rgba(255, 52, 53, 0.20);
  --korisec-ok:        #17e3b0;
  --korisec-err:       #ff7070;
  --korisec-warn:      #e8b34c;
  --korisec-ok-bg:     rgba(23, 227, 176, 0.10);
  --korisec-err-bg:    rgba(255, 112, 112, 0.10);
  --korisec-warn-bg:   rgba(232, 179, 76, 0.14);

  --af-bg:             #0b1014;
  --af-fg:             #f4f6f5;
  --af-muted:          #8ca39b;
  --af-edge:           rgba(255, 255, 255, 0.08);
  --af-card:           rgba(255, 255, 255, 0.03);
  --af-input-bg:       rgba(255, 255, 255, 0.04);
  --af-input-shadow:   0 0 0 3px rgba(255, 52, 53, 0.18);
  --af-card-shadow:    none;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(90% 60% at 50% -10%, var(--korisec-glow), transparent 55%),
              var(--korisec-surface);
  color: var(--korisec-ink);
  font-family: var(--font);
  font-size: 1rem;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a { color: var(--korisec-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Theme toggle icons ────────────────────────────────────────────────────── */
.icon-moon { display: block; }
.icon-sun  { display: none;  }
[data-theme="dark"] .icon-moon { display: none;  }
[data-theme="dark"] .icon-sun  { display: block; }

/* ── Dashboard app shell: sidebar + topbar layout ─────────────────────────── */
.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand img,
.brand-logo,
[data-logo] {
  height: 32px;
  width: auto;
  display: block;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--korisec-line);
  padding: 1.25rem 1rem;
  overflow-y: auto;
}

.sidebar-brand {
  display: inline-flex;
  padding: 0 0.5rem;
  margin-bottom: 1.75rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav button,
.sidebar-nav a.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--korisec-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.sidebar-nav button svg,
.sidebar-nav a.sidebar-link svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.sidebar-nav button:hover,
.sidebar-nav a.sidebar-link:hover {
  background: rgba(255, 52, 53, 0.06);
  color: var(--korisec-ink);
}

.sidebar-nav button.is-active {
  background: rgba(255, 52, 53, 0.12);
  color: var(--korisec-red);
  font-weight: 650;
}

.sidebar-foot {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.85rem 0.75rem 0.25rem;
  border-top: 1px solid var(--korisec-line);
  font-size: 0.78rem;
  color: var(--korisec-muted);
}

.sidebar-plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  background: rgba(255, 52, 53, 0.1);
  color: var(--korisec-red);
  font-weight: 650;
  text-transform: capitalize;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.45);
  z-index: 55;
}

.sidebar-backdrop.is-open { display: block; }

/* Main column (topbar + content) */
.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-width: 0;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--korisec-line);
  position: sticky;
  top: 0;
  background: var(--korisec-surface);
  z-index: 20;
  backdrop-filter: blur(8px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.topbar-title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--korisec-line);
  color: var(--korisec-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle:hover {
  border-color: var(--korisec-red);
  color: var(--korisec-red);
}

/* Profile menu */
.profile-menu {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--korisec-line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem 0.28rem 0.28rem;
  cursor: pointer;
  color: var(--korisec-ink);
  font: inherit;
  transition: border-color 0.15s;
}

.profile-trigger:hover { border-color: var(--korisec-red); }

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--korisec-red), var(--korisec-red-dim));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--korisec-muted);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  color: var(--korisec-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.profile-trigger[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: min(300px, calc(100vw - 2rem));
  min-width: 260px;
  background: var(--korisec-card);
  border: 1px solid var(--korisec-line);
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 16px 40px rgba(15, 20, 25, 0.14);
  z-index: 50;
  animation: fade-in 0.15s ease;
}

[data-theme="dark"] .profile-dropdown {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.profile-dropdown-header {
  padding: 0.75rem 0.75rem 0.85rem;
  border-bottom: 1px solid var(--korisec-line);
  margin-bottom: 0.35rem;
}

.profile-dropdown-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.profile-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--korisec-red), var(--korisec-red-dim));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

.profile-dropdown-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.profile-dropdown-meta strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.profile-dropdown-email {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--korisec-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-plan {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--korisec-muted);
  background: rgba(15, 20, 25, 0.06);
  text-transform: capitalize;
}

[data-theme="dark"] .profile-dropdown-plan {
  background: rgba(255, 255, 255, 0.08);
}

.profile-dropdown button,
.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--korisec-ink);
  cursor: pointer;
  text-decoration: none;
}

.profile-dropdown svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--korisec-muted); }

.profile-dropdown button:hover,
.profile-dropdown a:hover {
  background: rgba(255, 52, 53, 0.08);
  text-decoration: none;
  color: var(--korisec-ink);
}

.profile-dropdown .danger { color: var(--korisec-err); }
.profile-dropdown .danger svg { color: var(--korisec-err); }

/* Confirmation modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
  animation: fade-in 0.15s ease;
}

[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.6); }

.modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--korisec-card);
  border: 1px solid var(--korisec-line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 24px 64px rgba(15, 20, 25, 0.22);
}

.modal-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.modal-card p { margin: 0 0 1.35rem; color: var(--korisec-muted); font-size: 0.92rem; line-height: 1.5; }

.modal-card-wide {
  max-width: 680px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-head p {
  margin-bottom: 0;
}

.modal-close {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--korisec-line);
  border-radius: 999px;
  background: transparent;
  color: var(--korisec-muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--korisec-ink);
  border-color: rgba(255, 52, 53, 0.35);
}

.verify-options {
  display: grid;
  gap: 0.85rem;
}

.verify-option {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--korisec-line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(15, 20, 25, 0.018);
}

[data-theme="dark"] .verify-option {
  background: rgba(247, 249, 253, 0.025);
}

.verify-option-head {
  display: grid;
  gap: 0.2rem;
}

.verify-option-head span {
  color: var(--korisec-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: stretch;
}

.copy-row code {
  display: block;
  min-width: 0;
  border: 1px solid var(--korisec-line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: rgba(15, 20, 25, 0.04);
  color: var(--korisec-ink);
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}

[data-theme="dark"] .copy-row code {
  background: rgba(247, 249, 253, 0.05);
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.modal-actions .btn { width: auto; padding: 0.65rem 1.15rem; }

.btn-danger {
  background: linear-gradient(135deg, var(--korisec-err), #7d190f);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(180, 35, 24, 0.32);
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    z-index: 60;
    background: var(--korisec-surface);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .sidebar.is-open { transform: translateX(0); }

  .menu-toggle { display: flex; }
}

@media (max-width: 560px) {
  .app-topbar { padding: 0.85rem 1rem; gap: 0.5rem; }
  .profile-email { max-width: 6rem; }
}

@media (max-width: 400px) {
  .profile-email { display: none; }
}

/* ── Auth: full-screen split stage ─────────────────────────────────────────── */
.auth-stage {
  display: flex;
  min-height: 100svh;
  width: 100%;
}

/* Left brand panel — always dark, not theme-dependent */
.auth-brand {
  flex: 1.1;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 52, 53, 0.20), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(232, 179, 76, 0.10), transparent 50%),
    #0d1510;
  position: relative;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  color: #f4f6f5;
}

/* diagonal field lines */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 78px,
    rgba(255, 255, 255, 0.025) 78px 79px
  );
  pointer-events: none;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
  text-decoration: none;
}

.auth-brand-mark img {
  height: 40px;
  width: auto;
  display: block;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
}

.auth-brand-copy h2 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #f4f6f5;
}

.auth-brand-copy h2 em {
  font-style: normal;
  color: #ff3435;
}

.auth-brand-copy p {
  color: #8ca39b;
  font-size: 1rem;
  max-width: 28rem;
  line-height: 1.65;
  margin: 0;
}

.auth-stat-row {
  display: flex;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.auth-stat-row div strong {
  display: block;
  font-family: var(--font);
  font-size: 1.35rem;
  color: #f4f6f5;
  font-weight: 700;
}

.auth-stat-row div small {
  color: #8ca39b;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Right form panel */
.auth-form-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--af-bg);
  min-width: 0;
  position: relative;
}

.auth-form-topbar {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-form-card {
  width: 100%;
  max-width: 395px;
  color: var(--af-fg);
}

.auth-eyebrow {
  color: var(--korisec-red);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.5rem;
}

.auth-form-card h1 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
  color: var(--af-fg);
}

.auth-lede {
  color: var(--af-muted);
  font-size: 0.9rem;
  margin: 0 0 1.75rem;
  line-height: 1.55;
}

/* ── Centered auth layout (forgot, reset, verify) ──────────────────────────── */
.auth-center-wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--af-bg);
  color: var(--af-fg);
}

.auth-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--af-edge);
}

.auth-center-header .brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--af-fg);
}

.auth-center-header .brand-link img {
  height: 32px;
  width: auto;
  display: block;
}

.auth-center-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.auth-center-card {
  width: 100%;
  max-width: 400px;
}

.auth-center-card h1 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
  color: var(--af-fg);
}

/* ── Form components ───────────────────────────────────────────────────────── */
.field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--af-muted);
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--af-edge);
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  background: var(--af-input-bg);
  color: var(--af-fg);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder { color: rgba(90, 100, 110, 0.55); }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--korisec-red);
  box-shadow: var(--af-input-shadow);
}

.field input.is-invalid {
  border-color: var(--korisec-err);
}

.field-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--korisec-muted);
}

.field-hint code {
  font-size: 1em;
}

/* jQuery Validate inline errors */
label.field-error {
  font-size: 0.78rem;
  color: var(--korisec-err);
  margin: 0;
  font-weight: 400;
}

[data-theme="dark"] label.field-error { color: #ff7070; }

/* Password show/hide */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3.5rem; }

.pw-toggle {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--af-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.pw-toggle:hover { color: var(--korisec-red); }

/* Remember / forgot row */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.85rem 0 1.4rem;
  font-size: 0.85rem;
}

.row-between a {
  color: var(--korisec-red);
  font-weight: 500;
  text-decoration: none;
}
.row-between a:hover { text-decoration: underline; }

.form-check { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }

.form-check-input {
  width: 16px;
  height: 16px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--af-edge);
  border-radius: 4px;
  background: var(--af-input-bg);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
}

.form-check-input:checked {
  background-color: var(--korisec-red);
  border-color: var(--korisec-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' d='M3 8l3.5 3.5L13 5'/%3E%3C/svg%3E");
  background-size: cover;
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--af-muted);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--korisec-red), var(--korisec-red-dim));
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 52, 53, 0.32);
  text-decoration: none;
  color: #fff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--af-fg);
  border: 1px solid var(--af-edge);
  box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--korisec-red);
  color: var(--af-fg);
  box-shadow: none;
  transform: none;
}

.btn-sm {
  width: auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.84rem;
  border-radius: 999px;
}

.btn-ghost {
  background: transparent;
  color: var(--korisec-red);
  border: 1px solid transparent;
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 52, 53, 0.08);
  color: var(--korisec-red);
  box-shadow: none;
  transform: none;
}

.btn:focus-visible,
.sidebar-nav button:focus-visible,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
.profile-trigger:focus-visible,
.profile-dropdown button:focus-visible,
.profile-dropdown a:focus-visible,
.scan-row:focus-visible,
.linkish:focus-visible {
  outline: 2px solid var(--korisec-red);
  outline-offset: 2px;
}

/* Google OAuth button */
.btn-google {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 1px solid var(--af-edge);
  border-radius: 10px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  background: var(--af-input-bg);
  color: var(--af-fg);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 0.5rem;
}

.btn-google:hover {
  border-color: var(--korisec-red);
  text-decoration: none;
  color: var(--af-fg);
  background: rgba(255, 52, 53, 0.04);
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  margin: 1.4rem 0 0.5rem;
  color: var(--af-muted);
  font-size: 0.8rem;
}

.divider::before, .divider::after {
  content: "";
  height: 1px;
  background: var(--af-edge);
}

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  padding: 0.78rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.alert-error {
  background: var(--korisec-err-bg);
  color: var(--korisec-err);
}

.alert-ok {
  background: var(--korisec-ok-bg);
  color: var(--korisec-ok);
}

/* ── Footer note ───────────────────────────────────────────────────────────── */
.foot-note {
  text-align: center;
  color: var(--af-muted);
  font-size: 0.85rem;
  margin-top: 1.5rem;
  line-height: 1.5;
}

.foot-note a {
  color: var(--korisec-red);
  font-weight: 500;
}
.foot-note a:hover { text-decoration: underline; }

.legal-note {
  color: var(--af-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.legal-note a {
  color: var(--korisec-red);
  font-weight: 500;
}

.legal-note a:hover { text-decoration: underline; }

.consent-row a {
  color: var(--korisec-red);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-row a:hover { color: var(--korisec-red-dim, #e52b2c); }

/* For legacy form-footer class (used in callback pages) */
.form-footer {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--korisec-muted);
  font-size: 0.95rem;
}

/* ── Theme toggle button ───────────────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--af-edge);
  cursor: pointer;
  color: var(--af-muted);
  transition: border-color 0.15s, color 0.15s;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--korisec-red);
  color: var(--korisec-red);
}

/* dashboard header variant */
.theme-toggle-header {
  border-color: var(--korisec-line);
  color: var(--korisec-muted);
}

.theme-toggle-header:hover {
  border-color: var(--korisec-red);
  color: var(--korisec-red);
}

/* ── Dashboard layout ──────────────────────────────────────────────────────── */
.auth-main {
  display: grid;
  place-items: center;
  padding: 2rem 1rem 3rem;
}

.auth-card {
  width: min(100%, 420px);
  background: var(--korisec-card);
  border: 1px solid var(--korisec-line);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 18px 50px rgba(15, 20, 25, 0.08);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.auth-card .lede {
  margin: 0 0 1.35rem;
  color: var(--korisec-muted);
  line-height: 1.45;
}

.lede {
  color: var(--korisec-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.dashboard-greeting {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--korisec-ink);
  letter-spacing: -0.01em;
}

.profile-panel .profile-form {
  max-width: 36rem;
}

.profile-form input[disabled] {
  opacity: 0.78;
  cursor: not-allowed;
}

.dash {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.dash h1 {
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.dash .lede { color: var(--korisec-muted); margin-bottom: 1.5rem; }

.dash [data-section]:not(.hidden) {
  animation: fade-in 0.25s ease;
}

.dash-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--korisec-card);
  border: 1px solid var(--korisec-line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  border-color: rgba(255, 52, 53, 0.25);
  box-shadow: 0 4px 16px rgba(15, 20, 25, 0.05);
}

[data-theme="dark"] .stat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.stat-card .label {
  display: block;
  color: var(--korisec-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.stat-card .value {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-card .value.value-cap { text-transform: capitalize; }

.stat-card .hint {
  margin-top: 0.35rem;
  color: var(--korisec-muted);
  font-size: 0.85rem;
}

.stat-card-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stat-card-alert {
  border-color: rgba(180, 35, 24, 0.28);
}

.stat-card-alert .value {
  color: var(--korisec-err);
}

.score-gauge {
  flex-shrink: 0;
  display: block;
}

.score-gauge-fill {
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.score-gauge-text {
  fill: var(--korisec-ink);
  font-family: var(--font);
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.empty-state .empty-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.empty-state h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.empty-state p {
  margin: 0 auto 1.25rem;
  max-width: 28rem;
  color: var(--korisec-muted);
  line-height: 1.55;
}

.check-list {
  list-style: none;
  margin: 0 auto 1.4rem;
  padding: 0;
  max-width: 22rem;
  text-align: left;
  color: var(--korisec-muted);
  font-size: 0.92rem;
}

.check-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.4rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--korisec-red);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.coming-soon-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 52, 53, 0.1);
  color: var(--korisec-red);
}

.panel {
  background: var(--korisec-card);
  border: 1px solid var(--korisec-line);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}

.panel h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1rem;
}

.overview-panel .section-head {
  margin-bottom: 0.9rem;
}

.panel-note {
  color: var(--korisec-muted);
  font-size: 0.84rem;
}

.overview-empty-small {
  display: grid;
  gap: 0.25rem;
  min-height: 6.5rem;
  align-content: center;
  color: var(--korisec-muted);
  line-height: 1.45;
}

.overview-empty-small strong {
  color: var(--korisec-ink);
  font-size: 0.98rem;
}

.top-fix-list {
  display: grid;
  gap: 0.65rem;
}

.top-fix-item {
  border: 1px solid var(--korisec-line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: rgba(15, 20, 25, 0.015);
}

[data-theme="dark"] .top-fix-item {
  background: rgba(247, 249, 253, 0.025);
}

.top-fix-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  color: var(--korisec-muted);
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.top-fix-item strong {
  display: block;
  color: var(--korisec-ink);
  line-height: 1.35;
}

.urgency-wrap {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 8.5rem;
}

.urgency-donut {
  --urgency-critical: 0%;
  --urgency-high: 0%;
  --urgency-medium: 0%;
  width: 7.25rem;
  height: 7.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background:
    radial-gradient(circle at center, var(--korisec-card) 0 52%, transparent 53%),
    conic-gradient(
      var(--korisec-err) 0 var(--urgency-critical),
      #e76f51 var(--urgency-critical) var(--urgency-high),
      var(--korisec-warn) var(--urgency-high) var(--urgency-medium),
      rgba(90, 101, 112, 0.45) var(--urgency-medium) 100%
    );
}

.urgency-donut span {
  color: var(--korisec-ink);
  font-size: 1.45rem;
  font-weight: 750;
}

.urgency-legend {
  display: grid;
  gap: 0.45rem;
  color: var(--korisec-muted);
  font-size: 0.88rem;
}

.urgency-legend span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.urgency-legend i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.legend-critical { background: var(--korisec-err); }
.legend-high { background: #e76f51; }
.legend-medium { background: var(--korisec-warn); }
.legend-low { background: rgba(90, 101, 112, 0.45); }

.score-trend {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: 0.75rem;
  min-height: 9rem;
}

.trend-bar {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  min-width: 0;
}

.trend-bar-track {
  width: 100%;
  max-width: 2.5rem;
  height: 6rem;
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.06);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

[data-theme="dark"] .trend-bar-track {
  background: rgba(247, 249, 253, 0.08);
}

.trend-bar-track span {
  display: block;
  width: 100%;
  min-height: 0.2rem;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--korisec-red), var(--korisec-red-dim));
}

.trend-bar strong {
  font-size: 0.82rem;
  color: var(--korisec-ink);
}

.trend-bar em {
  font-style: normal;
  color: var(--korisec-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--korisec-muted);
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 650;
  background: rgba(255, 52, 53, 0.12);
  color: var(--korisec-red);
}

.badge-ok {
  background: var(--korisec-ok-bg);
  color: var(--korisec-ok);
}

.badge-warn {
  background: var(--korisec-warn-bg);
  color: var(--korisec-warn);
}

.hidden { display: none !important; }

.run-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.run-picker-select {
  border: 1px solid var(--af-edge);
  border-radius: 10px;
  padding: 0.68rem 0.8rem;
  background: var(--af-input-bg);
  color: var(--af-fg);
  font: inherit;
  font-size: 0.92rem;
  min-width: 10rem;
  max-width: 100%;
  cursor: pointer;
}

.run-picker-select:focus {
  outline: none;
  border-color: var(--korisec-red);
  box-shadow: var(--af-input-shadow);
}

.run-picker-select-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.84rem;
  border-radius: 8px;
  min-width: 8rem;
}

.add-domain {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--korisec-line);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted, #5a646e);
  cursor: pointer;
  max-width: 36rem;
}

.consent-row input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.domain-list-tools {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.domain-search {
  display: grid;
  gap: 0.3rem;
  flex: 1;
  min-width: min(100%, 18rem);
}

.domain-search span {
  color: var(--korisec-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.domain-search input {
  width: 100%;
  border: 1px solid var(--af-edge);
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  background: var(--af-input-bg);
  color: var(--af-fg);
  font: inherit;
  font-size: 0.95rem;
}

.domain-search input:focus {
  outline: none;
  border-color: var(--korisec-red);
  box-shadow: var(--af-input-shadow);
}

.domain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.domain-row {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--korisec-line);
  border-radius: 14px;
  background: var(--korisec-surface);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.domain-row:hover {
  border-color: rgba(255, 52, 53, 0.24);
  background: rgba(255, 52, 53, 0.025);
}

[data-theme="dark"] .domain-row:hover {
  background: rgba(255, 52, 53, 0.04);
}

.domain-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.domain-avatar {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(255, 52, 53, 0.09);
  color: var(--korisec-red);
  font-weight: 750;
}

.domain-card-title {
  min-width: 0;
}

.domain-card-title strong {
  display: block;
  color: var(--korisec-ink);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.domain-card-title span {
  display: block;
  margin-top: 0.2rem;
  color: var(--korisec-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.domain-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  color: var(--korisec-muted);
  font-size: 0.84rem;
}

.domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.scan-list {
  display: grid;
  gap: 0.55rem;
}

.scan-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--korisec-line);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.scan-row.is-busy {
  border-color: rgba(255, 52, 53, 0.28);
  background: rgba(255, 52, 53, 0.03);
}

.scan-row.is-selected {
  border-color: rgba(255, 52, 53, 0.45);
  background: rgba(255, 52, 53, 0.06);
}

.scan-row-main {
  flex: 1;
  min-width: 0;
}

.scan-row:hover {
  border-color: rgba(255, 52, 53, 0.35);
  background: rgba(255, 52, 53, 0.04);
}

.badge-busy {
  color: var(--korisec-red);
  background: rgba(255, 52, 53, 0.1);
}

.scan-progress {
  margin-top: 0.7rem;
  max-width: 28rem;
}

.scan-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--korisec-muted);
  margin-bottom: 0.35rem;
}

.scan-progress-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.08);
  overflow: hidden;
}

[data-theme="dark"] .scan-progress-track {
  background: rgba(247, 249, 253, 0.12);
}

.scan-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3435, #ff6b4a);
  transition: width 0.45s ease;
  min-width: 0;
}

.scan-progress-found {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--korisec-red);
}

.scan-detail .scan-progress {
  margin: 0.85rem 0 1rem;
  max-width: 36rem;
}

.scan-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.scan-score .grade {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--korisec-red);
}

.scan-score .score-num {
  color: var(--korisec-muted);
  font-size: 0.95rem;
}

.score-delta {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}
.score-delta.delta-up {
  background: var(--korisec-ok-bg);
  color: var(--korisec-ok);
}
.score-delta.delta-down {
  background: var(--korisec-err-bg);
  color: var(--korisec-err);
}
.score-delta.delta-flat {
  background: rgba(15, 20, 25, 0.06);
  color: var(--korisec-muted);
}
[data-theme="dark"] .score-delta.delta-flat {
  background: rgba(247, 249, 253, 0.06);
}

.scan-detail {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--korisec-line);
  animation: fade-in 0.2s ease;
}

.scan-detail-panel {
  padding: 1rem 1.1rem 1.2rem;
}

.check-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--korisec-line);
}

.scan-detail-focused {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.scan-detail-focused .scan-detail-head {
  padding: 0.25rem 0 0.35rem;
}

.scan-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.scan-detail-head-main {
  flex: 1;
  min-width: 0;
}

.severity-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.1rem 0 0.5rem;
}

.severity-heading .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.severity-heading .label {
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--korisec-ink);
}

.severity-heading .count {
  font-size: 0.8rem;
  color: var(--korisec-muted);
}

.severity-critical .dot, .severity-high .dot { background: var(--korisec-err); }
.severity-medium .dot { background: var(--korisec-warn); }
.severity-low .dot, .severity-info .dot { background: var(--korisec-muted); }

.finding-group {
  border: 0;
  padding: 0;
  margin: 0 0 0.4rem;
}

.finding-group > summary {
  cursor: pointer;
  list-style: none;
}

.finding-group > summary::-webkit-details-marker { display: none; }

.finding-group > summary .severity-heading {
  display: inline-flex;
}

.finding-group > summary .chevron {
  margin-left: auto;
  color: var(--korisec-muted);
  transition: transform 0.15s ease;
}

.finding-group[open] > summary .chevron { transform: rotate(90deg); }

.finding-card {
  border: 1px solid var(--korisec-line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
}

.finding-card .badge.sev-critical, .finding-card .badge.sev-high {
  background: var(--korisec-err-bg);
  color: var(--korisec-err);
}
.finding-card .badge.sev-medium {
  background: var(--korisec-warn-bg);
  color: var(--korisec-warn);
}
.finding-card .badge.sev-low, .finding-card .badge.sev-info {
  background: rgba(15, 20, 25, 0.06);
  color: var(--korisec-muted);
}
[data-theme="dark"] .finding-card .badge.sev-low,
[data-theme="dark"] .finding-card .badge.sev-info {
  background: rgba(247, 249, 253, 0.08);
}

.finding-card p {
  margin: 0.4rem 0 0;
  color: var(--korisec-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.passed-checks-panel {
  border: 1px solid var(--korisec-line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin: 0.85rem 0 1rem;
  background: rgba(47, 125, 50, 0.04);
}

.check-group {
  border: 0;
  margin: 0.65rem 0 0;
}

.check-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  color: var(--korisec-ink);
  font-weight: 650;
  font-size: 0.9rem;
}

.check-group > summary::-webkit-details-marker { display: none; }

.check-group > summary span:last-child {
  color: var(--korisec-muted);
  font-size: 0.82rem;
}

.check-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.check-card {
  border: 1px solid var(--korisec-line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: var(--korisec-surface);
}

.check-card strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--korisec-ink);
  font-size: 0.94rem;
}

.check-card p {
  margin: 0.35rem 0 0;
  color: var(--korisec-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.check-card.status-passed {
  background: var(--korisec-ok-bg);
}

@media (max-width: 760px) {
  .check-card-grid {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.plan-card {
  position: relative;
  border: 1px solid var(--korisec-line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  background: var(--korisec-surface, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.15s, transform 0.15s;
}
.plan-card.is-current {
  border-color: var(--korisec-red, #c62828);
  box-shadow: inset 0 0 0 1px var(--korisec-red, #c62828);
}
.plan-card.is-popular {
  border-color: rgba(255, 52, 53, 0.4);
}
.plan-ribbon {
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--korisec-red), var(--korisec-red-dim));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(255, 52, 53, 0.3);
}
.plan-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.plan-card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.plan-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--korisec-ink, inherit);
}
.plan-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--korisec-muted);
}
.plan-tagline {
  margin: 0;
  color: var(--korisec-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.plan-bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--korisec-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}
.plan-card .btn {
  width: 100%;
  margin-top: 0.25rem;
}

.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.privacy-actions .btn {
  width: auto;
  padding: 0.7rem 1rem;
}

/* Dashboard loading skeleton */
.dash-skeleton {
  padding-top: 0.25rem;
}
.skel {
  background: linear-gradient(
    90deg,
    rgba(15, 20, 25, 0.06) 25%,
    rgba(15, 20, 25, 0.12) 37%,
    rgba(15, 20, 25, 0.06) 63%
  );
  background-size: 400% 100%;
  animation: skel-shine 1.2s ease-in-out infinite;
  border-radius: 10px;
}
[data-theme="dark"] .skel {
  background: linear-gradient(
    90deg,
    rgba(247, 249, 253, 0.06) 25%,
    rgba(247, 249, 253, 0.12) 37%,
    rgba(247, 249, 253, 0.06) 63%
  );
  background-size: 400% 100%;
}
@keyframes skel-shine {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
.skel-card { height: 6.5rem; }
.skel-panel { height: 10rem; margin-top: 1rem; }
.skel-hint {
  margin-top: 1rem;
  color: var(--korisec-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .domain-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dash-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .domain-list-tools { align-items: stretch; flex-direction: column; }
  .modal-card-wide { max-height: calc(100svh - 2rem); overflow: auto; }
  .modal-head { gap: 0.75rem; }
  .copy-row { grid-template-columns: 1fr; }
  .copy-row .btn { width: 100%; }
  .scan-detail-head { flex-wrap: wrap; }
  .check-detail-toolbar { align-items: flex-start; flex-direction: column; }
  .check-detail-toolbar .run-picker { width: 100%; }
  .urgency-wrap { align-items: flex-start; flex-direction: column; }
  .score-trend { gap: 0.45rem; }
  .trend-bar-track { height: 4.8rem; }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-brand { display: none; }
  .auth-form-side { padding: 2.5rem 1.25rem; }
}
