@import url("../shared/common.css");

:root {
  --bg-app: var(--bg-main);
  --bg-sidebar: var(--bg-sidebar);
  --bg-card: var(--bg-card);
  --bg-card-hover: var(--bg-card-hover);
  --bg-input: var(--bg-input);
  --bg-modal: rgba(8, 10, 16, 0.95);

  --color-primary: var(--accent);
  --color-primary-glow: var(--accent-glow);
  --color-primary-hover: var(--accent-hover);
  
  --color-secondary: #3b82f6;
  --color-secondary-glow: rgba(59, 130, 246, 0.2);

  --color-income: var(--success);
  --color-income-glow: var(--success-glow);
  --color-expense: var(--danger);
  --color-expense-glow: var(--danger-glow);
  --color-warning: var(--warning);
  --color-warning-glow: var(--warning-glow);

  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);

  --border-light: var(--border-color);
  --border-focus: var(--accent);
  --shadow-glow: 0 0 20px var(--color-primary-glow);
}

/* Kontener główny aplikacji */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* --- LEWY PANEL (Sidebar) --- */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 32px 24px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  color: var(--color-primary);
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--color-primary);
}

.sidebar-menu {
  flex-grow: 1;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 14px 20px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  text-align: left;
  transition: var(--transition-normal);
}

.menu-item i {
  width: 20px;
  height: 20px;
  transition: var(--transition-fast);
}

.menu-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

.menu-item:hover i {
  transform: translateX(2px);
}

.menu-item.active {
  color: var(--text-main);
  background: linear-gradient(90deg, var(--bg-card-hover), transparent);
  border-left: 3px solid var(--color-primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: inset 8px 0 16px rgba(0, 0, 0, 0.2);
}

.menu-item.active i {
  color: var(--color-primary);
  filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border-light);
}

/* --- GŁÓWNA ZAWARTOŚĆ --- */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Górny pasek (Top bar) */
.topbar {
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.topbar-left h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Status klucza API */
.api-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  display: inline-block;
}

.status-dot.success {
  background-color: var(--color-income);
  box-shadow: 0 0 10px var(--color-income);
}

.status-dot.warning {
  background-color: var(--color-warning);
  box-shadow: 0 0 10px var(--color-warning);
}

.current-date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.current-date-badge i {
  width: 14px;
  height: 14px;
}

/* --- ELEMENTY INTERFEJSU (KARTY, PRZYCISKI) --- */

/* Przycisk bazowy */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 75, 247, 0.4);
  filter: brightness(1.1);
}

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

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--color-expense), hsl(340, 85%, 50%));
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(247, 75, 100, 0.3);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* Wrzucanie dokumentu (duży przycisk w panelu) */
.btn-upload-doc {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
}

/* Karty szklane (Glassmorphic Cards) */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  transition: var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* --- WIDOKI TREŚCI (Content Views) --- */
.content-view {
  display: none;
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  height: 100%;
}

.content-view.active {
  display: block;
}

/* --- PULPIT (Dashboard) --- */

/* Grid Statystyk */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.income::before { background-color: var(--color-income); }
.stat-card.expense::before { background-color: var(--color-expense); }
.stat-card.balance::before { background-color: var(--color-secondary); }
.stat-card.budget-usage::before { background-color: var(--color-primary); }

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
}

.income .stat-icon-wrapper i { color: var(--color-income); }
.expense .stat-icon-wrapper i { color: var(--color-expense); }
.balance .stat-icon-wrapper i { color: var(--color-secondary); }
.budget-usage .stat-icon-wrapper i { color: var(--color-primary); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.stat-footer {
  font-size: 12px;
}

/* Wiersz wykresów */
.dashboard-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  min-height: 380px;
}

.chart-container {
  height: 300px;
  position: relative;
}

