/* ============================================================
   Finance Tracker – custom styles
   ============================================================ */

/* Layout */
html, body {
  height: 100%;
  background: #f1f5f9;
}

#wrapper {
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  width: 240px;
  min-width: 240px;
  min-height: 100vh;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  transition: width .25s ease, min-width .25s ease;
  overflow: hidden;
  flex-shrink: 0;
}

#sidebar.collapsed {
  width: 56px;
  min-width: 56px;
}

#sidebar.collapsed .sb-label,
#sidebar.collapsed .sidebar-section,
#sidebar.collapsed .sidebar-brand-text {
  display: none !important;
}

#sidebar.collapsed .sb-link {
  justify-content: center;
  padding: 10px 0;
  margin: 1px 6px;
}

/* Brand */
.sidebar-brand {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.sidebar-brand a:hover { color: #fff; }

/* Section labels */
.sidebar-section {
  padding: 12px 16px 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255,255,255,.3);
  font-weight: 700;
  user-select: none;
}

/* Nav links */
.sb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin: 1px 8px;
  color: rgba(255,255,255,.6);
  text-decoration: none !important;
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.sb-link i {
  font-size: 15px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.sb-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}

.sb-link.active {
  background: #2563eb;
  color: #fff;
}

.sb-link.active i { color: #fff; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 11px;
  color: rgba(255,255,255,.25);
}

/* Page content */
#page-content-wrapper {
  flex: 1 1 auto;
  overflow-x: hidden;
}

/* Top navbar */
.top-navbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
}

/* Cards */
.card {
  border-radius: 12px !important;
}

/* Stat cards */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Wallet cards */
.wallet-card {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.wallet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
.wallet-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Tables */
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  font-weight: 600;
}

/* Badges */
.badge {
  font-weight: 500;
}

/* Diff positive/negative colors */
.diff-pos { color: #22c55e; }
.diff-neg { color: #ef4444; }

/* Forms */
.form-label {
  font-weight: 500;
  margin-bottom: 4px;
}

/* Amount display */
.amount-uah-preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 600;
  color: #15803d;
}

/* Auth page */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}

/* Progress bars in reports */
.progress {
  border-radius: 4px;
}

/* Sidebar toggle button */
#sidebar-toggle {
  border: none;
  background: none;
  color: #475569;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
#sidebar-toggle:hover {
  background: #f1f5f9;
}

/* Print */
@media print {
  #sidebar, .top-navbar, .btn, form { display: none !important; }
  #page-content-wrapper { margin: 0 !important; }
}
