/* ==================== RESET & OSNOVNO ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #2196f3;
    --light: #f5f5f5;
    --dark: #333;
    --border: #e0e0e0;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --radius: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: var(--dark);
    line-height: 1.6;
}

/* ==================== NAVIGACIJA ==================== */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.nav-icon {
    font-size: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-link {
    display: block;
    padding: 10px 20px;
    color: var(--dark);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

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

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

.btn-logout {
    padding: 8px 16px;
    background: white;
    color: var(--danger);
    border: 2px solid var(--danger);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

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

/* ==================== MAIN CONTENT ==================== */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 30px 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

/* ==================== DUGMAD ==================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #d32f2f;
}

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

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

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

.stat-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 15px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* ==================== SEKCIJE ==================== */
.section {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark);
}

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

.section-header h2 {
    margin-bottom: 0;
}

/* ==================== PUNJAČI ==================== */
.chargers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.charger-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--border);
    transition: all 0.3s;
}

.charger-card.online {
    border-left-color: var(--success);
}

.charger-card.offline {
    border-left-color: #999;
}

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

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

.charger-header h3 {
    font-size: 18px;
    color: var(--dark);
}

.charger-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-row .label {
    color: #666;
    font-size: 14px;
}

.info-row .value {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-available,
.status-registered {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-charging,
.status-active {
    background: #fff3e0;
    color: #e65100;
}

.status-offline,
.status-pending {
    background: #f5f5f5;
    color: #999;
}

.status-completed {
    background: #e3f2fd;
    color: #1976d2;
}

/* ==================== TABELE ==================== */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
    font-size: 13px;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--light);
    font-size: 14px;
}

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

.data-table tbody tr:hover {
    background: #f9f9f9;
}

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

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

.font-bold {
    font-weight: 700;
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

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

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

.badge-admin {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-user {
    background: #f3e5f5;
    color: #7b1fa2;
}

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

/* ==================== FOOTER ==================== */
.footer {
    background: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    color: #666;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chargers-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .stat-value {
        font-size: 24px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* ==================== FORM STYLES ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

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

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--danger);
}

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

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: var(--success);
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border-left-color: var(--danger);
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left-color: var(--warning);
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left-color: var(--info);
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== UTILITIES ==================== */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.text-muted { color: #999; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* ==================== CHART CONTAINER ==================== */
.chart-container {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--dark);
}