/* Admin prijava – modal */

:root {
    --account-glass: rgba(255, 255, 255, 0.72);
    --account-glass-dark: rgba(28, 24, 18, 0.82);
    --account-glow: rgba(212, 175, 55, 0.35);
    --account-radius: 22px;
    --account-radius-sm: 14px;
}

[data-theme="dark"] {
    --account-glass: rgba(32, 28, 22, 0.78);
    --account-glass-dark: rgba(18, 15, 10, 0.92);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal[hidden] {
    display: none !important;
}

body.auth-modal-open {
    overflow: hidden;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 5, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-modal-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: min(92vh, 760px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--account-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--account-radius);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(212, 175, 55, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    padding: 2.25rem 2rem 2rem;
    animation: authModalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    border-radius: 0 0 6px 6px;
    background: var(--gradient-primary);
}

@keyframes authModalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.auth-modal-close:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.auth-modal-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-modal-brand img {
    border-radius: 50%;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 32px var(--account-glow);
    border: 3px solid rgba(212, 175, 55, 0.25);
}

.auth-modal-brand h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.auth-modal-brand p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: panelFade 0.3s ease;
}

@keyframes panelFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form .form-group {
    margin-bottom: 1.1rem;
}

.auth-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    letter-spacing: 0.02em;
}

.auth-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--account-radius-sm);
    background: var(--bg-color);
    color: var(--text-dark);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}

.auth-form input::placeholder {
    color: var(--text-light);
    opacity: 0.75;
}

.auth-submit {
    width: 100%;
    margin-top: 0.75rem;
    justify-content: center;
    padding: 0.9rem 1.25rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.auth-error {
    background: rgba(220, 53, 69, 0.08);
    color: #b02a37;
    padding: 0.7rem 0.9rem;
    border-radius: var(--account-radius-sm);
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.auth-switch-text {
    text-align: center;
    margin-top: 1.15rem;
    font-size: 0.9rem;
}

.auth-switch-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch-text a:hover {
    text-decoration: underline;
}

.auth-panel-intro {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.55;
}
