/* ==========================================================================
   Vyapaar360 SEO Audit Tool - SaaS Interface Stylesheet
   Pure CSS3 | Strict Brand Palette (Navy #0A192F, Emerald #00A86B, White #FFFFFF)
   No Gradients | Professional SaaS Design | Responsive | PDF / Print Optimized
   ========================================================================== */

:root {
  --v-navy: #0A192F;
  --v-navy-light: #112240;
  --v-navy-muted: #233554;
  --v-emerald: #00A86B;
  --v-emerald-dark: #008755;
  --v-emerald-light: #E6F7F0;
  --v-white: #FFFFFF;
  --v-gray-50: #F8FAFC;
  --v-gray-100: #F1F5F9;
  --v-gray-200: #E2E8F0;
  --v-gray-300: #CBD5E1;
  --v-gray-400: #94A3B8;
  --v-gray-500: #64748B;
  --v-gray-700: #334155;
  --v-gray-900: #0F172A;

  /* Severity Colors (Solid, No Gradients) */
  --v-critical: #EF4444;
  --v-critical-bg: #FEF2F2;
  --v-warning: #F59E0B;
  --v-warning-bg: #FFFBEB;
  --v-notice: #3B82F6;
  --v-notice-bg: #EFF6FF;
  --v-pass: #00A86B;
  --v-pass-bg: #E6F7F0;

  --v-radius: 8px;
  --v-radius-lg: 12px;
  --v-shadow: 0 1px 3px rgba(10, 25, 47, 0.08), 0 1px 2px rgba(10, 25, 47, 0.04);
  --v-shadow-lg: 0 10px 15px -3px rgba(10, 25, 47, 0.08), 0 4px 6px -2px rgba(10, 25, 47, 0.04);
}

/* Tool Top Brand Banner */
.audit-top-hero {
  background-color: var(--v-navy);
  color: var(--v-white);
  padding: 48px 0 56px;
  border-bottom: 3px solid var(--v-emerald);
}

.audit-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--v-emerald);
  color: var(--v-white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.audit-hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--v-white);
  letter-spacing: -0.02em;
}

.audit-hero-subtitle {
  font-size: 17px;
  color: #8892B0;
  max-width: 760px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Audit Input Form Card */
.audit-form-card {
  background-color: var(--v-white);
  border-radius: var(--v-radius-lg);
  padding: 24px;
  box-shadow: var(--v-shadow-lg);
  border: 1px solid var(--v-gray-200);
}

.audit-input-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.audit-url-input-wrapper {
  position: relative;
  flex: 1 1 340px;
}

.audit-url-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--v-gray-400);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}

.audit-url-input {
  width: 100%;
  height: 52px;
  padding: 12px 16px 12px 64px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid var(--v-gray-300);
  border-radius: var(--v-radius);
  color: var(--v-navy);
  background-color: var(--v-white);
  transition: border-color 0.2s;
}

.audit-url-input:focus {
  outline: none;
  border-color: var(--v-emerald);
}

.audit-btn-submit {
  height: 52px;
  padding: 0 32px;
  background-color: var(--v-emerald);
  color: var(--v-white);
  border: none;
  border-radius: var(--v-radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.audit-btn-submit:hover:not(:disabled) {
  background-color: var(--v-emerald-dark);
}

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

/* Crawl Options Row */
.audit-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--v-gray-200);
  font-size: 13px;
  color: var(--v-gray-700);
  flex-wrap: wrap;
  gap: 12px;
}

.audit-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-select-sm {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--v-gray-300);
  font-size: 13px;
  color: var(--v-navy);
  background-color: var(--v-white);
}

/* Live Progress Overlay */
.audit-progress-box {
  display: none;
  margin-top: 24px;
  background-color: var(--v-gray-50);
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius);
  padding: 20px;
}

.audit-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.audit-progress-title {
  font-weight: 700;
  color: var(--v-navy);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--v-gray-300);
  border-top-color: var(--v-emerald);
  border-radius: 50%;
  animation: v-spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes v-spin {
  to { transform: rotate(360deg); }
}

.audit-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background-color: var(--v-gray-200);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.audit-progress-bar-fill {
  height: 100%;
  background-color: var(--v-emerald);
  width: 0%;
  transition: width 0.3s ease;
}

.audit-progress-status-text {
  font-size: 13px;
  color: var(--v-gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard & Report Containers */
.audit-main-content {
  background-color: var(--v-gray-50);
  min-height: 70vh;
  padding: 40px 0 60px;
}

.audit-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Report Header Bar */
.report-header-bar {
  background-color: var(--v-white);
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius-lg);
  padding: 24px 30px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--v-shadow);
}

