/* ============================================================
   SMART CITIZEN REQUEST SYSTEM — Design System
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Brand */
  --accent:        #4F46E5;
  --accent-hover:  #4338CA;
  --accent-light:  #EEF2FF;
  --accent-border: #C7D2FE;
  --accent-muted:  #818CF8;

  /* Text */
  --text-primary:   #0F172A;
  --text-secondary: #334155;
  --text-tertiary:  #64748B;
  --text-muted:     #94A3B8;
  --text-disabled:  #CBD5E1;

  /* Surfaces */
  --bg-page:   #F8FAFC;
  --bg-card:   #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-muted:  #E2E8F0;

  /* Borders */
  --border:       #E2E8F0;
  --border-hover: #CBD5E1;
  --border-focus: #4F46E5;
  --border-error: #EF4444;
  --border-ok:    #10B981;

  /* Status */
  --open-color:      #2563EB;
  --open-bg:         #EFF6FF;
  --open-border:     #BFDBFE;
  --progress-color:  #D97706;
  --progress-bg:     #FFFBEB;
  --progress-border: #FDE68A;
  --resolved-color:  #059669;
  --resolved-bg:     #ECFDF5;
  --resolved-border: #A7F3D0;
  --rejected-color:  #DC2626;
  --rejected-bg:     #FEF2F2;
  --rejected-border: #FECACA;

  /* Priority */
  --low-color:    #475569;
  --low-bg:       #F1F5F9;
  --low-border:   #CBD5E1;
  --medium-color: #2563EB;
  --medium-bg:    #EFF6FF;
  --medium-border:#BFDBFE;
  --high-color:   #EA580C;
  --high-bg:      #FFF7ED;
  --high-border:  #FED7AA;
  --urgent-color: #DC2626;
  --urgent-bg:    #FEF2F2;
  --urgent-border:#FECACA;

  /* Shape */
  --r-sm:   6px;
  --r-base: 8px;
  --r-md:   10px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-pill: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.09), 0 3px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.1),  0 8px 16px rgba(0,0,0,0.06);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 280ms ease;

  /* Layout */
  --header-h:  62px;
  --sidebar-w: 240px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Utilities ---- */
.hidden        { display: none !important; }
.sr-only       { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-muted    { color: var(--text-muted); }
.text-sm       { font-size: 0.867rem; }
.text-xs       { font-size: 0.8rem; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex          { display: flex; }
.items-center  { align-items: center; }
.gap-2         { gap: 8px; }
.gap-3         { gap: 12px; }
.mt-auto       { margin-top: auto; }

/* Shared layout helpers used in HTML */
.char-count-row   { display: flex; justify-content: space-between; align-items: center; }
.panel-actions-row { display: flex; gap: 6px; align-items: center; }
.step-lead        { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E8EDF5 50%, #F1F5F9 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-base);
}
.skel-text     { height: 14px; border-radius: 4px; }
.skel-title    { height: 20px; border-radius: 4px; }
.skel-icon     { width: 40px; height: 40px; border-radius: var(--r-md); flex-shrink: 0; }
.skel-badge    { width: 64px; height: 22px; border-radius: var(--r-pill); }
.skel-stat-num { height: 30px; width: 56px; border-radius: 4px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-base);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
  outline: none;
  position: relative;
}
.btn:focus-visible         { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled              { opacity: 0.5; cursor: not-allowed; }

.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-sm); }

.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text-primary); background: var(--bg-subtle); }

.btn-danger { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.btn-danger:hover:not(:disabled) { background: #FEE2E2; }

.btn-full { width: 100%; }
.btn-lg   { padding: 11px 22px; font-size: 0.95rem; }
.btn-sm   { padding: 6px 12px; font-size: 0.8rem; border-radius: var(--r-sm); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: background var(--t-fast), color var(--t-fast);
  outline: none;
}
.btn-icon:hover       { background: var(--bg-subtle); color: var(--text-primary); }
.btn-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Spinner */
.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}
.btn-spinner.dark {
  border-color: rgba(79,70,229,0.2);
  border-top-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.field-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}
.required { color: var(--accent); }

.input-wrap { position: relative; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-base);
  font-size: 0.9rem;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--text-disabled); }

input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input.field-valid                    { border-color: var(--border-ok); }
input.field-invalid,
textarea.field-invalid               { border-color: var(--border-error); }

