button, .btn-primary, .btn-small, .btn-icon {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* PALETA BOJA - RAFINIRANA */
    --primary: #edbb3d;
    --primary-hover: #dfa81c;
    --primary-subtle: #fffbf0;
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    
    --text-main: #0f172a;
    --text-secondary: #64748b;
    
    --border: #e2e8f0;
    
    /* UI VARIJABLE */
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --container-width: 1000px;
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #0f172a !important;
        --bg-surface: #1e293b !important;
        --text-main: #f1f5f9 !important;
        --text-secondary: #94a3b8 !important;
        --border: #334155 !important;
        --primary-subtle: #1e1a0f !important;
    }
    
    /* FORCE EVERYTHING DARK */
    body, .card, .trip-summary, .login-container, .stat-card, .empty-state,
    .modal-content, .modal-body, .bookings-table-wrapper, 
    .bookings-table-wrapper tbody tr, tbody tr,
    .installments-highlight, .image-upload-box, .passenger-item-modal {
        background: var(--bg-surface) !important;
        color: var(--text-main) !important;
    }
    
    .modal-header {
        background: #0f172a !important;
        border-bottom-color: var(--border) !important;
    }
    
    /* INPUTS */
    input, select, textarea, .flatpickr-input {
        background-color: #0f172a !important;
        color: var(--text-main) !important;
        border-color: var(--border) !important;
    }
    
    input::placeholder, textarea::placeholder {
        color: #64748b !important;
    }
    
    input:focus, select:focus, textarea:focus {
        background-color: var(--bg-surface) !important;
    }
    
    /* ALL BUTTONS */
    button:not(.btn-primary):not(.btn-danger),
    .btn-small:not(.btn-danger),
    .btn-icon, .btn-expand, .btn-close {
        background: transparent !important;
        border-color: var(--border) !important;
        color: var(--text-main) !important;
    }
    
    button:not(.btn-primary):not(.btn-danger):hover,
    .btn-small:not(.btn-danger):hover,
    .btn-icon:hover, .btn-expand:hover {
        background: #0f172a !important;
        border-color: var(--primary) !important;
        color: var(--primary) !important;
    }
    
    /* TABLES */
    table, thead, tbody, tr, td, th {
        background: var(--bg-surface) !important;
        color: var(--text-main) !important;
    }
    
    th {
        background: #0f172a !important;
        color: var(--text-secondary) !important;
    }
    
    .bookings-table-wrapper thead {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    }
    
    td {
        border-bottom-color: #0f172a !important;
    }
    
    tbody tr:hover, .bookings-table-wrapper tbody tr:hover {
        background: #0f172a !important;
    }
    
    /* STATUS BADGES */
    .status-pending {
        background: #422006 !important;
        color: #fbbf24 !important;
        border-color: #92400e !important;
    }
    
    .status-confirmed {
        background: #064e3b !important;
        color: #6ee7b7 !important;
        border-color: #047857 !important;
    }
    
    .status-cancelled {
        background: #7f1d1d !important;
        color: #fca5a5 !important;
        border-color: #991b1b !important;
    }
    
    .badge-rate {
        background: #422006 !important;
        color: #fbbf24 !important;
    }
    
    .badge-single {
        background: #1e293b !important;
        color: #94a3b8 !important;
    }
    
    /* SPECIAL ELEMENTS */
    .price-breakdown, .row-warning {
        background: #0f172a !important;
        border-color: #334155 !important;
    }
    
    .row-warning {
        background-color: #422006 !important;
    }
    
    /* SELECT ARROW */
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    }
    
    /* TEXT ELEMENTS */
    h1, h2, h3, h4, h5, h6, .modal-title, label, strong {
        color: var(--text-main) !important;
    }
    
    /* RADIO & CHECKBOX */
    input[type="radio"], input[type="checkbox"] {
        background-color: #0f172a !important;
        border: 2px solid var(--border) !important;
    }
    
    input[type="radio"]:checked, input[type="checkbox"]:checked {
        background-color: var(--primary) !important;
        border-color: var(--primary) !important;
    }
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT STRUKTURA --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR - Minimalistički */
.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
    padding: 24px;
    transition: transform 0.3s ease;
}

