/* =========================================================================
   CIRCLE DXB GLOBAL DESIGN TOKENS
   A single source of truth for all styling variables.
   Modify this file to globally update the entire app's look and feel.
   ========================================================================= */

/* --- LOCAL FONTS --- */
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* =========================================
     1. TYPOGRAPHY
     ========================================= */
  /* Using Poppins for a clean, modern, and readable look preferred by luxury real estate platforms */
  --font-sans:
    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem; /* 12px */
  --text-sm: 0.875rem; /* 14px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.125rem; /* 18px */
  --text-xl: 1.25rem; /* 20px */
  --text-2xl: 1.5rem; /* 24px */
  --text-3xl: 1.875rem; /* 30px */
  --text-4xl: 2.25rem; /* 36px */

  /* Font Weights */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* =========================================
     2. SPACING SYSTEM (8px Grid)
     ========================================= */
  --s-2: 0.125rem; /* 2px */
  --s-4: 0.25rem; /* 4px */
  --s-8: 0.5rem; /* 8px */
  --s-12: 0.75rem; /* 12px */
  --s-16: 1rem; /* 16px */
  --s-24: 1.5rem; /* 24px */
  --s-32: 2rem; /* 32px */
  --s-40: 2.5rem; /* 40px */
  --s-48: 3rem; /* 48px */
  --s-64: 4rem; /* 64px */

  /* =========================================
     3. BORDER RADIUS
     ========================================= */
  --r-none: 0;
  --r-sm: 0.375rem; /* 6px */
  --r-md: 0.625rem; /* 10px */
  --r-lg: 1rem; /* 16px */
  --r-xl: 1.5rem; /* 24px */
  --r-full: 9999px;

  /* =========================================
     4. SHADOWS & ELEVATION
     ========================================= */
  --shadow-sm: 0 1px 2px 0 #0000000d;
  --shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -1px #0000000f;
  --shadow-lg: 0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d;
  --shadow-float: 0 20px 25px -5px #0000001a, 0 10px 10px -5px #0000000a;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   5. COLOR THEMES
   ========================================= */

/* --- LIGHT THEME (Default) --- 
   Based on classic premium UI: clean white surfaces, airy light grays, 
   with sharp contrast for typography matching luxury Real Estate.
*/
:root {
  /* Foundation */
  --c-bg: #f3fafc; /* Very light airy gray updated from F8FAFC */
  --c-surface: #ffffff; /* Pure white for cards/menus */

  /* Typography */
  --c-text-main: #151718; /* Updated to request #151718 */
  --c-text-muted: #64748b; /* Slate 500 for secondary text */

  /* BOTTOM SHEET SPECIFIC UPLOAD STYLING */
  .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--s-24);
  }

  .sheet-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text-main);
    margin: 0;
  }

  .sheet-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  .file-upload-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--c-border);
    border-radius: var(--r-lg);
    background-color: var(--c-bg);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: var(--s-32) var(--s-16);
    text-align: center;
    min-height: 200px;
  }

  .file-upload-area:hover,
  .file-upload-area.dragover {
    border-color: var(--c-primary);
    background-color: var(--c-surface);
  }

  .file-upload-icon {
    color: var(--c-text-muted);
    margin-bottom: var(--s-16);
    transition: color var(--transition-fast);
  }

  .file-upload-area:hover .file-upload-icon,
  .file-upload-area.dragover .file-upload-icon {
    color: var(--c-primary);
  }

  .file-upload-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--c-text-main);
    margin-bottom: var(--s-8);
  }

  .file-upload-hint {
    font-size: 14px;
    color: var(--c-text-muted);
    margin: 0;
  }

  .hidden-file-input {
    display: none;
  }
  --c-text-inverse: #ffffff;

  /* Borders & Dividers */
  --c-border: #e2e8f0; /* Slate 200 */
  --c-border-hover: #cbd5e1;

  /* Brand / Primary Interactions */
  --c-primary: #0f172a; /* Deep Slate/Black */
  --c-primary-hover: #334155; /* Slate 700 */
  --c-primary-active: #000000;

  /* Accents */
  --c-accent: #c6a87c; /* Champagne / Gold accent typical in Dubai Real Estate */
  --c-accent-hover: #b59565;

  /* Semantic Status Colors */
  --c-income: #059669; /* Emerald 600 */
  --c-income-bg: #d1fae5; /* Emerald 100 */

  --c-expense: #dc2626; /* Red 600 */
  --c-expense-bg: #fee2e2; /* Red 100 */

  --c-warning: #d97706; /* Amber 600 */
  --c-warning-bg: #fef3c7; /* Amber 100 */

  /* States */
  --c-focus-ring: #0f172a33;
  --c-overlay: #00000066;
}



/* =========================================
   MERGED FROM: style.css
   ========================================= */
/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
margin,
padding {
  margin: 0;
  padding: 0;
}
body,
h1,
h2,
h3,
p,
ul,
form {
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* GLOBAL */
/* GLOBAL MOBILE FIRST */
body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--c-bg);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background-color: var(--c-bg);
    align-items: center;
    padding: var(--s-16);
  }
  .app-container {
    max-width: 420px;
    height: 85vh;
    min-height: 600px;
    max-height: 850px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-float);
  }
}

/* USER PROFILE HEADER */
.user-profile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-bg); /* fallback */
  border: 1px solid var(--c-border);
}
.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-main);
}
.btn-logout {
  font-size: 13px;
  padding: var(--s-4) var(--s-8);
  font-weight: 600;
  color: #ef4444; /* simple red */
}
.btn-logout:hover {
  color: #dc2626;
}

/* APP HEADER (Global Top Bar) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-20);
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  flex-shrink: 0;
  width: 100%;
}
.header-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-text-main);
  text-align: center;
  flex-grow: 1;
}
.header-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}
.header-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-main);
  border-radius: var(--r-full);
  padding: 4px;
  transition: background-color 0.2s;
}
.btn-icon:hover {
  background-color: var(--c-bg);
}
#btn-menu,
#btn-back,
#btn-share {
  width: 56px;
  height: 56px;
  background-color: #ffffff;
  border: 1px solid #E0E4E5;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar-container {
  display: flex;
  flex-shrink: 0;
}
.header-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-surface); /* fallback */
  border: 1px solid #E0E4E5;
  flex-shrink: 0;
}
.app-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: var(--s-24);
}
.page-main-title {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 600;
  color: var(--c-text-main);
  text-align: left;
  margin-bottom: var(--s-4);
}

