/* Vistas /auth: layout centrado, sin panel */

.mg-auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--mg-white-150);
    color: var(--mg-grey);
}

[data-theme="dark"] .mg-auth-body {
    background: var(--mg-white-100);
    color: var(--mg-grey);
}

.mg-auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem 2rem;
    box-sizing: border-box;
}

.mg-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto 0.5rem;
}

.mg-auth-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mg-auth-logo-img--dark {
    display: none;
}

[data-theme="dark"] .mg-auth-logo-img--light {
    display: none;
}

[data-theme="dark"] .mg-auth-logo-img--dark {
    display: block;
    filter: brightness(0) invert(1);
}

.mg-auth-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mg-auth-theme-btn {
    color: var(--mg-grey-100) !important;
    text-decoration: none !important;
    padding: 0.35rem 0.5rem !important;
}

[data-theme="dark"] .mg-auth-theme-btn {
    color: var(--mg-grey-100) !important;
}

.mg-auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.mg-auth-card {
    width: 100%;
    max-width: 400px;
}


.mg-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    color: var(--mg-grey);
}

[data-theme="dark"] .mg-auth-title {
    color: var(--mg-grey);
}

.mg-auth-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: var(--mg-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.45;
}

[data-theme="dark"] .mg-auth-subtitle {
    color: var(--mg-lavanda-500);
}

.mg-auth-hint {
    font-size: 0.9rem;
    color: var(--mg-grey-100);
    text-align: center;
}

[data-theme="dark"] .mg-auth-hint {
    color: var(--mg-grey-100);
}

.mg-auth-btn-social {
    border-radius: var(--border-radius-small);
    min-height: 44px;
}

.mg-auth-sep {
    text-align: center;
    font-size: 0.85rem;
    color: var(--mg-secondary);
    margin: 0 0 1rem;
    position: relative;
}

.mg-auth-sep span {
    background: var(--mg-white-150);
    padding: 0 0.5rem;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .mg-auth-sep span {
    background: var(--mg-white-100);
}

.mg-auth-sep::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--mg-grey-200);
    z-index: 0;
}

[data-theme="dark"] .mg-auth-sep::before {
    background: var(--mg-white-150);
}

.mg-auth-link-row {
    text-align: center;
}

.mg-auth-link-row a {
    font-weight: 500;
}

.mg-auth-legal {
    line-height: 1.5;
    text-align: center;
}

.mg-auth-footer {
    max-width: 520px;
    margin: 0 auto;
    padding-top: 1rem;
    line-height: 1.4;
}

.mg-auth-card .form-control {
    border-radius: var(--border-radius-small);
}

.mg-auth-card .btn-primary {
    min-height: 44px;
    font-weight: 600;
}

.mg-auth-card .input-group .btn {
    border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;
    border: 0 !important;
    transform: translate(0px, 0px) !important;
}

/* intl-tel-input en tema oscuro */
[data-theme="dark"] .mg-auth-card .iti__country-list {
    background: var(--mg-white);
    border-color: var(--mg-white-200);
}

[data-theme="light"] .mg-auth-body .mG_invalid,
.mg-auth-body .mG_invalid {
    border-color: var(--mg-primary) !important;
}

/* Página 404 (layout propio, sin panel) */
.mg-error-page-card {
    max-width: 28rem;
    padding: 0 1rem;
}

.mg-error-page-code {
    font-size: clamp(3rem, 12vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 0.75rem;
    color: var(--mg-primary);
    letter-spacing: -0.04em;
}
