/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Planeteria color palette */
  --primary:        #3182CE;
  --primary-dark:   #074F8B;
  --primary-light:  #EBF8FF;
  --accent:         #107DC2;
  --accent-grad:    #63CAE2;

  /* Neutrals */
  --dark:           #1A202C;
  --charcoal:       #2D3748;
  --gray-600:       #4A5568;
  --gray-500:       #718096;
  --gray-300:       #CBD5E0;
  --gray-200:       #EDF2F7;
  --gray-100:       #F7FAFC;
  --border:         #E2E8F0;
  --white:          #FFFFFF;

  /* Buttons */
  --btn-dark:       #32373c;
  --btn-dark-hover: #1A1D20;

  /* Severity */
  --danger:         #E53E3E;
  --danger-light:   #FFF5F5;
  --orange:         #DD6B20;
  --orange-light:   #FFFAF0;
  --warning:        #D69E2E;
  --warning-light:  #FEFCBF;
  --blue:           #3182CE;
  --blue-light:     #EBF8FF;

  /* Layout */
  --radius:         4px;
  --radius-md:      6px;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.1);
  --shadow:         0 1px 3px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md:      6px 6px 9px rgba(0,0,0,0.12);
  --shadow-lg:      0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--charcoal);
  background: var(--gray-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  font-weight: 300;
  line-height: 1.25;
  color: var(--dark);
}

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

/* ===================== VIEWS ===================== */
.view { display: none; min-height: 100vh; }
.view.active { display: flex; flex-direction: column; }

/* ===================== SITE HEADER ===================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;
}
.site-header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header-logo {
  display: inline-flex; align-items: center;
  opacity: 1; transition: opacity 0.2s;
}
.site-header-logo:hover { opacity: 0.8; text-decoration: none; }

/* ===================== LANDING ===================== */
.landing-container {
  /*max-width: 1000px; */
  margin: 0 auto;
  padding: 0 24px 60px;
  width: 100%;
  flex: 1;
}

.landing-hero {
  padding: 56px 0 36px;
  text-align: left;
}
.hero-rule {
  width: 48px; height: 4px;
  background: linear-gradient(90deg, var(--accent-grad), var(--accent));
  margin-bottom: 24px;
  border-radius: 2px;
}
.hero-title {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 16px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* Landing Card */
.landing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
}
.landing-card h2 {
  font-size: 18px;
  color: var(--dark);
  margin-bottom: 6px;
}
.landing-desc { color: var(--gray-500); margin-bottom: 24px; font-size: 14px; }

/* URL Input */
.url-input-wrap { position: relative; margin-bottom: 20px; }
.url-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--gray-300); pointer-events: none;
}
.url-input-wrap input {
  width: 100%; padding: 11px 14px 11px 40px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--dark);
}
.url-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.url-input-wrap input::placeholder { color: var(--gray-300); }

/* Options */
.options-row { margin-bottom: 24px; }
.option-label { display: block; }
.option-label > span {
  font-size: 12px; font-weight: 600;
  color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px;
  display: block; margin-bottom: 10px;
}
.slider-wrap { display: flex; align-items: center; gap: 14px; }
.slider-wrap input[type=range] {
  flex: 1; height: 4px; cursor: pointer; accent-color: var(--primary);
}
.slider-value {
  min-width: 40px; text-align: center;
  font-weight: 700; font-size: 15px;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 2px 10px; border-radius: var(--radius);
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--btn-dark); color: var(--white);
  border: none; border-radius: var(--radius);
  font-weight: 600; cursor: pointer; font-size: 14px;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none; font-family: inherit;
}
.btn-primary:hover { background: var(--btn-dark-hover); text-decoration: none; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary.btn-large {
  width: 100%; justify-content: center;
  padding: 13px 24px; font-size: 15px;
}
.btn-primary.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; color: var(--gray-600);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-weight: 500; cursor: pointer; font-size: 13px;
  transition: background 0.15s, color 0.15s; font-family: inherit;
}
.btn-ghost:hover { background: var(--gray-200); color: var(--dark); }
.btn-ghost.btn-sm { padding: 7px 14px; }

/* ===================== RECENT AUDITS ===================== */
.recent-audits { margin-bottom: 32px; }
.recent-audits h3 {
  font-family: inherit; font-weight: 600;
  font-size: 11px; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px;
}
.recent-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 6px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.recent-item:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.recent-item .r-url { font-weight: 600; font-size: 13px; flex: 1; color: var(--dark); }
.recent-item .r-meta { font-size: 11px; color: var(--gray-500); }
.recent-score {
  font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius);
}

