/* ==========================================================================
   ARAÇ SERVİS SAĞLIK RAPORU MODÜLÜ — CSS
   ========================================================================== */

/* Styling system inherited from main site variables */
:root {
  --bg-primary: #050B16;
  --bg-secondary: #08111F;
  --bg-card: rgba(11, 22, 40, 0.55);
  --accent-blue: #0A84FF;
  --accent-cyan: #00D8FF;
  --accent-glow: rgba(10, 132, 255, 0.35);
  --text-primary: #F5F7FB;
  --text-secondary: rgba(245, 245, 247, 0.72);
  --text-muted: rgba(245, 245, 247, 0.48);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(10, 132, 255, 0.3);
  --border-focus: rgba(10, 132, 255, 0.6);
  --success: #25D366;
  --warning: #FF9F0A;
  --danger: #FF453A;
  --font-display: 'Outfit', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* Base styles for report page */
.report-body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Page titles */
.text-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Main Container */
.report-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Report Header & Company branding */
.report-branding {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.report-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}
.report-logo-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-blue);
}
.report-meta-info {
  text-align: right;
}
.report-meta-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Grid Layouts */
.report-grid-top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 25px;
  margin-bottom: 30px;
}

/* Cards & Shells */
.report-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-blue);
}
.report-card.score-card::before {
  background-color: var(--accent-cyan);
}

.report-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Vehicle Info details */
.vehicle-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.vehicle-info-item {
  display: flex;
  flex-direction: column;
}
.vehicle-info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.vehicle-info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

/* Score Circle Indicator */
.score-flex-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.score-circle-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 15px;
}
.score-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}
.score-bg-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 12;
}
.score-active-ring {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}
.score-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.score-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.score-max {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.score-badge {
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}
.score-badge.success { background-color: rgba(37, 211, 102, 0.15); color: var(--success); }
.score-badge.primary { background-color: rgba(10, 132, 255, 0.15); color: var(--accent-blue); }
.score-badge.warning { background-color: rgba(255, 159, 10, 0.15); color: var(--warning); }
.score-badge.danger { background-color: rgba(255, 69, 58, 0.15); color: var(--danger); }

/* Breakdown / Kırılım Table */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.breakdown-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.breakdown-table tr:last-child td {
  border-bottom: none;
}
.breakdown-bar-container {
  width: 100px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}
.breakdown-bar-fill {
  height: 100%;
  background-color: var(--accent-blue);
  border-radius: 3px;
}

/* Service History Timeline */
.timeline-section {
  margin-top: 40px;
}
.timeline-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
}
.timeline-wrapper {
  position: relative;
  padding-left: 30px;
}
.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 5px;
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-dot {
  position: absolute;
  left: -30px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 3px solid var(--accent-blue);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.timeline-date {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}
.timeline-km {
  background-color: rgba(10, 132, 255, 0.1);
  color: var(--accent-blue);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.timeline-details {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
}
.timeline-details-item {
  margin-bottom: 12px;
}
.timeline-details-item:last-child {
  margin-bottom: 0;
}
.timeline-details-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.timeline-details-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Part / Item list inside service record */
.parts-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}
.part-tag {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
}

/* Checklist / Recommendations Styles */
.summary-blocks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 30px;
}
.check-list {
  list-style: none;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.check-list li i {
  position: absolute;
  left: 0;
  top: 4px;
}
.check-list li i.fa-check-circle {
  color: var(--success);
}
.check-list li i.fa-triangle-exclamation {
  color: var(--warning);
}
.check-list li i.fa-circle-chevron-right {
  color: var(--accent-blue);
}

/* Search page query form */
.search-hero {
  padding: 80px 0 50px 0;
  text-align: center;
  background: radial-gradient(circle at center, rgba(10, 132, 255, 0.08) 0%, transparent 70%);
}
.search-form-card {
  max-width: 500px;
  margin: 30px auto;
  padding: 30px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  margin-bottom: 25px;
}
.form-checkbox input {
  margin-top: 4px;
}
.form-checkbox span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #0056b3 100%);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(10, 132, 255, 0.3);
  transition: var(--transition);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4);
}

/* Alert Boxes */
.alert {
  padding: 15px 20px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 25px;
  font-size: 0.95rem;
}
.alert-danger {
  background-color: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff6b6b;
}

/* Action button at the top/bottom of reports */
.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 25px;
}
.btn-action {
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.btn-action:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-blue);
}

/* Disclaimer legal note */
.legal-disclaimer {
  margin-top: 40px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Admin panel styling additions */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.admin-table th, .admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.admin-table th {
  background-color: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-weight: 600;
}
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.admin-badge.active { background-color: rgba(37, 211, 102, 0.15); color: var(--success); }
.admin-badge.passive { background-color: rgba(255, 69, 58, 0.15); color: var(--danger); }

/* A4 Print CSS Styling */
@media print {
  @page {
    size: A4;
    margin: 15mm 12mm 20mm 12mm;
  }
  
  .report-body {
    background-color: #fff !important;
    color: #000 !important;
  }

  .report-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide header/nav and action buttons */
  .no-print, .header, .footer, .report-actions, .btn-action {
    display: none !important;
  }

  /* Make sure borders and cards print well on white paper */
  .report-card, .timeline-details {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .report-card::before {
    display: none !important;
  }

  .vehicle-info-value, .score-number {
    color: #000 !important;
  }

  .timeline-date, .timeline-km {
    color: #000 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .timeline-dot {
    border-color: #000 !important;
    background-color: #fff !important;
  }

  .timeline-wrapper::before {
    background-color: #ddd !important;
  }

  .breakdown-bar-container {
    background-color: #eee !important;
    border: 1px solid #ccc !important;
  }
  .breakdown-bar-fill {
    background-color: #555 !important;
  }

  .score-bg-ring {
    stroke: #eee !important;
  }
  .score-active-ring {
    stroke: #333 !important;
  }

  .legal-disclaimer {
    border: 1px solid #ddd !important;
    color: #555 !important;
    background-color: #fff !important;
  }

  /* Layout flow controls */
  .report-grid-top {
    display: block !important;
  }
  .report-grid-top > .report-card {
    margin-bottom: 20px !important;
  }
  
  .summary-blocks-grid {
    display: block !important;
  }
  .summary-blocks-grid > .report-card {
    margin-bottom: 20px !important;
  }

  .report-section {
    page-break-before: auto;
  }

  /* Enable multi-page timeline flow */
  .service-timeline {
    page-break-inside: auto;
  }
  
  .timeline-item {
    page-break-inside: avoid;
  }
}
