/**
 * JAWORKI - Style CSS
 * System wirtualnej waluty dla MOW Jaworek
 */

/* ========================================
   CSS Reset i zmienne
======================================== */
:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --secondary: #5d4037;
    --success: #388e3c;
    --warning: #f57c00;
    --danger: #d32f2f;
    --info: #1976d2;
    
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-100);
}

/* ========================================
   Strona logowania
======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 20px;
}

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

.login-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ========================================
   Komponenty formularzy
======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

select.form-control {
    cursor: pointer;
}

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

/* ========================================
   Przyciski
======================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

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

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-600);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--gray-700);
}

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

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

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

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Przycisk wyloguj w navbarze - biały na zielonym tle */
.btn-logout {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ========================================
   Alerty
======================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.alert-danger {
    background-color: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

.alert-warning {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}

/* ========================================
   Layout - Panel
======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--gray-800);
    color: white;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--gray-300);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--primary);
    color: white;
}

.sidebar-nav .badge {
    float: right;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid var(--gray-700);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--gray-600);
}

/* ========================================
   Karty
======================================== */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

/* Karty statystyk */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.stat-card.stat-warning .stat-value {
    color: var(--warning);
}

.stat-card.stat-danger .stat-value {
    color: var(--danger);
}

.stat-card.stat-success .stat-value {
    color: var(--success);
}

/* ========================================
   Tabele
======================================== */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.table tbody tr:hover {
    background-color: var(--gray-100);
}

.table .text-right {
    text-align: right;
}

.table .text-center {
    text-align: center;
}

/* ========================================
   Znaczniki i etykiety
======================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background-color: #fff3e0;
    color: #e65100;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

.badge-info {
    background-color: #e3f2fd;
    color: #1565c0;
}

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

/* ========================================
   Saldo i kwoty
======================================== */
.balance-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.balance-display .balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-display .balance-value {
    font-size: 3rem;
    font-weight: 700;
}

.amount-positive {
    color: var(--success);
}

.amount-negative {
    color: var(--danger);
}

/* ========================================
   Strona błędu
======================================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.error-box {
    text-align: center;
    padding: 40px;
}

.error-box h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.error-box p {
    color: var(--gray-600);
    margin-bottom: 24px;
}

/* ========================================
   Grid pomocniczy
======================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.col {
    flex: 1;
    padding: 10px;
}

.col-6 {
    width: 50%;
    padding: 10px;
}

.col-4 {
    width: 33.333%;
    padding: 10px;
}

.col-3 {
    width: 25%;
    padding: 10px;
}

/* ========================================
   Narzędzia pomocnicze
======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-600); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ========================================
   Modal
======================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========================================
   Drukowanie
======================================== */
@media print {
    .sidebar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }

    body {
        background: white !important;
    }

    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #333;
    }

    .print-header h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .print-header p {
        color: #666;
    }

    .table th {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.print-header {
    display: none;
}

/* ========================================
   Responsywność
======================================== */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .col-6,
    .col-4,
    .col-3 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .sidebar-footer {
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .app-container {
        flex-direction: column;
    }

    .col-6,
    .col-4,
    .col-3 {
        width: 100%;
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 24px;
    }

    .balance-display .balance-value {
        font-size: 2rem;
    }
}

/* ========================================
   Nawigacja górna
======================================== */
.navbar {
    background: var(--primary);
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
}

.navbar-menu {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: background 0.2s;
    position: relative;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-link.has-badge {
    padding-right: 28px;
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 500;
}

.user-role {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* ========================================
   Layout główny
======================================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.footer {
    background: var(--gray-200);
    padding: 16px;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.85rem;
}

/* ========================================
   Dashboard - statystyki
======================================== */
.dashboard h1 {
    margin-bottom: 8px;
}

.welcome {
    color: var(--gray-600);
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.stat-card.alert-warning {
    border-left: 4px solid var(--warning);
}

.stat-card.alert-danger {
    border-left: 4px solid var(--danger);
}

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.stat-link {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.85rem;
    color: var(--primary);
}

/* ========================================
   Menu szybkiego dostępu
======================================== */
.quick-menu {
    margin-bottom: 32px;
}

.quick-menu h2 {
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.menu-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--gray-800);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    position: relative;
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.menu-card.has-badge .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.menu-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.menu-title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.menu-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ========================================
   Sekcje
======================================== */
.section, .recent-section, .user-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.section h2, .recent-section h2, .user-section h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.section-hint {
    color: var(--gray-600);
    margin-bottom: 16px;
}

/* ========================================
   Tabele danych
======================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gray-600);
}

.data-table tr:hover {
    background: var(--gray-100);
}

.data-table tr.blocked {
    opacity: 0.6;
}

.data-table .amount {
    font-weight: 600;
    font-family: monospace;
    font-size: 1rem;
}

.data-table .amount.negative {
    color: var(--danger);
}

.data-table .actions {
    white-space: nowrap;
}

.table-footer {
    margin-top: 16px;
    text-align: center;
}

.table-footer a {
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* ========================================
   Alerty (karty)
======================================== */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alert-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.alert-card.pending {
    border-left: 4px solid var(--danger);
}

.alert-card.resolved {
    border-left: 4px solid var(--success);
    opacity: 0.85;
}

.alert-header {
    background: var(--gray-100);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-type {
    font-size: 0.8rem;
}

.alert-date {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.alert-status {
    margin-left: auto;
}

.status-pending {
    color: var(--danger);
    font-weight: 600;
}

.status-resolved {
    color: var(--success);
}

.alert-body {
    padding: 16px;
}

.alert-description {
    font-size: 1rem;
    margin-bottom: 12px;
}

.alert-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.alert-details span {
    display: block;
}

.alert-resolution {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
    margin: 16px -16px -16px;
    padding: 16px;
}

.alert-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.resolve-form .form-group {
    margin-bottom: 12px;
}

.resolve-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 60px;
}

/* ========================================
   Filtry
======================================== */
.filters-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    min-width: 150px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.filters-inline {
    margin-bottom: 16px;
}

.filters-inline label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* ========================================
   Nagłówek strony
======================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   Formularze panelowe
======================================== */
.form-panel {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.form-panel.hidden {
    display: none;
}

.form-panel h3 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 4px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.quick-amounts {
    margin: 20px 0;
}

.quick-amounts label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========================================
   Modal
======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 16px;
}

/* ========================================
   Panel wychowanka
======================================== */
.ward-dashboard .balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.balance-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
}

.balance-amount.warning {
    color: #ffeb3b;
}

.balance-warning {
    margin-top: 12px;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.deadline-info {
    background: var(--gray-100);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.deadline-info.urgent {
    background: #fff3cd;
    color: #856404;
}

.payments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.payment-item.paid {
    opacity: 0.7;
}

.payment-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.payment-name {
    font-weight: 500;
}

.payment-price {
    color: var(--gray-600);
    font-family: monospace;
}

.status-paid {
    color: var(--success);
}

.status-insufficient {
    color: var(--danger);
    font-size: 0.85rem;
}

.payments-summary {
    margin-top: 16px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    text-align: center;
}

.payments-summary.success {
    background: #d4edda;
    color: #155724;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.service-card {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
}

.service-name {
    font-weight: 500;
    margin-bottom: 8px;
}

.service-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.service-insufficient {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.transaction-icon {
    font-size: 1.5rem;
}

.transaction-info {
    flex: 1;
}

.transaction-desc {
    display: block;
    font-weight: 500;
}

.transaction-date {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.transaction-amount {
    font-weight: 600;
    font-family: monospace;
    font-size: 1.1rem;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--gray-600);
}

/* ========================================
   Panel pracownika
======================================== */
.wards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.ward-card {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
}

.ward-name {
    font-weight: 500;
    margin-bottom: 8px;
}

.ward-balance {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    font-family: monospace;
}

.ward-balance.low {
    color: var(--warning);
}

/* ========================================
   Płatność - potwierdzenie
======================================== */
.payment-confirmation {
    max-width: 500px;
    margin: 0 auto;
}

.payment-details {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow);
}

.payment-details h2 {
    margin-bottom: 16px;
}

.payment-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.payment-balance,
.payment-after {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.payment-balance .insufficient {
    color: var(--danger);
}

.payment-details .form-actions {
    margin-top: 24px;
    justify-content: center;
}

/* ========================================
   Responsywność dla nowych elementów
======================================== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-top: 12px;
        margin-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .navbar-user {
        font-size: 0.9rem;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .filters-form {
        flex-direction: column;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }

    .alert-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-status {
        margin-left: 0;
    }

    .balance-amount {
        font-size: 2.2rem;
    }
}
