:root {
    --primary-color: #FFDA00;
    --primary-dark: #E6C200;
    --secondary-color: #f0f2f5;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}


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


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #F5F5F5;
    color: var(--text-dark);
    min-height: 100vh;
}


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


.sidebar {
    width: 250px;
    background: #1D3557;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}


.sidebar-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}


.sidebar-logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}


.sidebar-logo img {
    max-height: 80px;
    max-width: 100%;
    width: auto;
    height: auto;
}


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


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


.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #E2E8F0;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}


.sidebar-nav a:hover {
    color: #FFFFFF;
    background-color: rgba(255, 218, 0, 0.1);
}


.sidebar-nav a.active {
    color: #FFDA00;
}


.main-content {
    flex: 1;
    flex-direction: column;
}


.top-navbar {
    background: #F5F5F5;
    padding: 15px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.quick-actions-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}


.quick-actions-nav .btn-primary {
    background: rgba(44, 62, 80, 0.8);
    color: #FFDA00 !important;
    border: 1px solid rgba(255, 218, 0, 0.3) !important;
    padding: 8px 16px;
    font-size: 13px !important;
    white-space: nowrap;
    transition: all 0.3s ease;
}


.quick-actions-nav .btn-primary:hover {
    background: #2C3E50;
    border-color: #FFDA00;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 218, 0, 0.2);
}


.top-navbar h1 {
    font-size: 20px;
    color: var(--text-dark);
}


.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}


.user-info {
    text-align: right;
}


.user-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
}


.btn-logout {
    background-color: var(--danger-color);
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 12px;
}


.btn-logout:hover {
    background-color: #c82333;
}


.page-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    margin-left: 250px;
}


/* Cards */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}


.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}


.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}


/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}


.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(255, 218, 0, 0.15);
    transition: all 0.3s ease;
}


.btn-primary:hover {
    background: var(--primary-color);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 218, 0, 0.3);
}


.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}


.btn-secondary:hover {
    background-color: #e9ecef;
}


/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}


.table thead {
    background-color: #1D3557 !important;
    border-bottom: 2px solid var(--border-color);
}


.table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: white !important;
    border: none;
}


.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}


.table tbody tr:hover {
    background-color: #f8f9fa;
}


.table tbody tr:nth-child(odd) {
    background-color: #fafafa;
}


/* ===== FORMS ===== */
.form-group {
    margin-bottom: 15px;
}


.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-dark);
}


.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}


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


/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border-left: 4px solid;
}


.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}


.alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}


.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}


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


.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}


.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}


.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 5px;
}


.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #1a1a1a;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100%;
        max-width: 250px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

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

    .page-content {
        padding: 15px;
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== KLIENCI PAGE - TABLE FIX ===== */
.table-responsive {
    overflow-x: visible !important;
}

.table-wrapper .table {
    display: table !important;
    width: 100%;
    border-collapse: collapse;
}

.table-wrapper .table thead {
    display: table-header-group !important;
    background: #1D3557 !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.table-wrapper .table thead tr {
    display: table-row !important;
}

.table-wrapper .table thead th {
    display: table-cell !important;
    background: #1D3557 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 15px 12px !important;
    border: none !important;
    text-align: left !important;
}

.table-wrapper .table tbody {
    display: table-row-group !important;
}

.table-wrapper .table tbody tr {
    display: table-row !important;
    transition: background-color 0.2s ease;
}

.table-wrapper .table tbody tr:hover {
    background-color: #f8f9fa !important;
}

.table-wrapper .table tbody tr:nth-child(odd) {
    background-color: #fafafa !important;
}

.table-wrapper .table tbody td {
    display: table-cell !important;
    padding: 13px 12px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Links w tabeli */
.table a[href^="mailto:"],
.table a[href^="tel:"] {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.table a[href^="mailto:"]:hover,
.table a[href^="tel:"]:hover {
    text-decoration: underline;
}

/* Wyszukiwarka */
.search-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255,218,0,0.1);
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.page-header h1 i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-buttons .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.btn-edit {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #1a1a1a;
    border: none;
    font-weight: 700;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #ffb300 0%, #ffa300 100%);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255,193,7,0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    font-weight: 700;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220,53,69,0.3);
}

.results-info {
    background: #f8f9fa;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 13px;
}

.no-results {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-light);
}

.no-results i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
    display: block;
}

.no-results p {
    margin: 0;
    font-size: 16px;
}

.no-results a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.no-data-text {
    color: #6c757d;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }

    .search-form input[type="text"],
    .search-form .btn {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}