/* Features grid */
.landing-features {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.feature {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.feature-icon { display: flex; align-items: center; margin-bottom: 2px; }
.feature strong { font-family: inherit; font-weight: 600; font-size: 13px; color: var(--dark); }
.feature span { font-size: 12px; color: var(--gray-500); }

/* ===================== SITE FOOTER ===================== */
.site-footer {
  background: var(--dark); color: var(--gray-300);
  border-top: none; margin-top: auto; flex-shrink: 0;
}
.site-footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.site-footer a { color: var(--accent-grad); }
.site-footer a:hover { color: var(--white); }

/* ===================== TOPBAR ===================== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px;
}
.brand-small {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.brand-small .brand-divider {
  width: 1px; height: 18px; background: var(--border);
}
.brand-small .brand-tool {
  font-weight: 600; font-size: 13px; color: var(--dark);
  letter-spacing: -0.01em;
}
.topbar-url {
  flex: 1; font-size: 13px; color: var(--gray-500);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}

/* ===================== PROGRESS ===================== */
.progress-container {
  max-width: 760px; margin: 40px auto; padding: 0 24px;
  flex: 1;
}
.progress-status-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.phase-icon { flex-shrink: 0; }
.spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.phase-label {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300; font-size: 17px; color: var(--dark);
}
.progress-current-url {
  font-size: 12px; color: var(--gray-500);
  margin-top: 4px; word-break: break-all; max-width: 540px;
}

.progress-bar-wrap { margin-bottom: 24px; }
.progress-bar-track {
  height: 8px; background: var(--gray-200);
  border-radius: 99px; overflow: hidden; margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-grad), var(--primary));
  border-radius: 99px; transition: width 0.4s ease;
}
.progress-counts { font-size: 12px; color: var(--gray-500); text-align: right; }

.progress-page-list {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow);
  max-height: 420px; overflow-y: auto;
}
.progress-page-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.progress-page-item:last-child { border-bottom: none; }
.progress-page-item .p-url {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--charcoal);
}
.p-status-icon { width: 18px; flex-shrink: 0; }
.p-score-badge {
  font-weight: 700; font-size: 11px;
  padding: 2px 8px; border-radius: var(--radius);
  white-space: nowrap;
}
.p-scanning { display: flex; align-items: center; gap: 6px; color: var(--primary); font-size: 12px; }
.p-scanning .mini-spinner {
  width: 13px; height: 13px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ===================== SUMMARY BANNER ===================== */
.summary-banner {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 20px 24px;
  flex-shrink: 0;
}
.summary-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 36px;
}
.score-gauge-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex-shrink: 0;
}
.score-label {
  font-size: 10px; font-weight: 600;
  color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.8px;
}
.summary-stats { display: flex; align-items: center; gap: 24px; flex: 1; }
.stat-block { text-align: center; }
.stat-value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 30px; font-weight: 300; color: var(--dark); line-height: 1;
}
.stat-label {
  font-size: 10px; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px;
}
.stat-divider { width: 1px; height: 44px; background: var(--border); }
.severity-block { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.sev-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-600); }
.sev-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sev-dot.critical { background: var(--danger); }
.sev-dot.serious  { background: var(--orange); }
.sev-dot.moderate { background: var(--warning); }
.sev-dot.minor    { background: var(--blue); }

/* Summary brand (results topbar) */
.summary-brand {
  margin-left: auto; text-align: right; flex-shrink: 0;
}
.summary-brand-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300; font-size: 15px; color: var(--primary-dark);
}
.summary-brand-sub { font-size: 11px; color: var(--gray-500); }

/* ===================== RESULTS LAYOUT ===================== */
.results-layout {
  display: flex; flex: 1;
  min-height: 0;
}

/* Left Panel */
.pages-panel {
  width: 360px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--white);
  display: flex; flex-direction: column;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.panel-header h3 {
  font-family: inherit; font-weight: 600; font-size: 13px;
  color: var(--dark); display: flex; align-items: center; gap: 8px;
}
.badge {
  display: inline-block; background: var(--gray-200);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 1px 8px; font-size: 11px; font-weight: 600; color: var(--gray-500);
}
.sort-select {
  font-size: 12px; padding: 4px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--gray-100); color: var(--charcoal);
  cursor: pointer; outline: none; font-family: inherit;
}
.sort-select:focus { border-color: var(--primary); }

