:root {
  --bg-main: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1e3a8a;
  --accent-red: #dc2626;
  --border: #e2e8f0;
  --card: #ffffff;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] {
  --bg-main: #0f172a;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --accent-red: #ef4444;
  --border: #334155;
  --card: #1e293b;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

html {
  scroll-behavior: smooth;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-main);
}

[data-theme='dark'] .logo-box {
  background: #2563eb;
}

[data-theme='dark'] .hero {
  background: #020617;
  border: 1px solid var(--border);
}

[data-theme='dark'] .report-item {
  background: #1e293b;
}

[data-theme='dark'] .stat-box {
  background: #0f172a;
}

[data-theme='dark'] .modal-content {
  background: #1e293b;
  color: #f1f5f9;
}

[data-theme='dark'] #modalBody {
  background: #0f172a;
  color: #cbd5e1;
}

[data-theme='dark'] input, 
[data-theme='dark'] select, 
[data-theme='dark'] textarea {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

[data-theme='dark'] header {
  background: #0f172a;
}

[data-theme='dark'] footer {
  background: #0f172a;
}

[data-theme='dark'] .btn-ghost {
  background: #334155;
  color: white;
}

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

/* Header & Nav */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-text p {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--primary);
}

.cta-group {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  background: #f1f5f9;
  color: #475569;
}

.btn-ghost:hover {
  background: #e2e8f0;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Main Content */
main {
  padding: 3rem 0;
}

.hero {
  background: var(--primary-dark);
  color: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-img-container {
  flex: 0 0 240px;
  height: 240px;
  position: relative;
  z-index: 2;
}

.hero-img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgb(0, 0, 0);
  border: 1px solid rgb(0, 0, 0);
}

@media (max-width: 850px) {
  .hero { flex-direction: column; text-align: center; padding: 2rem; }
  .hero-img-container { flex: 0 0 auto; width: 100%; height: 200px; order: -1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h2 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 1.5rem 0;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

/* Grids */
.grid-main {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 2rem;
}

.how-it-works {
  margin: 2rem 0;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.how-col {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--bg-main);
}

.step-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.step-list li {
  margin: 0.5rem 0;
}

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 0.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 95px;
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  border-color: var(--primary);
}

/* Sidebar Stats */
.stat-box {
  background: var(--bg-main);
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary);
}

/* List Items */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  background: white;
  transition: transform 0.2s;
}

.report-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.report-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.type-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
}

.tag-request { background: #eff6ff; color: #2563eb; }
.tag-complaint { background: #fef2f2; color: #dc2626; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 90%;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: white;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* Detail Grid in Modal */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.detail-box {
  background: var(--bg-main);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.detail-box label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  margin-bottom: 4px;
}

.detail-box span {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Community chat */
.chat-intro-heading {
  font-size: 1.75rem;
  font-weight: 900;
  margin-top: 1rem;
}

.chat-intro-card {
  margin-bottom: 1.5rem;
}

.chat-intro-text {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
  line-height: 1.55;
}

.chat-layout {
  padding: 1.25rem;
}

/* Kolonë në celular; rresht vetëm ≥721px (shih media query më poshtë) */
.chat-layout-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-body {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
}

@media (min-width: 721px) {
  .chat-body {
    flex: 1;
  }
}

.chat-nick-column {
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  border-left: none;
  border-bottom: none;
  align-self: stretch;
  box-sizing: border-box;
}

@media (min-width: 721px) {
  .chat-layout-form {
    flex-direction: row;
    align-items: stretch;
  }

  .chat-nick-column {
    width: 220px;
    max-width: 220px;
    padding: 0.75rem 0 0.75rem 1rem;
    margin: -0.5rem 0 -0.5rem 0;
    border-left: 1px solid var(--border);
    border-bottom: none;
    align-self: stretch;
  }
}

.chat-nick-column-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-nick-column input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text-main);
}

.chat-nick-column .btn {
  width: 100%;
  justify-content: center;
}

#chatSaveNickBtn {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  font-weight: 700;
}

#chatSaveNickBtn:hover:not(:disabled) {
  background: var(--primary-dark);
  filter: none;
}

#chatSaveNickBtn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

[data-theme='dark'] #chatSaveNickBtn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.chat-nick-countdown {
  margin-top: 0.25rem;
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  text-align: center;
}

.chat-nick-countdown-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.chat-nick-countdown-grid {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
}

.chat-nick-cd-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chat-cd-val {
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  line-height: 1.1;
}

.chat-cd-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: lowercase;
}

.chat-compose {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-compose textarea,
#chatMessageInput {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-send-row {
  justify-content: flex-end;
}

.chat-attach-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
}

