/*Ubicación: frontend/portal_proveedores/css/portal_login.css*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #0f766e;
    --primary-hover: #115e59;
    --dark-bg: #0b1220;
    --dark-hover: #1f2937;
    --text-main: #111827;
    --text-muted: #667085;
    --border-color: #dce3ec;
    --bg-light: #f7f9fb;
    --shadow-card: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

body, html {
    height: 100%;
    width: 100%;
}

/* ===== Layout: two-column split screen ===== */

.login-page {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.brand-panel {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(15, 118, 110, 0.55), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.35), transparent 50%),
        linear-gradient(160deg, #0b1220 0%, #111827 55%, #0b1220 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.brand-panel-inner {
    max-width: 440px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #5eead4;
    margin-bottom: 48px;
}

.brand-mark i {
    font-size: 1.4rem;
}

.brand-panel h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}

.brand-lead {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 500;
}

.brand-features i {
    font-size: 1.2rem;
    color: #2dd4bf;
    flex-shrink: 0;
}

.form-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.form-panel-footnote {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Login card ===== */

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.login-header {
    padding: 28px 30px 20px;
    text-align: left;
}

.login-header h2 {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.login-body {
    padding: 10px 30px 30px;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    font-size: 0.92rem;
    outline: none;
    transition: 0.2s;
    border-radius: 8px;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.forgot-password {
    text-align: right;
    margin-bottom: 22px;
}

.forgot-password a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password a:hover {
    color: var(--primary-color);
}

.btn-ingresar {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    min-height: 44px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.btn-ingresar:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.register-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eee;
    text-align: center;
}

.register-section p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.btn-registro {
    width: 100%;
    background: var(--dark-bg);
    color: white;
    border: none;
    min-height: 40px;
    padding: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.btn-registro:hover {
    background: var(--dark-hover);
}

/* ===== Modals ===== */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 18, 32, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    border-radius: 12px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f7f9fb;
    border-bottom: 1px solid #eee;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-body {
    padding: 25px;
}

.modal-instruccion {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
    background: #f0fdfa;
    padding: 15px;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}
.toast {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease forwards;
}
.toast.success { border-left: 5px solid #10b981; }
.toast.error { border-left: 5px solid #ef4444; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 3px;
    top: 50%;
    left: 50%;
    margin: -1px -12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    animation: btnProgress 0.9s ease-in-out infinite;
}

@keyframes btnProgress {
    0% { transform: translateX(-12px); }
    50% { transform: translateX(12px); }
    100% { transform: translateX(-12px); }
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===== Responsive ===== */

@media screen and (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        padding: 30px 20px;
    }
}

@media screen and (max-width: 480px) {
    .login-card {
        max-width: 100%;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 20px 15px;
    }

    .input-group input {
        font-size: 16px !important;
    }

    .modal-body div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .modal-body div[style*="display: flex"] button {
        width: 100% !important;
        padding: 12px !important;
    }

    .toast-container {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    .toast {
        width: 100%;
    }
}