/* Hamburger Menu Button - HIDDEN ON DESKTOP */
.hamburger-btn {
    display: none;
}

.sidebar .brand {
    margin-bottom: 40px;
    padding-left: 12px;
}

.sidebar .brand h2 {
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .brand h2::before {
    content: '';
    display: block;
    width: 12px; 
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar nav a:hover {
    color: var(--text-main);
    background-color: var(--bg-body);
}

.sidebar nav a.active {
    background-color: var(--primary-subtle);
    color: #b4860b;
    font-weight: 600;
}

.sidebar nav a i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1em;
    display: flex;
    justify-content: center;
}

/* Notification Badge */
.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
}

/* MAIN CONTENT - Centraliziran */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: margin-left 0.3s ease;
}

/* UNIFORM CONTAINER */
.content-wrapper {
    width: 100%;
    max-width: var(--container-width);
}

/* --- HEADER SEKCIJE --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

header p {
    color: var(--text-secondary);
    margin-top: 4px;
}

/* --- CARDS --- */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid transparent;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* --- EMPTY STATES --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 600;
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

/* --- FORMS & INPUTS --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 24px;
    margin-bottom: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

input, select, textarea, .flatpickr-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-body);
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background-color: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(237, 187, 61, 0.15);
}

/* Custom Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* --- SEARCH WRAPPER --- */
.search-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-wrapper input {
    padding-left: 45px !important;
}

/* --- FILTERS --- */
.filters-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filters-row input {
    max-width: 300px;
}

.filters-row select {
    max-width: 180px;
}

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--text-main);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.btn-small {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
}

.btn-small:hover {
    border-color: var(--text-main);
    background: var(--bg-body);
}

.btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px;
}

.btn-danger:hover {
    background: #dc2626 !important;
}

/* --- ICON BUTTONS --- */
.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-subtle);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* --- QUICK ACTIONS --- */
.quick-actions {
    display: flex;
    gap: 8px;
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--bg-body);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--bg-body);
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-rate {
    background: #fffbeb;
    color: #b45309;
}

.badge-single {
    background: #f1f5f9;
    color: #64748b;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.status-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.status-confirmed {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* --- UTILS --- */
.installments-box {
    background: var(--bg-body);
    padding: 24px;
    border-radius: var(--radius);
    margin-top: 16px;
    display: none;
}

.installments-highlight {
    background: #fffbf0;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--primary);
}

.image-upload-box {
    background: #f8fafc;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.passenger-item-modal {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

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

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

/* Skeleton Loader */
.skeleton {
    height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 12px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- TOAST --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #1e293b;
    color: #fff;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    border-left: 6px solid #10b981;
    font-weight: 600;
    animation: slideInRight 0.4s ease forwards;
}

.toast.error {
    border-left-color: #ef4444;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- LOGIN PAGE --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--bg-body);
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-surface);
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

/* --- PUBLIC BOOKING PAGE STYLES --- */
body.public-layout {
    background-color: #f8fafc;
    display: block;
}

.public-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.public-header {
    text-align: center;
    margin-bottom: 40px;
}

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

.trip-summary {
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(237, 187, 61, 0.1);
}

.trip-summary h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.trip-summary .date {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1rem;
}

.trip-summary .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 10px;
}

.price-breakdown {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.total-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .hamburger-btn {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 100;
        background: var(--bg-surface);
        border: 1px solid var(--border);
        width: 45px;
        height: 45px;
        border-radius: 12px;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-md);
    }

    .hamburger-btn i {
        font-size: 1.2rem;
        color: var(--text-main);
    }

    /* Sidebar mobile */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 20px 40px;
    }
    
    /* Form grid mobile */
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Filters mobile */
    .filters-row {
        flex-direction: column;
    }
    
    .filters-row input,
    .filters-row select {
        max-width: 100%;
    }
    
    /* Header mobile */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}
.row-warning {
    background-color: #fffaf0;
}

/* DARK MODE - BUTTON TEXT FIX */
@media (prefers-color-scheme: dark) {
    button:not(.btn-primary):not(.btn-danger),
    .btn-small:not(.btn-danger),
    .btn-icon,
    .btn-expand {
        color: #f1f5f9 !important;
    }
}