/* MójBlok app.css — Polski branding (czerwony stonowany + złoto) */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  /* PL marka — stonowany czerwony + złoto */
  --primary:      #BD0F2A;   /* PL czerwony stonowany */
  --primary-soft: #D8334A;
  --primary-dark: #8A0A1F;
  --accent:       #DB9F2A;   /* złoto */
  --accent-soft:  #E8B85C;
  --accent-bg:    #FFF4E1;

  /* Semantic */
  --success: #16A75A;
  --success-bg: #E8F8EE;
  --warning: #E9C46A;
  --warning-bg: #FFF8E1;
  --danger:  #E76F51;
  --danger-bg: #FFEEEA;
  --info:    #3B82F6;
  --info-bg: #EBF2FF;

  /* Neutrals (ciepły, sofistykowany) */
  --bg:           #F5F4F2;
  --surface:      #FFFFFF;
  --surface-2:   #FAFAF9;
  --border:      #E9E7E2;
  --border-strong:#D6D3CC;
  --text:        #1A1816;
  --text-light:  #78736A;
  --text-muted:  #A8A39A;

  /* Backward compat (Komşum 3rd-party uses) */
  --text-light-old: #6B7280;

  /* Typography */
  --font-display: 'DM Serif Display', 'Inter', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-scale:   1;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(15,14,12,.06), 0 1px 1px rgba(15,14,12,.03);
  --sh-md: 0 4px 12px rgba(15,14,12,.08), 0 2px 4px rgba(15,14,12,.04);
  --sh-lg: 0 12px 32px rgba(15,14,12,.12), 0 4px 8px rgba(15,14,12,.04);
}

/* Inter + DM Serif Display font loading */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700;800&display=swap');

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, .headline, .brand-name {
  font-family: var(--font-display);
  letter-spacing: -0.5px;
}

html { font-size: calc(16px * var(--font-scale)); }
html[data-font="small"]  { --font-scale: 0.875; }
html[data-font="normal"] { --font-scale: 1; }
html[data-font="large"]  { --font-scale: 1.15; }
html[data-font="xlarge"] { --font-scale: 1.3; }

/* Dark mode (prefers-color-scheme lub data-theme="dark") */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary:      #D8334A;   /* czerwony jaśniejszy w dark */
    --primary-soft: #E84A60;
    --primary-dark: #BD0F2A;
    --accent:       #E8B85C;   /* złoto jaśniejsze */
    --accent-bg:    #2A2419;
    --bg:           #0F0E0C;
    --surface:      #1A1816;
    --surface-2:    #2F2C28;
    --border:       #2F2C28;
    --border-strong:#4A453E;
    --text:         #F5F4F2;
    --text-light:   #A8A39A;
  }
}
:root[data-theme="dark"] {
  --primary:      #D8334A;
  --primary-soft: #E84A60;
  --primary-dark: #BD0F2A;
  --accent:       #E8B85C;
  --accent-bg:    #2A2419;
  --bg:           #0F0E0C;
  --surface:      #1A1816;
  --surface-2:    #2F2C28;
  --border:       #2F2C28;
  --border-strong:#4A453E;
  --text:         #F5F4F2;
  --text-light:   #A8A39A;
}

/* Lightbox (full-screen image viewer) */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 16px;
}
.lightbox-overlay img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.2); color: white;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 22px; border: none;
}

