/* =============================================
   APP VARIABLES & RESET
============================================= */
:root {
  --bg: #0d0f14;
  --surface: #141720;
  --surface2: #1c2030;
  --surface3: #232840;
  --border: #2a3050;
  --border2: #363f60;
  --accent: #4a7ff7;
  --accent-dim: rgba(74, 127, 247, 0.12);
  --accent-glow: rgba(74, 127, 247, 0.25);
  --green: #22c97a;
  --green-dim: rgba(34, 201, 122, 0.12);
  --amber: #f59e0b;
  --red: #f05252;
  --red-dim: rgba(240, 82, 82, 0.1);
  --text: #dde4f5;
  --text2: #8a96b8;
  --text3: #5a6282;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

body.light-theme {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --surface3: #e2e8f0;
  --border: #e2e8f0;
  --border2: #cbd5e1;
  --accent: #2563eb;
  --accent-dim: rgba(37, 99, 235, 0.12);
  --accent-glow: rgba(37, 99, 235, 0.25);
  --green: #059669;
  --green-dim: rgba(5, 150, 105, 0.12);
  --amber: #d97706;
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.1);
  --text: #0f172a;
  --text2: #334155;
  --text3: #64748b;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* =============================================
   SCROLLBAR
============================================= */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

/* =============================================
   HEADER
============================================= */
.app-header {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 10;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-gwx {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.logo-gwx .x-mark {
  color: #e03535;
  font-size: 21px;
}

.logo-divider {
  width: 1px;
  height: 18px;
  background: var(--border2);
}

.logo-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============================================
   BUTTONS
============================================= */
.btn {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #3a6fe8;
  transform: translateY(-1px);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}

.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border2);
}

.btn-success {
  background: var(--green);
  color: #0a1a12;
  font-weight: 700;
}

.btn-success:hover {
  background: #1ab56b;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(240, 82, 82, 0.25);
}

.btn-danger:hover {
  background: rgba(240, 82, 82, 0.2);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  font-size: 16px;
}

/* =============================================
   MAIN LAYOUT
============================================= */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* =============================================
   MAIN FORM AREA (formerly SIDEBAR)
============================================= */
.sidebar {
  flex: 1;
  background: var(--bg);
  border-right: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 40px 20px;
}

.sidebar-scroll {
  width: 100%;
  max-width: 760px;
  flex: 0 0 auto;
  overflow: visible;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  border-bottom: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.sidebar-footer {
  width: 100%;
  max-width: 760px;
  flex: 0 0 auto;
  padding: 24px 32px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
  margin-bottom: 40px;
}

/* =============================================
   SLOT TABS
============================================= */
.slot-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg);
  border-radius: 9px;
  padding: 3px;
  margin-bottom: 18px;
  gap: 2px;
}

.slot-tab {
  position: relative;
  padding: 9px 8px;
  border-radius: 7px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text3);
  background: transparent;
  border: none;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}

.slot-tab.active {
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.slot-tab:hover:not(.active) {
  color: var(--text2);
  background: var(--surface2);
}

.slot-pip {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: none;
  box-shadow: 0 0 5px var(--green);
}

/* =============================================
   FORM SECTIONS
============================================= */
.form-section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-input,
.form-select {
  width: 100%;
  padding: 8px 11px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  appearance: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
  background: var(--surface3);
}

.form-input::placeholder {
  color: var(--text3);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 15px;
  pointer-events: none;
}

.form-select {
  padding-right: 32px;
  cursor: pointer;
}

.form-select option {
  background: #1c2030;
}

/* =============================================
   ITEMS TABLE (SIDEBAR)
============================================= */
.items-table-header {
  display: grid;
  grid-template-columns: 28px 1fr 88px 26px;
  gap: 5px;
  padding: 0 2px;
  margin-bottom: 5px;
}

.items-table-header span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text3);
}

.item-row {
  display: grid;
  grid-template-columns: 28px 1fr 88px 26px;
  gap: 5px;
  margin-bottom: 5px;
  align-items: center;
}

.sn-badge {
  height: 32px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text3);
  font-family: var(--mono);
}

.item-row .form-input {
  padding: 7px 9px;
  font-size: 14px;
  border-radius: 5px;
}

.beneficiary-row {
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.beneficiary-row .form-input {
  padding: 8px 10px;
}

.remove-item-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text3);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: all 0.15s;
}

