:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --accent: #ff6d00;
  --accent-light: #fff3e0;
  --bg: #f5f7fa;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #3b82f6;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.6;
}

/* SIDEBAR */
#sidebar {
  width: 280px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 13px;
  color: var(--sidebar-text);
  margin-top: 2px;
}

.nav-list {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.nav-group-title {
  display: block;
  padding: 16px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.nav-link.active {
  background: rgba(59,130,246,0.15);
  color: #fff;
  border-left-color: var(--sidebar-active);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.progress-bar-container { }
.progress-label { font-size: 12px; margin-bottom: 6px; }
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-text { font-size: 12px; margin-top: 4px; }

/* MOBILE HEADER */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--sidebar-bg);
  color: #fff;
  align-items: center;
  padding: 0 16px;
  z-index: 99;
}

.menu-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  margin-right: 12px;
}

.mobile-title { font-size: 16px; font-weight: 600; }

/* MAIN CONTENT */
#content {
  margin-left: 280px;
  flex: 1;
  padding: 40px;
  max-width: 1100px;
}

.section { display: none; }
.section.active { display: block; }

h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text);
}

h3 { font-size: 18px; font-weight: 600; margin: 16px 0 8px; }
h4 { font-size: 16px; font-weight: 600; margin: 12px 0 6px; }

p { margin-bottom: 8px; }
.lead { font-size: 17px; color: var(--text-light); margin-bottom: 24px; }

a { color: var(--primary); }

ul, ol { margin: 8px 0 8px 24px; }
li { margin-bottom: 4px; }

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.card-num {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { font-size: 14px; color: var(--text-light); margin: 0; }

.card-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* MODULE BLOCKS */
.module-block {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.module-complete-btn {
  margin: 24px 0;
  text-align: center;
}

.module-complete-btn button {
  background: var(--success);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.module-complete-btn button:hover { opacity: 0.9; }
.module-complete-btn button.completed {
  background: #86efac;
  cursor: default;
}

/* INFO / TIP / WARNING BOXES */
.info-box, .tip-box, .warning-box {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 12px 0;
}

.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
}

.tip-box {
  background: #f0fdf4;
  border-left: 4px solid var(--success);
}

.warning-box {
  background: #fef3c7;
  border-left: 4px solid var(--warning);
}

.contacts-box {
  background: #f0fdf4;
  border: 2px solid var(--success);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
}

/* TABLES */
.table-responsive { overflow-x: auto; }

.tariff-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.tariff-table th, .tariff-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.tariff-table th {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tariff-table tr.highlight {
  background: #fffbeb;
  font-weight: 600;
}

.tariff-table tr:hover { background: #f8fafc; }

/* STEPS */
.step-list { margin: 16px 0; }

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.step:last-child { border-bottom: none; }

.step-num {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 { margin: 4px 0 6px; }

/* CHECKLIST */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  cursor: pointer;
}

.checklist input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--success);
}

/* DETAILS / SUMMARY */
details {
  margin: 8px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 4px 0;
}

details[open] summary { margin-bottom: 8px; }

/* TIMELINE */
.timeline { margin: 16px 0; }

.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.timeline-day {
  font-weight: 700;
  color: var(--primary);
  min-width: 80px;
  flex-shrink: 0;
}

/* METHOD CARD */
.method-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 12px 0;
}

.method-card h3 { color: var(--primary); margin-top: 0; }

/* TWO COLUMNS */
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.col-green {
  background: #f0fdf4;
  border-radius: 8px;
  padding: 16px;
}

.col-blue {
  background: #eff6ff;
  border-radius: 8px;
  padding: 16px;
}

/* OBJECTION CARDS */
.objection-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}

.objection-header {
  background: #fee2e2;
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
  padding: 12px 16px;
}

.objection-answer {
  padding: 14px 16px;
  font-size: 15px;
}

.objection-mini {
  background: #fef3c7;
  border-radius: 8px;
  padding: 16px;
}

.objection-mini p { margin-bottom: 6px; }

/* PROGRAM BLOCK */
.program-block {
  border-left: 4px solid var(--accent);
}

.program-summary {
  font-size: 16px;
  margin-bottom: 12px;
}

/* CALCULATOR */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-form label {
  font-weight: 600;
  font-size: 14px;
}

.calc-form select, .calc-form input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}

.calc-result {
  background: #f0fdf4;
  border: 2px solid var(--success);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 16px;
  border-bottom: 1px solid #d1fae5;
}

.calc-row:last-child { border-bottom: none; }

.calc-highlight {
  font-weight: 700;
  font-size: 18px;
  color: var(--success);
}

/* SCRIPT QUICK */
.script-quick {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  font-size: 15px;
}

.script-quick p { margin-bottom: 8px; }

/* DASHBOARD */
.dashboard-plan, .dashboard-kpi {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.kpi-item {
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.kpi-label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

/* TEST */
.test-progress {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.test-question {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.test-options { display: flex; flex-direction: column; gap: 8px; }

.test-option {
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
  background: #fff;
}

.test-option:hover { border-color: var(--primary); background: #eff6ff; }
.test-option.correct { border-color: var(--success); background: #f0fdf4; }
.test-option.wrong { border-color: var(--danger); background: #fef2f2; }
.test-option.selected { border-color: var(--primary); background: #eff6ff; }

.test-score {
  font-size: 48px;
  font-weight: 800;
  text-align: center;
  margin: 24px 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover { background: var(--primary-dark); }

/* RESPONSIVE */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  #sidebar.open { transform: translateX(0); }

  .mobile-header { display: flex; }

  #content {
    margin-left: 0;
    padding: 72px 16px 24px;
  }

  .cards-grid { grid-template-columns: 1fr; }
  .two-cols { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* LOGIN SCREEN */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-container {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}

.login-logo {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.login-field {
  margin-bottom: 20px;
  text-align: left;
}

.login-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.login-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.login-btn:hover {
  background: var(--primary-dark);
}

.login-error {
  background: #fef2f2;
  color: var(--danger);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
}

.login-help {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-light);
}

.login-help p {
  margin-bottom: 4px;
}

/* USER INFO IN SIDEBAR */
.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

.user-info span {
  font-size: 13px;
  color: var(--sidebar-text);
  font-weight: 500;
}

.logout-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--sidebar-text);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(220,38,38,0.2);
  color: #fca5a5;
}