/* Rol rozet */
.role-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.role-manager   { background: #BD0F2A; color: white; }
.role-assistant { background: #F59E0B; color: white; }
.role-owner     { background: #16A75A; color: white; }
.role-tenant    { background: #2563EB; color: white; }
.role-family    { background: #94A3B8; color: white; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body { padding-bottom: env(safe-area-inset-bottom); }

.header {
  background: var(--primary);
  color: white;
  padding: env(safe-area-inset-top) 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-info { display: flex; flex-direction: column; }
.site-name { font-size: 17px; font-weight: 600; }
.site-apt { font-size: 13px; opacity: 0.8; }
.header-icons { display: flex; gap: 8px; font-size: 22px; cursor: pointer; }
.header-icons > * { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.badge {
  background: var(--danger); color: white; font-size: 11px;
  border-radius: 10px; padding: 2px 6px; margin-left: -8px; vertical-align: top;
  min-width: 18px; display: inline-block; text-align: center;
}
.badge:empty { display: none; }

.screen { display: none; padding-bottom: 80px; }
.screen.active { display: block; }
.content { padding: 16px; }

.card {
  background: var(--surface); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-warning { background: linear-gradient(135deg, #FEF3C7, #FDE68A); border-left: 4px solid var(--warning); color: #1A2332; }
.card-invitation { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); border-left: 4px solid var(--primary); color: #1A2332; }

/* Highlight cards — açık modda renkli gradient, karanlık modda yumuşak ton */
.highlight-card { color: #1A2332; }
.highlight-primary { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); border-left: 4px solid var(--primary); }
.highlight-warning { background: linear-gradient(135deg, #FEF3C7, #FDE68A); border-left: 4px solid var(--warning); }
.highlight-purple  { background: linear-gradient(135deg, #F3E8FF, #E9D5FF); border-left: 4px solid #9333EA; }
.highlight-success { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); border-left: 4px solid var(--success); }

/* Karanlık modda gradient yerine surface + renkli border */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .highlight-card { color: var(--text); background: var(--surface); }
  :root:not([data-theme="light"]) .highlight-primary { background: linear-gradient(135deg, rgba(74,123,176,0.15), rgba(74,123,176,0.08)); }
  :root:not([data-theme="light"]) .highlight-warning { background: linear-gradient(135deg, rgba(233,196,106,0.15), rgba(233,196,106,0.08)); }
  :root:not([data-theme="light"]) .highlight-purple  { background: linear-gradient(135deg, rgba(147,51,234,0.18), rgba(147,51,234,0.08)); }
  :root:not([data-theme="light"]) .highlight-success { background: linear-gradient(135deg, rgba(42,157,143,0.18), rgba(42,157,143,0.08)); }
}
:root[data-theme="dark"] .highlight-card { color: var(--text); background: var(--surface); }
:root[data-theme="dark"] .highlight-primary { background: linear-gradient(135deg, rgba(74,123,176,0.15), rgba(74,123,176,0.08)); }
:root[data-theme="dark"] .highlight-warning { background: linear-gradient(135deg, rgba(233,196,106,0.15), rgba(233,196,106,0.08)); }
:root[data-theme="dark"] .highlight-purple  { background: linear-gradient(135deg, rgba(147,51,234,0.18), rgba(147,51,234,0.08)); }
:root[data-theme="dark"] .highlight-success { background: linear-gradient(135deg, rgba(42,157,143,0.18), rgba(42,157,143,0.08)); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.card-meta { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }
.card-body { font-size: 14px; line-height: 1.5; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }

.btn {
  padding: 10px 16px; border-radius: 8px; border: none; font-size: 14px;
  font-weight: 500; cursor: pointer; flex: 1;
  font-family: inherit;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger  { background: var(--danger); color: white; }
.btn-outline { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-oauth {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-oauth:hover { background: var(--bg); }
.oauth-divider {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 8px;
  font-size: 12px; color: var(--text-light);
}
.oauth-divider::before, .oauth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-block   { width: 100%; margin-bottom: 8px; }

.input {
  width: 100%; padding: 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; margin-bottom: 12px;
  font-family: inherit;
  background: var(--surface); color: var(--text);
}
/* A11Y: keyboard focus ring (WCAG 2.4.7) */
.input:focus-visible,
input:focus-visible:not([type="checkbox"]):not([type="radio"]),
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
/* Skip link — keyboard user'lar header'ı atlayabilsin */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--primary); color: white; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
.label { font-size: 13px; color: var(--text-light); margin-bottom: 4px; display: block; }

.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 24px 4px 8px;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 100;
}
.nav-item {
  flex: 1; text-align: center; padding: 10px 4px;
  min-height: 48px;
  font-size: 11px; color: var(--text-light); cursor: pointer;
  background: transparent; border: none; font-family: inherit;
}
.nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 4px; }
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 22px; margin-bottom: 2px; display: block; }

.list-item {
  display: flex; align-items: center; padding: 12px;
  background: var(--surface); border-radius: 12px;
  margin-bottom: 8px; gap: 12px;
}
.list-icon { font-size: 24px; }
.list-body { flex: 1; }
.list-title { font-size: 14px; font-weight: 500; }
.list-meta { font-size: 12px; color: var(--text-light); }

.welcome-screen {
  flex-direction: column; justify-content: center;
  align-items: center; min-height: 100vh; padding: 24px; text-align: center;
}
.welcome-screen.active { display: flex; }
.logo { font-size: 48px; margin-bottom: 16px; }
.brand-name {
  font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
  font-size: 38px; font-weight: 400; color: var(--primary);
  margin-bottom: 8px; letter-spacing: -0.5px;
}
.brand-tagline { font-size: 15px; color: var(--text-light); margin-bottom: 28px; max-width: 320px; }
.welcome-actions { width: 100%; max-width: 360px; }
.form-wrap { width: 100%; max-width: 360px; }
.version { margin-top: 28px; font-size: 12px; color: var(--text-light); }

/* Welcome hero kartlar (mieszkaniec / zarządca) — proto kalitesi */
.welcome-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; cursor: pointer; text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg, 16px);
  margin-bottom: 12px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.welcome-card:hover,
.welcome-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--sh-md, 0 6px 18px rgba(0,0,0,.08));
  outline: none;
}
.welcome-card-primary { border-left: 4px solid var(--primary); }
.welcome-card-accent  { border-left: 4px solid var(--accent); }
.welcome-card-icon {
  flex: 0 0 48px; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; border-radius: 12px;
  background: var(--primary-soft, rgba(189,15,42,.08));
}
.welcome-card-accent .welcome-card-icon {
  background: var(--accent-bg, rgba(219,159,42,.12));
}
.welcome-card-body { flex: 1; min-width: 0; }
.welcome-card-body .card-title {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 4px;
}
.welcome-card-body .card-meta {
  font-size: 13px; color: var(--text-light); line-height: 1.4;
}
.welcome-card-arrow {
  flex: 0 0 auto; font-size: 18px; color: var(--text-light);
  opacity: 0.5; transition: transform .15s ease, opacity .15s ease;
}
.welcome-card:hover .welcome-card-arrow {
  opacity: 1; transform: translateX(2px); color: var(--primary);
}

/* Feature chip rzędem (BLIK / KSeF / UWL / mObywatel) */
.welcome-features {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 24px 0 8px; max-width: 360px;
}
.feature-chip {
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
}

/* Form section başlık ipucu (rejestracja) */
.form-section-hint {
  background: var(--bg); padding: 12px;
  border-radius: var(--r-md, 10px);
  margin: 16px 0 12px;
  font-size: 12px; color: var(--text-light);
  text-align: left;
}
.form-section-hint:first-child { margin-top: 0; }

/* mObywatel butonu — flaga + brand kolor */
.btn-mobywatel {
  background: linear-gradient(135deg, #DC143C, #BD0F2A);
  color: white; border: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(189,15,42,.25);
}
.btn-mobywatel:hover {
  background: linear-gradient(135deg, #C9112C, #A50D24);
  box-shadow: 0 4px 12px rgba(189,15,42,.35);
}

.lang-bar {
  position: absolute; top: env(safe-area-inset-top, 20px); right: 16px;
  display: flex; gap: 4px;
}
.lang-bar button {
  padding: 4px 10px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-light);
}
.lang-bar button.active { background: var(--primary); color: white; border-color: var(--primary); }

.kvkk-check {
  display: flex; gap: 8px; font-size: 13px; margin: 12px 0;
  align-items: flex-start; text-align: left;
}
.kvkk-check input { margin-top: 3px; }

.code-display {
  background: linear-gradient(135deg, var(--primary), #3B6FA8);
  color: white; padding: 24px; border-radius: 16px;
  text-align: center; margin: 16px 0;
}
.code-label { font-size: 12px; opacity: 0.8; margin-bottom: 8px; }
.code-value {
  font-size: 28px; font-weight: 700; letter-spacing: 2px;
  margin-bottom: 12px; font-family: 'Courier New', monospace;
}
.btn-copy {
  background: rgba(255,255,255,0.2); color: white;
  padding: 8px 16px; border-radius: 8px; border: none;
  font-size: 13px; cursor: pointer;
}

.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--border); display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-light); flex-shrink: 0;
}
.avatar-lg { width: 80px; height: 80px; font-size: 32px; }

.message {
  background: var(--surface); border-radius: 12px;
  padding: 12px; margin-bottom: 8px;
}
.message-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.message-sender { font-size: 13px; font-weight: 600; }
.message-meta { font-size: 11px; color: var(--text-light); }
.message-content { font-size: 14px; line-height: 1.5; }
.message-actions {
  display: flex; gap: 16px; margin-top: 8px;
  font-size: 12px; color: var(--text-light);
}

.channels {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 16px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.channel-chip {
  padding: 6px 12px; border-radius: 20px; background: var(--bg);
  font-size: 13px; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--border);
}
.channel-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

.composer {
  position: fixed; bottom: 64px; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; gap: 8px; padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.composer input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 22px; font-size: 14px; font-family: inherit;
}
.composer button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: white; border: none;
  font-size: 18px; cursor: pointer;
}

/* ─── Desktop responsive (tablet + masaüstü) ─── */
@media (min-width: 768px) {
  .screen { max-width: 480px; margin: 0 auto; min-height: 100vh; box-shadow: 0 0 24px rgba(0,0,0,0.05); }
  .bottom-nav, .composer { max-width: 480px; left: 50%; transform: translateX(-50%); }
  body { background: var(--bg); }
}
@media (min-width: 1024px) {
  .welcome-screen { max-width: 480px; margin: 0 auto; }
  .screen { max-width: 560px; }
  .bottom-nav, .composer { max-width: 560px; }
}

/* Sentry CDN için */
.sentry-error-embed-wrapper { display: none !important; }

/* ─── Loading state ───────────────────────────────── */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.loading-center {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; color: var(--text-light);
}

/* Skeleton */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 8px;
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-card { height: 80px; margin-bottom: 12px; border-radius: 12px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }

/* Empty state */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-light);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 14px; margin-bottom: 16px; }

/* Disable button on loading */
button[disabled] { opacity: 0.7; cursor: not-allowed; }
button[disabled]::after { content: ''; }

/* ═══════════════════════════════════════════════════════════════
 * Sprint 5 — UI Prototype bileşenleri (PL design system)
 * Proto kalıbı için: appbar, badge, chip-row, vote bars, BLIK,
 * keypad, FAB, list-avatar, card.elevated, gradient cards
 * ═══════════════════════════════════════════════════════════════ */

/* Appbar (üst bar — back/title/action) */
.appbar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 8px;
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
.appbar-back, .appbar-action {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50%; cursor: pointer; font-size: 18px;
  color: var(--text);
  position: relative;
}
.appbar-back:hover, .appbar-action:hover { background: var(--bg); }
.appbar-title {
  flex: 1; font-size: 17px; font-weight: 600;
  color: var(--text); text-align: center;
}
.appbar-greeting {
  flex: 1; min-width: 0;
}
.appbar-greeting-line1 {
  font-size: 11px; color: var(--text-light); text-transform: uppercase;
  letter-spacing: 0.3px; margin-bottom: 2px;
}
.appbar-greeting-line2 {
  font-size: 15px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface);
}

/* Card variants */
.card.elevated {
  box-shadow: var(--sh-md, 0 4px 12px rgba(0,0,0,.08));
}
.card.card-hover { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.card.card-hover:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-md, 0 6px 18px rgba(0,0,0,.08));
}
.card-gradient-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, #8E0B20));
  color: white; border: none;
}
.card-gradient-primary .card-title,
.card-gradient-primary .card-meta { color: white; }
.card-gradient-gold {
  background: linear-gradient(135deg, var(--accent-bg, #FFF4E1), #F8E5B4);
  border: 1px solid var(--accent, #DB9F2A);
}

/* Pill (durum etiketleri — yeni proto stili) */
/* Not: eski .badge (count balon) korunuyor; proto için .pill kullanıyoruz */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--bg); color: var(--text-light);
  border: 1px solid var(--border);
}
.pill-success { background: rgba(15,125,46,.10); color: #0F7D2E; border-color: rgba(15,125,46,.25); }
.pill-danger  { background: rgba(198,40,40,.10); color: #C62828; border-color: rgba(198,40,40,.25); }
.pill-info    { background: rgba(21,101,192,.10); color: #1565C0; border-color: rgba(21,101,192,.25); }
.pill-gold    { background: rgba(219,159,42,.12); color: #B8801A; border-color: rgba(219,159,42,.30); }
.pill-warning { background: rgba(245,124,0,.10); color: #F57C00; border-color: rgba(245,124,0,.25); }
.pill-light   { background: rgba(255,255,255,.18); color: white; border-color: rgba(255,255,255,.30); }

/* Chip row (filtreler/kategoriler) */
.chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 16px 12px; margin: 0 -16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-light);
  cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.chip:hover { background: var(--bg); }
.chip.active {
  background: var(--primary); color: white;
  border-color: var(--primary);
}

/* Progress bar (oylama yüzde) */
.progress {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--bg); overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 999px;
  background: var(--primary);
  transition: width .4s ease;
}
.progress-bar.success { background: var(--success, #0F7D2E); }

.vote-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 13px;
}
.vote-row > span:first-child { width: 90px; font-weight: 600; }
.vote-row > span:last-child  { width: 70px; text-align: right; font-weight: 600; color: var(--text-light); }

/* BLIK 6-haneli code display + keypad */
.blik-display {
  display: flex; gap: 8px; justify-content: center;
  margin: 24px 0;
}
.blik-digit {
  width: 44px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px; font-weight: 400;
  color: var(--text);
}
.blik-digit.filled {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}
.blik-digit.active {
  border-color: var(--primary);
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 8px 0 16px;
  max-width: 320px; margin: 0 auto;
}
.key {
  height: 56px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 22px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: transform .08s;
  font-family: inherit;
}
.key:active { transform: scale(0.95); }
.key.key-action {
  background: var(--primary); color: white; border-color: var(--primary);
}
.key.key-action:active { background: var(--primary-dark, #8E0B20); }

/* List avatar (forum posts, mesaj listesi) */
.list-avatar {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft, #D8334A), var(--primary, #BD0F2A));
  color: white; font-weight: 700; font-size: 14px;
  flex: 0 0 40px;
}

/* FAB (floating action button) */
.fab {
  position: fixed; right: 20px; bottom: 80px;
  width: 56px; height: 56px;
  border-radius: 50%; border: none;
  background: var(--primary); color: white;
  font-size: 28px; font-weight: 300;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(189,15,42,.35);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
}
.fab:hover { background: var(--primary-dark, #8E0B20); transform: scale(1.05); }

/* Display heading (DM Serif büyük rakam) */
.display-amount {
  font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
  font-size: 36px; font-weight: 400;
  letter-spacing: -1px;
  line-height: 1;
}
.display-amount.lg { font-size: 48px; }
.display-amount.sm { font-size: 28px; }

/* Section title (büyük yarı kalın başlık) */
.section-title-lg {
  font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
  font-size: 20px; font-weight: 400;
  color: var(--text);
  margin: 24px 16px 12px;
  letter-spacing: -0.3px;
}

/* Text utilities */
.text-strong { font-size: 14px; font-weight: 600; color: var(--text); }
.text-small  { font-size: 13px; color: var(--text-light); line-height: 1.45; }
.text-tiny   { font-size: 11px; color: var(--text-light); }

/* Stats grid (3-kolon küçük metrikler) */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 12px;
}
.stat-cell {
  text-align: center;
  padding: 8px;
  background: var(--bg);
  border-radius: 8px;
}
.stat-cell-label { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; }
.stat-cell-value { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════════════════
 * ▼▼▼  PROTOTYPE DESIGN SYSTEM OVERRIDE  (ui-prototype/styles.css → app.css)
 * Bu blok app.css'in SONUNDA; aşağıdaki kurallar yukarıdakileri OVERRIDE eder.
 * Amaç: gerçek app'in görünümünü ui-prototype ile birebir aynı yapmak.
 * Sadece görünüm — layout/positioning bozulmaz, mevcut kurallar silinmez.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1) FONT (Inter gövde + DM Serif Display başlık) ─── */

/* ─── 2) :root TOKEN'LAR (prototip değerleri kazanır) ─── */
:root {
  /* Polonya markası — stonowany */
  --pl-red:       #BD0F2A;
  --pl-red-soft:  #D8334A;
  --pl-red-dark:  #8A0A1F;
  --pl-gold:      #DB9F2A;
  --pl-gold-soft: #E8B85C;
  --pl-gold-bg:   #FFF4E1;

  /* Mevcut marka değişkenleriyle aynı isim → prototip değerine sabitle */
  --primary:      #BD0F2A;
  --primary-soft: #D8334A;
  --primary-dark: #8A0A1F;
  --accent:       #DB9F2A;
  --accent-soft:  #E8B85C;
  --accent-bg:    #FFF4E1;

  /* Semantic */
  --success:    #16A75A;
  --success-bg: #E8F8EE;
  --warning:    #E9C46A;
  --warning-bg: #FFF8E1;
  --danger:     #E76F51;
  --danger-bg:  #FFEEEA;
  --info:       #3B82F6;
  --info-bg:    #EBF2FF;

  /* Warm neutrals (prototip skalası) */
  --c-50:  #FAFAF9;
  --c-100: #F5F4F2;
  --c-200: #E9E7E2;
  --c-300: #D6D3CC;
  --c-400: #A8A39A;
  --c-500: #78736A;
  --c-600: #4A453E;
  --c-700: #2F2C28;
  --c-800: #1A1816;
  --c-900: #0F0E0C;

  /* Surfaces / mevcut isimlerle eşleştir */
  --bg:            #F5F4F2;
  --bg-app:        #F5F4F2;
  --surface:       #FFFFFF;
  --surface-2:     #FAFAF9;
  --bg-card:       #FFFFFF;
  --bg-elevated:   #FFFFFF;

  /* Border */
  --border:        #E9E7E2;
  --border-strong: #D6D3CC;

  /* Text (mevcut isimler) */
  --text:       #2F2C28;
  --text-light: #78736A;
  --text-muted: #A8A39A;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --t-display: clamp(28px, 4vw, 36px);

  /* Radius (prototip) */
  --r-sm:   8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  22px;
  --r-full: 999px;

  /* Shadow (prototip) */
  --sh-sm: 0 1px 2px rgba(15,14,12,.06), 0 1px 1px rgba(15,14,12,.03);
  --sh-md: 0 4px 12px rgba(15,14,12,.08), 0 2px 4px rgba(15,14,12,.04);
  --sh-lg: 0 12px 32px rgba(15,14,12,.12), 0 4px 8px rgba(15,14,12,.04);
  --sh-xl: 0 24px 64px rgba(15,14,12,.16), 0 8px 16px rgba(15,14,12,.06);

  /* Transitions */
  --tr-fast: 150ms cubic-bezier(.4,0,.2,1);
  --tr:      250ms cubic-bezier(.4,0,.2,1);
  --tr-slow: 400ms cubic-bezier(.4,0,.2,1);
}

/* Dark mode token uyumu (warm neutrals'ı çevir) */
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  --c-700: var(--text);
}
:root[data-theme="dark"] {
  --bg-app: #0F0E0C;
  --bg-card: #1A1816;
  --bg-elevated: #2F2C28;
}

/* ─── 3) GÖVDE TİPOGRAFİSİ (Inter) ─── */
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--c-700);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background: var(--c-100);
  font-size: 15px;
  line-height: 1.5;
}

/* Başlıklar + büyük rakamlar → DM Serif Display */
h1, h2,
.headline,
.brand-name,
.card-title,
.display-amount,
.section-title-lg {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.5px;
}

/* ─── 4) HEADER (üst bar) ─── */
.header {
  background: var(--surface);
  color: var(--c-700);
  border-bottom: 1px solid var(--border);
  /* Sticky: uzun ekranlarda (chat, listeler) aşağı kayınca back/kapat butonu hep görünür kalsın */
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .site-name { color: var(--c-700); font-weight: 600; }
.header .site-apt  { color: var(--c-500); opacity: 1; }
/* Header ikonları (back/kapat) daha belirgin + dokunması kolay */
.header-icons span { cursor: pointer; font-size: 20px; padding: 4px; line-height: 1; }

/* ─── 5) APPBAR (back/title/action — proto görünümü) ─── */
.appbar { background: transparent; }
.appbar-back,
.appbar-action {
  background: var(--bg-card);
  border: none;
  box-shadow: var(--sh-sm);
  color: var(--c-700);
}
.appbar-back:hover,
.appbar-action:hover { background: var(--bg-card); box-shadow: var(--sh-md); }
.appbar-title { color: var(--c-700); font-weight: 600; }
.notif-badge {
  background: var(--pl-red);
  border: none;
  box-shadow: 0 0 0 2px var(--bg-app);
}

/* ─── 6) CARD (beyaz, yumuşak gölge, 14px radius, ince border) ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--sh-sm);
  margin-bottom: 12px;
  transition: all var(--tr-fast);
}
.card.elevated { box-shadow: var(--sh-md); border: none; }
.card.card-hover { cursor: pointer; }
.card.card-hover:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }

.card-title { font-size: 16px; color: var(--c-700); margin-bottom: 4px; }
.card-meta  { font-size: 12px; color: var(--c-500); margin-bottom: 12px; }
.card-body  { font-size: 14px; line-height: 1.5; color: var(--c-700); }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Gradient / highlight kart varyantları → proto kırmızı gradient */
.card-gradient-primary {
  background: linear-gradient(135deg, var(--pl-red) 0%, var(--pl-red-dark) 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(189,15,42,0.25);
}
.card-gradient-primary .card-title,
.card-gradient-primary .card-meta,
.card-gradient-primary .card-body { color: white; }
.card-gradient-gold {
  background: linear-gradient(135deg, var(--pl-gold-bg), #F8E5B4);
  border: 1px solid var(--pl-gold);
}

/* ─── 7) BUTONLAR (proto görünümü) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--tr-fast);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pl-red) 0%, var(--pl-red-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(189,15,42,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(189,15,42,0.35); }
.btn-primary:active { transform: translateY(0); }

/* .btn-outline = prototip .btn-secondary */
.btn-outline {
  background: var(--bg-card);
  color: var(--c-700);
  border: 1.5px solid var(--border-strong);
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--c-500); background: var(--bg-card); }

.btn-success { background: var(--success); color: white; box-shadow: none; }
.btn-danger  { background: var(--danger);  color: white; box-shadow: none; }
.btn-block   { width: 100%; }

/* ─── 8) INPUT + LABEL ─── */
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--c-700);
  margin-bottom: 12px;
  transition: all var(--tr-fast);
}
.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--pl-red);
  box-shadow: 0 0 0 4px rgba(189,15,42,0.08);
}
.input::placeholder { color: var(--c-400); }
.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── 9) SECTION TITLE (uppercase, letter-spacing, --c-500) ─── */
.section-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 24px 4px 12px;
}

/* ─── 10) BADGE (renk varyantları — pill görünümü) ─── */
/* Not: app'te .badge hem sayaç balonu hem durum etiketi olabiliyor.
   Sayaç balonunu (header bildirimi) bozmamak için temel renkli .badge'i
   pill stiline çeviriyoruz; varyant sınıflarıyla renklendiriyoruz. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(189,15,42,0.1);
  color: var(--pl-red);
  vertical-align: middle;
  min-width: auto;
  margin-left: 0;
}
.badge-red     { background: rgba(189,15,42,0.1); color: var(--pl-red); }
.badge-gold    { background: var(--pl-gold-bg); color: #8B6914; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #8B6914; }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }

/* ─── 11) CHIP / CHIP-ROW (pill; aktif=koyu) ─── */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px 12px;
  margin: 0 -16px 16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-600);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--tr-fast);
}
.chip:hover { border-color: var(--border-strong); background: var(--bg-card); }
.chip.active {
  background: var(--c-700);
  color: white;
  border-color: var(--c-700);
}

