/* ============================================
   BUDGET APP — Nordic Finance Theme
   ============================================ */

:root {
  /* Core palette */
  --bg-deep: #0c0e14;
  --bg-base: #111318;
  --bg-surface: #181b22;
  --bg-elevated: #1f2230;
  --bg-hover: #262a3a;
  --bg-active: #2d3248;

  /* Borders */
  --border: #2a2e3e;
  --border-light: #222638;
  --border-focus: var(--accent);

  /* Text */
  --text-primary: #e4e6ed;
  --text-secondary: #858a9e;
  --text-muted: #555a6e;
  --text-inverse: #0c0e14;

  /* Accent — warm gold */
  --accent: #c9a54a;
  --accent-hover: #dbb85c;
  --accent-muted: rgba(201, 165, 74, 0.15);
  --accent-text: #c9a54a;

  /* Status */
  --success: #3fa672;
  --success-bg: rgba(63, 166, 114, 0.12);
  --danger: #d94f4f;
  --danger-bg: rgba(217, 79, 79, 0.12);
  --warning: #d4943a;
  --warning-bg: rgba(212, 148, 58, 0.12);
  --info: #4f8fd9;
  --info-bg: rgba(79, 143, 217, 0.12);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-body: 'Commissioner', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(201, 165, 74, 0.15);

  /* Sidebar */
  --sidebar-width: 260px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LIGHT THEME
   ============================================ */

body.theme-light {
  --bg-deep: #f0f2f5;
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #f7f8fa;
  --bg-hover: #eef0f4;
  --bg-active: #e2e5ec;

  --border: #e0e2e8;
  --border-light: #eaedf2;

  --text-primary: #1a1d26;
  --text-secondary: #555a6e;
  --text-muted: #8b8fa3;
  --text-inverse: #ffffff;

  --accent-muted: rgba(201, 165, 74, 0.10);

  --success-bg: rgba(63, 166, 114, 0.08);
  --danger-bg: rgba(217, 79, 79, 0.08);
  --warning-bg: rgba(212, 148, 58, 0.08);
  --info-bg: rgba(79, 143, 217, 0.08);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 20px rgba(201, 165, 74, 0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  padding: 0;
}
.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent-muted);
}
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
body.theme-light .theme-toggle .icon-sun { display: block; }
body.theme-light .theme-toggle .icon-moon { display: none; }

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

::selection {
  background: var(--accent);
  color: var(--text-inverse);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   APP LAYOUT
   ============================================ */

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-base);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), min-width 0.3s var(--ease), width 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  z-index: 100;
}

.sidebar.collapsed {
  width: 0;
  min-width: 0;
  transform: translateX(-100%);
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border-radius: var(--radius-md);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-sm);
}

.nav-section {
  margin-bottom: var(--space-lg);
}

.nav-label {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 450;
  font-size: 0.93rem;
  transition: all 0.15s var(--ease);
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-muted);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 10px;
  background: var(--info);
  color: white;
}

.nav-badge:empty { display: none; }

.nav-badge--warn {
  background: var(--warning);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.user-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.user-card:hover { background: var(--bg-hover); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8a6f2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-base);
  min-height: 60px;
  gap: var(--space-md);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Period Selector */
.period-selector {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}

.period-label {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 var(--space-md);
  min-width: 130px;
  text-align: center;
  color: var(--text-primary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
  line-height: 1.4;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-glow);
}

.btn--secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: transparent;
}

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

.btn--success {
  background: var(--success-bg);
  color: var(--success);
  border-color: transparent;
}

.btn--success:hover {
  background: var(--success);
  color: white;
}

.btn--sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xl);
  background: var(--bg-deep);
}

/* ============================================
   CARDS & STATS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}

.stat-card:hover {
  border-color: var(--border);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, var(--accent));
  opacity: 0.6;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.stat-change {
  font-family: var(--font-mono);
  font-weight: 500;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* ============================================
   SECTION PANELS
   ============================================ */

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-body {
  padding: var(--space-lg);
}

.panel-body--flush {
  padding: 0;
}