.field-error { font-size: 0.78rem; color: #DC2626; min-height: 16px; }
.field-ok    { font-size: 0.78rem; color: var(--resolved-color); }

.field-status-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 13px;
}

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--t-fast);
  outline: none;
}
.pw-toggle:hover       { color: var(--text-secondary); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
input[type="password"] { padding-right: 42px; }

.char-count { font-size: 0.78rem; color: var(--text-muted); text-align: right; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}
.select-wrap select { padding-right: 34px; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.badge-open        { background: var(--open-bg);     color: var(--open-color);     border-color: var(--open-border); }
.badge-in_progress { background: var(--progress-bg); color: var(--progress-color); border-color: var(--progress-border); }
.badge-resolved    { background: var(--resolved-bg); color: var(--resolved-color); border-color: var(--resolved-border); }
.badge-rejected    { background: var(--rejected-bg); color: var(--rejected-color); border-color: var(--rejected-border); }
.badge-urgent      { background: var(--urgent-bg);   color: var(--urgent-color);   border-color: var(--urgent-border); }

.badge-low      { background: var(--low-bg);    color: var(--low-color);    border-color: var(--low-border); }
.badge-medium   { background: var(--medium-bg); color: var(--medium-color); border-color: var(--medium-border); }
.badge-high     { background: var(--high-bg);   color: var(--high-color);   border-color: var(--high-border); }
.badge-urgent-p { background: var(--urgent-bg); color: var(--urgent-color); border-color: var(--urgent-border); }

@keyframes fadeInBadge {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.badge-animate { animation: fadeInBadge 0.18s ease; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: #1E293B;
  color: #F8FAFC;
  min-width: 280px;
  max-width: 360px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: toastIn 0.28s cubic-bezier(0.16,1,0.3,1) forwards;
}
.toast.toast-exit { animation: toastOut 0.2s ease forwards; }

.toast-icon  { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.toast-body  { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.84rem; }
.toast-msg   { font-size: 0.78rem; color: #94A3B8; margin-top: 2px; line-height: 1.4; }
.toast-close {
  background: none; border: none; color: #475569;
  cursor: pointer; font-size: 15px; padding: 0;
  transition: color var(--t-fast);
}
.toast-close:hover { color: #F8FAFC; }

.toast-progress {
  position: absolute; bottom: 0; left: 0;
  height: 2px; background: var(--accent);
  animation: toastProgress 4.5s linear forwards;
}
.toast-success .toast-progress { background: var(--resolved-color); }
.toast-error   .toast-progress { background: var(--rejected-color); }

@keyframes toastIn  { from { transform: translateX(calc(100% + 20px)); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(calc(100% + 20px)); opacity: 0; } }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

/* ============================================================
   ERROR BANNER
   ============================================================ */
.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--r-base);
  color: #DC2626;
  font-size: 0.84rem;
  margin-bottom: 16px;
}
.error-banner-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   AUTH VIEW
   ============================================================ */
.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse at 15% 15%, rgba(79,70,229,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(124,58,237,0.05) 0%, transparent 55%);
}
.auth-view.fade-out { opacity: 0; pointer-events: none; transition: opacity var(--t-base); }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-lg);
  animation: authIn 0.32s ease forwards;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 6px;
}
.auth-logo-icon {
  width: 38px; height: 38px;
  background: var(--accent-light);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.auth-logo-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.auth-tagline {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: 24px;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-base);
  padding: 3px;
  margin-bottom: 24px;
  background: var(--bg-subtle);
}
.auth-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.auth-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Auth Panel */
.auth-panel { animation: panelIn var(--t-base) ease; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.auth-hint code {
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
}

/* Social Login Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Social Grid */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: var(--r-base);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  white-space: nowrap;
}
.btn-social:hover   { background: var(--bg-subtle); border-color: var(--border-hover); box-shadow: var(--shadow-xs); }
.btn-social:active  { transform: scale(0.98); }
.btn-social:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-apple { background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #1a1a1a; border-color: #1a1a1a; }

/* OTP panel */
.otp-info {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-base);
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.otp-info-icon {
  width: 34px; height: 34px;
  background: var(--accent); color: #fff;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.otp-info strong  { display: block; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 3px; }
.otp-info p       { color: var(--text-secondary); font-size: 0.78rem; line-height: 1.5; }
.otp-email-addr   { font-weight: 600; color: var(--accent); }

.otp-single-input {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.4em;
}
.otp-resend {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 4px;
}
.otp-resend-btn {
  background: none; border: none;
  color: var(--accent); cursor: pointer;
  font-size: 0.78rem; font-family: var(--font); font-weight: 600;
  padding: 0; text-decoration: underline; outline: none;
}
.otp-resend-btn:hover    { color: var(--accent-hover); }
.otp-resend-btn:disabled { color: var(--text-muted); cursor: not-allowed; text-decoration: none; }
.otp-resend-timer        { font-size: 0.78rem; color: var(--text-muted); margin-left: 4px; }

/* ============================================================
   APP HEADER
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.header-logo-icon {
  width: 32px; height: 32px;
  background: var(--accent-light);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.header-logo-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.header-logo-tag {
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent-border);
  letter-spacing: 0.02em;
}

/* Header XP badge */
.header-xp {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  cursor: default;
  user-select: none;
}
.xp-badge-icon { font-size: 0.95rem; }
.xp-points     { letter-spacing: -0.01em; }

/* User menu */
.header-user { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-base);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  outline: none;
}
.user-menu-btn:hover      { border-color: var(--border-hover); background: var(--bg-subtle); }
.user-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chevron-icon { color: var(--text-muted); transition: transform var(--t-fast); }
.user-menu-btn[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
  animation: dropdownIn 0.14s ease;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.84rem;
  font-family: var(--font);
  color: var(--text-secondary);
  transition: background var(--t-fast);
  outline: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dropdown-item:hover        { background: var(--bg-subtle); color: var(--text-primary); }
.dropdown-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dropdown-item.danger       { color: #DC2626; }
.dropdown-item.danger:hover { background: #FEF2F2; }
.dropdown-divider           { height: 1px; background: var(--border); }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: viewIn var(--t-base) ease;
}
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }

.app-main {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  width: 100%;
}

/* ============================================================
   GAMIFICATION — XP LEVEL CARD
   ============================================================ */
.xp-level-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #3730A3 0%, #4F46E5 55%, #6D28D9 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(79,70,229,0.3);
}
.xp-level-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.xp-avatar-large {
  font-size: 2rem;
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.xp-level-label {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.xp-badge-name { font-size: 1.05rem; font-weight: 700; margin-top: 3px; }

.xp-level-right { text-align: right; min-width: 110px; }
.xp-pts-value   { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.xp-pts-label   { font-size: 0.72rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }

.xp-progress-wrap {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
}
.xp-progress-bar {
  background: #fff;
  height: 100%;
  border-radius: 4px;
  transition: width 0.7s cubic-bezier(0.16,1,0.3,1);
}
.xp-pts-next { font-size: 0.7rem; opacity: 0.65; margin-top: 4px; }

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  margin-top: 8px;
  width: fit-content;
}
.streak-fire { font-size: 0.9rem; }

/* XP reward preview in modal */
.xp-reward-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--r-base);
  padding: 10px 14px;
  margin-top: 14px;
  font-size: 0.84rem;
  color: #92400E;
}
.xp-reward-icon { font-size: 1rem; }

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.stat-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-trend { font-size: 0.75rem; color: var(--text-muted); }

.stat-card-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Citizen stats: horizontal layout */
#citizen-stats-grid .stat-card { flex-direction: row; align-items: center; gap: 14px; }
#citizen-stats-grid .stat-icon-wrap { flex-shrink: 0; }
#citizen-stats-grid .stat-label    { margin-bottom: 2px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.section-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
}

.cta-row { margin-bottom: 20px; }

/* Submit CTA */
.submit-cta-btn {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(79,70,229,0.28);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
}
.submit-cta-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(79,70,229,0.38);
  transform: translateY(-1px);
}

