/* AMMS Login — Split-screen layout */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
}

/* ── LEFT PANEL ──────────────────────────────────────────────────────────── */

.panel-left {
    width: 42%;
    background-color: #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
    position: relative;
    overflow: hidden;
}

/* Decoración de fondo */
.panel-left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    background: rgba(13, 110, 253, 0.12);
    border-radius: 50%;
    pointer-events: none;
}

.panel-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 260px;
    height: 260px;
    background: rgba(13, 110, 253, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

/* Logo */
.brand {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: #0d6efd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-icon svg {
    width: 26px;
    height: 26px;
    fill: white;
}

.brand-name {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-name span {
    color: #0d6efd;
}

.brand-tagline {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.5;
    margin-left: 60px;
}

/* Descripción central */
.panel-body {
    position: relative;
    z-index: 1;
}

.panel-headline {
    font-size: 26px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.35;
    margin-bottom: 16px;
}

.panel-sub {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 40px;
}

/* Features list */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(13, 110, 253, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #60a5fa;
    font-size: 16px;
}

.feature-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.feature-text span {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Footer del panel */
.panel-footer-text {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #475569;
}

/* ── RIGHT PANEL ─────────────────────────────────────────────────────────── */

.panel-right {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Header del form */
.form-header {
    margin-bottom: 36px;
}

.form-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: #64748b;
}

/* Error */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc3545;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 24px;
    display: none;
}

.alert-error.show {
    display: block;
}

/* Campos */
.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrap input {
    width: 100%;
    padding: 11px 42px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap input:focus {
    background: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.input-wrap input:focus ~ i,
.input-wrap input:focus + i {
    color: #0d6efd;
}

.input-wrap input.is-invalid {
    border-color: #dc3545;
}

.btn-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-eye:hover {
    color: #0d6efd;
}

/* Opciones */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0d6efd;
    cursor: pointer;
}

.link-forgot {
    font-size: 13px;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.link-forgot:hover {
    text-decoration: underline;
}

/* Botón submit */
.btn-submit {
    width: 100%;
    padding: 13px;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.3);
}

.btn-submit:hover {
    background: #0b5ed7;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading .btn-label { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Version footer */
.form-version {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: #cbd5e1;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .panel-left {
        display: none;
    }

    body {
        background: #f8fafc;
    }

    .panel-right {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .form-wrapper {
        max-width: 100%;
    }
}
