@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #07080b;
  --bg-secondary: #0c0d12;
  --bg-card: rgba(16, 17, 23, 0.7);
  --border-color: rgba(255, 255, 255, 0.05);
  --border-focus: rgba(0, 245, 255, 0.5);
  
  --text-primary: #f5f6f9;
  --text-secondary: #878c9e;
  --text-muted: #4e5264;
  
  --accent-pink: #ff2a5f;
  --accent-cyan: #00f5ff;
  --accent-purple: #9d4edd;
  
  --status-pending-bg: rgba(255, 183, 3, 0.08);
  --status-pending-color: #ffb703;
  --status-approved-bg: rgba(0, 245, 255, 0.08);
  --status-approved-color: #00f5ff;
  --status-rejected-bg: rgba(255, 42, 95, 0.08);
  --status-rejected-color: #ff2a5f;
  
  --font-main: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-neon-pink: 0 0 16px rgba(255, 42, 95, 0.25);
  --shadow-neon-cyan: 0 0 16px rgba(0, 245, 255, 0.25);
  --shadow-neon-purple: 0 0 16px rgba(157, 78, 221, 0.25);
  
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  
  /* animejs.com dark grid lines overlay */
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center center;
  background-attachment: fixed;
}

/* Background floating glow effect */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 80% 15%, rgba(255, 42, 95, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 15% 75%, rgba(0, 245, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
}

/* Common UI Elements */
a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover {
  color: var(--accent-pink);
  text-shadow: var(--shadow-neon-pink);
}

button {
  cursor: pointer;
  font-family: var(--font-main);
  border: none;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

input, select, textarea {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  outline: none;
  transition: all 0.3s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.15);
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23878c9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-glow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Auth Pages */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan) 70%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.btn-primary {
  background: transparent;
  border: 1px solid var(--accent-pink);
  color: var(--accent-pink);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  display: block;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 42, 95, 0.05);
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-pink);
  color: #07080b;
  box-shadow: var(--shadow-neon-pink);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  list-style: none;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: all 0.25s ease;
}

.sidebar-item a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-item.active a {
  color: var(--accent-cyan);
  background: rgba(0, 245, 255, 0.05);
  border-left: 2px solid var(--accent-cyan);
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.25);
}

.sidebar-user {
  padding: 20px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--accent-pink);
  border: 1px solid rgba(255, 42, 95, 0.2);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
}

.btn-logout:hover {
  background: var(--accent-pink);
  color: #07080b;
  box-shadow: var(--shadow-neon-pink);
}

/* Main Content Area */
.main-content {
  margin-left: 240px;
  flex-grow: 1;
  padding: 40px;
  min-height: 100vh;
  min-width: 0;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 20px;
}

.page-title h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border-left: 2px solid var(--accent-cyan);
}

.stat-card.blue {
  border-left-color: var(--accent-cyan);
}

.stat-card.green {
  border-left-color: var(--accent-cyan);
}

.stat-card.yellow {
  border-left-color: var(--status-pending-color);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
}

/* Grid Layout for Panels */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 2fr 3fr;
  }
}

.panel-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.panel-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* Custom Table Design */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-color);
  border: 1px solid rgba(255, 183, 3, 0.15);
}

.badge-approved {
  background: var(--status-approved-bg);
  color: var(--status-approved-color);
  border: 1px solid rgba(0, 245, 255, 0.15);
  text-shadow: 0 0 6px rgba(0, 245, 255, 0.25);
}

.badge-rejected {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-color);
  border: 1px solid rgba(255, 42, 95, 0.15);
}

/* Form layouts */
.btn-submit {
  background: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 245, 255, 0.05);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.btn-submit:hover {
  background: var(--accent-cyan);
  color: #07080b;
  box-shadow: var(--shadow-neon-cyan);
  transform: translateY(-2px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Admin Actions Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  text-transform: uppercase;
}

.btn-action-acc {
  background: transparent;
  color: var(--status-approved-color);
  border-color: rgba(0, 245, 255, 0.3);
}

.btn-action-acc:hover {
  background: var(--status-approved-color);
  color: #07080b;
  box-shadow: var(--shadow-neon-cyan);
}

.btn-action-reject {
  background: transparent;
  color: var(--status-rejected-color);
  border-color: rgba(255, 42, 95, 0.3);
}

.btn-action-reject:hover {
  background: var(--status-rejected-color);
  color: #07080b;
  box-shadow: var(--shadow-neon-pink);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
}

.btn-cancel:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  width: 100%;
}

.toast {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-cyan);
  border-right: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-main);
}

.toast.toast-error {
  border-left-color: var(--status-rejected-color);
}

.toast.toast-success {
  border-left-color: var(--status-approved-color);
}