.remove-item-btn:hover {
  color: var(--red);
  background: var(--red-dim);
  border-color: rgba(240, 82, 82, 0.2);
}

.items-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.total-label-txt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text3);
  text-transform: uppercase;
}

.total-amount-txt {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}

/* =============================================
   PREVIEW AREA
============================================= */
.preview-area {
  flex: 1 0 auto;
  min-height: 100%;
  background: #cbd5e1;
  position: relative;
}

.preview-label {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Scale the A4 page to fit the preview area */
.page-scale-wrapper {
  position: relative;
  margin-top: 40px;
  transform-origin: top center;
  transform: scale(var(--page-scale, 0.65));
  transition: transform 0.2s;
}

/* =============================================
   A4 PAGE (VOUCHER SHEET)
============================================= */
.a4-page {
  /* A4 Landscape: 297mm × 210mm */
  width: 297mm;
  height: 210mm;
  background: #ffffff;
  display: flex;
  flex-direction: row;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  page-break-after: always;
  position: relative;
}

/* =============================================
   VOUCHER CELL
============================================= */
.voucher-cell {
  flex: 1;
  border-right: 1px solid #bbb;
  padding: 5mm 4.5mm;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  display: flex;
  flex-direction: column;
  font-size: 7pt;
  min-width: 0;
}

.voucher-cell:last-child {
  border-right: none;
}

/* GWX Logo */
.gwx-logo-block {
  margin-bottom: 2.5mm;
  line-height: 1;
}

.gwx-wordmark {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 15pt;
  font-weight: 900;
  letter-spacing: -1px;
  color: #111;
  line-height: 1;
  display: flex;
  align-items: center;
}

.gwx-x-symbol {
  color: #cc1111;
  font-size: 17pt;
}

.gwx-tagline-txt {
  font-size: 4.5pt;
  color: #666;
  margin-top: 0.5mm;
  letter-spacing: 0.5px;
  font-style: italic;
}

/* Voucher title bar */
.v-title {
  font-size: 7.5pt;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid #000;
  padding: 1.5mm 2mm;
  margin-bottom: 0;
  letter-spacing: 0.5px;
}

/* Info rows */
.v-info-block {
  border: 1px solid #000;
  border-top: none;
  flex-shrink: 0;
}

.v-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #000;
  min-height: 6.5mm;
}

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

.v-cell-label {
  font-size: 6pt;
  font-weight: 700;
  padding: 1mm 2mm;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.v-cell-value {
  flex: 1;
  font-size: 6.5pt;
  padding: 1mm 2mm;
  display: flex;
  align-items: center;
  word-break: break-word;
}

.v-cell-date {
  border-left: 1px solid #000;
  min-width: 31mm;
  display: flex;
  align-items: center;
  padding: 1mm 2mm;
  font-size: 6pt;
  font-weight: 700;
  flex-shrink: 0;
}

.v-cell-date .dv {
  font-weight: 400;
  font-size: 6.5pt;
  margin-left: 3px;
}

.v-account-spacer {
  height: 6.5mm;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  flex-shrink: 0;
}

/* Payment table */
.v-items-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000;
  border-top: none;
  flex-shrink: 0;
}

.v-items-table th {
  font-size: 6.5pt;
  font-weight: 700;
  padding: 1mm 1.5mm;
  border: 1px solid #000;
  background: #f0f0f0;
  white-space: nowrap;
}

.v-items-table td {
  font-size: 6.5pt;
  padding: 0.8mm 1.5mm;
  border: 1px solid #000;
  height: 5.8mm;
  vertical-align: top;
}

.col-sn {
  width: 7mm;
  text-align: center;
}

.col-amt {
  width: 19mm;
  text-align: right;
}