/* ─── 12) LIST ITEM (avatar + başlık + alt + zaman, hover) ─── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--tr-fast);
}
.list-item:hover { border-color: var(--border-strong); transform: translateX(2px); }
.list-icon  { font-size: 24px; flex-shrink: 0; }
.list-body  { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; color: var(--c-700); margin-bottom: 2px; }
.list-meta  { font-size: 12px; color: var(--c-500); }
/* Avatar (initials) — kırmızı gradient daire */
.list-avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--pl-red), var(--pl-red-dark));
  color: white;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
  flex: 0 0 40px;
}

/* ─── 13) PROGRESS BAR ─── */
.progress {
  height: 8px;
  background: var(--c-200);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pl-red), var(--pl-red-soft));
  border-radius: var(--r-full);
  transition: width var(--tr-slow);
}
.progress-bar.gold    { background: linear-gradient(90deg, var(--pl-gold), var(--pl-gold-soft)); }
.progress-bar.success { background: linear-gradient(90deg, var(--success), #20C56E); }

/* ─── 14) FAB (kırmızı yuvarlak) ─── */
.fab {
  position: fixed;
  right: 20px; bottom: 80px;
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--pl-red), var(--pl-red-dark));
  color: white;
  border: none;
  font-size: 24px; font-weight: 300;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(189,15,42,0.4);
  z-index: 90;
  display: grid; place-items: center;
  transition: all var(--tr);
}
.fab:hover { transform: scale(1.05) translateY(-2px); background: linear-gradient(135deg, var(--pl-red), var(--pl-red-dark)); }

