/* rOZvita - Main Stylesheet */

:root {
    --color-primary: #0077B6;
    --color-primary-light: #90E0EF;
    --color-primary-dark: #023E8A;
    --color-primary-bg: #CAF0F8;
    --color-booked-other: #9E9E9E;
    --color-booked-other-bg: #E0E0E0;
    --color-booked-own: #0077B6;
    --color-conflict: #E63946;
    --color-success: #2D6A4F;
    --color-warning: #E9C46A;
    --color-bg: #F8F9FA;
    --color-white: #FFFFFF;
    --color-text: #212529;
    --color-text-light: #6C757D;
    --color-border: #DEE2E6;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header / Navigation */
.nav {
    background: var(--color-primary-dark);
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}
.nav-brand:hover {
    text-decoration: none;
    color: var(--color-primary-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a, .nav-links button {
    color: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-links a:hover, .nav-links button:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
}
.nav-links a.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary-bg);
    color: var(--color-primary-dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--color-white);
}
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0,119,182,0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    gap: 6px;
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: var(--color-border);
    color: var(--color-text);
}
.btn-secondary:hover:not(:disabled) {
    background: #CED4DA;
}

.btn-danger {
    background: var(--color-conflict);
    color: white;
}
.btn-danger:hover:not(:disabled) {
    background: #C1121F;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}
.btn-outline:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

/* Auth pages */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo h1 {
    font-size: 2rem;
    color: var(--color-primary);
    letter-spacing: 2px;
}
.auth-logo p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 350px;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-conflict); }
.toast-info { background: var(--color-primary); }

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

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
table th {
    background: var(--color-bg);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}
table tr:hover td {
    background: rgba(0,119,182,0.03);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-admin {
    background: var(--color-primary-bg);
    color: var(--color-primary-dark);
}
.badge-user {
    background: #E9ECEF;
    color: var(--color-text-light);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        padding: 0 12px;
        height: 54px;
    }
    .nav-brand {
        font-size: 1.2rem;
    }
    .nav-links a, .nav-links button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    .container {
        padding: 12px;
    }
    .card {
        padding: 16px;
    }
    .auth-container {
        margin-top: 30px;
    }
    .nav-user span.user-email {
        display: none;
    }
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