/* PROGRESS */
.progress-container {
  height: 4px;
  background: var(--c-border);
  width: 100%;
}
.progress-bar {
  height: 100%;
  background: var(--c-primary);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STEPS */
.step {
  display: none;
  flex-direction: column;
  padding: var(--s-24) var(--s-24) var(--s-32);
  height: 100%;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.step.active {
  display: flex;
}

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

/* TYPOGRAPHY */
.step-header {
  margin-bottom: var(--s-32);
}
.step-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-4);
}
.step-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
}
.btn-primary {
  background: var(--c-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.btn-secondary:hover {
  background: var(--c-bg);
}

.btn-text {
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 15px;
  padding: var(--s-8);
  transition: color 0.1s;
}
.btn-text:hover {
  color: var(--c-text-main);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: var(--s-24);
  align-self: flex-start;
  padding: var(--s-4) 0;
  margin-left: -4px;
}
.back-btn:hover {
  color: var(--c-text-main);
}

.btn-huge {
  flex-direction: column;
  padding: var(--s-40) var(--s-16);
  gap: var(--s-16);
  font-size: 18px;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-16);
}
.icon-huge {
  font-size: 32px;
}

/* STEP 1: CARDS */
.type-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
  flex-grow: 1;
}
.type-cards-large {
  gap: var(--s-24);
}
.card-btn {
  border: none;
  border-radius: var(--r-xl);
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  align-items: center;
}
.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.2s;
}

.income-card-large {
  background: linear-gradient(135deg, var(--c-income-bg) 0%, #a7f3d0 100%);
  color: var(--c-income);
  box-shadow: 0 8px 16px -6px rgba(5, 150, 105, 0.25);
}
.income-card-large:hover,
.income-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(5, 150, 105, 0.3);
}
.income-card-large::before {
  background-color: rgba(5, 150, 105, 0);
}
.income-card-large:active::before {
  background-color: rgba(5, 150, 105, 0.1);
}

.expense-card-large {
  background: linear-gradient(135deg, var(--c-expense-bg) 0%, #fecaca 100%);
  color: var(--c-expense);
  box-shadow: 0 8px 16px -6px rgba(220, 38, 38, 0.25);
}
.expense-card-large:hover,
.expense-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(220, 38, 38, 0.3);
}
.expense-card-large::before {
  background-color: rgba(220, 38, 38, 0);
}
.expense-card-large:active::before {
  background-color: rgba(220, 38, 38, 0.1);
}

.card-content-large {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-16);
  width: 100%;
  padding: var(--s-32);
  text-align: center;
}

.icon-circle-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.income-icon-large {
  color: var(--c-income);
}
.expense-icon-large {
  color: var(--c-expense);
}

.text-large h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.text-large p {
  font-size: 15px;
  opacity: 0.8;
  font-weight: 500;
}

/* STEP 2: OCR */
.capture-card-large {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  box-shadow: 0 8px 16px -6px rgba(37, 99, 235, 0.25);
}
.capture-card-large:hover,
.capture-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(37, 99, 235, 0.3);
}
.capture-card-large::before {
  background-color: rgba(37, 99, 235, 0);
}
.capture-card-large:active::before {
  background-color: rgba(37, 99, 235, 0.1);
}
.capture-icon-large {
  color: #2563eb;
}

.camera-card-large {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  box-shadow: 0 8px 16px -6px rgba(75, 85, 99, 0.25);
}
.camera-card-large:hover,
.camera-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(75, 85, 99, 0.3);
}
.camera-card-large::before {
  background-color: rgba(75, 85, 99, 0);
}
.camera-card-large:active::before {
  background-color: rgba(75, 85, 99, 0.1);
}
.camera-icon-large {
  color: #4b5563;
}
.ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--s-24);
  animation: fadeIn 0.3s forwards;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--s-24);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success-circle {
  width: 64px;
  height: 64px;
  background: var(--c-income-bg);
  color: var(--c-income);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-24);
  font-size: 32px;
}
.success-circle.big {
  width: 80px;
  height: 80px;
  margin-bottom: var(--s-32);
  font-size: 40px;
}

/* STEP 3: FORM */
.form-layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  flex-grow: 1;
}
.row {
  display: flex;
  gap: var(--s-12);
}
.row .input-group {
  flex: 1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text-main);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}
.highlight-group select {
  background: var(--c-bg);
  border-color: #d1d5db;
  font-weight: 500;
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-select {
  position: absolute;
  left: 8px;
  color: var(--c-text-muted);
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  z-index: 10;
}
/* Ensure input text doesn't overlap with the wider currency dropdown */
.currency-input input {
  padding-left: 60px;
}

.toggle-optional {
  text-align: left;
  margin-top: var(--s-8);
  color: var(--c-primary);
}
.optional-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  padding-top: var(--s-8);
  animation: fadeIn 0.3s;
}

/* UTILS */
.hidden,
.hide-by-default {
  display: none !important;
}
.spacer {
  flex-grow: 1;
  min-height: var(--s-24);
}
.bottom-action {
  margin-top: auto;
}
.mt-large {
  margin-top: var(--s-24);
}

/* STEP 4: RECEIPT */
.receipt {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-24);
}
.receipt-top {
  text-align: center;
  padding-bottom: var(--s-24);
  border-bottom: 2px dashed #d1d5db;
  margin-bottom: var(--s-24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}
.tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
}
.tag.income {
  color: var(--c-income);
  background: var(--c-income-bg);
}
.tag.expense {
  color: var(--c-expense);
  background: var(--c-expense-bg);
}

.receipt-top h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.receipt-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.r-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.r-label {
  color: var(--c-text-muted);
}
.r-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* SUCCESS SCREEN */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.success-screen h1 {
  font-size: 28px;
  margin-bottom: var(--s-8);
}
.success-screen p {
  color: var(--c-text-muted);
}
/* Dashboard flex fix */
#app-main {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ======================== */
/* SIDEBAR & MENU BTN       */
/* ======================== */

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  color: var(--c-text-main);
  transition: background-color 0.2s;
  padding: 4px;
}
.btn-icon:hover {
  background-color: var(--c-bg);
}

/* BOTTOM SHEET */
.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--c-overlay);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 50vh;
  min-height: 350px;
  background: var(--c-surface);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  padding: var(--s-32) var(--s-24) var(--s-48); /* Extra padding at bottom for mobile */
}

@media (min-width: 600px) {
  .bottom-sheet {
    position: absolute; /* Revert to absolute for desktop mock container */
    max-width: 420px;
    margin: 0 auto;
    height: 60%;
    z-index: 1001;
  }
  .bottom-sheet-overlay {
    position: absolute;
    max-width: 420px;
    margin: 0 auto;
    border-radius: var(--r-xl);
  }
}

.bottom-sheet.active {
  transform: translateY(0);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--c-surface);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
}
.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
}
.sidebar-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.sidebar-nav {
  padding: var(--s-16);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  flex-grow: 1;
  overflow-y: auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  padding: var(--s-12) var(--s-16);
  width: 100%;
  border-radius: var(--r-md);
  color: var(--c-text-main);
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
  text-align: left;
}
.nav-btn:hover {
  background-color: var(--c-bg);
}

