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

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0b1220;
  color: #e2e8f0;
  min-height: 100vh;
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: #111827;
  border-right: 1px solid #1f2937;
  padding: 1rem 0.75rem;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem 1.25rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.logo-text { font-size: 1.25rem; font-weight: 700; }

.nav { display: flex; flex-direction: column; gap: 0.15rem; }

.nav-item, .nav-group summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
}

.nav-item:hover, .nav-group summary:hover,
.nav-item.active, .nav-group summary.active { background: #1e293b; color: #f1f5f9; }

.nav-sub {
  display: block;
  padding: 0.45rem 0.75rem 0.45rem 2.5rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 6px;
}

.nav-sub:hover, .nav-sub.active { color: #c4b5fd; background: #1e1b4b33; }

.nav-group summary::-webkit-details-marker { display: none; }

.nav-group summary::after {
  content: "▸";
  margin-left: auto;
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.15s ease;
}

.nav-group[open] summary::after { transform: rotate(90deg); }

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(rgba(11,18,32,0.85), rgba(11,18,32,0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23334155'/%3E%3Cstop offset='100%25' stop-color='%231e293b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect fill='url(%23g)' width='1200' height='600'/%3E%3C/svg%3E") center/cover;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #1f2937;
  background: #0f172aee;
}

.header-left, .header-right { display: flex; align-items: center; gap: 0.6rem; }

.menu-btn {
  background: transparent;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-income { background: #059669; color: #fff; }
.btn-expense { background: #e11d48; color: #fff; }
.btn-transfer { background: transparent; border: 1px solid #7c3aed; color: #c4b5fd; }

.lang-select {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.user { display: flex; align-items: center; gap: 0.5rem; }

.logout-btn {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #334155;
  border-radius: 8px;
}

.logout-btn:hover {
  color: #f1f5f9;
  border-color: #475569;
  background: #1e293b;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.content { padding: 1.25rem; flex: 1; }

.filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.filter-btn.active { background: #7c3aed; border-color: #7c3aed; color: #fff; }

.date-input {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
}

.checkbox-label { color: #94a3b8; font-size: 0.9rem; }

.banks-banner {
  background: linear-gradient(135deg, #0f4c5c 0%, #1a5f6f 50%, #0d3d4a 100%);
  border: 1px solid #1e6b7a;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow-x: auto;
  backdrop-filter: blur(8px);
}

.banks-strip {
  display: flex;
  align-items: stretch;
  min-width: min-content;
  padding: 1rem 0.5rem;
}

.bank-balance {
  flex: 0 0 auto;
  min-width: 130px;
  padding: 0.5rem 1.25rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.bank-balance:last-child {
  border-right: none;
}

.bank-balance--total {
  min-width: 160px;
  border-right: 2px solid rgba(255, 255, 255, 0.35);
}

.bank-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-value-box {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.bank-amount {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.bank-currency {
  display: block;
  font-size: 0.7rem;
  color: #cbd5e1;
  margin-top: 0.15rem;
  text-transform: lowercase;
}

.total-card {
  background: #1e293bcc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.total-label { display: block; color: #94a3b8; font-size: 0.85rem; margin-bottom: 0.25rem; }
.total-value { font-size: 2rem; font-weight: 700; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: #1e293bcc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(8px);
}

.stat-card h3 { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 0.75rem; font-weight: 500; }

.stat-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.stat-cols.single { grid-template-columns: 1fr; }

.stat-cols span { display: block; font-size: 0.75rem; color: #64748b; margin-bottom: 0.15rem; }
.stat-cols strong { font-size: 1.1rem; }

.page-placeholder {
  background: #1e293bcc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
}

.page-placeholder h1 { margin-bottom: 0.5rem; }
.page-placeholder p { color: #94a3b8; }

.charts-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chart-stat {
  background: #1e293bcc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(8px);
}

.chart-stat-label {
  display: block;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.chart-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
}

.chart-stat-in { color: #a78bfa; }
.chart-stat-out { color: #f87171; }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.chart-card {
  background: #1e293bcc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem 1.25rem 1.25rem;
  backdrop-filter: blur(8px);
}

.chart-card-wide { grid-column: 1 / -1; }

.chart-card h3 {
  font-size: 0.95rem;
  color: #cbd5e1;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.chart-wrap {
  position: relative;
  height: 320px;
}

.chart-wrap-donut { height: 280px; }

@media (max-width: 900px) {
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card-wide { grid-column: auto; }
}

.alert-error {
  background: #7f1d1d99;
  border: 1px solid #ef4444;
  color: #fecaca;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error.hidden { display: none; }

.sync-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.breadcrumb {
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.breadcrumb a:hover { color: #334155; }
.breadcrumb strong { color: #1e293b; font-weight: 600; }
.breadcrumb-sep { margin: 0 0.35rem; color: #94a3b8; }

.content-sheet {
  background: linear-gradient(180deg, #eef2f7 0%, #e8edf4 100%);
  margin: -1.25rem;
  padding: 1.25rem;
  min-height: calc(100vh - 64px);
}

.content-sheet .sync-status { color: #64748b; }

.sheet-page { min-height: 0; }

.sheet-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.sheet-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 150px);
}

.sheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  color: #1f2937;
}

.sheet-table td {
  border: 1px solid #d7dee8;
  padding: 0.45rem 0.65rem;
  vertical-align: middle;
  line-height: 1.35;
  background: #fff;
}

.sheet-table .cell-num {
  width: 42px;
  min-width: 42px;
  text-align: center;
  color: #475569;
}

.sheet-table .cell-label {
  min-width: 110px;
  text-align: left;
  font-weight: 500;
  color: #0f172a;
}

.sheet-table .cell-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sheet-table .row-title .cell-title {
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  color: #0f172a;
  padding: 0.7rem 1rem;
}

.sheet-table .row-header .cell-header {
  background: #f1f5f9;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
  font-size: 0.76rem;
}

.sheet-table .row-subheader .cell-subheader,
.sheet-table .row-subheader td {
  background: #e8f7ec;
  font-weight: 700;
  text-align: center;
  color: #14532d;
  font-size: 0.76rem;
}

.sheet-table .row-month td {
  background: #edf9f0;
}

.sheet-table .row-month .cell-label {
  font-weight: 700;
  color: #166534;
}

.sheet-table .row-subrow td {
  background: #fff;
}

.sheet-table .row-subrow .cell-label {
  padding-left: 1.4rem;
  color: #334155;
  font-weight: 500;
}

.sheet-table .row-total td {
  background: #f1f5f9;
  font-weight: 700;
}

.sheet-table .cell-cost {
  background: #f8fffa;
}

.sheet-table .cell-jami,
.sheet-table .cell-volume {
  background: #fff9db !important;
  font-weight: 700;
  color: #854d0e;
}

.sheet-table .cell-profit {
  background: #f0f9ff;
}

.sheet-table .row-subheader .cell-jami,
.sheet-table .row-subheader .cell-volume,
.sheet-table .row-subheader .cell-profit {
  background: #dff5ea;
}

.sheet-table .cell-negative {
  color: #15803d;
  font-weight: 600;
}

.sheet-table tbody tr:hover td {
  filter: brightness(0.98);
}

/* ── Obyekt page ── */
.obyekt-page {
  max-width: 100%;
}

.obyekt-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
  border: 1px solid #e8edf3;
  overflow: hidden;
}

.obyekt-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 1.35rem 0;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

.obyekt-head-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.65rem;
}

.sync-status--compact {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.obyekt-tabs {
  display: inline-flex;
  gap: 0.25rem;
}

.obyekt-tab {
  background: none;
  border: none;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.obyekt-tab:hover {
  color: #7c3aed;
}

.obyekt-tab.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
}

.month-select-wrap {
  position: relative;
}

.month-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  font-size: 0.85rem;
}

.month-select {
  appearance: none;
  min-width: 150px;
  background: #f8fafc;
  border: 1px solid #dde4ee;
  border-radius: 10px;
  padding: 0.55rem 2rem 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.month-select:hover,
.month-select:focus {
  border-color: #a78bfa;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.obyekt-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 175px);
  position: relative;
}

.obyekt-table-wrap.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.obyekt-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #1e293b;
}

.obyekt-table th,
.obyekt-table td {
  border-right: 1px solid #e5eaf0;
  border-bottom: 1px solid #e5eaf0;
  padding: 0.5rem 0.7rem;
  vertical-align: middle;
  line-height: 1.4;
}

.obyekt-table th:first-child,
.obyekt-table td:first-child {
  border-left: none;
}

.obyekt-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f4f6f9;
  font-weight: 700;
  font-size: 0.74rem;
  text-align: center;
  color: #1e293b;
  box-shadow: 0 1px 0 #e5eaf0;
}

.obyekt-table thead .row-title th,
.obyekt-table thead .row-title .cell-title {
  background: #f8fafc;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
}

.obyekt-table thead .row-header th,
.obyekt-table thead .row-header .cell-header {
  background: #f1f5f9;
  color: #334155;
}

.obyekt-table thead .row-subheader th,
.obyekt-table thead .row-subheader .cell-subheader {
  background: #e8f7ec;
  color: #14532d;
}

.obyekt-table thead .cell-cost {
  background: #edfbf1;
}

.obyekt-table thead .cell-jami,
.obyekt-table thead .cell-volume {
  background: #fef9c3;
  color: #854d0e;
}

.obyekt-table thead .cell-profit {
  background: #e0f2fe;
  color: #0369a1;
}

.obyekt-table .cell-num {
  width: 44px;
  min-width: 44px;
  text-align: center;
  color: #64748b;
  font-weight: 600;
  background: #fafbfc;
  border-right: 1px solid #e8edf3;
}

.obyekt-table .object-name {
  min-width: 150px;
  max-width: 200px;
  font-weight: 700;
  color: #0f172a;
  background: #fafbfc;
  white-space: normal;
  line-height: 1.3;
}

.obyekt-table .cell-metric-label {
  min-width: 88px;
  font-weight: 600;
  font-size: 0.78rem;
  color: #475569;
  background: #f8fafc;
  text-align: left;
  padding-left: 0.85rem;
}

.obyekt-table .cell-value {
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #fff;
  min-width: 88px;
}

.obyekt-table .row-prognoz .cell-value {
  background: #fff;
}

.obyekt-table .row-fakt .cell-value {
  background: #fcfcfd;
}

.obyekt-table .row-farq .cell-value,
.obyekt-table .row-farq .cell-metric-label {
  background: #fff8f8;
}

.obyekt-table .row-farq .cell-metric-label {
  color: #dc2626;
  font-weight: 700;
}

.obyekt-table .cell-diff-value {
  font-weight: 600;
}

.obyekt-table .cell-negative {
  color: #dc2626;
}

.obyekt-table tr.object-end td {
  border-bottom: 2px solid #e2e8f0;
}

.obyekt-table tbody tr.object-start td {
  border-top: 2px solid #f1f5f9;
}

.obyekt-table tbody tr:hover .cell-value {
  background: #f8fafc;
}

.obyekt-table .cell-empty {
  padding: 0;
  border: none;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  color: #64748b;
}

.empty-state .empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.empty-state p {
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
}

.empty-state small {
  font-size: 0.85rem;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Kassa journal */
.kassa-page .sync-status { margin-bottom: 0.5rem; }

.kassa-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.kassa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.kassa-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kassa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  white-space: nowrap;
}

.kassa-btn:hover { background: #f9fafb; }

.kassa-btn-filter {
  color: #4b5563;
}

.kassa-btn-filter.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.kassa-btn-filter.is-active:hover {
  background: #6d28d9;
  border-color: #6d28d9;
}

.kassa-filters {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
}

.kassa-filters.hidden {
  display: none;
}

.kassa-filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem 0.65rem;
}

@media (max-width: 1200px) {
  .kassa-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .kassa-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.kassa-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.kassa-field-range {
  grid-column: span 1;
}

.kassa-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
}

.kassa-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.65rem;
  cursor: help;
}

.kassa-input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #1f2937;
  background: #fff;
  min-height: 34px;
}

.kassa-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.kassa-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  padding-right: 1.6rem;
}

.kassa-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.kassa-range-inputs .kassa-input {
  flex: 1;
  min-width: 0;
}

.kassa-range-sep {
  color: #94a3b8;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.kassa-date-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.kassa-date-field .kassa-date-display {
  padding-right: 2.2rem;
  cursor: pointer;
  background: #fff;
}

.kassa-date-trigger {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kassa-date-trigger:hover {
  background: #f3e8ff;
  color: #6d28d9;
}

.kassa-calendar {
  position: fixed;
  z-index: 200;
  width: 280px;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(124, 58, 237, 0.06);
}

.kassa-calendar.hidden {
  display: none;
}

.kassa-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.kassa-cal-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.kassa-cal-nav {
  width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kassa-cal-nav:hover {
  background: #f3e8ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.kassa-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.35rem;
}

.kassa-calendar-weekdays span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  padding: 0.2rem 0;
}

.kassa-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.kassa-cal-day {
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.kassa-cal-day:hover:not(.is-empty) {
  background: #f3e8ff;
  color: #6d28d9;
}

.kassa-cal-day.is-today {
  box-shadow: inset 0 0 0 1.5px #7c3aed;
  color: #7c3aed;
}

.kassa-cal-day.is-selected {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.kassa-cal-day.is-selected:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  color: #fff;
}

.kassa-cal-day.is-empty {
  pointer-events: none;
}

.kassa-filters-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.5rem;
}

.kassa-btn-clear {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #4b5563;
}

.kassa-btn-clear:hover {
  background: #e5e7eb;
}

.kassa-btn-search {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  min-width: 100px;
}

.kassa-btn-search:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.kassa-btn-excel {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.kassa-btn-excel:hover {
  background: #15803d;
  border-color: #15803d;
}

.kassa-btn-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.kassa-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 280px);
}

.kassa-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: #1f2937;
}

.kassa-table th,
.kassa-table td {
  border: 1px solid #d7dee8;
  padding: 0.5rem 0.65rem;
  vertical-align: middle;
  line-height: 1.35;
  background: #fff;
  text-align: left;
  white-space: nowrap;
}

.kassa-table thead th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
  position: sticky;
  top: 0;
  z-index: 2;
}

.kassa-table .kassa-sortable {
  cursor: pointer;
  user-select: none;
}

.kassa-table .kassa-sortable:hover {
  background: #e8edf4;
}

.kassa-table .sort-icon {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-left: 0.15rem;
}

.kassa-table .sort-asc .sort-icon::after { content: " ↑"; }
.kassa-table .sort-desc .sort-icon::after { content: " ↓"; }

.kassa-table .cell-date {
  color: #334155;
}

.kassa-table .cell-income {
  color: #16a34a;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kassa-table .cell-expense {
  color: #dc2626;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kassa-table .cell-comment {
  white-space: normal;
  min-width: 280px;
  max-width: 420px;
}

.kassa-table .cell-actions {
  text-align: center;
  white-space: nowrap;
}

.kassa-detail-btn {
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #86efac;
  background: #ecfdf5;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.kassa-detail-btn:hover {
  background: #d1fae5;
}

.kassa-action-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  line-height: 1;
}

.kassa-action-edit { color: #ca8a04; }
.kassa-action-delete { color: #dc2626; }

.kassa-action-btn:hover {
  background: #f1f5f9;
}

.kassa-table tbody tr:hover td {
  background: #f8fafc;
}

.kassa-empty-row td {
  border: none;
  padding: 0;
}

.kassa-empty-row .empty-state {
  padding: 3rem 2rem;
}

.kassa-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
}

.kassa-pagination.hidden {
  display: none;
}

.kassa-pagination-info {
  font-size: 0.82rem;
  color: #64748b;
}

.kassa-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.kassa-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.kassa-page-btn:hover:not(:disabled):not(.is-active) {
  background: #f3e8ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.kassa-page-btn.is-active {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: #7c3aed;
  color: #fff;
}

.kassa-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.kassa-page-ellipsis {
  padding: 0 0.25rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b1220 0%, #1e1b4b 50%, #0b1220 100%);
  padding: 1.5rem;
}

.login-wrap {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
}

.login-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.lang-select-login {
  min-width: 140px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.login-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.login-field span {
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
}

.login-input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1f2937;
}

.login-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.login-btn {
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.login-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
}