.chat-attach-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-attach-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.chat-attach-btn:hover {
  background: var(--bg-main);
  border-color: var(--primary);
  color: var(--primary);
}

.chat-attach-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
}

.chat-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 0;
}

.chat-staged-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  font-size: 0.75rem;
  max-width: 100%;
}

.chat-staged-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  color: var(--text-main);
  font-weight: 600;
}

.chat-staged-remove {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  border-radius: 4px;
}

.chat-staged-remove:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.chat-attach-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-attach-block {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-main);
}

.chat-attach-img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.chat-attach-video {
  display: block;
  max-width: 100%;
  max-height: 280px;
  width: 100%;
}

.chat-attach-file {
  padding: 0.5rem 0.65rem;
}

.chat-attach-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  word-break: break-all;
}

@media (max-width: 720px) {
  .chat-intro-heading {
    font-size: 1.35rem;
  }

  .chat-form.chat-layout-form {
    flex-direction: column;
    gap: 1rem;
  }

  /* Emri / nofka sipër në celular */
  .chat-nick-column {
    border-bottom: 1px solid var(--border);
    padding: 0 0 1rem 0;
    order: 1;
    align-self: stretch;
  }

  .chat-body {
    order: 2;
    min-width: 0;
    flex: 0 1 auto;
  }

  .chat-body .chat-messages {
    min-height: min(200px, 28dvh);
    max-height: min(400px, 50dvh);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .chat-attach-bar {
    gap: 0.5rem;
  }

  .chat-attach-btn {
    min-height: 44px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    touch-action: manipulation;
  }

  .chat-staged-name {
    max-width: min(220px, calc(100vw - 5.5rem));
  }

  /* 16px shmang zmadhimin automatik të faqes në iOS */
  #chatNickname,
  #chatMessageInput {
    font-size: 16px;
  }

  .chat-send-row {
    width: 100%;
  }

  .chat-send-row .btn.btn-primary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    touch-action: manipulation;
  }

  .chat-delete-btn {
    min-height: 40px;
    padding: 0.35rem 0.65rem;
    touch-action: manipulation;
  }

  .chat-bubble-head {
    flex-wrap: wrap;
    align-items: center;
  }

  .chat-attach-img {
    max-height: min(240px, 40dvh);
  }

  .chat-attach-video {
    max-height: min(280px, 45dvh);
  }

  body[data-page='community-chat'] main.container {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  body[data-page='community-chat'] .chat-layout {
    padding: 0.85rem 0.75rem;
  }
}

body[data-page='community-chat'] {
  overflow-x: hidden;
}

body[data-page='community-chat'] main.container {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: 100%;
  overflow-x: hidden;
}

.chat-messages {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
}

.chat-bubble {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.chat-bubble-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.chat-bubble-meta {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
  min-width: 0;
}

.chat-delete-btn {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.2;
}

.chat-delete-btn:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

[data-theme="dark"] .chat-delete-btn:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
}

.chat-bubble-body {
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-form-row input {
  flex: 1;
  min-width: 160px;
}

.chat-nick-lock-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -0.15rem 0 0 0;
  line-height: 1.45;
  font-weight: 500;
}

#chatNickname:read-only {
  cursor: default;
  background: var(--bg-main);
  opacity: 0.95;
}

.chat-form textarea {
  resize: vertical;
  min-height: 72px;
}