.sidebar-footer {
  padding: var(--s-16);
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
}

.nav-logout {
  color: #ef4444; /* simple red */
}
.nav-logout:hover {
  background-color: #fee2e2;
}



.sidebar-prefs {
  display: flex;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-16);
  margin-bottom: var(--s-16);
}

.pref-select {
  flex: 1;
  padding: var(--s-8);
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text-main);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  appearance: none;
  text-align: center;
}
.pref-select:hover,
.pref-select:focus {
  border-color: var(--c-primary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--c-border);
  transition: 0.4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}
input:checked + .slider {
  background-color: var(--c-primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(
    --c-surface
  ); /* Ensures contrast when the track is white in dark mode */
}
.slider.round {
  border-radius: 24px;
}
.slider.round:before {
  border-radius: 50%;
}

@media (min-width: 600px) {
  .app-container {
    overflow: hidden;
  }
  .sidebar-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
  }
  .sidebar {
    position: absolute;
    height: 100%;
  }
}

/* =========================================
   MERGED FROM: auth/style.css
   ========================================= */
/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
margin,
padding {
  margin: 0;
  padding: 0;
}
body,
h1,
h2,
h3,
p,
ul,
form {
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* GLOBAL */
/* GLOBAL MOBILE FIRST */
body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--c-bg);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background-color: var(--c-bg);
    align-items: center;
    padding: var(--s-16);
  }
  .app-container {
    max-width: 420px;
    height: 85vh;
    min-height: 550px;
    max-height: 750px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-float);
  }
}

/* AUTH SECTIONS */
.auth-box {
  display: none;
  flex-direction: column;
  padding: var(--s-32) var(--s-24) var(--s-24);
  height: 100%;
  overflow-y: auto;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.auth-box.active {
  display: flex;
}

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

/* HEADER & LOGO */
.auth-header {
  margin-bottom: var(--s-32);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-box {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-16);
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-small {
  width: 48px;
  height: 48px;
  margin-bottom: var(--s-16);
  border-radius: var(--r-md);
}
.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  margin-bottom: var(--s-24);
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-8);
}
.auth-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

/* FORM STYLES */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  flex-grow: 1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  text-align: left;
}
input {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg);
  color: var(--c-text-main);
  transition:
    box-shadow 0.2s,
    border-color 0.2s,
    background-color 0.2s;
  appearance: none;
}
input:focus {
  outline: none;
  background: var(--c-surface);
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}

.form-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: var(--s-16);
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  background: var(--c-primary);
  color: white;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  box-shadow: var(--shadow-sm);
  margin-top: var(--s-8);
}
.btn-primary:hover {
  background: var(--c-primary-hover);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-link {
  color: var(--c-text-main);
  font-weight: 600;
  font-size: inherit;
  text-decoration: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  padding: 0;
}

/* OAUTH BUTTONS */
.btn-google {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  background: var(--c-surface);
  color: var(--c-text-main);
  border: 1px solid var(--c-border);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  box-shadow: var(--shadow-sm);
  margin-top: var(--s-8);
}
.btn-google:hover {
  background: var(--c-bg);
}
.btn-google:active {
  transform: translateY(1px);
}
.btn-google:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.btn-link {
  color: var(--c-text-main);
  font-weight: 600;
  font-size: inherit;
  text-decoration: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  padding: 0;
}
.btn-link:hover {
  color: #4b5563;
  text-decoration: underline;
}
.text-small {
  font-size: 13px;
  color: var(--c-text-muted);
}
.text-small:hover {
  color: var(--c-text-main);
}
.btn-back {
  color: var(--c-text-muted);
  font-size: 14px;
}
.btn-back:hover {
  color: var(--c-text-main);
  text-decoration: none;
}

/* FOOTER */
.auth-footer {
  text-align: center;
  margin-top: var(--s-32);
  font-size: 14px;
  color: var(--c-text-muted);
  padding-top: var(--s-24);
  border-top: 1px solid var(--c-border);
}
.mt-auto {
  margin-top: auto;
}

/* SUCCESS MSG */
.success-message {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: var(--s-16);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: var(--s-12);
  margin-top: var(--s-16);
  font-size: 14px;
  font-weight: 500;
}
.error-msg {
  color: #ef4444;
  font-size: 14px;
  margin-bottom: var(--s-16);
  text-align: center;
  font-weight: 500;
}
.success-icon-small {
  width: 24px;
  height: 24px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

/* UTILS */
.hidden {
  display: none !important;
}

/* =========================================
   MERGED FROM: flows/add_client/style.css
   ========================================= */
/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
margin,
padding {
  margin: 0;
  padding: 0;
}
body,
h1,
h2,
h3,
p,
ul,
form {
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* GLOBAL */
/* GLOBAL MOBILE FIRST */
body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--c-bg);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background-color: var(--c-bg);
    align-items: center;
    padding: var(--s-16);
  }
  .app-container {
    max-width: 420px;
    height: 85vh;
    min-height: 600px;
    max-height: 850px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-float);
  }
}

/* USER PROFILE HEADER */
.user-profile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-bg); /* fallback */
  border: 1px solid var(--c-border);
}
.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-main);
}
.btn-logout {
  font-size: 13px;
  padding: var(--s-4) var(--s-8);
  font-weight: 600;
  color: #ef4444; /* simple red */
}
.btn-logout:hover {
  color: #dc2626;
}

/* APP HEADER (Used in Dashboard & Sub-Flows) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.greeting h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.greeting p {
  font-size: 13px;
  color: var(--c-text-muted);
}
.app-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: var(--s-24);
}

/* PROGRESS */
.progress-container {
  height: 4px;
  background: var(--c-border);
  width: 100%;
}
.progress-bar {
  height: 100%;
  background: var(--c-primary);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STEPS */
.step {
  display: none;
  flex-direction: column;
  padding: var(--s-24) var(--s-24) var(--s-32);
  height: 100%;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.step.active {
  display: flex;
}

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

/* TYPOGRAPHY */
.step-header {
  margin-bottom: var(--s-32);
}
.step-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-4);
}
.step-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
}
.btn-primary {
  background: var(--c-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.btn-secondary:hover {
  background: var(--c-bg);
}

.btn-text {
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 15px;
  padding: var(--s-8);
  transition: color 0.1s;
}
.btn-text:hover {
  color: var(--c-text-main);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: var(--s-24);
  align-self: flex-start;
  padding: var(--s-4) 0;
  margin-left: -4px;
}
.back-btn:hover {
  color: var(--c-text-main);
}

.btn-huge {
  flex-direction: column;
  padding: var(--s-40) var(--s-16);
  gap: var(--s-16);
  font-size: 18px;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-16);
}
.icon-huge {
  font-size: 32px;
}

/* STEP 1: CARDS */
.type-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
  flex-grow: 1;
}
.type-cards-large {
  gap: var(--s-24);
}
.card-btn {
  border: none;
  border-radius: var(--r-xl);
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  align-items: center;
}
.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.2s;
}

