/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f5f7;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 14px;
}

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

/* Sidebar - podobny do obecnego systemu */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

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

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 15px 0;
}

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

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    transform: translateX(3px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    border-radius: 0 4px 4px 0;
}

.sidebar-nav .icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
    opacity: 0.9;
}

.sidebar-nav a.active .icon {
    opacity: 1;
}

/* Font Awesome ikony w sidebarze */
.sidebar-nav .icon.fas {
    font-size: 18px;
}

/* Podmenu */
.sidebar-nav li.has-submenu {
    position: relative;
}

.sidebar-nav li.has-submenu > a {
    position: relative;
}

.sidebar-nav .submenu-toggle {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar-nav li.has-submenu.active .submenu-toggle {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-nav li.has-submenu.active .submenu {
    max-height: 500px;
}

.sidebar-nav .submenu li {
    margin: 0;
}

.sidebar-nav .submenu a {
    padding: 10px 18px 10px 50px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .submenu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-nav .submenu a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    background: #f4f5f7;
}

.top-bar {
    background: #ffffff;
    padding: 20px 35px;
    border-bottom: 1px solid #e4e6eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.mobile-menu-toggle:hover {
    background: #f0f0f0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.user-info i {
    font-size: 18px;
    color: #667eea;
}

.content-wrapper {
    padding: 0;
    width: 100%;
    max-width: 100%;
}

/* Scrollbar dla sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Container */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px 30px;
    box-sizing: border-box;
}

/* Ensure all content uses full width */
.content-wrapper .container,
.main-content .container {
    width: 100%;
    max-width: 100%;
}

/* Buttons - nowoczesny design */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-block {
    width: 100%;
}

/* Stats Grid - podobny do dashboardu */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.stat-icon {
    font-size: 32px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.stat-icon.fas {
    font-size: 28px;
}

.stat-info h3 {
    font-size: 32px;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 700;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables - nowoczesny design */
.data-table {
    width: 100%;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
}

.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

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

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #2ecc71;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Page - podobny do obecnego */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move 20s linear infinite;
}

@keyframes move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 400;
}

/* Settings */
.settings-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.settings-section h2 {
    margin-bottom: 10px;
}

.settings-section p {
    color: #666;
    margin-bottom: 20px;
}

.menu-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Dodatkowe style dla lepszego wyglądu */
.recent-activity {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.recent-activity h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    margin: 0;
    color: #2c3e50;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.form-section h3 {
    margin: 20px 0 15px 0;
    color: #34495e;
}

/* Card styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
    width: 100%;
}

.card-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.card-header h2,
.card-header h3,
.card-header h4 {
    margin: 0;
    color: white !important;
    font-size: 20px;
    font-weight: 600;
}

.card-header p,
.card-header .text-muted {
    margin: 10px 0 0 0;
    color: rgba(255,255,255,0.9) !important;
    font-size: 14px;
}

.card-header strong {
    color: white !important;
}

.card-body {
    padding: 25px;
}

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

.table-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow-x: auto;
}

/* Lepsze style dla formularzy */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Overlay dla menu mobilnego */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .top-bar {
        padding: 15px 20px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
}