.pages-list { flex: 1; overflow-y: auto; }
.page-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s; border-left: 3px solid transparent;
}
.page-item:hover { background: var(--gray-100); }
.page-item.active {
  background: var(--primary-light);
  border-left-color: var(--primary);
}
.page-item.active .page-url-text { color: var(--primary-dark); font-weight: 600; }
.page-item.error-item { opacity: 0.6; cursor: default; }
.page-url-text {
  flex: 1; font-size: 12px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--charcoal);
}
.page-score-pill {
  font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: var(--radius);
  white-space: nowrap; flex-shrink: 0;
}
.page-issue-count { font-size: 11px; color: var(--gray-500); white-space: nowrap; flex-shrink: 0; }

/* Right Panel */
.issues-panel {
  flex: 1; overflow-y: auto; background: var(--gray-100);
  display: flex; flex-direction: column;
}
.issues-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px;
  flex: 1; min-height: 300px; color: var(--gray-500);
}
.issues-placeholder p { font-size: 13px; }
.issues-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--white); border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px; flex-shrink: 0;
}
.issue-page-url {
  font-size: 13px; font-weight: 600; color: var(--dark);
  word-break: break-all; flex: 1;
}

/* Filter Bar */
.filter-bar {
  display: flex; gap: 6px; padding: 10px 20px;
  background: var(--white); border-bottom: 1px solid var(--border);
  flex-wrap: wrap; flex-shrink: 0;
}
.filter-btn {
  padding: 4px 12px; font-size: 11px; font-weight: 600;
  border-radius: 99px; border: 1px solid var(--border);
  background: var(--gray-100); color: var(--gray-600);
  cursor: pointer; transition: all 0.12s; font-family: inherit;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.filter-btn:hover { background: var(--border); }
.filter-btn.active { background: var(--btn-dark); color: var(--white); border-color: var(--btn-dark); }
.filter-btn[data-severity="critical"].active { background: var(--danger); border-color: var(--danger); }
.filter-btn[data-severity="serious"].active  { background: var(--orange); border-color: var(--orange); }
.filter-btn[data-severity="moderate"].active { background: var(--warning); border-color: var(--warning); }
.filter-btn[data-severity="minor"].active    { background: var(--blue); border-color: var(--blue); }

/* Issues List */
#issues-list { padding: 16px 20px; }
.issue-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 10px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.issue-card-header {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--gray-100);
}
.issue-title {
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--dark); flex: 1; line-height: 1.4;
}
.sev-tag {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--radius); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap; flex-shrink: 0;
}
.sev-tag.critical { background: var(--danger-light); color: var(--danger); }
.sev-tag.serious  { background: var(--orange-light); color: var(--orange); }
.sev-tag.moderate { background: var(--warning-light); color: var(--warning); }
.sev-tag.minor    { background: var(--blue-light); color: var(--blue); }
.wcag-tag {
  font-size: 10px; color: var(--gray-500);
  background: var(--white); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: var(--radius);
  white-space: nowrap; flex-shrink: 0;
}

.issue-card-body { padding: 12px 14px; }
.issue-desc {
  font-size: 12px; color: var(--gray-600); margin-bottom: 10px; line-height: 1.65;
}
.issue-count-label {
  font-size: 11px; font-weight: 600; color: var(--gray-500); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.element-snippet {
  background: var(--gray-100); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 10px; margin-bottom: 5px;
}
.element-snippet code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px; color: var(--gray-600);
  word-break: break-all; display: block; white-space: pre-wrap;
}
.element-explanation { font-size: 11px; color: var(--gray-500); margin-top: 3px; }
.more-elements { font-size: 11px; color: var(--gray-300); margin-top: 4px; font-style: italic; }
.no-issues {
  text-align: center; padding: 40px 20px; color: var(--gray-500);
}
.no-issues .check-icon { font-size: 36px; margin-bottom: 12px; }