.income-card-large {
  background: linear-gradient(135deg, var(--c-income-bg) 0%, #a7f3d0 100%);
  color: var(--c-income);
  box-shadow: 0 8px 16px -6px rgba(5, 150, 105, 0.25);
}
.income-card-large:hover,
.income-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(5, 150, 105, 0.3);
}
.income-card-large::before {
  background-color: rgba(5, 150, 105, 0);
}
.income-card-large:active::before {
  background-color: rgba(5, 150, 105, 0.1);
}

.expense-card-large {
  background: linear-gradient(135deg, var(--c-expense-bg) 0%, #fecaca 100%);
  color: var(--c-expense);
  box-shadow: 0 8px 16px -6px rgba(220, 38, 38, 0.25);
}
.expense-card-large:hover,
.expense-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(220, 38, 38, 0.3);
}
.expense-card-large::before {
  background-color: rgba(220, 38, 38, 0);
}
.expense-card-large:active::before {
  background-color: rgba(220, 38, 38, 0.1);
}

.card-content-large {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-16);
  width: 100%;
  padding: var(--s-32);
  text-align: center;
}

.icon-circle-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.income-icon-large {
  color: var(--c-income);
}
.expense-icon-large {
  color: var(--c-expense);
}

.text-large h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.text-large p {
  font-size: 15px;
  opacity: 0.8;
  font-weight: 500;
}

/* STEP 2: OCR */
.capture-card-large {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  box-shadow: 0 8px 16px -6px rgba(37, 99, 235, 0.25);
}
.capture-card-large:hover,
.capture-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(37, 99, 235, 0.3);
}
.capture-card-large::before {
  background-color: rgba(37, 99, 235, 0);
}
.capture-card-large:active::before {
  background-color: rgba(37, 99, 235, 0.1);
}
.capture-icon-large {
  color: #2563eb;
}

.camera-card-large {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  box-shadow: 0 8px 16px -6px rgba(75, 85, 99, 0.25);
}
.camera-card-large:hover,
.camera-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(75, 85, 99, 0.3);
}
.camera-card-large::before {
  background-color: rgba(75, 85, 99, 0);
}
.camera-card-large:active::before {
  background-color: rgba(75, 85, 99, 0.1);
}
.camera-icon-large {
  color: #4b5563;
}
.ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--s-24);
  animation: fadeIn 0.3s forwards;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--s-24);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success-circle {
  width: 64px;
  height: 64px;
  background: var(--c-income-bg);
  color: var(--c-income);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-24);
  font-size: 32px;
}
.success-circle.big {
  width: 80px;
  height: 80px;
  margin-bottom: var(--s-32);
  font-size: 40px;
}

/* STEP 3: FORM */
.form-layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  flex-grow: 1;
}
.row {
  display: flex;
  gap: var(--s-12);
}
.row .input-group {
  flex: 1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text-main);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}
.highlight-group select {
  background: var(--c-bg);
  border-color: #d1d5db;
  font-weight: 500;
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-select {
  position: absolute;
  left: 8px;
  color: var(--c-text-muted);
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  z-index: 10;
}
/* Ensure input text doesn't overlap with the wider currency dropdown */
.currency-input input {
  padding-left: 60px;
}

.toggle-optional {
  text-align: left;
  margin-top: var(--s-8);
  color: var(--c-primary);
}
.optional-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  padding-top: var(--s-8);
  animation: fadeIn 0.3s;
}

/* UTILS */
.hidden,
.hide-by-default {
  display: none !important;
}
.spacer {
  flex-grow: 1;
  min-height: var(--s-24);
}
.bottom-action {
  margin-top: auto;
}
.mt-large {
  margin-top: var(--s-24);
}

/* STEP 4: RECEIPT */
.receipt {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-24);
}
.receipt-top {
  text-align: center;
  padding-bottom: var(--s-24);
  border-bottom: 2px dashed #d1d5db;
  margin-bottom: var(--s-24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}
.tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
}
.tag.income {
  color: var(--c-income);
  background: var(--c-income-bg);
}
.tag.expense {
  color: var(--c-expense);
  background: var(--c-expense-bg);
}

.receipt-top h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.receipt-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.r-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.r-label {
  color: var(--c-text-muted);
}
.r-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* SUCCESS SCREEN */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.success-screen h1 {
  font-size: 28px;
  margin-bottom: var(--s-8);
}
.success-screen p {
  color: var(--c-text-muted);
}

/* =========================================
   MERGED FROM: flows/add_contract/style.css
   ========================================= */
/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
margin,
padding {
  margin: 0;
  padding: 0;
}
body,
h1,
h2,
h3,
p,
ul,
form {
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* GLOBAL */
/* GLOBAL MOBILE FIRST */
body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--c-bg);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background-color: var(--c-bg);
    align-items: center;
    padding: var(--s-16);
  }
  .app-container {
    max-width: 420px;
    height: 85vh;
    min-height: 600px;
    max-height: 850px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-float);
  }
}

/* USER PROFILE HEADER */
.user-profile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-bg); /* fallback */
  border: 1px solid var(--c-border);
}
.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-main);
}
.btn-logout {
  font-size: 13px;
  padding: var(--s-4) var(--s-8);
  font-weight: 600;
  color: #ef4444; /* simple red */
}
.btn-logout:hover {
  color: #dc2626;
}

/* APP HEADER (Used in Dashboard & Sub-Flows) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.greeting h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.greeting p {
  font-size: 13px;
  color: var(--c-text-muted);
}
.app-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: var(--s-24);
}

/* PROGRESS */
.progress-container {
  height: 4px;
  background: var(--c-border);
  width: 100%;
}
.progress-bar {
  height: 100%;
  background: var(--c-primary);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STEPS */
.step {
  display: none;
  flex-direction: column;
  padding: var(--s-24) var(--s-24) var(--s-32);
  height: 100%;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.step.active {
  display: flex;
}

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

/* TYPOGRAPHY */
.step-header {
  margin-bottom: var(--s-32);
}
.step-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-4);
}
.step-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
}
.btn-primary {
  background: var(--c-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.btn-secondary:hover {
  background: var(--c-bg);
}

.btn-text {
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 15px;
  padding: var(--s-8);
  transition: color 0.1s;
}
.btn-text:hover {
  color: var(--c-text-main);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: var(--s-24);
  align-self: flex-start;
  padding: var(--s-4) 0;
  margin-left: -4px;
}
.back-btn:hover {
  color: var(--c-text-main);
}

.btn-huge {
  flex-direction: column;
  padding: var(--s-40) var(--s-16);
  gap: var(--s-16);
  font-size: 18px;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-16);
}
.icon-huge {
  font-size: 32px;
}

/* STEP 1: CARDS */
.type-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
  flex-grow: 1;
}
.type-cards-large {
  gap: var(--s-24);
}
.card-btn {
  border: none;
  border-radius: var(--r-xl);
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  align-items: center;
}
.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.2s;
}

