/* Public auth pages + modal */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8fafc;
}

.auth-page-brand {
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.auth-page-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
}

.auth-page-brand p {
    opacity: 0.9;
    max-width: 420px;
    line-height: 1.8;
}

.auth-page-brand ul {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.auth-page-brand li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
}

.auth-page-brand li i {
    color: #93c5fd;
}

.auth-page-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card-pro {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    padding: 2rem;
}

.auth-card-pro h2 {
    font-size: 1.45rem;
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.auth-card-pro .auth-subtitle {
    color: #64748b;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.auth-input-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.auth-input-wrap label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #334155;
}

.auth-input-wrap input {
    width: 100%;
    padding: 0.75rem 0.9rem 0.75rem 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-input-wrap .field-icon {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.auth-card-pro .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 10px;
    padding: 0.8rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: #64748b;
}

.auth-switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

/* Header auth buttons */
.auth-section-pro {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.auth-btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.auth-btn-pro.login {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.auth-btn-pro.login:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.auth-btn-pro.register {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.auth-btn-pro.register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.user-btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.user-btn-pro .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-btn-pro .user-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
}

/* Auth modal */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal.is-open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-tabs {
    display: flex;
    gap: 0.35rem;
    background: #e2e8f0;
    padding: 0.25rem;
    border-radius: 10px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.tab-btn.active {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.modal-close {
    border: none;
    background: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 1.25rem 1.25rem 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 0.9rem;
}

.modal-body label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #334155;
}

.modal-body input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
}

.modal-body input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.form-errors {
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-page-brand {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .auth-page-brand h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .auth-section-pro.desktop-only {
        display: none;
    }

    .auth-btn-pro {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}