.report-header-info h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--v-navy);
  margin-bottom: 6px;
}

.report-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--v-gray-500);
  flex-wrap: wrap;
}

.report-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-audit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--v-radius);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-audit-primary {
  background-color: var(--v-emerald);
  color: var(--v-white);
}

.btn-audit-primary:hover {
  background-color: var(--v-emerald-dark);
}

.btn-audit-outline {
  background-color: var(--v-white);
  border-color: var(--v-gray-300);
  color: var(--v-navy);
}

.btn-audit-outline:hover {
  background-color: var(--v-gray-100);
}

/* Scorecard Banner */
.scorecard-banner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  background-color: var(--v-white);
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--v-shadow);
}

@media (max-width: 860px) {
  .scorecard-banner {
    grid-template-columns: 1fr;
  }
}

.overall-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--v-gray-200);
  padding-right: 24px;
  text-align: center;
}

@media (max-width: 860px) {
  .overall-score-card {
    border-right: none;
    border-bottom: 1px solid var(--v-gray-200);
    padding-right: 0;
    padding-bottom: 24px;
  }
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--v-navy);
  color: var(--v-white);
  margin-bottom: 12px;
  border: 6px solid var(--v-emerald);
}

.score-number {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.score-total {
  font-size: 13px;
  color: var(--v-gray-400);
  font-weight: 600;
}

.score-grade-badge {
  display: inline-block;
  padding: 4px 14px;
  background-color: var(--v-emerald);
  color: var(--v-white);
  font-weight: 800;
  font-size: 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.score-rating-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--v-navy);
}

/* Category Scores Grid */
.category-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.cat-score-card {
  background-color: var(--v-gray-50);
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cat-score-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--v-gray-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-score-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--v-navy);
  margin-bottom: 8px;
}

.cat-score-bar {
  height: 6px;
  background-color: var(--v-gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.cat-score-bar-fill {
  height: 100%;
  background-color: var(--v-emerald);
}

/* Issues Summary Chips */
.issues-summary-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--v-gray-200);
}

.issue-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.issue-chip-critical {
  background-color: var(--v-critical-bg);
  color: var(--v-critical);
  border: 1px solid #FECACA;
}

.issue-chip-warning {
  background-color: var(--v-warning-bg);
  color: #B45309;
  border: 1px solid #FDE68A;
}

.issue-chip-notice {
  background-color: var(--v-notice-bg);
  color: var(--v-notice);
  border: 1px solid #BFDBFE;
}

.issue-chip-pass {
  background-color: var(--v-pass-bg);
  color: var(--v-pass);
  border: 1px solid #A7F3D0;
}

/* Navigation Tabs */
.audit-tabs-nav {
  display: flex;
  gap: 6px;
  background-color: var(--v-white);
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.audit-tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--v-gray-700);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.audit-tab-btn:hover {
  background-color: var(--v-gray-100);
  color: var(--v-navy);
}

.audit-tab-btn.active {
  background-color: var(--v-navy);
  color: var(--v-white);
}

.tab-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  background-color: rgba(0,0,0,0.1);
  margin-left: 6px;
}

.audit-tab-btn.active .tab-badge {
  background-color: var(--v-emerald);
  color: var(--v-white);
}

/* Tab Panels */
.audit-tab-panel {
  display: none;
}

.audit-tab-panel.active {
  display: block;
}

/* Cards & Section Boxes */
.audit-card {
  background-color: var(--v-white);
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--v-shadow);
}

.audit-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--v-navy);
  margin-bottom: 6px;
}

.audit-card-desc {
  font-size: 14px;
  color: var(--v-gray-500);
  margin-bottom: 20px;
}

/* Issues Table / List */
.issues-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.issue-filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--v-gray-300);
  border-radius: 4px;
  background-color: var(--v-white);
  font-size: 13px;
  font-weight: 600;
  color: var(--v-gray-700);
  cursor: pointer;
}

.issue-filter-btn.active {
  background-color: var(--v-navy);
  color: var(--v-white);
  border-color: var(--v-navy);
}

.issue-item {
  border: 1px solid var(--v-gray-200);
  border-left-width: 4px;
  border-radius: var(--v-radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  background-color: var(--v-white);
  transition: transform 0.15s;
}

.issue-item:hover {
  transform: translateX(2px);
}

.issue-item-critical {
  border-left-color: var(--v-critical);
}

.issue-item-warning {
  border-left-color: var(--v-warning);
}

.issue-item-notice {
  border-left-color: var(--v-notice);
}

.issue-item-pass {
  border-left-color: var(--v-pass);
}

.issue-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.issue-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.issue-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}