.income-card-large {
  background: linear-gradient(135deg, var(--c-income-bg) 0%, #a7f3d0 100%);
  color: var(--c-income);
  box-shadow: 0 8px 16px -6px rgba(5, 150, 105, 0.25);
}
.income-card-large:hover,
.income-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(5, 150, 105, 0.3);
}
.income-card-large::before {
  background-color: rgba(5, 150, 105, 0);
}
.income-card-large:active::before {
  background-color: rgba(5, 150, 105, 0.1);
}

.expense-card-large {
  background: linear-gradient(135deg, var(--c-expense-bg) 0%, #fecaca 100%);
  color: var(--c-expense);
  box-shadow: 0 8px 16px -6px rgba(220, 38, 38, 0.25);
}
.expense-card-large:hover,
.expense-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(220, 38, 38, 0.3);
}
.expense-card-large::before {
  background-color: rgba(220, 38, 38, 0);
}
.expense-card-large:active::before {
  background-color: rgba(220, 38, 38, 0.1);
}

.card-content-large {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-16);
  width: 100%;
  padding: var(--s-32);
  text-align: center;
}

.icon-circle-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.income-icon-large {
  color: var(--c-income);
}
.expense-icon-large {
  color: var(--c-expense);
}

.text-large h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.text-large p {
  font-size: 15px;
  opacity: 0.8;
  font-weight: 500;
}

/* STEP 2: OCR */
.capture-card-large {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  box-shadow: 0 8px 16px -6px rgba(37, 99, 235, 0.25);
}
.capture-card-large:hover,
.capture-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(37, 99, 235, 0.3);
}
.capture-card-large::before {
  background-color: rgba(37, 99, 235, 0);
}
.capture-card-large:active::before {
  background-color: rgba(37, 99, 235, 0.1);
}
.capture-icon-large {
  color: #2563eb;
}

.camera-card-large {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  box-shadow: 0 8px 16px -6px rgba(75, 85, 99, 0.25);
}
.camera-card-large:hover,
.camera-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(75, 85, 99, 0.3);
}
.camera-card-large::before {
  background-color: rgba(75, 85, 99, 0);
}
.camera-card-large:active::before {
  background-color: rgba(75, 85, 99, 0.1);
}
.camera-icon-large {
  color: #4b5563;
}
.ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--s-24);
  animation: fadeIn 0.3s forwards;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--s-24);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success-circle {
  width: 64px;
  height: 64px;
  background: var(--c-income-bg);
  color: var(--c-income);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-24);
  font-size: 32px;
}
.success-circle.big {
  width: 80px;
  height: 80px;
  margin-bottom: var(--s-32);
  font-size: 40px;
}

/* STEP 3: FORM */
.form-layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  flex-grow: 1;
}
.row {
  display: flex;
  gap: var(--s-12);
}
.row .input-group {
  flex: 1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text-main);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}
.highlight-group select {
  background: var(--c-bg);
  border-color: #d1d5db;
  font-weight: 500;
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-select {
  position: absolute;
  left: 8px;
  color: var(--c-text-muted);
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  z-index: 10;
}
/* Ensure input text doesn't overlap with the wider currency dropdown */
.currency-input input {
  padding-left: 60px;
}

.toggle-optional {
  text-align: left;
  margin-top: var(--s-8);
  color: var(--c-primary);
}
.optional-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  padding-top: var(--s-8);
  animation: fadeIn 0.3s;
}

/* UTILS */
.hidden,
.hide-by-default {
  display: none !important;
}
.spacer {
  flex-grow: 1;
  min-height: var(--s-24);
}
.bottom-action {
  margin-top: auto;
}
.mt-large {
  margin-top: var(--s-24);
}

/* STEP 4: RECEIPT */
.receipt {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-24);
}
.receipt-top {
  text-align: center;
  padding-bottom: var(--s-24);
  border-bottom: 2px dashed #d1d5db;
  margin-bottom: var(--s-24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}
.tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
}
.tag.income {
  color: var(--c-income);
  background: var(--c-income-bg);
}
.tag.expense {
  color: var(--c-expense);
  background: var(--c-expense-bg);
}

.receipt-top h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.receipt-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.r-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.r-label {
  color: var(--c-text-muted);
}
.r-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* SUCCESS SCREEN */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.success-screen h1 {
  font-size: 28px;
  margin-bottom: var(--s-8);
}
.success-screen p {
  color: var(--c-text-muted);
}

/* =========================================
   MERGED FROM: flows/add_transaction/style.css
   ========================================= */
/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
margin,
padding {
  margin: 0;
  padding: 0;
}
body,
h1,
h2,
h3,
p,
ul,
form {
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* GLOBAL */
/* GLOBAL MOBILE FIRST */
body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--c-bg);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background-color: var(--c-bg);
    align-items: center;
    padding: var(--s-16);
  }
  .app-container {
    max-width: 420px;
    height: 85vh;
    min-height: 600px;
    max-height: 850px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-float);
  }
}

/* USER PROFILE HEADER */
.user-profile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-bg); /* fallback */
  border: 1px solid var(--c-border);
}
.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-main);
}
.btn-logout {
  font-size: 13px;
  padding: var(--s-4) var(--s-8);
  font-weight: 600;
  color: #ef4444; /* simple red */
}
.btn-logout:hover {
  color: #dc2626;
}

/* APP HEADER (Used in Dashboard & Sub-Flows) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.greeting h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.greeting p {
  font-size: 13px;
  color: var(--c-text-muted);
}
.app-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: var(--s-24);
}

/* PROGRESS */
.progress-container {
  height: 4px;
  background: var(--c-border);
  width: 100%;
}
.progress-bar {
  height: 100%;
  background: var(--c-primary);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STEPS */
.step {
  display: none;
  flex-direction: column;
  padding: var(--s-24) var(--s-24) var(--s-32);
  height: 100%;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.step.active {
  display: flex;
}

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

/* TYPOGRAPHY */
.step-header {
  margin-bottom: var(--s-32);
}
.step-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-4);
}
.step-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
}
.btn-primary {
  background: var(--c-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.btn-secondary:hover {
  background: var(--c-bg);
}

.btn-text {
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 15px;
  padding: var(--s-8);
  transition: color 0.1s;
}
.btn-text:hover {
  color: var(--c-text-main);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: var(--s-24);
  align-self: flex-start;
  padding: var(--s-4) 0;
  margin-left: -4px;
}
.back-btn:hover {
  color: var(--c-text-main);
}

.btn-huge {
  flex-direction: column;
  padding: var(--s-40) var(--s-16);
  gap: var(--s-16);
  font-size: 18px;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-16);
}
.icon-huge {
  font-size: 32px;
}

/* STEP 1: CARDS */
.type-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
  flex-grow: 1;
}
.type-cards-large {
  gap: var(--s-24);
}
.card-btn {
  border: none;
  border-radius: var(--r-xl);
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  align-items: center;
}
.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.2s;
}

