/* ===============================================
   Salon Beauty - Elegancki, luksusowy design
   =============================================== */

:root {
    /* Kolory - elegancka paleta róży i złota */
    --primary: #d4a574;
    --primary-dark: #b08b5f;
    --primary-light: #e6c9a8;
    --secondary: #f5e6d8;
    --accent: #c89b72;
    --dark: #2c2c2c;
    --text-dark: #3a3a3a;
    --text-light: #666;
    --bg-light: #faf8f5;
    --bg-white: #ffffff;
    --border: #e8e0d5;
    --shadow: rgba(180, 140, 100, 0.1);
    --error: #d97676;
    --success: #7ab88c;
    
    /* Typografia */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Przestrzeń */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dark);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

/* ===============================================
   Navigation
   =============================================== */

.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px var(--shadow);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--dark);
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: translateY(-2px);
}

.brand-icon {
    font-size: 1.8rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.user-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-name {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-logout {
    background: var(--primary-light);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.btn-logout:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

/* ===============================================
   Main Content
   =============================================== */

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    animation: fadeIn 0.6s ease;
}

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

/* ===============================================
   Header Section
   =============================================== */

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
}

.current-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

#dateInput {
    font-family: var(--font-body);
    padding: var(--spacing-xs);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.date-display {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.btn-nav {
    background: var(--secondary);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.cash-status {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
}

.cash-status label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.cash-input-group {
    display: flex;
    gap: var(--spacing-sm);
}

.cash-input-group input {
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    width: 150px;
}

/* ===============================================
   Buttons
   =============================================== */

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-dark);
    border: 1px solid var(--border);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-update {
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-delete {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: var(--spacing-xs);
}

.btn-delete:hover {
    opacity: 1;
    transform: scale(1.2);
}

.btn-edit {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: var(--spacing-xs);
    margin-right: 0.5rem;
}

.btn-edit:hover {
    opacity: 1;
    transform: scale(1.2);
}

.btn-small {
    background: var(--primary-light);
    color: var(--text-dark);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ===============================================
   Services Section
   =============================================== */

.services-section {
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.service-form {
    margin-bottom: var(--spacing-lg);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.readonly-field {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

/* ===============================================
   Tables
   =============================================== */

.services-table {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}

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

thead {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
}

thead th {
    padding: var(--spacing-md);
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.03em;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: var(--bg-light);
}

tbody td {
    padding: var(--spacing-md);
    font-size: 0.95rem;
}

.suma-cell {
    font-weight: 600;
    color: var(--primary);
}

.stylist-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--primary-light);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.payment-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.payment-badge.gotówka {
    background: #e8f5e9;
    color: #2e7d32;
}

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

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

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.empty-state p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

/* ===============================================
   Summary Section
   =============================================== */

.summary-section {
    margin-top: var(--spacing-xl);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.summary-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

.summary-card.highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    border: 2px solid var(--primary);
}

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

.stylist-summary,
.financial-summary,
.payment-summary {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.stylist-row,
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
}

.stylist-row:last-child,
.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-sm);
    border-top: 2px solid var(--primary);
}

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

.stylist-amount,
.stat-value {
    font-weight: 600;
    color: var(--primary);
}

/* ===============================================
   Losses
   =============================================== */

.summary-card.losses {
    background: linear-gradient(135deg, #ffe8e8, #fff5f5);
}

.loss-form {
    margin-bottom: var(--spacing-md);
    animation: slideDown 0.4s ease;
}

.loss-form form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.loss-form input {
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
}

.losses-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.loss-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.btn-delete-small {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    color: var(--error);
}

.btn-delete-small:hover {
    opacity: 1;
    transform: scale(1.3);
}

.empty-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: var(--spacing-md) 0;
}

/* ===============================================
   Stylistki Page
   =============================================== */

.stylistki-container {
    animation: fadeIn 0.6s ease;
}

.stylistki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.stylistka-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 2px solid var(--primary-light);
    transition: all 0.3s ease;
}

.stylistka-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

.stylistka-card.inactive {
    opacity: 0.6;
    border-color: var(--border);
}

.stylistka-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.stylistka-info h3 {
    font-size: 1.4rem;
    margin: 0;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

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

.stylistka-actions {
    display: flex;
    justify-content: center;
}

.btn-toggle {
    background: var(--secondary);
    color: var(--text-dark);
    border: 1px solid var(--border);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ===============================================
   Raporty Page
   =============================================== */

.raporty-container {
    animation: fadeIn 0.6s ease;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.month-selector label {
    font-weight: 500;
    color: var(--text-light);
}

.month-selector select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
}

.monthly-summary {
    margin-bottom: var(--spacing-xl);
}

.stats-section h2 {
    margin-bottom: var(--spacing-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-light);
}

.stat-header h3 {
    margin: 0;
    color: var(--primary);
}

.stat-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

/* ===============================================
   Notifications
   =============================================== */

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--bg-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--primary);
    transform: translateX(400px);
    transition: all 0.4s ease;
    z-index: 1000;
    max-width: 300px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--error);
}

/* ===============================================
   Responsive
   =============================================== */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .header-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-navigation {
        flex-direction: column;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid,
    .stats-grid,
    .stylistki-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   Search Input & Wyszukiwarka usług
   =============================================== */

.search-input-wrapper {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 1000;
    margin-top: 4px;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

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

.search-item:hover {
    background: var(--primary-light);
}

.search-item-name {
    font-weight: 500;
    color: var(--text-dark);
}

.search-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===============================================
   Discount Toggle - przełącznik zniżki PLN/%
   =============================================== */

.discount-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.discount-toggle {
    display: flex;
    gap: 4px;
    background: var(--secondary);
    padding: 4px;
    border-radius: 6px;
}

.toggle-btn {
    flex: 1;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: none;
    background: transparent;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--shadow);
}

.toggle-btn:hover:not(.active) {
    background: var(--border);
}

/* ===============================================
   Editable Sum - edytowalna suma
   =============================================== */

.editable-sum {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--primary);
    font-weight: 600;
}

.editable-sum:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

/* ===============================================
   Rodzaje usług - zarządzanie
   =============================================== */

.uslug-container {
    animation: fadeIn 0.6s ease;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.action-buttons {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
    align-items: center;
}

.btn-edit,
.btn-toggle-small {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    padding: var(--spacing-xs);
}

.btn-edit:hover,
.btn-toggle-small:hover {
    opacity: 1;
    transform: scale(1.2);
}

.inactive-row {
    opacity: 0.5;
}

.inactive-row td {
    color: var(--text-light);
}

/* ===============================================
   Responsive dla nowych elementów
   =============================================== */

@media (max-width: 768px) {
    .form-grid-two {
        grid-template-columns: 1fr;
    }
    
    .search-results {
        max-height: 200px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
}

/* ===============================================
   Koszty eksploatacyjne
   =============================================== */

.summary-card.costs {
    background: linear-gradient(135deg, #fff8e8, #fffbf5);
    border: 2px solid var(--accent);
}

.info-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
    font-style: italic;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: var(--spacing-xs);
}

.cost-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.cost-category {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
}

.cost-name {
    font-weight: 500;
    color: var(--text-dark);
}

.cost-amount {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cost-row {
    color: var(--error) !important;
}

/* Koszty - strona zarządzania */

.koszty-container {
    animation: fadeIn 0.6s ease;
}

.costs-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.category-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-light);
    margin-bottom: var(--spacing-md);
}

.category-header h3 {
    margin: 0;
    color: var(--primary);
}

.category-sum {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.costs-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cost-row:hover {
    background: var(--secondary);
}

.cost-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.cost-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.cost-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

.cost-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.hint {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

@media (max-width: 768px) {
    .costs-section {
        grid-template-columns: 1fr;
    }
    
    .cost-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .cost-amount {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===============================================
   Wynagrodzenia
   =============================================== */

.wynagrodzenia-container {
    animation: fadeIn 0.6s ease;
}

.info-box {
    background: var(--secondary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    margin-bottom: var(--spacing-xl);
    border-left: 4px solid var(--primary);
}

.info-box h3 {
    margin-bottom: var(--spacing-sm);
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box ul li {
    padding: var(--spacing-xs) 0;
    color: var(--text-dark);
}

.stylistki-wages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.wage-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 2px solid var(--primary-light);
    transition: all 0.3s ease;
}

.wage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

.wage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-light);
}

.wage-header h3 {
    margin: 0;
}

.wage-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.wage-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wage-type .label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.wage-type .value {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.no-config {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: var(--spacing-md) 0;
}

/* Modal */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-lg);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001;
}

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

.modal-header h2 {
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--error);
    transform: scale(1.2);
}

.modal-content form {
    padding: var(--spacing-lg);
}

.prowizje-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    max-height: 400px;
    overflow-y: auto;
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 8px;
}

.prowizja-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.prowizja-row label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.prowizja-input {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
}

.wage-row {
    background: var(--primary-light);
    padding: var(--spacing-sm);
    border-radius: 8px;
    margin-top: var(--spacing-sm);
    font-weight: 600;
}

.wage-value {
    color: var(--primary) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

@media (max-width: 768px) {
    .stylistki-wages {
        grid-template-columns: 1fr;
    }
    
    .prowizje-grid {
        grid-template-columns: 1fr;
    }
    
    .modal {
        padding: 0;
    }
    
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ===============================================
   Stan kasy - rozszerzony
   =============================================== */

.cash-status h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary);
}

.cash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--spacing-md);
    align-items: end;
    margin-bottom: var(--spacing-lg);
}

.cash-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cash-input-group label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.cash-input-group input {
    padding: var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.cash-button-group {
    display: flex;
    align-items: flex-end;
}

.cash-summary {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 12px;
    border: 2px solid var(--primary-light);
}

.cash-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs) 0;
    font-size: 0.95rem;
}

