/* ═══════════════════════════════════════════════════════
   Müşteri Portalı — Premium Slate (ajans ile uyumlu)
   ═══════════════════════════════════════════════════════ */

.portal-app {
  min-height: 100vh;
  background: #eceef2;
  -webkit-font-smoothing: antialiased;
}

.portal-shell {
  min-height: 100vh;
  background: #eceef2;
  color: #0b1220;
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.portal-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% -10%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.portal-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* ── Top bar ── */
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.portal-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,99,235,0.35);
  color: #fff;
  font-size: 20px;
}
.portal-brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.portal-brand-text { font-size: 15px; font-weight: 700; color: #1a2234; }
.portal-shell { --portal-accent: var(--portal-brand, #6366f1); }
.portal-hero-badge { border-color: color-mix(in srgb, var(--portal-accent) 30%, transparent); color: var(--portal-accent); }
.portal-brand-sub { font-size: 11px; color: #5c677a; margin-top: 2px; }
.portal-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(38, 48, 72, 0.14);
  background: rgba(236, 240, 247, 0.75);
  backdrop-filter: blur(8px);
  color: #3d4a5c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.portal-logout-btn:hover { background: #fafbfc; color: #0b1220; border-color: rgba(99, 102, 241, 0.28); }

/* ── Hero ── */
.portal-hero {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid rgba(38, 48, 72, 0.1);
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(26, 34, 52, 0.08), inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
}
.portal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.portal-hero h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  color: #1a2234;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.portal-hero p {
  font-size: 14px;
  color: #5c677a;
  margin-top: 8px;
  max-width: 520px;
  line-height: 1.6;
}

/* ── Nav tabs ── */
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px;
  background: rgba(37, 45, 63, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 20, 35, 0.2);
}
.portal-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(226, 232, 244, 0.55);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.portal-nav-btn:hover { color: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.06); }
.portal-nav-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.2));
  color: #f1f4fa;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.portal-nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