.income-card-large {
  background: linear-gradient(135deg, var(--c-income-bg) 0%, #a7f3d0 100%);
  color: var(--c-income);
  box-shadow: 0 8px 16px -6px rgba(5, 150, 105, 0.25);
}
.income-card-large:hover,
.income-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(5, 150, 105, 0.3);
}
.income-card-large::before {
  background-color: rgba(5, 150, 105, 0);
}
.income-card-large:active::before {
  background-color: rgba(5, 150, 105, 0.1);
}

.expense-card-large {
  background: linear-gradient(135deg, var(--c-expense-bg) 0%, #fecaca 100%);
  color: var(--c-expense);
  box-shadow: 0 8px 16px -6px rgba(220, 38, 38, 0.25);
}
.expense-card-large:hover,
.expense-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(220, 38, 38, 0.3);
}
.expense-card-large::before {
  background-color: rgba(220, 38, 38, 0);
}
.expense-card-large:active::before {
  background-color: rgba(220, 38, 38, 0.1);
}

.card-content-large {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-16);
  width: 100%;
  padding: var(--s-32);
  text-align: center;
}

.icon-circle-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.income-icon-large {
  color: var(--c-income);
}
.expense-icon-large {
  color: var(--c-expense);
}

.text-large h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.text-large p {
  font-size: 15px;
  opacity: 0.8;
  font-weight: 500;
}

/* STEP 2: OCR */
.capture-card-large {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  box-shadow: 0 8px 16px -6px rgba(37, 99, 235, 0.25);
}
.capture-card-large:hover,
.capture-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(37, 99, 235, 0.3);
}
.capture-card-large::before {
  background-color: rgba(37, 99, 235, 0);
}
.capture-card-large:active::before {
  background-color: rgba(37, 99, 235, 0.1);
}
.capture-icon-large {
  color: #2563eb;
}

.camera-card-large {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  box-shadow: 0 8px 16px -6px rgba(75, 85, 99, 0.25);
}
.camera-card-large:hover,
.camera-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(75, 85, 99, 0.3);
}
.camera-card-large::before {
  background-color: rgba(75, 85, 99, 0);
}
.camera-card-large:active::before {
  background-color: rgba(75, 85, 99, 0.1);
}
.camera-icon-large {
  color: #4b5563;
}
.ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--s-24);
  animation: fadeIn 0.3s forwards;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--s-24);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success-circle {
  width: 64px;
  height: 64px;
  background: var(--c-income-bg);
  color: var(--c-income);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-24);
  font-size: 32px;
}
.success-circle.big {
  width: 80px;
  height: 80px;
  margin-bottom: var(--s-32);
  font-size: 40px;
}

/* STEP 3: FORM */
.form-layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  flex-grow: 1;
}
.row {
  display: flex;
  gap: var(--s-12);
}
.row .input-group {
  flex: 1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text-main);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}
.highlight-group select {
  background: var(--c-bg);
  border-color: #d1d5db;
  font-weight: 500;
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-select {
  position: absolute;
  left: 8px;
  color: var(--c-text-muted);
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  z-index: 10;
}
/* Ensure input text doesn't overlap with the wider currency dropdown */
.currency-input input {
  padding-left: 60px;
}

.toggle-optional {
  text-align: left;
  margin-top: var(--s-8);
  color: var(--c-primary);
}
.optional-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  padding-top: var(--s-8);
  animation: fadeIn 0.3s;
}

/* UTILS */
.hidden,
.hide-by-default {
  display: none !important;
}
.spacer {
  flex-grow: 1;
  min-height: var(--s-24);
}
.bottom-action {
  margin-top: auto;
}
.mt-large {
  margin-top: var(--s-24);
}

/* STEP 4: RECEIPT */
.receipt {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-24);
}
.receipt-top {
  text-align: center;
  padding-bottom: var(--s-24);
  border-bottom: 2px dashed #d1d5db;
  margin-bottom: var(--s-24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}
.tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
}
.tag.income {
  color: var(--c-income);
  background: var(--c-income-bg);
}
.tag.expense {
  color: var(--c-expense);
  background: var(--c-expense-bg);
}

.receipt-top h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.receipt-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.r-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.r-label {
  color: var(--c-text-muted);
}
.r-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* SUCCESS SCREEN */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.success-screen h1 {
  font-size: 28px;
  margin-bottom: var(--s-8);
}
.success-screen p {
  color: var(--c-text-muted);
}

/* =========================================
   MERGED FROM: flows/add_unit/style.css
   ========================================= */
/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
margin,
padding {
  margin: 0;
  padding: 0;
}
body,
h1,
h2,
h3,
p,
ul,
form {
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* GLOBAL */
/* GLOBAL MOBILE FIRST */
body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

.app-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--c-bg);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    background-color: var(--c-bg);
    align-items: center;
    padding: var(--s-16);
  }
  .app-container {
    max-width: 420px;
    height: 85vh;
    min-height: 600px;
    max-height: 850px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-float);
  }
}

/* USER PROFILE HEADER */
.user-profile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-bg); /* fallback */
  border: 1px solid var(--c-border);
}
.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text-main);
}
.btn-logout {
  font-size: 13px;
  padding: var(--s-4) var(--s-8);
  font-weight: 600;
  color: #ef4444; /* simple red */
}
.btn-logout:hover {
  color: #dc2626;
}

/* APP HEADER (Used in Dashboard & Sub-Flows) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-24);
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.greeting h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.greeting p {
  font-size: 13px;
  color: var(--c-text-muted);
}
.app-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: var(--s-24);
}

/* PROGRESS */
.progress-container {
  height: 4px;
  background: var(--c-border);
  width: 100%;
}
.progress-bar {
  height: 100%;
  background: var(--c-primary);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STEPS */
.step {
  display: none;
  flex-direction: column;
  padding: var(--s-24) var(--s-24) var(--s-32);
  height: 100%;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.step.active {
  display: flex;
}

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

/* TYPOGRAPHY */
.step-header {
  margin-bottom: var(--s-32);
}
.step-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-4);
}
.step-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px var(--s-16);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
}
.btn-primary {
  background: var(--c-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.btn-secondary:hover {
  background: var(--c-bg);
}

.btn-text {
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 15px;
  padding: var(--s-8);
  transition: color 0.1s;
}
.btn-text:hover {
  color: var(--c-text-main);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: var(--s-24);
  align-self: flex-start;
  padding: var(--s-4) 0;
  margin-left: -4px;
}
.back-btn:hover {
  color: var(--c-text-main);
}

.btn-huge {
  flex-direction: column;
  padding: var(--s-40) var(--s-16);
  gap: var(--s-16);
  font-size: 18px;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-16);
}
.icon-huge {
  font-size: 32px;
}

/* STEP 1: CARDS */
.type-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
  flex-grow: 1;
}
.type-cards-large {
  gap: var(--s-24);
}
.card-btn {
  border: none;
  border-radius: var(--r-xl);
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  align-items: center;
}
.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.2s;
}