/* ============================================
   TABLES
   ============================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  padding: 10px var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.1s var(--ease);
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr:hover td {
  color: var(--text-primary);
}

.data-table .num {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table .num.positive { color: var(--success); }
.data-table .num.negative { color: var(--danger); }

.data-table .group-row td {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.87rem;
  cursor: pointer;
}

.data-table .group-row td:first-child::before {
  content: '▸';
  display: inline-block;
  margin-right: var(--space-sm);
  transition: transform 0.2s var(--ease);
  color: var(--text-muted);
}

.data-table .group-row.expanded td:first-child::before {
  transform: rotate(90deg);
}

.data-table .total-row td {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-top: 2px solid var(--border);
  font-size: 0.9rem;
}

.data-table .indent-1 td:first-child { padding-left: 36px; }
.data-table .indent-2 td:first-child { padding-left: 56px; }

.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 240px);
}

/* ============================================
   STATUS BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge--draft { background: var(--bg-elevated); color: var(--text-muted); }
.badge--draft::before { background: var(--text-muted); }

.badge--pending { background: var(--warning-bg); color: var(--warning); }
.badge--pending::before { background: var(--warning); }

.badge--approved { background: var(--success-bg); color: var(--success); }
.badge--approved::before { background: var(--success); }

.badge--rejected { background: var(--danger-bg); color: var(--danger); }
.badge--rejected::before { background: var(--danger); }

.badge--paid { background: var(--info-bg); color: var(--info); }
.badge--paid::before { background: var(--info); }

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23858a9e' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

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

/* Autocomplete dropdown */
.ac-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.ac-item {
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s var(--ease);
}

.ac-item:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.ac-item:last-child {
  border-bottom: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.form-inline-input {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  width: 100%;
  outline: none;
  transition: all 0.15s var(--ease);
}

.form-inline-input:hover {
  border-color: var(--border);
}

.form-inline-input:focus {
  border-color: var(--accent);
  background: var(--bg-deep);
}

.form-inline-input.num-input {
  font-family: var(--font-mono);
  text-align: right;
}

/* ============================================
   FILTERS BAR
   ============================================ */

.filters-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  font-family: var(--font-body);
}

.filter-chip:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 36px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s var(--ease);
}

.search-box input:focus {
  border-color: var(--accent);
}

/* ============================================
   TABS
   ============================================ */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--space-lg);
}

.tab {
  padding: 12px var(--space-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  font-family: var(--font-body);
  transition: color 0.15s var(--ease);
}

.tab:hover { color: var(--text-secondary); }

.tab.active {
  color: var(--accent);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease);
}

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

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-light);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  animation: toastIn 0.3s var(--ease), toastOut 0.3s var(--ease) 2.7s forwards;
  min-width: 280px;
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }
.toast--warning { border-left: 3px solid var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ============================================
   BUDGET PLAN — EDITABLE TABLE
   ============================================ */

.plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.plan-toolbar .responsible-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.responsible-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  font-family: var(--font-body);
}

.responsible-chip:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.responsible-chip.active {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.plan-summary {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
}

.plan-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-summary-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.plan-summary-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Plan View Toggle ── */

.plan-view-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-md);
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
}

.plan-view-btn {
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.plan-view-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.plan-view-btn.active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

/* ── Year Plan Table ── */

.year-table-scroll {
  max-height: 75vh;
}

.year-table {
  border-collapse: separate;
  border-spacing: 0;
}

.year-table th,
.year-table td {
  padding: 6px 10px;
  white-space: nowrap;
}

.year-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface);
}

.year-sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-surface);
  min-width: 220px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-table thead th.year-sticky-col {
  z-index: 3;
}

.year-month-col {
  text-align: right;
  min-width: 72px;
  font-size: 0.8rem;
}

.year-num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.year-month-current {
  background: var(--accent-muted) !important;
}

.year-total-col {
  text-align: right;
  font-weight: 600;
  min-width: 80px;
  border-left: 2px solid var(--border);
}

.year-group-row td {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.year-group-row td.year-sticky-col {
  background: var(--bg-elevated);
}

.year-group-row td.year-month-current {
  background: color-mix(in srgb, var(--accent-muted) 60%, var(--bg-elevated));
}

.year-item-row td {
  color: var(--text-secondary);
}

.year-item-row:hover td {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.year-item-indent {
  padding-left: 28px !important;
}

.year-grand-total-row td {
  font-weight: 600;
  color: var(--text-primary);
  border-top: 2px solid var(--accent);
  background: var(--bg-elevated);
  font-size: 0.85rem;
}

.year-grand-total-row td.year-sticky-col {
  background: var(--bg-elevated);
}

.year-grand-total-row td.year-month-current {
  background: color-mix(in srgb, var(--accent-muted) 60%, var(--bg-elevated));
}

/* Editable row actions */
.row-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}

tr:hover .row-actions {
  opacity: 1;
}

.row-actions .btn-icon {
  width: 26px;
  height: 26px;
}

/* Add row button */
.add-row-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-lg);
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  border-top: 1px dashed var(--border);
}

