/* ORBIS - Dark Theme (matching prototype) */
:root {
    --bg-primary: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #222633;
    --bg-input: #252936;
    --border: #2a2e3b;
    --text-primary: #e8eaf0;
    --text-secondary: #8b8fa3;
    --text-muted: #5a5e70;
    --accent-blue: #4a9eff;
    --accent-orange: #ff8c42;
    --accent-red: #ff4d6a;
    --accent-green: #34d399;
    --accent-purple: #a78bfa;
    --accent-yellow: #fbbf24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: #6db3ff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

#blazor-error-ui {
    background: var(--accent-red);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.5);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--accent-red);
    padding: 1rem;
    color: white;
    border-radius: 8px;
}

.blazor-error-boundary::after { content: "Nastala chyba." }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.btn:hover { background: var(--bg-card-hover); border-color: #444; }
.btn-accent {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    font-weight: 600;
}
.btn-accent:hover { background: #3d8be6; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-danger {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}
.btn-danger:hover { background: #e0435c; }

/* FAB - floating add button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    border: none;
    font-size: 1.6rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 150;
    box-shadow: 0 4px 16px rgba(74,158,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(74,158,255,0.5); }

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-sheet {
    background: var(--bg-primary);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-head h2 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
}
.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.form-actions .btn { flex: 1; justify-content: center; }

/* Form inputs */
input[type="text"], input[type="search"], input[type="number"], select, textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 16px; /* prevents iOS zoom on focus */
    outline: none;
    transition: border-color 0.15s;
    -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-blue); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Utility */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.inactive { opacity: 0.4; }

/* ===== Login page ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}
.login-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-blue);
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 28px;
}
.login-error {
    background: rgba(255, 77, 106, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.login-field {
    text-align: left;
    margin-bottom: 16px;
}
.login-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}
.login-field input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s;
}
.login-field input:focus {
    border-color: var(--accent-blue);
}
.login-field input::placeholder {
    color: var(--text-muted);
}
.login-remember {
    text-align: left;
    margin-bottom: 20px;
}
.login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
}
.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.login-btn:hover {
    background: #3d8be6;
}

/* Nav logout */
.nav-logout-form {
    margin-left: auto;
}
.nav-logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}
.nav-logout-btn:hover {
    color: var(--accent-red);
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