.income-card-large {
  background: linear-gradient(135deg, var(--c-income-bg) 0%, #a7f3d0 100%);
  color: var(--c-income);
  box-shadow: 0 8px 16px -6px rgba(5, 150, 105, 0.25);
}
.income-card-large:hover,
.income-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(5, 150, 105, 0.3);
}
.income-card-large::before {
  background-color: rgba(5, 150, 105, 0);
}
.income-card-large:active::before {
  background-color: rgba(5, 150, 105, 0.1);
}

.expense-card-large {
  background: linear-gradient(135deg, var(--c-expense-bg) 0%, #fecaca 100%);
  color: var(--c-expense);
  box-shadow: 0 8px 16px -6px rgba(220, 38, 38, 0.25);
}
.expense-card-large:hover,
.expense-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(220, 38, 38, 0.3);
}
.expense-card-large::before {
  background-color: rgba(220, 38, 38, 0);
}
.expense-card-large:active::before {
  background-color: rgba(220, 38, 38, 0.1);
}

.card-content-large {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-16);
  width: 100%;
  padding: var(--s-32);
  text-align: center;
}

.icon-circle-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.income-icon-large {
  color: var(--c-income);
}
.expense-icon-large {
  color: var(--c-expense);
}

.text-large h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.text-large p {
  font-size: 15px;
  opacity: 0.8;
  font-weight: 500;
}

/* STEP 2: OCR */
.capture-card-large {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  box-shadow: 0 8px 16px -6px rgba(37, 99, 235, 0.25);
}
.capture-card-large:hover,
.capture-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(37, 99, 235, 0.3);
}
.capture-card-large::before {
  background-color: rgba(37, 99, 235, 0);
}
.capture-card-large:active::before {
  background-color: rgba(37, 99, 235, 0.1);
}
.capture-icon-large {
  color: #2563eb;
}

.camera-card-large {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  box-shadow: 0 8px 16px -6px rgba(75, 85, 99, 0.25);
}
.camera-card-large:hover,
.camera-card-large:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(75, 85, 99, 0.3);
}
.camera-card-large::before {
  background-color: rgba(75, 85, 99, 0);
}
.camera-card-large:active::before {
  background-color: rgba(75, 85, 99, 0.1);
}
.camera-icon-large {
  color: #4b5563;
}
.ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--s-24);
  animation: fadeIn 0.3s forwards;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--s-24);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success-circle {
  width: 64px;
  height: 64px;
  background: var(--c-income-bg);
  color: var(--c-income);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-24);
  font-size: 32px;
}
.success-circle.big {
  width: 80px;
  height: 80px;
  margin-bottom: var(--s-32);
  font-size: 40px;
}

/* STEP 3: FORM */
.form-layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  flex-grow: 1;
}
.row {
  display: flex;
  gap: var(--s-12);
}
.row .input-group {
  flex: 1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text-main);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}
.highlight-group select {
  background: var(--c-bg);
  border-color: #d1d5db;
  font-weight: 500;
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-select {
  position: absolute;
  left: 8px;
  color: var(--c-text-muted);
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  z-index: 10;
}
/* Ensure input text doesn't overlap with the wider currency dropdown */
.currency-input input {
  padding-left: 60px;
}

.toggle-optional {
  text-align: left;
  margin-top: var(--s-8);
  color: var(--c-primary);
}
.optional-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  padding-top: var(--s-8);
  animation: fadeIn 0.3s;
}

/* UTILS */
.hidden,
.hide-by-default {
  display: none !important;
}
.spacer {
  flex-grow: 1;
  min-height: var(--s-24);
}
.bottom-action {
  margin-top: auto;
}
.mt-large {
  margin-top: var(--s-24);
}

/* STEP 4: RECEIPT */
.receipt {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-24);
}
.receipt-top {
  text-align: center;
  padding-bottom: var(--s-24);
  border-bottom: 2px dashed #d1d5db;
  margin-bottom: var(--s-24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}
.tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
}
.tag.income {
  color: var(--c-income);
  background: var(--c-income-bg);
}
.tag.expense {
  color: var(--c-expense);
  background: var(--c-expense-bg);
}

.receipt-top h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.receipt-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.r-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.r-label {
  color: var(--c-text-muted);
}
.r-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* SUCCESS SCREEN */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.success-screen h1 {
  font-size: 28px;
  margin-bottom: var(--s-8);
}
.success-screen p {
  color: var(--c-text-muted);
}

/* =========================================
   MERGED FROM: sections/client/styles.css
   ========================================= */
/* Base resets & adjustments */
.profile-container {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

.profile-container .app-header {
  border-bottom: none;
}
.profile-content {
  padding: 0 var(--s-24) var(--s-32);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* HEADER */
.profile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--s-8) var(--s-24);
}
.icon-btn {
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.icon-btn:hover {
  color: var(--c-text-main);
}
.back-button {
  margin-left: -8px; /* Optical alignment */
}

/* USER DETAILS */
.user-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -36px;
  animation: fadeInDown 0.4s ease forwards;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s-8);
}
.profile-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-4);
}
.vip-badge {
  background: #1e3a8a; /* Regal blue for premium feel */
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* BALANCE */
.balance-section {
  text-align: center;
  margin-top: var(--s-16);
  width: 100%;
}
.balance-label {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: var(--s-4);
}
.balance-amount {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* DIVIDER */
.divider {
  width: 100%;
  height: 1px;
  background: var(--c-border);
  margin: var(--s-16) 0;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--s-16);
}
.text-center {
  text-align: center;
}

/* CAROUSEL */
.properties-section {
  width: 100%;
  position: relative;
}
.properties-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-12);
  margin-bottom: var(--s-16);
}
.count-bubble {
  background-color: #3C6B7E;
  color: #FFFFFF;
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 600;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px; /* Visual compensation for Poppins numbers sitting high */
  box-sizing: border-box;
}
.carousel-container {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  position: relative;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  border-radius: var(--r-lg);
  flex-grow: 1;
  box-shadow: var(--shadow-md);
}
.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
.carousel-slide {
  scroll-snap-align: center;
  flex: 0 0 100%;
  position: relative;
  aspect-ratio: 16 / 9;
}
.property-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.property-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px var(--s-16) var(--s-16);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
  text-align: center;
}
.property-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.property-location {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--s-16);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-border);
  transition: background 0.2s;
}
.dot.active {
  background: var(--c-primary);
}

