/* PARKS auth — ByteRoute brand + sistēmas neitrālā palete */
:root {
    --auth-bg: #F1F5F9;
    --auth-fg: #1E293B;
    --auth-muted: #64748B;
    --auth-border: #E2E8F0;
    --auth-card: #FFFFFF;
    --auth-primary: #2563EB;
    --auth-primary-dark: #1E3A5F;
    --auth-teal: #12B4C7;
    --auth-radius: 10px;
    --auth-shadow: 0 10px 40px -12px rgba(30, 58, 95, 0.14);
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
    color: var(--auth-fg);
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(47, 115, 255, 0.10), transparent 55%),
        radial-gradient(700px 380px at 92% 8%, rgba(53, 216, 212, 0.09), transparent 50%),
        linear-gradient(180deg, #F8FAFC 0%, var(--auth-bg) 100%);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 1.5rem;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 2rem 1.75rem 1.5rem;
}

.auth-panel--wide {
    max-width: 560px;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand__mark {
    width: 48px;
    height: 60px;
    margin-bottom: 0.85rem;
}

.auth-brand__mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auth-brand__name {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--auth-primary-dark);
    line-height: 1.1;
}

.auth-brand__tagline {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.auth-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--auth-primary-dark);
}

.auth-lead {
    margin: 0 0 1.35rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.45;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-fg);
}

.auth-field .form-control {
    height: 42px;
    border-radius: 8px;
    border-color: var(--auth-border);
    font-size: 0.95rem;
    color: var(--auth-fg);
    background: #fff;
}

.auth-field .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0.25rem 0 1.25rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
    cursor: pointer;
    line-height: 1.35;
}

.auth-check input[type="checkbox"] {
    position: static;
    float: none;
    margin: 0.15rem 0 0;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-check span {
    flex: 1;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 44px;
    padding: 0 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.auth-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.auth-btn--primary {
    background: linear-gradient(135deg, #2563EB, #1E4DB7);
    color: #fff;
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.4);
}

.auth-btn--primary:not(:disabled):hover {
    opacity: 0.93;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.auth-link {
    text-align: center;
    font-size: 0.85rem;
}

.auth-link a {
    color: var(--auth-primary);
    font-weight: 500;
}

.auth-link a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-alert {
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.auth-alert--danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

.auth-alert--warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #92400E;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--auth-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.auth-footer__vendor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-fg);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-footer__vendor:hover {
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-footer__vendor svg {
    width: 22px;
    height: 30px;
    flex-shrink: 0;
}

.auth-footer__meta {
    margin: 0;
    font-size: 0.72rem;
    color: var(--auth-muted);
}

.auth-org-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.auth-org-card {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.95rem 1rem;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-org-card:hover {
    border-color: #93C5FD;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.auth-org-card.is-selected {
    border-color: var(--auth-primary);
    background: #F8FAFF;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-org-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.auth-org-card__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--auth-fg);
}

.auth-org-card__email {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: var(--auth-muted);
}

.auth-badge {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.auth-badge--primary {
    background: #DBEAFE;
    color: #1E40AF;
}

.auth-badge--muted {
    background: #F1F5F9;
    color: #475569;
}

.auth-link-btn {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--auth-primary);
    cursor: pointer;
}

.auth-link-btn:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-btn--ghost {
    width: auto;
    min-width: 7rem;
    height: 40px;
    background: transparent;
    border: 1px solid var(--auth-border);
    color: var(--auth-fg);
    box-shadow: none;
}

.auth-btn--ghost:hover {
    background: #F8FAFC;
}

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

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

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

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.auth-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 1.25rem 1.35rem 1.15rem;
}

.auth-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auth-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--auth-primary-dark);
}

.auth-modal__close {
    border: none;
    background: transparent;
    color: var(--auth-muted);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.auth-modal__close:hover {
    color: var(--auth-fg);
}

.auth-modal__body {
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.5;
}

.auth-modal__body p {
    margin: 0 0 0.65rem;
}

.auth-modal__contact {
    margin-top: 0.85rem !important;
}

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

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

.auth-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.auth-modal__footer .auth-btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    text-decoration: none;
}

@media (max-width: 480px) {
    .auth-panel {
        padding: 1.5rem 1.15rem 1.25rem;
    }

    .auth-brand__name {
        font-size: 1.4rem;
        letter-spacing: 0.1em;
    }
}