.toast-close {
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Hide sections for SPA */
.dashboard-section {
  display: none;
}

.dashboard-section.active-section {
  display: block;
}

/* Tab button controls */
.tab-buttons {
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.btn-tab {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
}

.btn-tab.active {
  background: var(--accent-cyan);
  color: #07080b;
  font-weight: 600;
  box-shadow: var(--shadow-neon-cyan);
}

/* Close Setor Notice Banner */
#setorClosedNotice {
  border: 1px dashed var(--accent-pink);
  background: rgba(255, 42, 95, 0.08);
  color: var(--accent-pink);
  padding: 14px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

#setorClosedNotice svg {
  flex-shrink: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ====================================================
   MOBILE RESPONSIVENESS — FULL OVERHAUL
   ==================================================== */

/* Sidebar Overlay (backdrop) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 99;
  animation: fadeIn 0.2s ease;
}

.sidebar-overlay.active {
  display: block;
}

/* Hamburger always visible on mobile */
.hamburger {
  display: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.hamburger:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-cyan);
}

/* ---- Breakpoint: Tablet & Mobile (max 1024px) ---- */
@media (max-width: 1024px) {
  .main-content {
    padding: 24px 20px;
    min-width: 0;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Breakpoint: Mobile (max 768px) ---- */
@media (max-width: 768px) {

  /* Sidebar */
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
    width: 220px;
  }

  .sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.6);
  }

  /* Main content full width */
  .main-content {
    margin-left: 0;
    padding: 16px 14px;
    min-width: 0;
  }

  /* Header bar */
  .header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .page-title {
    order: 2;
    flex: 1;
    min-width: 0;
  }

  .page-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
  }

  .page-title p {
    font-size: 0.85rem;
    color: var(--text-secondary);
  }

  /* Balance in header — custom pill/badge */
  .header-balance {
    order: 3;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem !important;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Stats grid — 2 columns on mobile with minmax to avoid blowout */
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .stat-card {
    padding: 16px;
  }

  /* Cards */
  .card {
    padding: 18px;
  }

  /* Panel header — wrap on small screens */
  .panel-header {
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
  }

  .panel-header h3 {
    font-size: 1.15rem;
  }

  .panel-header > div {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  /* Tables — mobile card style */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius-sm);
  }

  /* Make table text smaller on mobile */
  table {
    font-size: 0.82rem;
    min-width: 500px;
  }

  th, td {
    padding: 10px 12px;
  }

  /* Admin table — allow horizontal scroll */
  #adminSubmissionTableBody tr td,
  #adminUsersTableBody tr td,
  #adminWithdrawalTableBody tr td {
    white-space: nowrap;
  }

  /* Form labels, inputs, selects, and textareas on mobile */
  label {
    font-size: 0.85rem;
  }

  input, select, textarea {
    font-size: 0.92rem;
    padding: 10px 14px;
  }

  /* Form row always single column on mobile */
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Dashboard grid always single column */
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* Tab buttons styling */
  .btn-tab {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8rem !important;
    padding: 6px 8px !important;
  }

  /* Button touch targets */
  .btn-submit,
  .btn-action,
  .btn-logout {
    min-height: 40px;
    font-size: 0.9rem;
  }

  .btn-action {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  /* Toast — full width at bottom */
  .toast-container {
    bottom: 12px;
    right: 12px;
    left: 12px;
    max-width: 100%;
  }

  /* Modal */
  .modal {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer button {
    width: 100%;
    justify-content: center;
  }

  /* Auth pages */
  .auth-header h1 {
    font-size: 1.8rem;
  }

  /* Tab buttons wrap */
  .tab-buttons {
    flex-wrap: wrap !important;
  }

  /* Admin action buttons in user table */
  #adminUsersTableBody .btn-action,
  #adminSubmissionTableBody .btn-action,
  #adminWithdrawalTableBody .btn-action {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  /* Bulk action card buttons */
  #btnBulkApprove, #btnBulkReject {
    flex: unset;
    width: 100%;
  }

  /* Select filters wrap */
  #submissionFilter,
  #withdrawalFilter {
    width: 100%;
  }
}

/* ---- Breakpoint: Very Small (max 480px) ---- */
@media (max-width: 480px) {
  .main-content {
    padding: 12px 10px;
    min-width: 0;
  }

  .header-bar {
    gap: 12px;
  }

  .page-title {
    width: calc(100% - 60px);
    flex: none;
  }

  .page-title p {
    display: none; /* Hide subtitle to save screen real estate */
  }

  .header-balance {
    width: 100%;
    order: 4;
    justify-content: center;
    margin-top: 4px;
    font-size: 0.8rem !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 12px 10px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .page-title h1 {
    font-size: 1.2rem;
  }

  .card {
    padding: 14px;
  }

  .panel-header h3 {
    font-size: 1rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  /* Stack panel-header buttons vertically */
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header > div {
    width: 100%;
    justify-content: flex-start;
  }

  /* Toast smaller */
  .toast {
    font-size: 0.85rem;
    padding: 12px;
  }
}