/* ACTION GRID */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-12);
  width: 100%;
}
.action-btn {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--s-16) var(--s-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-12);
  color: var(--c-text-main);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.action-btn:hover,
.action-btn:active {
  background: var(--c-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.action-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RECENT TRANSACTIONS */
.transactions-section {
  width: 100%;
  margin-top: var(--s-24);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-24) var(--s-16);
}
.transaction-list {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--s-16);
}
.t-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-12) 0;
  border-bottom: 1px solid var(--c-border);
}
.t-row:last-child {
  border-bottom: none;
}
.t-name {
  font-size: 14px;
  font-weight: 500;
}
.t-right {
  text-align: right;
}
.t-amount {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.t-date {
  font-size: 11px;
  color: var(--c-text-muted);
}

/* Standard semantic colors */
.t-amount.income {
  color: var(--c-income);
}
.t-amount.expense {
  color: var(--c-expense);
}

/* VIEW MORE BTN */
.btn-view-more {
  width: 100%;
  padding: var(--s-12);
  background: var(--c-surface);
  color: var(--c-text-main);
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  transition: all 0.2s;
  border: 1px solid var(--c-border);
}
.btn-view-more:hover {
  background: var(--c-bg);
  color: var(--c-text-main);
}

/* ANIMATIONS */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   MERGED FROM: sections/contract/styles.css
   ========================================= */
/* Contracts specific styles */
/* Global styles are loaded via ../../style.css in index.html for reusability */

/* =========================================
   MERGED FROM: sections/document/styles.css
   ========================================= */
/* Documents specific styles */
/* Global styles are loaded via ../../style.css in index.html for reusability */

/* =========================================
   MERGED FROM: sections/transaction/styles.css
   ========================================= */
/* Transactions specific styles */
/* Global styles are loaded via ../../style.css in index.html for reusability */

/* =========================================
   MERGED FROM: sections/unit/styles.css
   ========================================= */
/* Units specific styles */
/* Global styles are loaded via ../../style.css in index.html for reusability */

/* =========================================
   DASHBOARD ACTION CARDS (SPLIT BUTTONS)
   ========================================= */
.dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
  width: 100%;
  padding-bottom: var(--s-16);
}

.action-card-split {
  display: flex;
  align-items: stretch;
  background-color: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  color: var(--c-text-main);
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  border: 1px solid var(--c-border);
  min-height: 140px;
  position: relative;
}

.action-card-split:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: var(--c-primary-hover);
}

.action-card-split:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.action-card-split-image {
  flex: 0 0 50%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.action-card-split-image::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(to right, transparent, var(--c-surface));
}

.action-card-split-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-16);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  text-align: center;
  line-height: var(--leading-tight);
  z-index: 1;
}

@media (max-width: 400px) {
  .action-card-split-content {
    font-size: var(--text-2xl);
    padding: var(--s-12);
  }
}

.bg-img-transaction {
  background-image: url("https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&q=80&w=600");
}
.bg-img-client {
  background-image: url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&q=80&w=600");
}
.bg-img-property {
  background-image: url("https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&q=80&w=600");
}

/* =========================================
   DASHBOARD NEW LAYOUT (WIDGETS & ACTIONS)
   ========================================= */

.app-dashboard-content {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
}

/* 1. Stats Row */
.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-16);
  width: 100%;
}

.stat-widget {
  border-radius: 36px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-normal);
}

.stat-widget:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.bg-widget-units {
  background-color: #CBE5ED;
  color: #1C404E;
}

.bg-widget-clients {
  background-color: #DCE1F8;
  color: #1B1F4C;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.stat-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
}

.stat-icon-svg {
  width: 24px;
  height: 24px;
}

.stat-value {
  font-family: var(--font-sans);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
}

/* 2. Section Header */
.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: calc(var(--s-16) * -1); /* Pull down relative to gap */
}

.section-title {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  color: var(--c-text-main);
  letter-spacing: -0.01em;
}

/* 3. Quick Actions */
.dashboard-quick-actions {
  display: flex;
  overflow-x: auto;
  gap: var(--s-16);
  width: 100%;
  padding-bottom: var(--s-8); /* Room for scroll hints */
  scrollbar-width: none; /* Firefox */
  flex-shrink: 0;
}
.dashboard-quick-actions::-webkit-scrollbar {
  display: none; /* Hide scrollbar in Chrome/Safari */
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: var(--s-8);
  flex: 0 0 auto;
  text-decoration: none;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  color: var(--c-text-main);
  transition: all var(--transition-normal);
}

.quick-action-btn:hover {
  transform: translateY(-2px);
}

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

.qa-icon {
  width: 90px;
  height: 90px;
  min-width: 90px;
  min-height: 90px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 4px solid #DDE9E9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: transparent;
  transition: all var(--transition-normal);
}

.qa-icon svg {
  width: 32px;
  height: 32px;
  color: var(--c-primary);
}

.qa-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.quick-action-btn:hover .qa-image {
  transform: scale(1.1);
}

.qa-label {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

/* 4. Utility Classes */
.mt-16 {
  margin-top: var(--s-16) !important;
}

/* 5. Recent Activity List */
.activity-widget {
  background-color: #1E1E1E;
  border-radius: 36px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-shrink: 0;
}

.activity-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.activity-widget-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
}

.activity-widget-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.activity-widget-date {
  font-size: 28px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 20px;
}

.activity-widget-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-widget-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.activity-widget-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-item-title {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #52B0D3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}

.activity-item-meta {
  font-size: 12px;
  font-weight: 400;
  color: #A1A1A1;
  white-space: nowrap;
}

/* =========================================
   MODAL SPECIFIC STYLES
   ========================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--c-overlay);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: flex !important;
}

.modal-content {
  position: relative;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  width: 90%;
  max-width: 500px;
  max-height: 95vh;
  height: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(0);
  transition: transform 0.3s;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.modal-overlay.hidden .modal-content {
  transform: translateY(20px);
}

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

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 16px var(--s-24) var(--s-24);
  overflow-y: auto;
}

.document-preview-container {
  width: 100%;
  height: 140px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  background: var(--c-bg);
  cursor: pointer;
  border: 1px solid var(--c-border);
  transition: height 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-preview-container.expanded {
  height: 300px;
}

.document-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.expand-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.8;
}

.data-form .form-group {
  margin-bottom: 10px;
}

.data-form label {
  display: block;
  font-size: 10px;
  color: var(--c-text-muted);
  margin-bottom: 2px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-form .input-field {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg);
  color: var(--c-text-main);
  font-size: 13px;
  font-weight: 500;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  height: 36px;
}

.data-form .input-field:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-focus);
}

.data-form .double-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.data-form .btn-block {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  height: 44px;
  border-radius: var(--r-md);
}