/* ── Stat grid ── */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.portal-stat {
  background: #ffffff;
  border: 1px solid rgba(38, 48, 72, 0.1);
  border-radius: 16px;
  padding: 22px 20px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(26, 34, 52, 0.06), inset 0 1px 0 rgba(255,255,255,0.45);
}
.portal-stat:hover { border-color: rgba(99, 102, 241, 0.22); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(26, 34, 52, 0.1); }
.portal-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.portal-stat-icon.blue { background: rgba(37,99,235,0.1); color: #2563eb; }
.portal-stat-icon.violet { background: rgba(124,58,237,0.1); color: #7c3aed; }
.portal-stat-icon.amber { background: rgba(245,158,11,0.12); color: #d97706; }
.portal-stat-icon.green { background: rgba(16,185,129,0.12); color: #059669; }
.portal-stat-value { font-size: 28px; font-weight: 800; color: #1a2234; letter-spacing: -0.5px; }
.portal-stat-label { font-size: 12px; color: #5c677a; margin-top: 4px; font-weight: 500; }

/* ── Cards ── */
.portal-card {
  background: #ffffff;
  border: 1px solid rgba(38, 48, 72, 0.1);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(26, 34, 52, 0.07), inset 0 1px 0 rgba(255,255,255,0.45);
}
.portal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(38, 48, 72, 0.08);
  background: rgba(255, 255, 255, 0.15);
}
.portal-card-title { font-size: 16px; font-weight: 700; color: #1a2234; }
.portal-card-sub { font-size: 12px; color: #5c677a; margin-top: 4px; }
.portal-card-body { padding: 22px 24px; }

.portal-status {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.portal-status.sent { background: rgba(37,99,235,0.12); color: #1d4ed8; }
.portal-status.viewed { background: rgba(245,158,11,0.12); color: #b45309; }
.portal-status.approved { background: rgba(16,185,129,0.12); color: #047857; }
.portal-status.rejected { background: rgba(239,68,68,0.1); color: #b91c1c; }

/* ── Report row ── */
.portal-report-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.portal-report-row:last-child { border-bottom: none; }
.portal-report-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.portal-report-info { flex: 1; min-width: 0; }
.portal-report-title { font-size: 14px; font-weight: 600; color: #0f172a; }
.portal-report-meta { font-size: 12px; color: #64748b; margin-top: 3px; }
.portal-score-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #4f46e5;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.06);
}
.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.portal-btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}
.portal-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.45); }
.portal-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.portal-btn-ghost {
  background: rgba(236, 240, 247, 0.6);
  color: #3d4a5c;
  border: 1px solid rgba(38, 48, 72, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.portal-btn-ghost:hover { background: #fafbfc; border-color: rgba(99, 102, 241, 0.25); color: #0b1220; }
.portal-btn-success { background: rgba(16,185,129,0.1); color: #047857; border: 1px solid rgba(16,185,129,0.25); }
.portal-btn-danger { background: rgba(239,68,68,0.08); color: #b91c1c; border: 1px solid rgba(239,68,68,0.2); }
.portal-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Notification ── */
.portal-notif {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}
.portal-notif:last-child { border-bottom: none; }
.portal-notif:hover { background: rgba(99, 102, 241, 0.03); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; }
.portal-notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6366f1;
  margin-top: 6px;
  flex-shrink: 0;
}
.portal-notif-title { font-size: 14px; font-weight: 600; color: #0f172a; }
.portal-notif-msg { font-size: 12px; color: #64748b; margin-top: 4px; line-height: 1.5; }
.portal-notif-time { font-size: 11px; color: #94a3b8; margin-top: 6px; }

/* ── Empty & loading ── */
.portal-empty {
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
}
.portal-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(99, 102, 241, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #6366f1;
}
.portal-empty p { font-size: 14px; }
.portal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
  color: #64748b;
}
.portal-error {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 14px;
  padding: 16px 20px;
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ── Quick grid (özet) ── */
.portal-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.portal-quick-card {
  background: #ffffff;
  border: 1px solid rgba(38, 48, 72, 0.1);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(26, 34, 52, 0.05), inset 0 1px 0 rgba(255,255,255,0.4);
}
.portal-quick-card:hover { border-color: rgba(99, 102, 241, 0.28); background: linear-gradient(180deg, #eef2f8 0%, #e4eaf4 100%); box-shadow: 0 10px 28px rgba(99, 102, 241, 0.12); }
.portal-quick-card h3 { font-size: 14px; font-weight: 700; color: #1a2234; margin-bottom: 6px; }
.portal-quick-card p { font-size: 12px; color: #5c677a; line-height: 1.5; }

.portal-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.portal-order-stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(38, 48, 72, 0.08);
}
.portal-order-stat--warn {
  border-color: rgba(245,158,11,0.3);
  background: rgba(254, 243, 199, 0.35);
}
.portal-order-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}
.portal-order-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}
.portal-order-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.portal-order-delta.up { color: #059669; }
.portal-order-delta.down { color: #dc2626; }
.portal-order-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.portal-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.portal-regression-list {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(254, 243, 199, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.portal-regression-title {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.portal-regression-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  padding: 6px 0;
}
.portal-regression-item svg { flex-shrink: 0; color: #d97706; margin-top: 2px; }
.portal-regression-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}
.portal-regression-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245,158,11,0.2);
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portal-regression-item-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.5;
}

.portal-order-delta.up { color: #059669; }
.portal-order-delta.down { color: #dc2626; }

.portal-guide-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.portal-guide-picker-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(38, 48, 72, 0.12);
  background: rgba(236, 240, 247, 0.65);
  color: #3d4a5c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.portal-guide-picker-btn.active {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.15);
  color: #3730a3;
}
.portal-guide-intel .pg-root { margin-top: 0; }

.portal-notif--read { opacity: 0.55; }
.portal-notif-dot--warn { background: #f59e0b !important; box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }
.portal-notif-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .portal-stats { grid-template-columns: repeat(2, 1fr); }
  .portal-quick-grid { grid-template-columns: 1fr; }
  .portal-report-row { flex-wrap: wrap; gap: 12px; }
  .portal-inner { padding: 20px 16px 48px; }
  .portal-hero h1 { font-size: 26px; }
  .portal-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .portal-nav::-webkit-scrollbar { display: none; }
  .portal-nav-btn { flex-shrink: 0; white-space: nowrap; }
  .portal-report-info { width: 100%; }
  .portal-actions { flex-direction: column; }
  .portal-actions .portal-btn { width: 100%; justify-content: center; }
  .portal-topbar { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 480px) {
  .portal-stats { grid-template-columns: 1fr; }
  .portal-stat-value { font-size: 24px; }
  .portal-card-body { padding: 16px; }
  .portal-report-row { padding: 14px 0; }
}

/* ── Portal onboarding wizard ── */
.portal-onboard-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 8, 15, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.portal-onboard-card {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 20px; padding: 36px 32px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2); text-align: center;
}
.portal-onboard-close {
  position: absolute; top: 14px; right: 14px;
  border: none; background: #f1f5f9; border-radius: 8px; padding: 6px; cursor: pointer;
}
.portal-onboard-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.portal-onboard-card h2 { font-size: 22px; font-weight: 800; margin: 0 0 10px; color: #0b1220; }
.portal-onboard-card p { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0 0 20px; }
.portal-onboard-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.portal-onboard-dots span { width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; }
.portal-onboard-dots span.active { background: #6366f1; width: 20px; border-radius: 999px; }
.portal-onboard-actions { display: flex; gap: 10px; justify-content: center; }