.add-row-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

/* ============================================
   PLAN-FACT BARS
   ============================================ */

.pf-bar-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 140px;
}

.pf-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.pf-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s var(--ease);
}

.pf-bar-fill.ok { background: var(--success); }
.pf-bar-fill.warn { background: var(--warning); }
.pf-bar-fill.over { background: var(--danger); }

.pf-percent {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  min-width: 42px;
  text-align: right;
}

/* ============================================
   DASHBOARD SPECIFICS
   ============================================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

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

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.created { background: var(--info); }
.activity-dot.approved { background: var(--success); }
.activity-dot.rejected { background: var(--danger); }
.activity-dot.paid { background: var(--accent); }

.activity-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.activity-text strong {
  color: var(--text-primary);
  font-weight: 500;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Budget category bars */
.budget-bar-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 8px 0;
}

.budget-bar-label {
  flex: 0 0 180px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.budget-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width 0.8s var(--ease);
}

.budget-bar-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-width: 90px;
  text-align: right;
  color: var(--text-muted);
}

/* ============================================
   APPROVAL CARD
   ============================================ */

.approval-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: border-color 0.2s var(--ease);
}

.approval-card:hover {
  border-color: var(--accent);
}

.approval-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.approval-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.approval-card-amount {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.approval-card-meta {
  display: flex;
  gap: var(--space-lg);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.approval-card-meta dt {
  color: var(--text-muted);
}

.approval-card-meta dd {
  color: var(--text-secondary);
  font-weight: 500;
}

.approval-actions {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* ============================================
   DIRECTORIES - TREE VIEW
   ============================================ */

.tree-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 7px var(--space-md);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.1s var(--ease);
  font-size: 0.85rem;
}

.tree-item:hover { background: var(--bg-hover); }

.tree-item.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.tree-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}

.tree-toggle.expanded { transform: rotate(90deg); }
.tree-toggle.empty { visibility: hidden; }

.tree-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.tree-children {
  padding-left: 24px;
}

.tree-children.hidden { display: none; }

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
}

.empty-state svg {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    z-index: 200;
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  .topbar { padding: var(--space-md); }
  .content { padding: var(--space-md); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

.animate-in {
  animation: slideUp 0.35s var(--ease) both;
}

.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.05s; }
.animate-in:nth-child(3) { animation-delay: 0.1s; }
.animate-in:nth-child(4) { animation-delay: 0.15s; }
.animate-in:nth-child(5) { animation-delay: 0.2s; }

/* ============================================
   UTILITIES
   ============================================ */

/* ============================================
   PAYMENT CALENDAR
   ============================================ */

.cal-grid-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cal-table th {
  padding: 10px var(--space-sm);
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cal-table th.cal-weekend {
  color: var(--text-muted);
  opacity: 0.7;
}

.cal-table th.cal-week-total {
  width: 100px;
  color: var(--accent-text);
}

.cal-cell {
  border: 1px solid var(--border-light);
  vertical-align: top;
  padding: var(--space-xs);
  min-height: 90px;
  height: 110px;
  background: var(--bg-surface);
  transition: background 0.15s var(--ease);
}

.cal-cell--empty {
  background: var(--bg-base);
  border-color: transparent;
}

.cal-cell--weekend {
  background: var(--bg-base);
}

.cal-cell--today {
  background: rgba(201, 165, 74, 0.06);
  border-color: var(--accent);
}

.cal-cell--has-entries:hover {
  background: var(--bg-hover);
}

.cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  padding: 0 2px;
}

.cal-day-num {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1;
}

.cal-today-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 0.78rem;
}

.cal-day-total {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.cal-day-entries {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.cal-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.7rem;
  line-height: 1.3;
  cursor: pointer;
  transition: opacity 0.15s var(--ease), transform 0.1s var(--ease);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-left: 3px solid transparent;
}

.cal-entry:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.cal-entry--pending {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  border-left-color: #9ca3af;
  opacity: 0.4;
}

.cal-entry--pending .cal-entry-pending-label,
.cal-entry--pending .cal-week-entry-pending-label {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.8;
  white-space: nowrap;
  flex-shrink: 0;
}

.cal-entry--approved {
  background: var(--info-bg);
  color: var(--info);
  border-left-color: var(--info);
}

.cal-entry--paid {
  background: var(--success-bg);
  color: var(--success);
  border-left-color: var(--success);
}

.cal-entry--rejected {
  background: var(--danger-bg);
  color: var(--danger);
  border-left-color: var(--danger);
  opacity: 0.6;
  display: none;
}

.cal-entry-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.cal-entry-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-entry-more {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 1px 5px;
  text-align: center;
  cursor: default;
}

.cal-week-total-cell {
  background: var(--bg-elevated);
  text-align: center;
  vertical-align: middle;
  border-color: var(--border-light);
}

.cal-week-total-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-text);
}