/* ============================================================
   REQUEST CARDS
   ============================================================ */
.requests-list { display: flex; flex-direction: column; gap: 10px; }

.request-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  overflow: hidden;
}
.request-card:hover       { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.request-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.request-card.expanded    { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.08), var(--shadow-md); }

.request-card[data-status="open"]        { border-left: 3px solid var(--open-color); }
.request-card[data-status="in_progress"] { border-left: 3px solid var(--progress-color); }
.request-card[data-status="resolved"]    { border-left: 3px solid var(--resolved-color); }
.request-card[data-status="rejected"]    { border-left: 3px solid var(--rejected-color); }

.request-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  animation: cardPulse 0.5s ease;
}
@keyframes cardPulse {
  0%   { box-shadow: 0 0 0 0 rgba(79,70,229,0.35); }
  100% { box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
}

.request-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}
.req-cat-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.req-card-meta { flex: 1; min-width: 0; }
.req-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.req-desc-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 3px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.req-card-badges { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.req-card-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.req-card-info span { display: flex; align-items: center; gap: 3px; }

.req-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--t-base);
  margin-top: 4px;
}
.request-card.expanded .req-chevron { transform: rotate(90deg); }

/* Expanded body */
.req-card-body {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.req-cat-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.req-desc-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-base);
  padding: 10px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Image thumbnails in citizen card */