.chart-container-pie {
  height: 280px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Tabele pulpitu */
.dashboard-tables-row {
  display: flex;
  gap: 24px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

/* Lista ostatnich transakcji */
.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.recent-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.category-icon-round {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon-round i {
  width: 18px;
  height: 18px;
}

.recent-details h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.recent-details p {
  font-size: 12px;
  color: var(--text-muted);
}

.recent-amount {
  font-size: 15px;
  font-weight: 700;
}

.recent-amount.income { color: var(--color-income); }
.recent-amount.expense { color: var(--color-expense); }

/* --- TABELE GLOBALNE --- */
.table-card {
  padding: 0;
}

.table-card .card-header {
  padding: 24px 24px 12px 24px;
  margin-bottom: 0;
}

.table-card .card-body {
  padding: 0 24px 24px 24px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  padding: 16px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

/* Kolorowania typów w tabeli */
.badge-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-type.income {
  background-color: var(--color-income-glow);
  color: var(--color-income);
}

.badge-type.expense {
  background-color: var(--color-expense-glow);
  color: var(--color-expense);
}

.td-amount {
  font-weight: 700;
  font-size: 15px;
}
.td-amount.income { color: var(--color-income); }
.td-amount.expense { color: var(--color-expense); }

.badge-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-status.paid {
  background-color: var(--color-income-glow);
  color: var(--color-income);
}

.badge-status.pending {
  background-color: var(--color-warning-glow);
  color: var(--color-warning);
}

/* Plik załącznika */
.attachment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.attachment-link:hover {
  background-color: var(--color-primary-glow);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.attachment-link i {
  width: 16px;
  height: 16px;
}

/* Przyciski akcji w tabeli */
.btn-action-edit, .btn-action-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-edit:hover {
  background-color: var(--color-primary-glow);
  color: var(--color-primary);
}

.btn-action-delete:hover {
  background-color: var(--color-expense-glow);
  color: var(--color-expense);
}

/* Paski postępu budżetów */
.budget-progress-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.budget-progress-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budget-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.budget-progress-category {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-container.mini {
  height: 6px;
}

.progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width var(--transition-normal);
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.progress-bar.success { background: var(--color-income); }
.progress-bar.warning { background: var(--color-warning); }
.progress-bar.danger { background: var(--color-expense); }

/* --- FORMULARZE I ELEMENTY SYSTEMU --- */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-control, .form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 12px 16px;
  font-family: var(--font-family);
  font-size: 14px;
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255, 255, 255, 0.5)' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
}

.password-input-wrapper .form-control {
  width: 100%;
  padding-right: 48px;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-password i {
  width: 18px;
  height: 18px;
}

.help-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- FILTRY I USTAWIENIA --- */
.view-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.filters-panel {
  display: flex;
  gap: 12px;
  flex-grow: 1;
}

.input-group.search {
  position: relative;
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 320px;
}

.input-group.search .form-control, .input-group.search input {
  padding-left: 44px;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* --- WIDOK: PASKI PŁACOWE --- */
.salary-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.salary-components-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.section-subtitle {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
}

/* --- MODALE --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-modal);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 500px;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalEnter var(--transition-normal) forwards;
}

.modal-card.modal-lg {
  width: 1000px;
}

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

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

/* Drag & Drop OCR Zone */
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-glow);
  box-shadow: var(--shadow-glow);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px var(--color-primary-glow));
}

.upload-dropzone h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-dropzone p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* Spinner analizy */
.ocr-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-left-color: var(--color-primary);
  border-radius: var(--radius-round);
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

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

.ocr-loading-state h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Panel wyników OCR (Dwa panele) */
.ocr-result-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: 60vh;
}

.document-preview-container {
  border: 1px solid var(--border-light);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.preview-body {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-main);
}

.preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.ocr-form-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
}

.ocr-form-container form {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Podgląd załącznika fullscreen */
.document-preview-fullscreen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-main);
}

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

.document-preview-fullscreen iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Ustawienia strony */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.setting-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.setting-info p {
  font-size: 12px;
}

/* Strefa niebezpieczna */
.danger-zone h4 {
  color: var(--color-expense);
}

/* Ręczne dodawanie pliku */
.manual-file-attachment {
  display: flex;
  align-items: center;
}

/* Stany puste */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
  opacity: 0.5;
}

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

.text-success { color: var(--color-income); }

/* Klasy pomocnicze */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.border-top { border-top: 1px solid var(--border-light); }
.mt-16 { margin-top: 16px; }
.pt-16 { padding-top: 16px; }
.mt-24 { margin-top: 24px; }
.ml-8 { margin-left: 8px; }
.fs-14 { font-size: 14px; }
.w-full { width: 100%; }
.max-h-350 { max-height: 350px; }
.scrollable-y { overflow-y: auto; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-charts-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-tables-row {
    flex-direction: column;
  }
  
  .salary-dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
  }
  
  .menu-item {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .menu-item.active {
    border-left: none;
    border-bottom: 3px solid var(--color-primary);
  }
  
  .sidebar-footer {
    display: none; /* schowane na mobile, zrobimy skrót gdzie indziej lub zostaje */
  }
  
  .topbar {
    padding: 16px 20px;
  }
  
  .content-view {
    padding: 20px;
  }
  
  .ocr-result-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: 50vh;
  }
  
  .document-preview-container {
    height: 250px;
  }
}

/* Filter pills style */
.filter-pills {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.filter-pills .pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pills .pill:hover {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
}

.filter-pills .pill.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(138, 75, 247, 0.4);
}