.cal-totals-row td {
  background: var(--bg-elevated);
  border-top: 2px solid var(--border);
  padding: var(--space-md);
}

.cal-month-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.cal-month-total-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Calendar: View toggle tabs ── */

.cal-view-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cal-view-tab {
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.cal-view-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.cal-view-tab--active {
  background: var(--accent-muted);
  color: var(--accent);
}

/* ── Calendar: Week navigation bar ── */

.cal-week-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-elevated);
}

.cal-week-nav-btn {
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.cal-week-nav-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.cal-week-nav-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.cal-week-nav-total {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Calendar: Week grid (7 columns) ── */

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  min-height: 400px;
}

.cal-week-col {
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.cal-week-col:last-child {
  border-right: none;
}

.cal-week-col--today {
  background: rgba(201, 165, 74, 0.04);
}

.cal-week-col--today .cal-week-col-header {
  background: rgba(201, 165, 74, 0.10);
  border-bottom-color: var(--accent);
}

.cal-week-col--weekend {
  background: var(--bg-base);
}

.cal-week-col--outside {
  opacity: 0.4;
}

.cal-week-col-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xs);
  background: var(--bg-elevated);
  border-bottom: 2px solid var(--border);
  text-align: center;
}

.cal-week-col-day {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cal-week-col-date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.cal-week-col-total {
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-text);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-week-col-entries {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cal-week-entry {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s var(--ease), transform 0.1s var(--ease);
}

.cal-week-entry:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.cal-week-entry-contragent {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-week-entry-amount {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 1px;
}

.cal-week-entry-comment {
  font-size: 0.68rem;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

.cal-week-entry-empty {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-md) 0;
  font-style: italic;
}

@media (max-width: 1100px) {
  .cal-cell {
    min-height: 70px;
    height: 80px;
  }
  .cal-entry {
    font-size: 0.65rem;
  }
  .cal-week-grid {
    grid-template-columns: repeat(7, minmax(100px, 1fr));
    overflow-x: auto;
  }
  .cal-week-col {
    min-width: 100px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-accent { color: var(--accent-text); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.fw-600 { font-weight: 600; }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.gap-sm { gap: var(--space-sm); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* ============================================
   BANK IMPORT PAGE
   ============================================ */

.bank-import-page {
  animation: fadeIn 0.3s var(--ease);
}

.bank-import-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
}

.bank-import-empty-icon {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.bank-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  flex-wrap: wrap;
}

.bank-actions-right {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Bank table */
.bank-table {
  font-size: 0.85rem;
}

.bank-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface);
}

/* Day header rows */
.bank-day-header td {
  background: var(--bg-elevated) !important;
  padding: var(--space-sm) var(--space-md) !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 600;
  font-size: 0.82rem;
}

.bank-day-label {
  color: var(--text-primary);
  text-transform: capitalize;
}

.bank-day-total {
  float: right;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Row status styling */
.bank-row--auto {
  border-left: 3px solid var(--success);
}

.bank-row--review {
  border-left: 3px solid var(--warning);
}

.bank-row--manual {
  border-left: 3px solid var(--info);
}

.bank-row--skipped {
  border-left: 3px solid var(--border);
  opacity: 0.5;
}

.bank-row--skipped:hover {
  opacity: 0.8;
}

/* Status indicators */
.bank-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.bank-status--auto {
  background: var(--success-bg);
  color: var(--success);
}

.bank-status--review {
  background: var(--warning-bg);
  color: var(--warning);
}

.bank-status--manual {
  background: var(--info-bg);
  color: var(--info);
}

.bank-status--skipped {
  background: var(--bg-hover);
  color: var(--text-muted);
}

/* Compact select for budget item in table */
.form-select--compact {
  padding: 4px 8px;
  font-size: 0.78rem;
  height: auto;
  min-height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}

.form-select--compact:hover {
  border-color: var(--text-muted);
}

.form-select--compact:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-muted);
}

/* Bank confirmation modal */
.bank-confirm-info {
  max-width: 600px;
}

/* Loading spinner */
.bank-loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: bankSpin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes bankSpin {
  to { transform: rotate(360deg); }
}

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