.cash-row span:first-child {
    color: var(--text-dark);
}

.cash-value {
    font-weight: 600;
    color: var(--text-dark);
}

.cash-row.highlight-cash {
    background: var(--primary-light);
    padding: var(--spacing-sm);
    border-radius: 8px;
    margin: var(--spacing-sm) 0;
    font-weight: 600;
}

.cash-value-big {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.cash-separator {
    height: 2px;
    background: var(--border);
    margin: var(--spacing-sm) 0;
}

.cash-row.negative-diff {
    color: var(--error);
}

.cash-row.positive-diff {
    color: var(--success);
}

.cash-value-diff {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Raporty - różnice fiskalne */

.summary-separator {
    height: 2px;
    background: var(--border);
    margin: var(--spacing-md) 0;
}

.summary-row.negative-diff {
    background: rgba(244, 67, 54, 0.1);
    padding: var(--spacing-sm);
    border-radius: 8px;
    color: var(--error);
    font-weight: 600;
}

.summary-row.positive-diff {
    background: rgba(76, 175, 80, 0.1);
    padding: var(--spacing-sm);
    border-radius: 8px;
    color: var(--success);
    font-weight: 600;
}

@media (max-width: 768px) {
    .cash-grid {
        grid-template-columns: 1fr;
    }
    
    .cash-button-group {
        justify-content: stretch;
    }
    
    .cash-button-group button {
        width: 100%;
    }
}

/* ===============================================
   Panele podsumowań - rozdzielone
   =============================================== */

.cash-summary-card {
    background: linear-gradient(135deg, #e8f5e9, #f1f8f4);
    border: 2px solid #4caf50;
}

.highlight-green {
    background: rgba(76, 175, 80, 0.15);
    padding: var(--spacing-sm);
    border-radius: 8px;
    font-weight: 700;
}

.fiscal-report {
    background: linear-gradient(135deg, #fff3e0, #fffbf5);
    border: 2px solid var(--accent);
}

.fiscal-form {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: white;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.fiscal-form form {
    display: flex;
    gap: var(--spacing-sm);
}

.fiscal-form input {
    flex: 1;
    padding: var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
}

.fiscal-form button {
    white-space: nowrap;
}

/* Usuwam stare style cash-grid */
.cash-grid {
    display: none;
}

/* ===============================================
   PROFESJONALNE RAPORTY
   =============================================== */

.reports-container {
    animation: fadeIn 0.6s ease;
    max-width: 1400px;
    margin: 0 auto;
}

/* Nagłówek raportu */
.report-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: var(--spacing-xl);
    border-radius: 16px;
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.report-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-header h1 {
    margin: 0;
    font-size: 2rem;
}

.report-header .month-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
}

.report-header .month-selector label {
    font-size: 0.9rem;
    font-weight: 500;
}

.report-header .month-selector select {
    background: white;
    color: var(--primary);
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.kpi-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.kpi-card.primary {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff, #f8f0f5);
}

.kpi-card.success {
    border-color: var(--success);
    background: linear-gradient(135deg, #fff, #f0f8f5);
}

.kpi-card.info {
    border-color: #2196F3;
    background: linear-gradient(135deg, #fff, #f0f5f8);
}

.kpi-card.warning {
    border-color: var(--accent);
    background: linear-gradient(135deg, #fff, #fff8f0);
}

.kpi-icon {
    font-size: 3rem;
    line-height: 1;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.kpi-change {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    color: var(--text-light);
}

.kpi-change.positive {
    color: var(--success);
    font-weight: 600;
}

.kpi-change.negative {
    color: var(--error);
    font-weight: 600;
}

/* Layout dwukolumnowy */
.report-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
}

.report-main, .report-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Sekcje raportu */
.report-section {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: 0 2px 10px var(--shadow);
}

.report-section h2 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--primary);
    font-size: 1.3rem;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-light);
}

/* Tabela finansowa */
.finance-table table {
    width: 100%;
    border-collapse: collapse;
}

.finance-table td {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
}

.finance-table td:last-child {
    text-align: right;
}

.finance-table .section-header td {
    padding-top: var(--spacing-md);
    background: var(--bg-light);
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.finance-table .highlight td {
    background: var(--primary-light);
    font-weight: 600;
    padding: var(--spacing-sm);
}

.finance-table .total-row td {
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: var(--spacing-md);
}

.finance-table .spacer {
    height: var(--spacing-md);
    border: none;
}

.finance-table .amount {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.finance-table .negative {
    color: var(--error);
}

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

/* Struktura kosztów */
.costs-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.cost-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cost-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-category {
    font-weight: 600;
    color: var(--text-dark);
}

.cost-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.cost-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.cost-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.cost-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.5s ease;
}

/* Metody płatności */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.payment-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.payment-item:hover {
    background: var(--primary-light);
    transform: translateX(4px);
}

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

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.payment-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.payment-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.payment-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Top usługi */
.top-services {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.service-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.service-item:hover {
    background: var(--primary-light);
}

.service-rank {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.service-info {
    flex: 1;
}

.service-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.service-stats {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
}

.service-count {
    color: var(--text-light);
}

.service-sum {
    color: var(--primary);
    font-weight: 600;
}

/* Wynagrodzenia */
.wages-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.wage-item {
    padding: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.wage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.wage-name {
    font-weight: 600;
    color: var(--text-dark);
}

.wage-amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.wage-details {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
    color: var(--text-light);
}

.wage-total {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 8px;
    margin-top: var(--spacing-sm);
}

/* Porównanie */
.comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: var(--spacing-sm);
}

.comparison-item {
    text-align: center;
}

.comparison-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.comparison-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.comparison-arrow {
    font-size: 2.5rem;
    line-height: 1;
}

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

.comparison-arrow.negative {
    color: var(--error);
}

.comparison-summary {
    text-align: center;
    padding: var(--spacing-sm);
    border-radius: 8px;
    font-weight: 600;
}

.comparison-summary.positive {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.comparison-summary.negative {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error);
}

/* Wyniki per stylistka */
.stylist-results {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.stylist-item {
    padding: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: 8px;
}

.stylist-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stylist-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.stat-row span:first-child {
    color: var(--text-light);
}

.stat-row span:last-child {
    font-weight: 600;
    color: var(--text-dark);
}

.payment-breakdown {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-xs);
}

.payment-mini {
    font-size: 0.75rem;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .report-layout {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .report-header .header-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .report-header h1 {
        font-size: 1.5rem;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-card {
        padding: var(--spacing-md);
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .comparison {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
}

@media print {
    .report-header {
        background: var(--primary);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .kpi-card, .report-section {
        break-inside: avoid;
    }
}

/* ===============================================
   RAPORT GLOBALNY - dodatkowe style
   =============================================== */

.period-info {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* Trend miesięczny */
.monthly-trend {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.trend-item {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    gap: var(--spacing-sm);
    align-items: center;
}

.trend-month {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.trend-bar-container {
    background: var(--bg-light);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.trend-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 15px;
    transition: width 0.5s ease;
}

.trend-value {
    text-align: right;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

/* Select z separatorem */
.report-header select option[disabled] {
    font-size: 0.7rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .period-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .trend-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .trend-month {
        text-align: center;
    }
    
    .trend-value {
        text-align: center;
    }
}
