/* Müşteri portalı okunabilirlik katmanı.
   Yalnızca .portal-view içindeki yazı boyutu, satır aralığı, taşma davranışı ve gri yardımcı metin kontrastını düzenler;
   marka renkleri, düzen ve diğer sayfalar değişmez. Kaldırmak için index.html'deki <link> satırını silmek yeterli. */
.portal-view {
  --pr-body: clamp(16px, 15.4px + .2vw, 17px);
  --pr-meta: clamp(14px, 13.6px + .12vw, 15px);
  --pr-control: 16px;
  --pr-h1: clamp(24px, 20.5px + 1vw, 28px);
  --pr-h2: clamp(20px, 18.8px + .35vw, 22px);
  --pr-title: clamp(18px, 17px + .3vw, 20px);
  font-size: var(--pr-body);
  line-height: 1.6;
}

/* Standart metinler ve açıklamalar */
.portal-view :is(
  .support-card p, .portal-welcome p, .panel-heading p, .metric-grid p, .empty-state span,
  .start-card p, .form-section-title p, .consent p, .form-error, .manager-note p,
  .admin-request-head p, .admin-notes, .credit-head p, .credit-empty, .admin-credit-box p,
  .request-file-actions > span, .revision-history li, .admin-request-actions > span, .admin-loading,
  .upload-zone strong, .request-detail strong, .admin-request-specs strong, .user-copy strong, .credit-row b
) { font-size: var(--pr-body); line-height: 1.6; }

.portal-view :is(.request-main strong, .vehicle-choice strong, .support-card strong) { font-size: 17px; line-height: 1.4; }
.portal-view .empty-state strong { font-size: 18px; line-height: 1.4; }

/* Küçük üst etiketler, meta bilgiler ve durum bilgileri (en az 14px) */
.portal-view :is(
  .portal-welcome > div > span, .panel-heading > div > span, .form-section-title > span,
  .metric-grid small, .card-head span, .start-card > div > span, .request-main small, .request-detail span,
  .step-indicator span, .vehicle-choice small, .vehicle-choice i, .upload-zone small,
  .admin-request-head > div > span, .admin-request-specs small, .credit-head span, .credit-row small,
  .admin-credit-box span, .manager-note > span, .manager-group-head span, .support-card small,
  .user-copy small, .portal-nav b, .request-status, .status-pill, .revision-history li small, .preview-badge
) { font-size: var(--pr-meta); line-height: 1.45; }
.portal-view .request-status { padding: 6px 10px; }
.portal-view .portal-nav b { min-width: 24px; height: 24px; border-radius: 12px; }

/* Form alanları, form etiketleri, butonlar ve menüler (en az 16px) */
.portal-view :is(
  .fields-grid label > span, .admin-request-actions form label,
  .fields-grid input, .fields-grid select, .fields-grid textarea, .table-toolbar input, .table-toolbar select,
  .manager-item input[type="text"], .manager-item textarea,
  .admin-request-actions select, .admin-request-actions input,
  .portal-nav button, .back-site, .portal-signout, .card-head button, .start-card button, .upload-zone em,
  .file-action, .admin-request-actions > button, .button,
  .request-files > summary, .revision-history > summary
) { font-size: var(--pr-control); }
.portal-view :is(.fields-grid input, .fields-grid select, .fields-grid textarea, .table-toolbar input, .table-toolbar select,
  .admin-request-actions select, .admin-request-actions input) { min-height: 44px; line-height: 1.4; }
.portal-view :is(.fields-grid label > span, .admin-request-actions form label) { letter-spacing: .02em; }

/* Başlıklar */
.portal-view .panel-heading h1 { font-size: var(--pr-h1); line-height: 1.15; }
.portal-view :is(.form-section-title h2, .card-head h2, .start-card h2, .admin-subheading h2) { font-size: var(--pr-h2); line-height: 1.25; }
.portal-view .admin-request-head h3 { font-size: var(--pr-h2); line-height: 1.25; }
.portal-view :is(.portal-topbar > div:first-child > strong, .manager-group-head strong) { font-size: var(--pr-title); line-height: 1.3; }

/* Büyük yazılar taşmasın */
.portal-view :is(.request-main, .request-detail, .admin-request-specs div, .revision-history li span, .admin-request-head > div, .credit-row) { min-width: 0; overflow-wrap: anywhere; }
.portal-view .request-main small { overflow-wrap: normal; }
.portal-view :is(.file-action, .admin-request-actions > button) { white-space: normal; line-height: 1.3; text-align: center; }
.portal-view .admin-request-actions form { grid-template-columns: minmax(150px, 180px) minmax(200px, 1fr) auto; }
/* Araç grubu kartları: büyüyen yazıyla 4 sabit sütun taşıyordu; alan yettiği kadar sütun (masaüstünde 2×2) */
@media (min-width: 861px) {
  .portal-view .vehicle-choice-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
}
@media (max-width: 860px) {
  .portal-view .admin-request-actions form { grid-template-columns: 1fr; }
  .portal-view .admin-request-specs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .portal-view .admin-request-specs { grid-template-columns: 1fr; }
  /* Dar ekranda talep satırındaki indirme düğmesi bilgilerin altına iner */
  .portal-view .requests-table .request-row { grid-template-columns: 1fr; gap: 10px; }
  .portal-view .requests-table .request-row .file-action { justify-self: start; }
}
@media (max-width: 860px) {
  /* Mobilde portal yatayda kaymasın (menü şeridi kendi içinde kaymaya devam eder) */
  .portal-view { overflow-x: hidden; }
}

/* Kontrast (WCAG 2.2 AA, 4.5:1): açık zemindeki gri yardımcı metinler aynı gri tonunun koyusuna çekildi.
   Marka renkleri, kırmızı etiketler, durum rozetleri ve koyu zeminli kartlar değişmez. */
.portal-view :is(
  .metric-grid small, .metric-grid p, .card-head span, .request-main small, .request-detail span,
  .vehicle-choice small, .upload-zone small, .admin-request-specs small, .credit-row small, .user-copy small,
  .revision-history li small, .portal-welcome p, .panel-heading p, .form-section-title p, .consent p,
  .credit-head p, .empty-state span, .admin-request-head p, .credit-empty, .request-file-actions > span,
  .admin-request-actions > span, .request-files > summary, .revision-history > summary
) { color: #5f6b6e; }

/* Talep satırındaki "Düzenlenmiş Dosyayı İndir": .request-row button (29px kare, açık gri) kuralı
   .file-action görünümünü eziyordu; düğmenin kendi koyu görünümü geri verilir. */
.portal-view .request-row .file-action {
  width: auto; height: auto; min-height: 40px; padding: 10px 14px; border-radius: 8px;
  background: #172b31; color: #fff;
}
