:root {
    /* Brand Colors (VIMODROM Baskets) */
    --primary: #c90000; /* Red */
    --primary-hover: #a30000;
    --bg-dark: #121212;
    --surface-dark: #1e1e1e;
    --surface-dark-border: #333333;
    --text-main: #f5f5f5;
    --text-muted: #aaaaaa;

    --success: #6aa84f;
    --warning: #f1c232;
    --danger: #c90000;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background-color: var(--surface-dark);
    border-bottom: 1px solid var(--surface-dark-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-img {
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.title-section h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.title-section p {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background-color: rgba(255,255,255,0.05);
}

/* Main Container */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Cards */
.card {
    background-color: var(--surface-dark);
    border: 1px solid var(--surface-dark-border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}
input[type="text"], input[type="password"], input[type="date"], select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--surface-dark-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(201, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(201,0,0,0.3);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201,0,0,0.4);
}
.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: var(--text-main);
}
.btn-block {
    width: 100%;
    display: block;
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-error {
    background-color: rgba(201,0,0,0.1);
    border: 1px solid var(--danger);
    color: #ff6b6b;
}
.alert-success {
    background-color: rgba(106,168,79,0.1);
    border: 1px solid var(--success);
    color: #8ce99a;
}
.alert-info {
    background-color: rgba(241,194,50,0.1);
    border: 1px solid var(--warning);
    color: #ffe066;
}

/* Loading animation for modern feel */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Radio & Checkbox buttons (Streamlit style horizontal) */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.radio-item input[type="radio"] {
    accent-color: var(--primary);
    width: 1.2rem;
    height: 1.2rem;
}

/* Layout Utilities */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        text-align: center;
    }
    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    .logo-img {
        height: 50px;
    }
    .title-section h2 {
        font-size: 1.25rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    main {
        padding: 1rem;
    }
    .card {
        padding: 1.25rem;
    }
    .grid-2-col, .grid-3-col {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .flex-between {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    .flex-between > * {
        margin-bottom: 0.5rem;
    }
    .btn {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
        box-sizing: border-box;
    }
    /* Keep horizontal scrolling for data tables */
    .data-table {
        min-width: 500px; /* Forces scroll on small screens only for large tables */
    }
}