.v-total-row {
  border: 1px solid #000;
  border-top: none;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.v-total-label {
  font-size: 6.5pt;
  font-weight: 700;
  padding: 1mm 2mm;
  text-align: right;
  border-right: 1px solid #000;
}

.v-total-value {
  font-size: 6.5pt;
  font-weight: 700;
  padding: 1mm 1.5mm;
  text-align: right;
  min-width: 19mm;
}

/* Amount in words */
.v-amount-words {
  border: 1px solid #000;
  border-top: none;
  padding: 1.5mm 2mm;
  flex-shrink: 0;
}

.v-aw-label {
  font-size: 6pt;
  font-weight: 700;
  margin-bottom: 0.5mm;
}

.v-aw-value {
  font-size: 6.5pt;
  font-style: italic;
  min-height: 6mm;
  line-height: 1.3;
}

/* Signature block */
.v-sig-block {
  border: 1px solid #000;
  border-top: none;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.v-sig-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #000;
  min-height: 6mm;
  padding: 1mm 2mm;
  flex: 1;
}

.v-sig-row:last-child {
  border-bottom: none;
}

.v-sig-label {
  font-size: 6pt;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.v-sig-value {
  font-size: 6.5pt;
  margin-left: 3px;
}

/* Empty voucher placeholder */
.voucher-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ccc;
  border: 2px dashed #e0e0e0;
  border-radius: 2mm;
  margin-top: 3mm;
  gap: 3mm;
}

.voucher-empty-state .empty-icon {
  font-size: 22pt;
  opacity: 0.4;
}

.voucher-empty-state .empty-txt {
  font-size: 7pt;
  text-align: center;
  opacity: 0.5;
  line-height: 1.4;
}

/* =============================================
   MODAL
============================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--surface);
  border-radius: 12px;
  width: 95vw;
  height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text3);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--red);
}

/* =============================================
   PRINT STYLES
============================================= */
@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }

  html,
  body,
  #app-screen {
    overflow: visible !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-header,
  .app-body,
  .modal-overlay,
  .toast,
  .cookie-banner,
  #login-screen {
    display: none !important;
  }

  .print-section {
    display: block !important;
  }

  .print-page-wrapper {
    display: block;
    height: auto;
  }

  .a4-page {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    height: 99vh !important;
    max-height: 209mm !important;
    overflow: hidden !important;
    box-shadow: none;
    margin: 0;
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* =============================================
   PRINT SECTION (screen: hidden)
============================================= */
.print-section {
  display: none;
}

/* =============================================
   SLOT STATUS BAR
============================================= */
.slot-status-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.slot-status-chip {
  flex: 1;
  padding: 7px 6px;
  border-radius: 7px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text3);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.slot-status-chip.filled {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34, 201, 122, 0.3);
}

.slot-status-chip.editing {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-glow);
}

/* =============================================
   UTILITY
============================================= */
.divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0 12px;
}

.flex-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flex-1 {
  flex: 1;
}

.text-muted {
  color: var(--text3);
}

.text-green {
  color: var(--green);
}

/* INFO TOAST */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(34, 201, 122, 0.4);
}

.toast.error {
  border-color: rgba(240, 82, 82, 0.4);
}

/* History Panel */
.history-section {
  margin-top: 16px;
}

.history-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.history-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-group {
  margin-bottom: 4px;
}

.history-group-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  transition: all 0.15s;
}

.history-group-header:hover {
  color: var(--text);
}

.history-group-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-group.collapsed .history-group-content {
  display: none;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}

.history-item:hover {
  border-color: var(--border2);
  background: var(--surface3);
}

.history-item.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.history-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  color: transparent;
  transition: all 0.15s;
}

.history-item.selected .history-check {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-info-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-info-detail {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}

.history-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.history-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.15s;
}

.history-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

.history-btn.delete:hover {
  background: var(--red-dim);
  color: var(--red);
}

.history-empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--text3);
  font-size: 14px;
  font-style: italic;
}

.print-count-badge {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

/* =============================================
   RESPONSIVE (MOBILE VIEW)
============================================= */
@media (max-width: 992px) {
  .app-body {
    flex-direction: column;
    overflow-y: auto;
  }

  .sidebar {
    overflow: visible;
    padding: 20px 10px;
  }

  .sidebar-scroll {
    padding: 20px;
  }

  .history-sidebar {
    width: 100% !important;
    border-left: none !important;
    border-top: 2px solid var(--border) !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
  }

  .history-list {
    max-height: none !important;
  }
}

/* =============================================
   LOGIN SCREEN
============================================= */
#login-screen {
  display: flex;
  height: 100vh;
  width: 100vw;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-container {
  background: var(--surface);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text3);
}

#app-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.auth-toggle a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.toggle-password:hover {
  color: var(--text);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

/* =============================================
   THEME TOGGLE
============================================= */
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
}

/* =============================================
   COOKIE BANNER
============================================= */
.cookie-banner {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10000;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 90%;
  max-width: 500px;
}

.cookie-banner.show {
  bottom: 24px;
}