/* ===================== SCORE COLOR CLASSES ===================== */
.score-green  { color: #276749; background: #F0FFF4; }
.score-lime   { color: #285E61; background: #E6FFFA; }
.score-amber  { color: #7B341E; background: var(--orange-light); }
.score-red    { color: #9B2335; background: var(--danger-light); }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .results-layout { flex-direction: column; }
  .pages-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 280px; }
  .summary-inner { flex-wrap: wrap; gap: 16px; }
  .summary-brand { margin-left: 0; }
  .landing-features { grid-template-columns: 1fr; }
  .site-header-inner { padding: 14px 20px; }
  .landing-container { padding: 0 16px 40px; }
}

/* ===================== PRINT ===================== */
@media print {
  .topbar, .filter-bar, #issue-filter-bar, .site-header { display: none !important; }
}

.site-header {
  position: fixed;
  background: rgba(222, 249, 255, 0.6);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  z-index: 99;
  width: 100%;
  top: 0px;
}
.gradient_wrap {
  background-image: url(https://www.planeteria.com/wp-content/themes/planeteriaweb/img/Hero%20gradient%20animation_page.svg);
  background-position: right;
  background-repeat: no-repeat;
  background-position: top;
}

/* ===================== LOGO IMG ===================== */
.logo-img { height: 32px; width: auto; display: block; }
.brand-small .logo-img { height: 26px; }

/* ===================== TOPBAR ACTIONS ===================== */
.topbar-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* ===================== MODALS ===================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300; font-size: 18px; color: var(--dark);
}
.modal-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); padding: 4px; border-radius: var(--radius);
  display: flex; align-items: center; transition: color 0.15s, background 0.15s;
}
.modal-close-btn:hover { background: var(--gray-200); color: var(--dark); }
.modal-desc {
  padding: 14px 24px 0;
  font-size: 13px; color: var(--gray-600); line-height: 1.5;
}
.modal-section { padding: 16px 24px; }
.modal-label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gray-600); margin-bottom: 12px;
}
.modal-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none; font-family: inherit;
  color: var(--dark); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.modal-hint { font-size: 12px; color: var(--gray-500); margin-top: 6px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}

/* ===================== BRAND OPTION CARDS ===================== */
.brand-options-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 16px 24px;
}
.brand-option-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 12px;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  background: var(--gray-100);
}
.brand-option-card:hover {
  border-color: var(--primary); background: var(--primary-light);
}
.brand-option-card.selected {
  border-color: var(--primary); background: var(--primary-light);
}
.brand-option-card img {
  height: 36px; width: 100%; object-fit: contain;
}
.brand-option-card span {
  font-size: 12px; font-weight: 600; color: var(--charcoal);
  text-align: center; line-height: 1.3;
}

/* ===================== TOAST NOTIFICATIONS ===================== */
.toast-notification {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: toastIn 0.25s ease;
}
.toast-success { background: #16a34a; color: #fff; }
.toast-error   { background: var(--danger); color: #fff; }
@keyframes toastIn {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ===================== FIX MODAL ===================== */
.modal-box-lg { max-width: 640px; }

/* Issue summary row inside fix modal */
.fix-issue-summary { padding: 12px 24px; background: var(--gray-100); border-bottom: 1px solid var(--border); }
.fix-issue-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Target radio group */
.fix-radio-group { display: flex; flex-direction: column; gap: 10px; }
.fix-radio-label {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.fix-radio-label:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.fix-radio-label input[type="radio"] { margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.fix-radio-text { display: flex; flex-direction: column; gap: 2px; }
.fix-radio-sub { font-size: 12px; color: var(--gray-500); }
.fix-dev-url-wrap { margin-top: 10px; }

/* Credentials grid */
.fix-credentials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.fix-field-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 4px; }
.fix-save-creds-label {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; font-size: 13px; color: var(--charcoal); cursor: pointer;
}
.fix-save-creds-label input { accent-color: var(--primary); }

/* Fix button in topbar / issue card */
.btn-fix {
  background: #16a34a; color: #fff; border: none;
  padding: 8px 16px; border-radius: var(--radius); cursor: pointer;
  font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-fix:hover { background: #15803d; }
.btn-fix-issue {
  background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0;
  padding: 3px 10px; border-radius: var(--radius); cursor: pointer;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto; flex-shrink: 0; transition: background 0.15s;
}
.btn-fix-issue:hover { background: #bbf7d0; }

/* Result panel */
.fix-result { padding: 16px 24px; border-top: 1px solid var(--border); }
.fix-result-success {
  display: flex; align-items: flex-start; gap: 12px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius);
  padding: 14px 16px;
}
.fix-result-suggestion {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 14px 16px;
}
.fix-suggestion-reason {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--charcoal); margin-bottom: 12px;
}
.fix-result-error {
  background: var(--danger-light); border: 1px solid #fecaca;
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; color: #991b1b;
}

/* Code block */
.fix-code-wrap { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fix-code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; background: var(--gray-200);
  font-size: 11px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px;
}
.fix-copy-btn {
  background: none; border: 1px solid var(--border); border-radius: 3px;
  padding: 2px 8px; font-size: 11px; font-weight: 600; cursor: pointer;
  color: var(--gray-600); transition: background 0.15s;
}
.fix-copy-btn:hover { background: var(--white); }
.fix-code-block {
  background: #0f172a; color: #e2e8f0; padding: 14px 16px;
  font-size: 12px; line-height: 1.6; overflow-x: auto;
  white-space: pre; margin: 0;
}
.fix-code-block code { font-family: 'Menlo', 'Monaco', 'Consolas', monospace; }