.req-images-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.req-img-thumb {
  width: 68px; height: 68px;
  border-radius: var(--r-base);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-subtle);
  transition: border-color var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
  padding: 0;
}
.req-img-thumb:hover      { border-color: var(--accent); transform: scale(1.04); }
.req-img-thumb img        { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Admin response cards in citizen view */
.req-responses { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.req-response-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-left: 3px solid #10B981;
  border-radius: var(--r-base);
  padding: 12px 14px;
}
.req-response-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.req-response-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #065F46; background: #D1FAE5; border-radius: 4px; padding: 2px 6px;
}
.req-response-by   { font-size: 0.78rem; font-weight: 600; color: #065F46; }
.req-response-date { font-size: 0.73rem; color: var(--text-muted); margin-left: auto; }
.req-response-msg  { font-size: 0.84rem; color: var(--text-primary); line-height: 1.55; }

.resp-indicator {
  color: #059669; font-weight: 700;
  background: #ECFDF5; border-radius: var(--r-pill); padding: 1px 7px;
}

/* Citizen rating */
.req-rating-cta  { margin-top: 12px; }
.req-rating-done { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 0.84rem; }
.req-rating-label { color: var(--text-muted); font-size: 0.75rem; }
.req-rating-fb    { color: var(--text-secondary); font-style: italic; font-size: 0.78rem; }
.btn-rate-update  {
  font-size: 0.73rem; padding: 2px 8px;
  border: 1px solid var(--border); border-radius: 4px;
  background: white; cursor: pointer; color: var(--text-tertiary);
  transition: background var(--t-fast);
}
.btn-rate-update:hover { background: var(--bg-subtle); }

/* Request card skeleton */
.request-card-skel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.empty-state-icon  { font-size: 40px; margin-bottom: 14px; }
.empty-state-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty-state-desc  {
  font-size: 0.84rem; color: var(--text-muted); margin-bottom: 20px;
  max-width: 300px; margin-left: auto; margin-right: auto;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: overlayIn var(--t-base) ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 640px) { .modal-overlay { align-items: center; padding: 24px 16px; } }

.modal {
  background: var(--bg-card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: modalUp var(--t-slow) cubic-bezier(0.16,1,0.3,1);
}
@media (min-width: 640px) {
  .modal { border-radius: var(--r-xl); animation: modalIn var(--t-base) ease; }
}
@keyframes modalUp { from { transform: translateY(100%); } to   { transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.98) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-sm { max-width: 440px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.modal-body  { flex: 1; overflow-y: auto; padding: 24px; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Step progress */
.step-progress {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}
.step-item { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.step-label { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.step-connector {
  flex: 1; min-width: 18px; height: 2px;
  background: var(--border); margin: 0 8px;
  transition: background var(--t-base);
}
.step-item.active .step-num  { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-item.active .step-label { color: var(--accent); font-weight: 600; }
.step-item.done .step-num    { background: var(--resolved-color); border-color: var(--resolved-color); color: #fff; }
.step-item.done .step-label  { color: var(--resolved-color); }
.step-connector.done         { background: var(--resolved-color); }

/* Step panels */
.step-panel        { display: none; }
.step-panel.active { display: block; }

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 400px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  background: var(--bg-card);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  text-align: center;
  outline: none;
}
.category-tile:hover        { border-color: var(--border-hover); background: var(--bg-subtle); box-shadow: var(--shadow-sm); }
.category-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.category-tile.selected     { border-color: var(--accent); background: var(--accent-light); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }

.category-tile-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.category-tile-name { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); line-height: 1.3; }
.category-tile.selected .category-tile-name { color: var(--accent); }

/* Priority grid */
.priority-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.priority-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-base);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: var(--font);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.priority-option input[type="radio"] { accent-color: var(--accent); }
.priority-option:has(input:checked)  { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.dropzone-icon { font-size: 28px; margin-bottom: 8px; color: var(--text-muted); }
.dropzone-text { font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 4px; }
.dropzone-hint { font-size: 0.75rem; color: var(--text-muted); }
.dropzone-link { color: var(--accent); text-decoration: underline; cursor: pointer; }

.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photo-thumb    { position: relative; display: flex; flex-direction: column; gap: 4px; }
.photo-thumb img {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: var(--r-base);
  border: 1px solid var(--border);
}
.photo-thumb-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #EF4444; color: #fff; border: none;
  cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  transition: background var(--t-fast);
}
.photo-thumb-remove:hover { background: #DC2626; }
.photo-thumb-info { font-size: 0.65rem; color: var(--text-muted); width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Review summary */
.review-summary {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-row     { display: flex; gap: 12px; }
.review-label   { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; min-width: 80px; padding-top: 2px; }
.review-value   { font-size: 0.875rem; color: var(--text-primary); flex: 1; }
.review-divider { height: 1px; background: var(--border); }
.review-photos  { display: flex; gap: 8px; flex-wrap: wrap; }
.review-photos img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); }

/* ============================================================
   RATING MODAL
   ============================================================ */
.rating-prompt { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.5; }

.star-rating   { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.star {
  font-size: 2.2rem;
  background: none; border: none; cursor: pointer;
  color: #D1D5DB; padding: 0; line-height: 1;
  transition: color var(--t-fast), transform var(--t-fast);
}
.star:hover, .star.active { color: #F59E0B; transform: scale(1.1); }
.star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.stars-display { display: inline-flex; gap: 2px; }
.star-display  { color: #D1D5DB; font-size: 1.1rem; }
.star-display.filled { color: #F59E0B; }

.rating-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 0.75rem; color: var(--text-muted); }
.rating-selected-label { font-weight: 600; color: var(--text-primary); font-size: 0.84rem; text-align: center; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  animation: overlayIn var(--t-base) ease;
}
.lightbox-inner {
  max-width: min(90vw,900px); max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.lightbox-inner img {
  max-width: 100%; max-height: 80vh;
  border-radius: var(--r-lg); object-fit: contain;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6); display: block;
}
.lightbox-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; }
.lightbox-caption { color: rgba(255,255,255,0.6); font-size: 0.78rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-counter { color: rgba(255,255,255,0.45); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.lightbox-close {
  position: fixed; top: 18px; right: 18px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: #fff;
  width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast); outline: none; z-index: 2001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: #fff;
  width: 48px; height: 48px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), opacity var(--t-fast); outline: none; z-index: 2001;
}
.lightbox-nav:hover    { background: rgba(255,255,255,0.2); }
.lightbox-nav:disabled { opacity: 0.2; cursor: not-allowed; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
  position: relative;
}
.admin-content { flex: 1; min-width: 0; }

/* Admin Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
}
.admin-sidebar-inner { display: flex; flex-direction: column; padding: 0 10px; }

.admin-sidebar-brand {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.admin-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-menu-item-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

.admin-menu-btn {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--r-base);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
  display: flex;
  align-items: center;
  gap: 9px;
  outline: none;
}
.admin-menu-btn:hover     { background: var(--bg-subtle); color: var(--text-primary); }
.admin-menu-btn.active    { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.admin-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.admin-menu-btn svg       { flex-shrink: 0; opacity: 0.8; }
.admin-menu-btn.active svg { opacity: 1; }

@media (min-width: 900px) {
  .admin-sidebar  { display: flex; }
  .admin-content  { padding: 0; }
}
.admin-content .app-main { padding-left: 28px; padding-right: 28px; }

/* CRUD area */
#admin-crud-root { margin-bottom: 20px; }
.crud-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 20px; }
.crud-row   { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.crud-list  { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.crud-item  {
  padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--bg-card);
  transition: border-color var(--t-fast);
}
.crud-item:hover  { border-color: var(--border-hover); }
.crud-actions     { display: flex; gap: 6px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}
.filter-bar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-bar .search-wrap::before {
  content: '';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 14px;
}
.filter-bar input[type="search"] { padding-left: 36px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
}
.requests-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.requests-table thead { background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.requests-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); white-space: nowrap; user-select: none;
}
.requests-table th.sortable        { cursor: pointer; }
.requests-table th.sortable:hover  { color: var(--text-primary); }
.sort-indicator { margin-left: 4px; opacity: 0.4; font-size: 0.7rem; }
.requests-table th.sort-asc  .sort-indicator,
.requests-table th.sort-desc .sort-indicator { opacity: 1; color: var(--accent); }

.requests-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.requests-table tbody tr:last-child { border-bottom: none; }
.requests-table tbody tr:hover      { background: var(--bg-subtle); }
.requests-table tbody tr.selected   { background: var(--accent-light); }
.requests-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}
.requests-table td.td-mono   { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.78rem; }
.requests-table td .citizen-name  { font-weight: 600; color: var(--text-primary); }
.requests-table td .citizen-email { font-size: 0.75rem; color: var(--text-muted); }

/* Status/priority selects */
.status-select,
.priority-select {
  padding: 4px 26px 4px 9px;
  font-size: 0.75rem; font-weight: 600;
  font-family: var(--font);
  border-radius: var(--r-pill); border: 1px solid;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394A3B8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 7px;
  transition: background-color var(--t-fast); outline: none;
}
.status-select:focus, .priority-select:focus { box-shadow: 0 0 0 2px rgba(79,70,229,0.2); }

.status-select.status-open        { background-color: var(--open-bg);     color: var(--open-color);     border-color: var(--open-border); }
.status-select.status-in_progress { background-color: var(--progress-bg); color: var(--progress-color); border-color: var(--progress-border); }
.status-select.status-resolved    { background-color: var(--resolved-bg); color: var(--resolved-color); border-color: var(--resolved-border); }
.status-select.status-rejected    { background-color: var(--rejected-bg); color: var(--rejected-color); border-color: var(--rejected-border); }

.priority-select.priority-low    { background-color: var(--low-bg);    color: var(--low-color);    border-color: var(--low-border); }
.priority-select.priority-medium { background-color: var(--medium-bg); color: var(--medium-color); border-color: var(--medium-border); }
.priority-select.priority-high   { background-color: var(--high-bg);   color: var(--high-color);   border-color: var(--high-border); }
.priority-select.priority-urgent { background-color: var(--urgent-bg); color: var(--urgent-color); border-color: var(--urgent-border); }

.table-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 0.84rem; }
.table-skel-row td { padding: 14px 16px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; gap: 12px; flex-wrap: wrap;
}
.pagination-info { font-size: 0.78rem; color: var(--text-muted); }
.pagination-btns { display: flex; gap: 5px; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-card); cursor: pointer;
  font-size: 0.78rem; font-weight: 500; font-family: var(--font);
  color: var(--text-secondary);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  outline: none;
}
.page-btn:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text-primary); background: var(--bg-subtle); }
.page-btn.active     { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled   { opacity: 0.35; cursor: not-allowed; }
.page-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   ADMIN SIDE PANEL
   ============================================================ */
.side-panel {
  width: 440px;
  border-left: 1px solid var(--border);
  background: var(--bg-card);
  display: flex; flex-direction: column;
  height: calc(100vh - var(--header-h));
  position: sticky; top: var(--header-h);
  animation: panelSlideIn var(--t-base) ease;
  overflow: hidden; flex-shrink: 0;
}
@keyframes panelSlideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px;
}
.panel-header-info { flex: 1; min-width: 0; }
.panel-title    { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.panel-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-body     { flex: 1; overflow-y: auto; }

.panel-section { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-section:last-child { border-bottom: none; }
.panel-section-title {
  font-size: 0.65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* Case header in panel */
.panel-case-header { display: flex; flex-direction: column; gap: 8px; }
.panel-ref-chip {
  font-family: monospace; font-size: 0.73rem; color: var(--text-muted);
  background: var(--bg-subtle); padding: 3px 8px; border-radius: 4px;
  display: inline-block; width: fit-content; border: 1px solid var(--border);
}
.panel-title-text { font-size: 1rem; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.panel-badges     { display: flex; gap: 6px; flex-wrap: wrap; }

/* Citizen info rows */
.panel-info-grid { display: flex; flex-direction: column; gap: 10px; }
.panel-info-row  { display: flex; align-items: flex-start; gap: 10px; }
.panel-info-icon {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.panel-info-label {
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  line-height: 1; margin-bottom: 2px;
}
.panel-info-value { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); line-height: 1.4; word-break: break-word; }

.admin-confirm-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill); padding: 3px 9px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
.admin-confirm-chip.confirmed { background: rgba(5,150,105,0.1); color: #065F46; border: 1px solid rgba(5,150,105,0.2); }
.admin-confirm-chip.pending   { background: rgba(217,119,6,0.1);  color: #92400E; border: 1px solid rgba(217,119,6,0.2); }
.admin-confirm-chip.expired   { background: rgba(220,38,38,0.1);  color: #991B1B; border: 1px solid rgba(220,38,38,0.2); }

.panel-desc-full {
  font-size: 0.875rem; color: var(--text-secondary); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg-subtle); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px; min-height: 56px;
}

/* Attachment gallery */
.attach-count { background: var(--accent-light); color: var(--accent); font-size: 0.65rem; padding: 1px 6px; border-radius: 10px; font-weight: 700; border: 1px solid var(--accent-border); }
.attachment-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.attach-thumb {
  position: relative; aspect-ratio: 1; border-radius: var(--r-base); overflow: hidden;
  cursor: pointer; border: 1px solid var(--border); background: var(--bg-subtle);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.attach-thumb:hover       { transform: scale(1.03); box-shadow: var(--shadow-md); border-color: var(--accent); }
.attach-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.attach-thumb img         { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-overlay           { position: absolute; inset: 0; background: rgba(15,23,42,0); display: flex; align-items: center; justify-content: center; transition: background var(--t-fast); color: #fff; font-size: 16px; }
.attach-thumb:hover .attach-overlay { background: rgba(15,23,42,0.4); }
.attach-no-images {
  grid-column: 1 / -1; text-align: center; padding: 20px 14px;
  color: var(--text-muted); font-size: 0.78rem;
  background: var(--bg-subtle); border-radius: var(--r-base);
  border: 2px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}

/* Admin action selects */
.admin-action-card    { display: flex; flex-direction: column; gap: 12px; }
.admin-action-row     { display: flex; gap: 8px; }
.admin-action-row .select-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.select-wrap-label    { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }

/* Action blocks (response / note) */
.panel-action-block {
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  border: 1.5px solid var(--border); background: var(--bg-subtle);
}
.panel-action-block.response-block { background: #F0FDF4; border-color: #A7F3D0; }
.panel-action-block.note-block     { background: #FFFBEB; border-color: #FDE68A; }

.panel-action-block-label { display: flex; align-items: center; gap: 10px; }
.panel-action-block-icon  { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.response-icon { background: #D1FAE5; }
.note-icon     { background: #FEF3C7; }
.panel-action-block-title { font-size: 0.84rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.panel-action-block-sub   { font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; line-height: 1.4; }

.panel-note-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); display: block; margin-bottom: 5px;
}
.panel-note-textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--r-base);
  font-size: 0.875rem; font-family: var(--font); line-height: 1.5;
  color: var(--text-primary); background: var(--bg-card);
  resize: vertical; min-height: 82px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast); outline: none;
}
.panel-note-textarea:focus         { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.panel-note-textarea::placeholder  { color: var(--text-disabled); }
.panel-action-block .panel-note-textarea { min-height: 88px; }

.response-block .panel-note-textarea { background: #fff; border-color: #A7F3D0; }
.response-block .panel-note-textarea:focus { border-color: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }
.note-block .panel-note-textarea     { background: #fff; border-color: #FDE68A; }
.note-block .panel-note-textarea:focus { border-color: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,0.12); }

/* Admin responses in panel */
.panel-response-item {
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
  border: 1px solid #BBF7D0; border-left: 3px solid #10B981;
  border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px;
  transition: box-shadow var(--t-fast);
}
.panel-response-item:last-child { margin-bottom: 0; }
.panel-response-item:hover      { box-shadow: 0 2px 8px rgba(16,185,129,0.1); }

.panel-response-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; font-size: 0.78rem; }
.panel-response-admin { font-weight: 700; color: #065F46; display: flex; align-items: center; gap: 4px; }
.panel-response-admin::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #10B981; }
.panel-response-date  { color: var(--text-muted); font-size: 0.73rem; }
.panel-response-vis   { margin-left: auto; font-size: 0.68rem; font-weight: 600; background: #D1FAE5; color: #065F46; border-radius: 4px; padding: 2px 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.panel-response-msg   { font-size: 0.875rem; color: var(--text-primary); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* Panel rating */
.panel-rating-row      { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.panel-rating-val      { font-size: 1rem; font-weight: 800; color: var(--text-primary); }
.panel-rating-feedback {
  font-size: 0.84rem; color: var(--text-secondary); font-style: italic;
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--r-base);
  padding: 10px 14px; line-height: 1.6;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-spine { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 14px; }
.timeline-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--border); flex-shrink: 0; margin-top: 4px;
}
.timeline-dot.dot-resolved { background: var(--resolved-color); box-shadow: 0 0 0 2px #A7F3D0; }
.timeline-dot.dot-rejected { background: var(--rejected-color); box-shadow: 0 0 0 2px #FECACA; }
.timeline-dot.dot-open     { background: var(--open-color);     box-shadow: 0 0 0 2px #BFDBFE; }
.timeline-dot.dot-created  { background: var(--text-muted);     box-shadow: 0 0 0 2px var(--border); }
.timeline-line { flex: 1; width: 2px; background: var(--border); margin-top: 4px; min-height: 10px; }
.timeline-item:last-child .timeline-line { display: none; }
.timeline-content { flex: 1; padding-top: 2px; }
.timeline-action  { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.timeline-meta    { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.timeline-note    { font-size: 0.84rem; color: var(--text-secondary); margin-top: 4px; font-style: italic; }
.timeline-private {
  font-size: 0.68rem; font-weight: 600;
  background: #FEF3C7; color: #92400E; padding: 1px 5px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* ============================================================
   XP ANIMATIONS
   ============================================================ */
#xp-float-container { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.xp-float {
  position: fixed;
  font-size: 1.05rem; font-weight: 800; color: #F59E0B;
  pointer-events: none; z-index: 9999;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
  animation: xpFloat 1.4s cubic-bezier(0.16,1,0.3,1) forwards;
  white-space: nowrap;
}
@keyframes xpFloat {
  0%   { transform: translateY(0) scale(0.8); opacity: 0; }
  15%  { transform: translateY(-10px) scale(1.2); opacity: 1; }
  60%  { transform: translateY(-50px) scale(1); opacity: 1; }
  100% { transform: translateY(-75px) scale(0.8); opacity: 0; }
}

.levelup-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 8000; pointer-events: none;
  animation: levelupBg 3s ease forwards;
}
@keyframes levelupBg {
  0% { background: rgba(0,0,0,0); }
  20% { background: rgba(0,0,0,0.45); }
  70% { background: rgba(0,0,0,0.45); }
  100% { background: rgba(0,0,0,0); }
}
.levelup-card {
  background: linear-gradient(135deg, #3730A3 0%, #4F46E5 60%, #6D28D9 100%);
  color: #fff; border-radius: 18px; padding: 36px 48px; text-align: center;
  box-shadow: 0 24px 60px rgba(79,70,229,0.5);
  animation: levelupPop 3s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes levelupPop {
  0%  { transform: scale(0.3) rotate(-6deg); opacity: 0; }
  20% { transform: scale(1.06) rotate(1deg); opacity: 1; }
  30% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1); opacity: 1; }
  100%{ transform: scale(0.7); opacity: 0; }
}
.levelup-emoji    { font-size: 3.2rem; margin-bottom: 12px; }
.levelup-title    { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.02em; }
.levelup-subtitle { font-size: 0.95rem; opacity: 0.85; font-weight: 500; }
.levelup-badge    { font-size: 0.82rem; opacity: 0.65; margin-top: 10px; }

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.achievements-section { margin-bottom: 24px; }
.achievements-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }

.achievement-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 10px; text-align: center;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  cursor: default; position: relative; overflow: hidden;
}
.achievement-card.unlocked { border-color: #F59E0B; box-shadow: 0 0 0 1px rgba(245,158,11,0.25), var(--shadow-sm); }
.achievement-card.unlocked:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(245,158,11,0.35), var(--shadow-md); }
.achievement-card.locked   { opacity: 0.35; filter: grayscale(0.7); }

.achievement-emoji          { font-size: 1.8rem; margin-bottom: 7px; line-height: 1; }
.achievement-name           { font-size: 0.72rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; line-height: 1.3; }
.achievement-desc           { font-size: 0.65rem; color: var(--text-muted); line-height: 1.4; }
.achievement-pts            { font-size: 0.65rem; font-weight: 700; color: #F59E0B; margin-top: 5px; }
.achievement-unlocked-badge { position: absolute; top: 5px; right: 5px; font-size: 0.5rem; font-weight: 800; background: #F59E0B; color: #fff; border-radius: 3px; padding: 1px 4px; text-transform: uppercase; letter-spacing: 0.03em; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 639px) {
  :root { --header-h: 56px; }
  .auth-card         { padding: 28px 20px 24px; border-radius: var(--r-lg); }
  .app-main          { padding: 18px 14px 40px; }
  .modal-body        { padding: 16px; }
  .modal-header      { padding: 16px 16px 12px; }
  .modal-footer      { padding: 12px 16px; }
  .step-progress     { padding: 12px 16px; }
  .header-logo-tag   { display: none; }
  .user-name-text    { display: none; }
  .side-panel        { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 440px; z-index: 300; height: 100vh; }
  .xp-level-card     { flex-direction: column; align-items: flex-start; }
  .xp-level-right    { text-align: left; width: 100%; }
  .header-xp .xp-points { display: none; }
  .req-img-thumb     { width: 58px; height: 58px; }
  .admin-action-row  { flex-direction: column; }
  .req-card-info     { gap: 6px; }
  .stats-grid        { gap: 10px; }
}

@media (max-width: 480px) {
  .filter-bar          { flex-direction: column; }
  .filter-bar .search-wrap { width: 100%; }
  .pagination          { justify-content: center; }
  .pagination-info     { width: 100%; text-align: center; }
  .social-grid         { grid-template-columns: 1fr 1fr; }
}