@media (max-width: 900px) {
  .container { padding: 0 14px; }
  .header-content {
    flex-wrap: wrap;
    gap: 0.85rem;
  }
  nav {
    width: 100%;
    order: 3;
  }
  nav ul {
    width: 100%;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
  }
  .cta-group {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .grid-main { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .footer-content {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .brand {
    width: 100%;
    justify-content: center;
  }
  .brand-text h1 { font-size: 1rem; }
  nav a { font-size: 0.82rem; }
  main { padding: 1.4rem 0; }
  .hero {
    padding: 1.35rem;
    border-radius: 16px;
  }
  .hero h2 { font-size: 1.55rem; margin: 0.9rem 0; }
  .hero p { margin-bottom: 1rem; }
  .cta-group { width: 100%; justify-content: center; }
  .btn { padding: 0.6rem 0.9rem; font-size: 0.8rem; }
  .form-container > div {
    grid-template-columns: 1fr !important;
    gap: 0.4rem !important;
  }
  .report-header {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .modal-content {
    width: 95%;
    padding: 1.2rem;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Map picker (Gjilan) — lista alfabetike e rrugëve */
.map-picker-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-picker-launch {
  width: 100%;
}

.map-open-streets-btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.street-pick-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.85rem 1rem 1rem;
}

.street-pick-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.street-pick-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.street-pick-close {
  flex-shrink: 0;
}

.street-pick-load-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem 0;
}

.street-pick-scroll {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-main);
}

.street-pick-row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.street-pick-row:last-child {
  border-bottom: none;
}

.street-pick-letter-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.25rem;
  background: var(--card);
  border-right: 1px solid var(--border);
}

.street-pick-letter {
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.street-pick-letter--spacer {
  visibility: hidden;
}

.street-pick-name-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
}

.street-pick-name-btn:hover {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .street-pick-name-btn:hover {
  background: rgba(96, 165, 250, 0.12);
}

.street-pick-empty {
  margin: 0;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.map-picker-map-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.map-picker-selected-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.map-picker-actions {
  display: flex;
  justify-content: flex-end;
}

.map-picker-canvas {
  height: 520px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Mirëseardhje — ballina */
body.welcome-no-scroll {
  overflow: hidden;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.welcome-overlay.is-dismissed {
  display: none;
}

.welcome-overlay__bg {
  position: absolute;
  inset: 0;
  background-color: #1e293b;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.28) 42%, rgba(15, 23, 42, 0.62) 100%),
    url('gjilani.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.welcome-overlay__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.5rem);
  width: 100%;
  max-width: 560px;
}

.welcome-overlay__logo-wrap {
  width: min(280px, 52vw);
  max-height: min(40vh, 280px);
  flex-shrink: 0;
  animation: welcome-card-in 0.7s ease 0.08s both;
}

.welcome-overlay__logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(40vh, 280px);
  object-fit: contain;
  border-radius: 50%;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

.welcome-overlay__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  animation: welcome-card-in 0.65s ease 0.18s both;
}

@keyframes welcome-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.welcome-overlay__card {
  text-align: center;
  padding: clamp(1.75rem, 5vw, 2.5rem) clamp(1.25rem, 4vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.35);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.welcome-overlay__title {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.85rem 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.welcome-overlay__subtitle {
  font-size: clamp(0.9rem, 2.4vw, 1rem);
  font-weight: 500;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.55;
  margin: 0 0 1.75rem 0;
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}

.welcome-overlay__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.6rem 0.95rem 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.55);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #f0f9ff;
  cursor: pointer;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45) 0%, rgba(14, 116, 144, 0.35) 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow:
    0 4px 24px rgba(37, 99, 235, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.welcome-overlay__btn:hover {
  transform: translateY(-2px);
  border-color: rgba(186, 230, 253, 0.75);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.55) 0%, rgba(8, 145, 178, 0.42) 100%);
  box-shadow:
    0 12px 36px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.welcome-overlay__btn:active {
  transform: translateY(0);
}

.welcome-overlay__btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.welcome-overlay__arrow {
  flex-shrink: 0;
  margin-top: 1px;
}
{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', -apple-system, sans-serif;
        }

        :root {
            --bg-main: #f8fafc;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --primary: #2563eb;
            --primary-dark: #1e3a8a;
            --accent-red: #dc2626;
            --border: #e2e8f0;
            --card: #ffffff;
            --radius-lg: 24px;
            --radius-md: 16px;
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        [data-theme='dark'] {
            --bg-main: #0f172a;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --primary: #3b82f6;
            --primary-dark: #60a5fa;
            --accent-red: #ef4444;
            --border: #334155;
            --card: #1e293b;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            line-height: 1.5;
            transition: background-color 0.3s, color 0.3s;
        }

        /* Layout containers */
        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 20px;
        }

        header {
            background: var(--card);
            border-bottom: 1px solid var(--border);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-box {
            width: 40px;
            height: 40px;
            background: var(--primary);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
        }

        .brand-text h1 {
            font-size: 1.25rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .brand-text p {
            font-size: 0.65rem;
            font-weight: 700;
            color: var(--primary);
            text-transform: uppercase;
        }

        nav ul {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        nav a {
            text-decoration: none;
            color: var(--text-muted);
            font-weight: 600;
            font-size: 0.9rem;
            transition: color 0.2s;
        }

        nav a:hover, nav a.active {
            color: var(--primary);
        }

        .cta-group {
            display: flex;
            gap: 12px;
        }

        .btn {
            padding: 0.6rem 1.2rem;
            border-radius: 8px;
            font-weight: 700;
            font-size: 0.85rem;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        .btn-danger {
            background: var(--accent-red);
            color: white;
        }

        .btn-danger:hover {
            filter: brightness(1.1);
        }

        .btn-ghost {
            background: #f1f5f9;
            color: #475569;
        }

        .btn-ghost:hover {
            background: #e2e8f0;
        }

        .theme-toggle {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--card);
            color: var(--text-main);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .theme-toggle:hover {
            background: var(--bg-main);
        }

        /* Main chat area: two columns side-by-side */
        .chat-layout-main {
            display: flex;
            flex-direction: row;
            gap: 1.5rem;
            margin-top: 1rem;
        }

        /* LEFT COLUMN: messages + compose (takes 2/3 or flexible) */
        .chat-messages-area {
            flex: 2;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        /* RIGHT COLUMN: nickname & countdown (fixed width) */
        .chat-side-panel {
            flex: 1;
            max-width: 280px;
            background: var(--card);
            border-radius: var(--radius-md);
            border: 1px solid var(--border);
            padding: 1.2rem 1rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            height: fit-content;
            position: sticky;
            top: 90px;
        }

        .chat-messages {
            min-height: 380px;
            max-height: 480px;
            overflow-y: auto;
            padding: 1rem;
            border-radius: 16px;
            background: var(--bg-main);
            border: 1px solid var(--border);
        }

        .chat-bubble {
            margin-bottom: 1rem;
            padding: 0.75rem 1rem;
            border-radius: 14px;
            background: var(--card);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
        }

        .chat-bubble-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.3rem;
        }

        .chat-bubble-meta {
            font-size: 0.7rem;
            font-weight: 800;
            color: var(--primary);
            text-transform: uppercase;
        }

        .chat-delete-btn {
            font-size: 0.65rem;
            font-weight: 700;
            padding: 0.2rem 0.5rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--bg-main);
            color: var(--text-muted);
            cursor: pointer;
        }

        .chat-delete-btn:hover {
            color: #dc2626;
            border-color: #fecaca;
        }

        .chat-bubble-body {
            font-size: 0.9rem;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .chat-bubble-time {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-top: 0.4rem;
        }

        .chat-compose {
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
        }

        .chat-compose textarea {
            width: 100%;
            padding: 0.8rem;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--card);
            font-size: 0.9rem;
            resize: vertical;
        }

        .chat-attach-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
        }

        .chat-attach-label {
            font-size: 0.7rem;
            font-weight: 800;
            color: var(--text-muted);
        }

        .chat-attach-btn {
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.35rem 0.8rem;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--card);
            cursor: pointer;
        }

        .chat-attach-btn:hover {
            background: var(--bg-main);
            border-color: var(--primary);
            color: var(--primary);
        }

        .chat-attach-note {
            font-size: 0.68rem;
            color: var(--text-muted);
        }

        .chat-attachment-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }

        .chat-staged-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.25rem 0.45rem;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--bg-main);
            font-size: 0.75rem;
        }

        .chat-staged-remove {
            background: none;
            border: none;
            cursor: pointer;
            font-weight: bold;
            color: var(--text-muted);
        }

        .chat-attach-list {
            margin-top: 0.5rem;
        }

        .chat-attach-img {
            max-width: 100%;
            max-height: 180px;
            border-radius: 10px;
        }

        /* Right panel specific */
        .side-label {
            font-size: 0.7rem;
            font-weight: 800;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        #chatNickname {
            width: 100%;
            padding: 0.7rem;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--card);
            font-size: 0.9rem;
        }

        #chatSaveNickBtn {
            width: 100%;
            justify-content: center;
            background: var(--primary);
            color: white;
        }

        .chat-nick-countdown {
            background: var(--bg-main);
            border-radius: 14px;
            padding: 0.8rem 0.6rem;
            text-align: center;
            border: 1px solid var(--border);
        }

        .countdown-title {
            font-size: 0.65rem;
            font-weight: 800;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
        }

        .countdown-grid {
            display: flex;
            justify-content: space-between;
            gap: 0.3rem;
        }

        .cd-block {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .cd-val {
            font-size: 1.4rem;
            font-weight: 900;
            font-variant-numeric: tabular-nums;
            color: var(--primary);
            line-height: 1.2;
        }

        .cd-lbl {
            font-size: 0.6rem;
            font-weight: 700;
            color: var(--text-muted);
        }

        .chat-nick-lock-hint {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.2rem;
        }

        footer {
            border-top: 1px solid var(--border);
            padding: 2rem 0;
            margin-top: 3rem;
            background: var(--card);
        }

        .footer-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .footer-links {
            display: flex;
            gap: 1.5rem;
        }

        @media (max-width: 780px) {
            .chat-layout-main {
                flex-direction: column;
            }
            .chat-side-panel {
                max-width: 100%;
                position: static;
            }
            .header-content {
                flex-direction: column;
                align-items: center;
            }
            nav ul {
                justify-content: center;
                flex-wrap: wrap;
            }
        }
