/* ===== НОСТРОЙ Design System — sro.szbi.ru ===== */

:root {
  --nos-blue: #1B3A5C;
  --nos-blue-dark: #122840;
  --nos-blue-bg: #EDF2F7;
  --nos-blue-light: #C8D6E5;
  --nos-red: #FF262E;
  --nos-green: #5ea13d;
  --nos-yellow: #ffae00;
  --nos-gray: #505863;
  --nos-gray-light: #F0F4F8;
  --nos-gray-medium: #D2D4D9;
  --nos-text: #333;
  --nos-text-light: #666;
  --nos-bg: #F5F7FA;
  --nos-footer: #0F2137;
  --nos-card-border: rgba(27,58,92,0.08);
  --nos-card-border-hover: rgba(27,58,92,0.18);
  --nos-radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Anti-copy protection */
body, .nos-content, .nos-card, .nos-answer-btn, .nos-feedback, .nos-study-header {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* Allow selection in form inputs */
input, textarea, select { -webkit-user-select: text; user-select: text; }
/* Hide everything when printing */
@media print {
  body { display: none !important; }
  html::after {
    content: 'Печать запрещена';
    display: block;
    font-size: 24px;
    text-align: center;
    padding: 100px;
  }
}

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  color: var(--nos-text);
  background: var(--nos-bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--nos-blue); text-decoration: none; }
a:hover { color: var(--nos-red); }

/* ===== HEADER ===== */
.nos-header {
  background: var(--nos-blue);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 8px rgba(75,80,158,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nos-header-left { display: flex; align-items: center; gap: 32px; }
.nos-logo {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
}
.nos-logo:hover { color: #fff; }
.nos-logo-shield {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; color: #fff;
}
.nos-logo-title { font-size: 16px; font-weight: 700; color: #fff; }
.nos-logo-sub { font-size: 10px; color: rgba(255,255,255,0.6); }

.nos-nav { display: flex; gap: 4px; }
.nos-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.15s;
}
.nos-nav a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nos-nav a.active { color: #fff; background: rgba(255,255,255,0.18); }

.nos-header-right { display: flex; align-items: center; gap: 16px; }
.nos-user-pill {
  background: rgba(255,255,255,0.12);
  padding: 6px 16px;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.nos-user-dot {
  width: 8px; height: 8px;
  background: var(--nos-green);
  border-radius: 50%;
}
.nos-logout {
  color: rgba(255,255,255,0.5) !important;
  text-decoration: none;
  font-size: 12px;
}
.nos-logout:hover { color: var(--nos-red) !important; }

/* ===== CONTENT WRAPPER ===== */
.nos-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
  flex: 1;
  width: 100%;
}
.nos-content-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
  flex: 1;
  width: 100%;
}
.nos-content-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px;
  flex: 1;
  width: 100%;
}

/* ===== WELCOME BAR ===== */
.nos-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.nos-welcome-title { font-size: 22px; font-weight: 700; color: var(--nos-text); }
.nos-welcome-sub { font-size: 13px; color: var(--nos-text-light); margin-top: 2px; }

/* ===== BUTTONS ===== */
.nos-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.nos-btn-primary { background: var(--nos-blue); color: #fff; }
.nos-btn-primary:hover { background: #3d4186; color: #fff; }
.nos-btn-success { background: var(--nos-green); color: #fff; }
.nos-btn-success:hover { background: #4e8c33; color: #fff; }
.nos-btn-danger { background: var(--nos-red); color: #fff; }
.nos-btn-danger:hover { background: #e0222a; color: #fff; }
.nos-btn-outline {
  background: #fff; color: var(--nos-text);
  border: 1px solid var(--nos-gray-medium);
}
.nos-btn-outline:hover { background: #f8f8fc; color: var(--nos-text); border-color: var(--nos-blue); }
.nos-btn-disabled {
  background: #e8e8e8; color: #aaa;
  cursor: not-allowed; pointer-events: none;
}
.nos-btn-sm { padding: 6px 14px; font-size: 12px; }
.nos-btn-lg { padding: 14px 32px; font-size: 16px; }

/* ===== STAT CARDS ===== */
.nos-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.nos-stat-card {
  background: #fff;
  border-radius: var(--nos-radius);
  padding: 22px 20px;
  border: 1px solid rgba(75,80,158,0.1);
  position: relative;
  overflow: hidden;
}
.nos-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}
.nos-stat-card.c-blue::before { background: var(--nos-blue); }
.nos-stat-card.c-green::before { background: var(--nos-green); }
.nos-stat-card.c-yellow::before { background: var(--nos-yellow); }
.nos-stat-card.c-red::before { background: var(--nos-red); }
.nos-stat-top { display: flex; justify-content: space-between; align-items: flex-start; }
.nos-stat-number { font-size: 30px; font-weight: 700; }
.nos-stat-card.c-blue .nos-stat-number { color: var(--nos-blue); }
.nos-stat-card.c-green .nos-stat-number { color: var(--nos-green); }
.nos-stat-card.c-yellow .nos-stat-number { color: #d49700; }
.nos-stat-card.c-red .nos-stat-number { color: var(--nos-red); }
.nos-stat-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nos-stat-card.c-blue .nos-stat-icon { background: var(--nos-blue-bg); color: var(--nos-blue); }
.nos-stat-card.c-green .nos-stat-icon { background: #e8f5e9; color: var(--nos-green); }
.nos-stat-card.c-yellow .nos-stat-icon { background: #fff8e1; color: #d49700; }
.nos-stat-card.c-red .nos-stat-icon { background: #ffeef0; color: var(--nos-red); }
.nos-stat-icon svg { width: 20px; height: 20px; }
.nos-stat-label { font-size: 12px; color: var(--nos-text-light); margin-top: 6px; }

/* ===== TWO COLUMNS ===== */
.nos-two-cols {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

/* ===== CARD ===== */
.nos-card {
  background: #fff;
  border-radius: var(--nos-radius);
  border: 1px solid var(--nos-card-border);
  overflow: hidden;
  margin-bottom: 20px;
}
.nos-card-header {
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}
.nos-card-title {
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.nos-card-title svg { width: 18px; height: 18px; color: var(--nos-blue); }
.nos-card-body { padding: 22px; }
.nos-card-action {
  font-size: 12px;
  color: var(--nos-blue);
  text-decoration: none;
  font-weight: 500;
}
.nos-card-action:hover { color: var(--nos-red); }

/* ===== BLOCK ROWS (progress) ===== */
.nos-block-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}
.nos-block-row:last-child { border-bottom: none; }
.nos-block-num {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.nos-block-num.done { background: var(--nos-green); }
.nos-block-num.active { background: var(--nos-blue); }
.nos-block-num.locked { background: var(--nos-gray-medium); }
.nos-block-info { flex: 1; min-width: 0; }
.nos-block-label { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.nos-block-label.locked { color: #999; }
.nos-block-bar {
  height: 8px;
  background: #ececec;
  border-radius: 4px;
  overflow: hidden;
}
.nos-block-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.nos-block-bar-fill.green { background: var(--nos-green); }
.nos-block-bar-fill.blue { background: var(--nos-blue); }
.nos-block-pct {
  width: 50px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.nos-block-pct.done { color: var(--nos-green); }
.nos-block-pct.active { color: var(--nos-blue); }
.nos-block-pct.locked { color: #bbb; }
.nos-block-action {
  flex-shrink: 0;
}

/* ===== HISTORY LIST ===== */
.nos-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}
.nos-history-item:last-child { border-bottom: none; }
.nos-history-badge {
  width: 42px; height: 42px;
  border-radius: var(--nos-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.nos-history-badge.pass { background: #e8f5e9; color: #2e7d32; }
.nos-history-badge.fail { background: #ffeef0; color: #cc0a00; }
.nos-history-info { flex: 1; }
.nos-history-score { font-size: 14px; font-weight: 500; }
.nos-status {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 3px;
  margin-left: 8px;
  display: inline-block;
}
.nos-status.pass { background: #e8f5e9; color: #2e7d32; }
.nos-status.fail { background: #ffeef0; color: #cc0a00; }
.nos-history-date { font-size: 11px; color: #999; margin-top: 2px; }
.nos-history-pct { font-size: 14px; font-weight: 700; color: var(--nos-text-light); flex-shrink: 0; }

/* ===== PROGRESS BAR (generic) ===== */
.nos-progress {
  height: 8px;
  background: #ececec;
  border-radius: 4px;
  overflow: hidden;
}
.nos-progress.lg { height: 12px; }
.nos-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.7s;
}
.nos-progress-fill.blue { background: var(--nos-blue); }
.nos-progress-fill.green { background: var(--nos-green); }
.nos-progress-fill.red { background: var(--nos-red); }
.nos-progress-fill.yellow { background: var(--nos-yellow); }

/* ===== STUDY PAGE ===== */
.nos-study-header {
  background: #fff;
  border-radius: var(--nos-radius);
  border: 1px solid var(--nos-card-border);
  padding: 24px;
  margin-bottom: 20px;
}
.nos-streak-dots {
  display: flex; align-items: center; gap: 4px;
}
.nos-streak-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  transition: all 0.2s;
}
.nos-streak-dot.filled { background: var(--nos-green); }
.nos-streak-dot.empty { background: #e0e0e0; }
.nos-answer-btn {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--nos-radius);
  border: 2px solid #e0e0e0;
  background: #fff;
  font-size: 14px;
  color: var(--nos-text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.5;
}
.nos-answer-btn:hover:not([disabled]) {
  transform: translateX(4px);
  border-color: var(--nos-blue);
  background: var(--nos-blue-bg);
}
.nos-answer-btn[disabled] { cursor: default; opacity: 0.7; }
.nos-answer-btn.nos-answer-correct {
  border-color: var(--nos-green) !important;
  background: #f0fdf4 !important;
  opacity: 1 !important;
}
.nos-answer-btn.nos-answer-wrong {
  border-color: var(--nos-red) !important;
  background: #fef2f2 !important;
  opacity: 1 !important;
}
.nos-answer-btn.nos-answer-selected {
  border-color: var(--nos-green) !important;
  background: #f0fdf4 !important;
  opacity: 1 !important;
}
.nos-feedback {
  padding: 16px;
  border-radius: var(--nos-radius);
  margin-bottom: 16px;
}
.nos-feedback.correct {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}
.nos-feedback.wrong {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}
.nos-feedback-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; margin-bottom: 6px;
}
.nos-explanation {
  font-size: 13px;
  color: var(--nos-text-light);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* ===== TEST PAGE ===== */
.nos-test-start {
  background: #fff;
  border-radius: var(--nos-radius);
  border: 1px solid var(--nos-card-border);
  padding: 48px 32px;
  text-align: center;
}
.nos-test-start h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.nos-test-start p { color: var(--nos-text-light); max-width: 500px; margin: 0 auto 32px; }
.nos-test-stats {
  display: flex; justify-content: center; gap: 32px;
  margin-bottom: 32px;
}
.nos-test-stat-num { font-size: 32px; font-weight: 700; }
.nos-test-stat-num.blue { color: var(--nos-blue); }
.nos-test-stat-num.green { color: var(--nos-green); }
.nos-test-stat-num.orange { color: #e67e00; }
.nos-test-stat-label { font-size: 12px; color: var(--nos-text-light); margin-top: 2px; }
.nos-test-stat-divider { width: 1px; background: #e0e0e0; }

.nos-answer-option {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px;
  border-radius: var(--nos-radius);
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.1s;
  font-size: 14px;
}
.nos-answer-option:hover:not(.selected) { border-color: #b0b0c8; background: #fafafe; }
.nos-answer-option.selected { border-color: var(--nos-blue); background: var(--nos-blue-bg); }
.nos-answer-option input[type="radio"] {
  margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: var(--nos-blue);
  flex-shrink: 0;
}

.nos-timer {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}
.nos-timer.warning { color: var(--nos-red); }
.nos-timer svg { width: 16px; height: 16px; }

.nos-question-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.nos-question-nav-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.1s;
  font-family: inherit;
}
.nos-question-nav-btn.current { background: var(--nos-blue); color: #fff; }
.nos-question-nav-btn.answered { background: #d4edda; color: #2e7d32; }
.nos-question-nav-btn.unanswered { background: #f0f0f0; color: #666; }
.nos-question-nav-btn:hover { opacity: 0.85; }

/* ===== RESULT PAGE ===== */
.nos-result-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.nos-result-card.passed { border: 2px solid #86efac; }
.nos-result-card.failed { border: 2px solid #fca5a5; }
.nos-result-header {
  padding: 40px 32px;
  text-align: center;
}
.nos-result-header.passed { background: #f0fdf4; }
.nos-result-header.failed { background: #fef2f2; }
.nos-result-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.nos-result-icon.passed { background: #dcfce7; }
.nos-result-icon.failed { background: #fee2e2; }
.nos-result-icon svg { width: 40px; height: 40px; }
.nos-result-icon.passed svg { color: var(--nos-green); }
.nos-result-icon.failed svg { color: var(--nos-red); }
.nos-result-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.nos-result-title.passed { color: #15803d; }
.nos-result-title.failed { color: #dc2626; }

.nos-result-score {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 32px;
}
.nos-result-big { font-size: 48px; font-weight: 700; text-align: center; }
.nos-result-big.passed { color: var(--nos-green); }
.nos-result-big.failed { color: var(--nos-red); }
.nos-result-big.muted { color: #ccc; }
.nos-result-big small { display: block; font-size: 13px; font-weight: 400; color: var(--nos-text-light); margin-top: 4px; }
.nos-result-slash { font-size: 32px; color: #ddd; font-weight: 300; }

/* Error review section */
.nos-error-header {
  padding: 14px 22px;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: #dc2626; font-size: 14px;
}
.nos-error-header svg { width: 18px; height: 18px; }
.nos-error-item {
  padding: 20px 22px;
  border-bottom: 1px solid #f0f0f0;
}
.nos-error-item:last-child { border-bottom: none; }
.nos-error-question { font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.nos-error-answer {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 10px; border-radius: 6px; margin-bottom: 4px;
  font-size: 13px;
}
.nos-error-answer.correct { background: #f0fdf4; color: #15803d; }
.nos-error-answer svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.nos-error-explanation {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--nos-blue-bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--nos-blue);
}

/* ===== AUTH PAGES (login/register) ===== */
.nos-auth-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--nos-blue) 0%, var(--nos-blue-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.nos-auth-wrapper { width: 100%; max-width: 420px; }
.nos-auth-logo {
  text-align: center; margin-bottom: 32px;
}
.nos-auth-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.12);
  border-radius: 16px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.2);
  font-weight: 700; font-size: 14px; color: #fff;
}
.nos-auth-logo h1 { font-size: 22px; font-weight: 700; color: #fff; }
.nos-auth-logo p { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.nos-auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  padding: 32px;
}
.nos-auth-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 24px; }
.nos-auth-footer {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  margin-top: 24px;
}

/* Form elements */
.nos-form-group { margin-bottom: 16px; }
.nos-form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--nos-text-light);
  margin-bottom: 6px;
}
.nos-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}
.nos-form-input:focus {
  border-color: var(--nos-blue);
  box-shadow: 0 0 0 3px rgba(75,80,158,0.12);
}
.nos-form-submit {
  width: 100%;
  padding: 12px;
  background: var(--nos-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.nos-form-submit:hover { background: #3d4186; }
.nos-form-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--nos-text-light);
}
.nos-form-link a { color: var(--nos-blue); font-weight: 600; }
.nos-form-link a:hover { color: var(--nos-red); }

/* Alert messages */
.nos-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.nos-alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.nos-alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.nos-alert.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.nos-alert.warning { background: #fff8e1; border: 1px solid #ffe082; color: #b58900; }
.nos-alert.info { background: var(--nos-blue-bg); border: 1px solid var(--nos-blue-light); color: var(--nos-blue); }

/* ===== LANDING PAGE ===== */
.nos-hero {
  background: linear-gradient(135deg, var(--nos-blue) 0%, var(--nos-blue-dark) 100%);
  color: #fff;
  padding: 60px 32px;
  text-align: center;
}
.nos-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 16px; line-height: 1.3; }
.nos-hero p { font-size: 16px; color: rgba(255,255,255,0.75); max-width: 600px; margin: 0 auto 32px; }
.nos-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.2);
}
.nos-hero-badge .dot { width: 8px; height: 8px; background: var(--nos-green); border-radius: 50%; }
.nos-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.nos-hero-btn-primary {
  background: #fff; color: var(--nos-blue);
  padding: 14px 32px; border-radius: var(--nos-radius);
  font-weight: 700; font-size: 16px;
  text-decoration: none;
  transition: all 0.15s;
}
.nos-hero-btn-primary:hover { background: #f0f0ff; color: var(--nos-blue); }
.nos-hero-btn-outline {
  border: 1px solid rgba(255,255,255,0.4); color: #fff;
  padding: 14px 32px; border-radius: var(--nos-radius);
  font-weight: 600; font-size: 16px;
  text-decoration: none;
  transition: all 0.15s;
}
.nos-hero-btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

.nos-landing-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; max-width: 800px; margin: 0 auto;
  padding: 40px 32px;
  text-align: center;
}
.nos-landing-stat-num { font-size: 32px; font-weight: 700; color: var(--nos-blue); }
.nos-landing-stat-label { font-size: 12px; color: var(--nos-text-light); margin-top: 4px; }

.nos-landing-features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: 900px; margin: 0 auto;
  padding: 48px 32px;
}
.nos-feature {
  text-align: center;
  padding: 24px;
}
.nos-feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.nos-feature-icon.blue { background: var(--nos-blue-bg); color: var(--nos-blue); }
.nos-feature-icon.green { background: #e8f5e9; color: var(--nos-green); }
.nos-feature-icon.orange { background: #fff3e0; color: #e67e00; }
.nos-feature-icon svg { width: 28px; height: 28px; }
.nos-feature h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.nos-feature p { font-size: 13px; color: var(--nos-text-light); line-height: 1.5; }

.nos-cta {
  background: var(--nos-blue);
  color: #fff;
  padding: 48px 32px;
  text-align: center;
}
.nos-cta h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.nos-cta p { color: rgba(255,255,255,0.7); margin-bottom: 24px; }

/* ===== CERTIFICATE LANDING SECTION ===== */
.nos-cert-section {
  padding: 60px 32px;
  background: #fff;
}
.nos-cert-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 56px;
  position: relative;
}
.nos-cert-inner::before {
  content: '';
  position: absolute;
  left: -32px; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #f0d060, #b8860b, #8b6914);
  border-radius: 3px;
}
.nos-cert-visual { flex-shrink: 0; }
.nos-cert-stack {
  position: relative;
  width: 340px; height: 250px;
}
.nos-cert-shadow {
  position: absolute;
  top: 10px; left: 10px;
  width: 340px; height: 250px;
  background: #e8e0d0;
  border-radius: 4px;
  transform: rotate(-2deg);
}
.nos-cert-card {
  position: absolute;
  top: 0; left: 0;
  width: 340px; height: 250px;
  background: linear-gradient(180deg, #fdfbf5, #f8f4e8);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  transform: rotate(1deg);
  transition: transform 0.3s ease;
}
.nos-cert-card:hover { transform: rotate(0deg) translateY(-4px); }
.nos-cert-frame { position: absolute; inset: 4px; border: 1.5px solid #b8860b; }
.nos-cert-frame2 { position: absolute; inset: 8px; border: 1px solid rgba(184,134,11,0.3); }
.nos-cert-body {
  position: relative; z-index: 1;
  padding: 14px 24px 12px;
  display: flex; flex-direction: column; align-items: center;
  height: 100%;
  font-family: Georgia, serif;
}
.nos-cert-emb {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #f0d060, #b8860b);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; margin-bottom: 2px;
}
.nos-cert-org { font-family: Verdana, sans-serif; font-size: 5px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #b8860b; margin-bottom: 2px; }
.nos-cert-title { font-size: 17px; font-weight: 700; color: #2a2a2a; letter-spacing: 4px; text-transform: uppercase; font-variant: small-caps; }
.nos-cert-sub { font-style: italic; font-size: 7px; color: #999; margin: 2px 0 5px; }
.nos-cert-name { font-variant: small-caps; font-size: 12px; font-weight: 700; color: #1a1a1a; }
.nos-cert-city { font-family: Verdana, sans-serif; font-size: 6px; color: #bbb; margin-bottom: 4px; }
.nos-cert-body > .nos-cert-text { font-size: 6px; color: #777; text-align: center; line-height: 1.5; margin-bottom: 4px; max-width: 260px; }
.nos-cert-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  width: 100%; margin-top: auto;
}
.nos-cert-fc { text-align: center; min-width: 60px; }
.nos-cert-date { font-family: Verdana, sans-serif; font-size: 5px; color: #aaa; }
.nos-cert-seal {
  width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f5e6a3, #daa520 25%, #b8860b 50%, #8b6914 80%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(184,134,11,0.3);
}
.nos-cert-seal-in {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-size: 11px;
}
.nos-cert-seal-lbl { font-family: Verdana, sans-serif; font-size: 3px; letter-spacing: 1px; text-transform: uppercase; }
.nos-cert-sig { font-style: italic; font-size: 10px; color: #333; }
.nos-cert-sig-line { width: 50px; height: 1px; background: #ddd; margin: 1px auto; }
.nos-cert-sig-lbl { font-family: Verdana, sans-serif; font-size: 4px; color: #bbb; letter-spacing: 1px; text-transform: uppercase; }

/* Text side */
.nos-cert-text-side { flex: 1; }
.nos-cert-text-side h2 {
  font-size: 28px; font-weight: 700;
  color: var(--nos-text); line-height: 1.3;
  margin-bottom: 14px;
}
.nos-cert-gold-line {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, #b8860b, #daa520);
  border-radius: 2px;
  margin-bottom: 14px;
}
.nos-cert-text-side > p {
  font-size: 14px; color: var(--nos-text-light);
  line-height: 1.7; margin-bottom: 24px;
}
.nos-cert-info-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 28px;
}
.nos-cert-info-item {
  display: flex; align-items: flex-start; gap: 10px;
}
.nos-cert-info-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #fdf8e8;
  display: flex; align-items: center; justify-content: center;
  color: #b8860b; font-size: 16px;
  flex-shrink: 0;
}
.nos-cert-info-text {
  font-size: 13px; color: #555; line-height: 1.4;
}
.nos-cert-info-text strong {
  display: block; color: var(--nos-text);
  font-size: 13px; margin-bottom: 2px;
}
.nos-cert-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--nos-blue); color: #fff;
  padding: 13px 26px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}
.nos-cert-cta:hover { background: #3d4186; color: #fff; }

@media (max-width: 900px) {
  .nos-cert-inner { flex-direction: column; gap: 32px; align-items: center; }
  .nos-cert-inner::before { display: none; }
  .nos-cert-visual { width: 280px; height: 190px; overflow: hidden; }
  .nos-cert-stack { width: 340px; height: 250px; transform: scale(0.8); transform-origin: top left; }
  .nos-cert-shadow { width: 340px; height: 250px; }
  .nos-cert-card { width: 340px; height: 250px; }
  .nos-cert-info-grid { grid-template-columns: 1fr; }
}

/* ===== ADMIN PAGE ===== */
.nos-table-wrap { overflow-x: auto; }
.nos-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.nos-table thead { background: #fafafe; }
.nos-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nos-text-light);
  border-bottom: 1px solid #f0f0f0;
}
.nos-table th.center { text-align: center; }
.nos-table th.right { text-align: right; }
.nos-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f8f8f8;
}
.nos-table td.center { text-align: center; }
.nos-table td.right { text-align: right; }
.nos-table tbody tr:hover { background: #fafafe; }
.nos-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px; font-weight: 700;
}
.nos-badge.green { background: #e8f5e9; color: #2e7d32; }
.nos-badge.amber { background: #fff8e1; color: #b58900; }
.nos-badge.red { background: #ffeef0; color: #cc0a00; }

/* ===== DOCS PAGE ===== */
.nos-docs-banner {
  background: var(--nos-blue);
  padding: 24px;
  border-radius: var(--nos-radius) var(--nos-radius) 0 0;
  color: #fff;
}
.nos-docs-banner h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.nos-docs-banner p { font-size: 13px; color: rgba(255,255,255,0.65); }
.nos-step {
  display: flex; gap: 16px;
  padding: 16px 0;
}
.nos-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.nos-step-num.blue { background: var(--nos-blue); }
.nos-step-num.orange { background: #e67e00; }
.nos-step h4 { font-weight: 700; margin-bottom: 4px; }
.nos-step p { font-size: 13px; color: var(--nos-text-light); line-height: 1.6; }

/* ===== FOOTER ===== */
.nos-footer {
  background: var(--nos-footer);
  color: #888;
  padding: 24px 32px;
  margin-top: auto;
  font-size: 12px;
  text-align: center;
}
.nos-footer a { color: #aaa; text-decoration: none; }
.nos-footer a:hover { color: #fff; }

/* ===== TOAST ===== */
.nos-toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nos-toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  font-size: 13px;
  max-width: 360px;
  animation: nos-slide-in 0.3s ease;
}
.nos-toast.success { background: var(--nos-blue); color: #fff; }
.nos-toast.error { background: var(--nos-red); color: #fff; }
.nos-toast.warning { background: #e67e00; color: #fff; }
.nos-toast-close {
  margin-left: auto;
  background: none; border: none;
  color: inherit; opacity: 0.6;
  cursor: pointer; font-size: 16px;
}
.nos-toast-close:hover { opacity: 1; }
@keyframes nos-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== LOADING SPINNER ===== */
.nos-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--nos-blue-light);
  border-top-color: var(--nos-blue);
  border-radius: 50%;
  animation: nos-spin 0.6s linear infinite;
  margin: 0 auto;
}
@keyframes nos-spin {
  to { transform: rotate(360deg); }
}

/* ===== UTILITIES ===== */
.nos-text-center { text-align: center; }
.nos-text-right { text-align: right; }
.nos-text-muted { color: var(--nos-text-light); }
.nos-text-small { font-size: 12px; }
.nos-text-xs { font-size: 11px; }
.nos-mb-0 { margin-bottom: 0; }
.nos-mb-4 { margin-bottom: 16px; }
.nos-mb-6 { margin-bottom: 24px; }
.nos-mb-8 { margin-bottom: 32px; }
.nos-mt-4 { margin-top: 16px; }
.nos-mt-6 { margin-top: 24px; }
.nos-flex { display: flex; }
.nos-flex-center { display: flex; align-items: center; justify-content: center; }
.nos-gap-2 { gap: 8px; }
.nos-gap-3 { gap: 12px; }
.nos-gap-4 { gap: 16px; }
.nos-space-y-3 > * + * { margin-top: 12px; }
.nos-space-y-4 > * + * { margin-top: 16px; }
.nos-space-y-6 > * + * { margin-top: 24px; }
.nos-hidden { display: none !important; }

/* ===== BURGER MENU ===== */
.nos-burger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 6px;
}
.nos-burger span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: all 0.25s;
}
.nos-burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nos-burger.active span:nth-child(2) { opacity: 0; }
.nos-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nos-mobile-nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--nos-blue-dark);
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 99;
}
.nos-mobile-nav a {
  display: block;
  padding: 14px 24px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.15s;
}
.nos-mobile-nav a:hover, .nos-mobile-nav a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nos-mobile-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 4px 16px;
}
.nos-mobile-nav-logout { color: rgba(255,255,255,0.5) !important; }

.nos-hide-mobile { }

/* ===== DASHBOARD CERTIFICATE ===== */
.nos-dash-cert { border-radius: 4px; }

/* ===== RESPONSIVE ===== */

/* --- Tablet (<=1024px) --- */
@media (max-width: 1024px) {
  .nos-two-cols { grid-template-columns: 1fr; }
  .nos-cert-inner { gap: 36px; }
  .nos-cert-text-side h2 { font-size: 24px; }
}

/* --- Small tablet (<=900px) --- */
@media (max-width: 900px) {
  .nos-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nos-landing-features { grid-template-columns: 1fr; gap: 8px; }
  .nos-landing-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .nos-cert-inner { flex-direction: column; gap: 32px; }
  .nos-cert-inner::before { display: none; }
  .nos-cert-stack { width: 280px; height: 206px; }
  .nos-cert-shadow { width: 280px; height: 206px; }
  .nos-cert-card { width: 280px; height: 206px; }
  .nos-cert-info-grid { grid-template-columns: 1fr; }
  .nos-cert-section { padding: 40px 20px; }
  .nos-cert-text-side { text-align: center; }
  .nos-cert-gold-line { margin: 0 auto 14px; }
  .nos-test-stats { gap: 20px; flex-wrap: wrap; }
  .nos-test-stat-num { font-size: 26px; }
}

/* --- Mobile (<=768px) --- */
@media (max-width: 768px) {
  .nos-header { padding: 0 16px; height: 56px; position: relative; }
  .nos-nav { display: none; }
  .nos-burger { display: flex; }
  .nos-mobile-nav { display: block; }
  .nos-hide-mobile { display: none !important; }
  .nos-user-pill { display: none; }

  .nos-content, .nos-content-wide, .nos-content-narrow {
    padding: 20px 16px;
  }

  .nos-hero { padding: 40px 20px; }
  .nos-hero h1 { font-size: 26px; }
  .nos-hero p { font-size: 14px; }
  .nos-hero-btn-primary, .nos-hero-btn-outline {
    padding: 12px 24px; font-size: 14px;
  }
  .nos-hero-badge { font-size: 12px; padding: 5px 12px; }

  .nos-landing-stats { padding: 24px 16px; }
  .nos-landing-stat-num { font-size: 26px; }
  .nos-landing-features { padding: 32px 16px; }

  .nos-welcome-title { font-size: 18px; }
  .nos-welcome { flex-direction: column; align-items: flex-start; }

  .nos-stat-card { padding: 16px 14px; }
  .nos-stat-number { font-size: 24px; }
  .nos-stat-icon { width: 34px; height: 34px; }

  .nos-block-row { gap: 10px; }
  .nos-block-label { font-size: 12px; }
  .nos-block-action .nos-btn { padding: 6px 12px; font-size: 11px; }

  .nos-cta { padding: 36px 20px; }
  .nos-cta h2 { font-size: 20px; }

  .nos-test-start { padding: 32px 20px; }
  .nos-test-start h2 { font-size: 20px; }
  .nos-test-stats { gap: 16px; }

  .nos-answer-btn { padding: 14px 16px; font-size: 13px; }
  .nos-answer-option { padding: 12px 14px; font-size: 13px; }

  .nos-result-header { padding: 28px 20px; }
  .nos-result-title { font-size: 20px; }
  .nos-result-big { font-size: 38px; }
  .nos-result-score { gap: 16px; padding: 24px 16px; flex-wrap: wrap; }

  .nos-error-item { padding: 16px; }
  .nos-error-question { font-size: 13px; }

  .nos-card-body { padding: 16px; }
  .nos-card-header { padding: 14px 16px; }

  .nos-auth-card { padding: 24px 20px; }
  .nos-auth-logo h1 { font-size: 18px; }

  .nos-footer { padding: 20px 16px; font-size: 11px; }

  .nos-docs-banner { padding: 20px 16px; }
  .nos-docs-banner h2 { font-size: 18px; }

  .nos-toasts { bottom: 12px; right: 12px; left: 12px; }
  .nos-toast { max-width: 100%; }

  .nos-table { font-size: 12px; }
  .nos-table th, .nos-table td { padding: 8px 10px; }

}

/* --- Small mobile (<=480px) --- */
@media (max-width: 480px) {
  body { font-size: 13px; }

  .nos-header { height: 50px; }
  .nos-logo-shield { width: 32px; height: 32px; font-size: 9px; }
  .nos-logo-title { font-size: 13px; }
  .nos-logo-sub { font-size: 9px; }

  .nos-hero { padding: 32px 16px; }
  .nos-hero h1 { font-size: 22px; }
  .nos-hero p { font-size: 13px; margin-bottom: 24px; }
  .nos-hero-actions { flex-direction: column; gap: 10px; }
  .nos-hero-btn-primary, .nos-hero-btn-outline {
    padding: 12px 20px; font-size: 14px;
    text-align: center; width: 100%;
    display: block;
  }

  .nos-landing-stat-num { font-size: 22px; }
  .nos-landing-stat-label { font-size: 11px; }

  .nos-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nos-stat-card { padding: 14px 12px; }
  .nos-stat-number { font-size: 20px; }
  .nos-stat-label { font-size: 11px; }

  .nos-content, .nos-content-wide, .nos-content-narrow {
    padding: 16px 12px;
  }

  .nos-welcome-title { font-size: 16px; }
  .nos-welcome-sub { font-size: 12px; }

  .nos-cert-section { padding: 32px 16px; }
  .nos-cert-visual { width: 220px; height: 165px; overflow: hidden; }
  .nos-cert-stack { width: 340px; height: 250px; transform: scale(0.62); transform-origin: top left; }
  .nos-cert-shadow { width: 340px; height: 250px; }
  .nos-cert-card { width: 340px; height: 250px; }
  .nos-cert-text-side h2 { font-size: 20px; }
  .nos-cert-text-side > p { font-size: 13px; }
  .nos-cert-cta { padding: 12px 20px; font-size: 13px; width: 100%; justify-content: center; }

  .nos-cta h2 { font-size: 18px; }
  .nos-cta .nos-hero-btn-primary { width: auto; display: inline-block; }

  .nos-test-start { padding: 24px 16px; }
  .nos-test-start h2 { font-size: 18px; }
  .nos-test-stat-num { font-size: 22px; }
  .nos-test-stats { gap: 12px; }
  .nos-test-stat-divider { display: none; }

  .nos-question-nav-btn { width: 28px; height: 28px; font-size: 10px; }

  .nos-result-big { font-size: 32px; }
  .nos-result-title { font-size: 18px; }
  .nos-result-icon { width: 64px; height: 64px; }
  .nos-result-icon svg { width: 32px; height: 32px; }

  .nos-btn { padding: 8px 16px; font-size: 12px; }
  .nos-btn-lg { padding: 12px 24px; font-size: 14px; }

  .nos-form-input { padding: 10px 12px; font-size: 14px; }
  .nos-form-submit { padding: 12px; font-size: 14px; }

  .nos-study-header { padding: 16px; }

  .nos-feature { padding: 16px; }
  .nos-feature h3 { font-size: 14px; }
  .nos-feature p { font-size: 12px; }
  .nos-feature-icon { width: 48px; height: 48px; }
  .nos-feature-icon svg { width: 24px; height: 24px; }
}

/* ===== HTMX ===== */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }

/* ===== ALPINE ===== */
[x-cloak] { display: none !important; }