/* ─── 15) BOTTOM NAV / NAV ITEM (aktif=kırmızı) ─── */
.bottom-nav {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.nav-item {
  font-size: 10px;
  font-weight: 600;
  color: var(--c-500);
}
.nav-item.active { color: var(--pl-red); }
.nav-icon { font-size: 22px; }

/* ─── 16) DISPLAY AMOUNT (büyük rakam — DM Serif Display) ─── */
.display-amount {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--c-700);
}

/* ─── 17) TEXT YARDIMCILARI ─── */
.text-strong { font-weight: 600; color: var(--c-700); }
.text-tiny   { font-size: 11px; color: var(--c-500); }
.text-small  { font-size: 13px; color: var(--c-500); }

/* ─── 18) HIGHLIGHT CARD (proto'da yumuşak ton — kırmızı vurgu) ─── */
.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--c-700);
  box-shadow: var(--sh-sm);
}
.highlight-primary { border-left: 4px solid var(--pl-red); }
.highlight-warning { border-left: 4px solid var(--warning); }
.highlight-success { border-left: 4px solid var(--success); }
.highlight-purple  { border-left: 4px solid #9333EA; }

/* ─── 19) BLIK + KEYPAD (proto dolu hane = kırmızı gradient) ─── */
.blik-digit {
  font-family: 'DM Serif Display', Georgia, serif;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--c-700);
}
.blik-digit.filled {
  background: linear-gradient(135deg, var(--pl-red) 0%, var(--pl-red-dark) 100%);
  border-color: var(--pl-red);
  color: white;
}
.key {
  background: var(--bg-card);
  border: none;
  box-shadow: var(--sh-sm);
  color: var(--c-700);
}
.key:active { transform: scale(0.95); background: var(--c-100); }
.key.key-action {
  background: linear-gradient(135deg, var(--pl-red), var(--pl-red-dark));
  color: white; border: none;
}

/* ─── 20) WELCOME / BRAND ─── */
.brand-name { color: var(--pl-red-dark); }
.brand-tagline { color: var(--c-500); }
.welcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.welcome-card-primary { border-left: 4px solid var(--pl-red); }
.welcome-card-accent  { border-left: 4px solid var(--pl-gold); }

/* ─── 21) DİL ÇUBUĞU + ÖZELLİK ÇİP'LERİ ─── */
.lang-bar button { border-radius: var(--r-full); color: var(--c-600); border-color: var(--border-strong); }
.lang-bar button.active { background: var(--c-700); color: white; border-color: var(--c-700); }
.feature-chip { border-radius: var(--r-full); background: var(--bg-card); color: var(--c-600); border: 1px solid var(--border); }

/* ═══════════════ ▲▲▲  PROTOTYPE DESIGN SYSTEM OVERRIDE SONU  ▲▲▲ ═══════════════ */