.issue-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--v-navy);
}

.issue-category-pill {
  font-size: 11px;
  color: var(--v-gray-500);
  background-color: var(--v-gray-100);
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: capitalize;
}

.issue-desc {
  font-size: 14px;
  color: var(--v-gray-700);
  line-height: 1.5;
  margin-bottom: 10px;
}

.issue-recommendation {
  background-color: var(--v-gray-50);
  border: 1px solid var(--v-gray-200);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--v-navy);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.issue-recom-label {
  font-weight: 700;
  color: var(--v-emerald);
  white-space: nowrap;
}

.issue-affected-url {
  font-family: monospace;
  font-size: 12px;
  color: var(--v-gray-500);
  margin-top: 6px;
  word-break: break-all;
}

/* Responsive Table */
.audit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius);
  background-color: var(--v-white);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.audit-table th {
  background-color: var(--v-gray-50);
  color: var(--v-navy);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid var(--v-gray-200);
  white-space: nowrap;
}

.audit-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--v-gray-200);
  color: var(--v-gray-700);
  vertical-align: middle;
}

.audit-table tr:hover td {
  background-color: #FAFBFD;
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge-200 { background-color: var(--v-pass-bg); color: var(--v-pass); }
.status-badge-300 { background-color: var(--v-notice-bg); color: var(--v-notice); }
.status-badge-400 { background-color: var(--v-critical-bg); color: var(--v-critical); }
.status-badge-500 { background-color: var(--v-critical-bg); color: var(--v-critical); }

/* Technical Checks Grid */
.tech-checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tech-check-card {
  border: 1px solid var(--v-gray-200);
  border-radius: var(--v-radius);
  padding: 16px;
  background-color: var(--v-white);
}

.tech-check-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tech-check-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--v-navy);
}

/* Keywords Grid */
.keywords-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--v-gray-100);
  border: 1px solid var(--v-gray-200);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--v-navy);
}

.keyword-count {
  background-color: var(--v-navy);
  color: var(--v-white);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

/* History Audits Table */
.audit-history-search {
  width: 100%;
  max-width: 380px;
  padding: 10px 14px;
  border: 1px solid var(--v-gray-300);
  border-radius: var(--v-radius);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Backlink Module Callout */
.backlink-note-box {
  background-color: var(--v-gray-50);
  border: 1px solid var(--v-gray-200);
  border-left: 4px solid var(--v-notice);
  border-radius: var(--v-radius);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--v-gray-700);
  margin-bottom: 20px;
}

/* ==========================================================================
   PRINT / PDF EXPORT STYLES
   ========================================================================== */
@media print {
  /* Page Setup */
  @page {
    size: A4;
    margin: 1.5cm;
  }

  body {
    background-color: #FFFFFF !important;
    color: #0A192F !important;
    font-size: 11pt !important;
  }

  /* Hide Non-Print Elements */
  .site-header,
  .site-footer,
  .top-util-bar,
  .audit-top-hero,
  .audit-form-card,
  .report-header-actions,
  .audit-tabs-nav,
  .issues-filter-bar,
  .btn-audit,
  .audit-history-search,
  #digital-cta-btn,
  .nav-desktop,
  .nav-actions {
    display: none !important;
  }

  /* Force All Tab Panels to Render in Print */
  .audit-tab-panel {
    display: block !important;
    page-break-before: always;
  }

  .audit-tab-panel:first-of-type {
    page-break-before: auto;
  }

  /* Print Header with Vyapaar360 Corporate Branding */
  .print-header-banner {
    display: block !important;
    border-bottom: 3px solid #00A86B;
    padding-bottom: 16px;
    margin-bottom: 24px;
  }

  .print-header-banner .print-logo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .print-header-banner h1 {
    font-size: 20pt;
    color: #0A192F;
    font-weight: 800;
  }

  .print-header-banner .print-tagline {
    font-size: 10pt;
    color: #00A86B;
    font-weight: 700;
    text-transform: uppercase;
  }

  .audit-card,
  .scorecard-banner,
  .report-header-bar {
    border: 1px solid #CBD5E1 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .score-circle {
    background-color: #0A192F !important;
    color: #FFFFFF !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .issue-item {
    page-break-inside: avoid;
    border: 1px solid #CBD5E1 !important;
  }

  .audit-table th,
  .audit-table td {
    padding: 8px 10px !important;
    font-size: 9pt !important;
  }
}
