/*
 * WhatsApp Panel — pantalla de login (acceso SaaS)
 * Tipografía: Inter (--font-main)
 */

:root {
    --font-main: 'Inter', Arial, Helvetica, sans-serif;

    --color-bg: #F4F6F8;
    --color-white: #FFFFFF;

    --color-text: #111827;
    --color-muted: #6B7280;
    --color-soft: #9CA3AF;

    --color-border: #E5E7EB;

    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #128C7E;
    --color-dark-panel: #061D22;
    --color-dark-card: rgba(255, 255, 255, 0.07);

    --color-blue: #2563EB;
    --color-purple: #7C3AED;

    --radius-main: 28px;
    --radius-card: 18px;
    --shadow-main: 0 30px 80px rgba(15, 23, 42, 0.16);
    --shadow-soft: 0 16px 35px rgba(15, 23, 42, 0.08);
}

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

body.auth-page {
    min-height: 100vh;
    font-family: var(--font-main);
    background: radial-gradient(circle at top left, #FFFFFF 0%, var(--color-bg) 42%, #EEF2F7 100%);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-page a {
    color: inherit;
    text-decoration: none;
}

.auth-page button,
.auth-page input {
    font-family: inherit;
}

.login-shell {
    width: 100%;
    max-width: 1480px;
    min-height: 820px;
    background: var(--color-white);
    border-radius: var(--radius-main);
    box-shadow: var(--shadow-main);
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.66fr 1fr;
}

.login-form-side {
    padding: 68px 78px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #FFFFFF;
}

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

.brand-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--color-whatsapp), var(--color-whatsapp-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.28);
}

.brand-icon svg {
    width: 34px;
    height: 34px;
    color: #FFFFFF;
}

.brand-text h1 {
    font-size: 29px;
    line-height: 1.1;
    letter-spacing: -0.8px;
    font-weight: 800;
    margin-bottom: 4px;
}

.brand-text p {
    font-size: 16px;
    color: var(--color-muted);
}

.login-title {
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: -1.2px;
    font-weight: 800;
    margin-bottom: 16px;
}

.login-description {
    font-size: 16px;
    line-height: 1.7;
    color: #4B5563;
    max-width: 475px;
    margin-bottom: 36px;
}

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

.form-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 9px;
}

.input-wrap {
    position: relative;
}

.input-icon-left,
.input-icon-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8B95A5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
}

.input-icon-left {
    left: 18px;
    pointer-events: none;
}

.input-icon-right {
    right: 18px;
    cursor: pointer;
}

.input-icon-left svg,
.input-icon-right svg {
    width: 22px;
    height: 22px;
}

.input-wrap input {
    width: 100%;
    height: 58px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0 52px;
    font-size: 16px;
    color: var(--color-text);
    outline: none;
    background: #FFFFFF;
    transition: all 0.2s ease;
}

.input-wrap input.is-invalid {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.input-wrap input::placeholder {
    color: #8B95A5;
}

.input-wrap input:focus {
    border-color: var(--color-whatsapp);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.13);
}

.field-error {
    margin-top: 8px;
    font-size: 13px;
    color: #DC2626;
    font-weight: 600;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 8px 0 32px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #111827;
    cursor: pointer;
}

.remember input {
    width: 20px;
    height: 20px;
    accent-color: var(--color-whatsapp-dark);
}

.forgot-link {
    font-size: 15px;
    font-weight: 700;
    color: #07893C;
}

.forgot-link:hover,
.create-account a:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0B8F3C, #17BF52);
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 16px 30px rgba(37, 211, 102, 0.28);
    transition: all 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(37, 211, 102, 0.34);
}

.login-button svg {
    width: 19px;
    height: 19px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 34px 0;
    color: #6B7280;
    font-size: 15px;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #E5E7EB;
}

.google-button {
    width: 100%;
    height: 54px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    transition: all 0.2s ease;
    opacity: 0.72;
}

.google-button svg {
    width: 22px;
    height: 22px;
}

.create-account {
    margin-top: 28px;
    font-size: 15px;
    text-align: center;
    color: #4B5563;
}

.create-account a {
    font-weight: 800;
    color: #07893C;
    margin-left: 5px;
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}

.security-note {
    margin-top: 66px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #7B8494;
    font-size: 15px;
}

.security-note svg {
    width: 23px;
    height: 23px;
    color: #8EA0B8;
    flex: 0 0 auto;
}

.hero-side {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 12%, rgba(37, 211, 102, 0.20), transparent 28%),
        radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.14), transparent 32%),
        linear-gradient(145deg, #041B20, #061D22 45%, #092C32);
    padding: 88px 70px 64px;
    color: #FFFFFF;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 880px;
}

.hero-text {
    max-width: 455px;
    margin-bottom: 74px;
}

.hero-text h2 {
    font-size: 38px;
    line-height: 1.22;
    letter-spacing: -1.3px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-text h2 span {
    color: var(--color-whatsapp);
}

.hero-text p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.72);
}

.hero-image {
    position: absolute;
    top: 54px;
    right: 40px;
    width: 390px;
    max-width: 45%;
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

.hero-image img {
    width: 100%;
    display: block;
    object-fit: contain;
}

.status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    margin-bottom: 18px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-whatsapp);
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0.13);
    flex: 0 0 auto;
}

.status-info strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 5px;
}

.status-info span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.74);
}

.status-action {
    min-width: 130px;
    height: 44px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-weight: 700;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}

.status-action svg {
    width: 18px;
    height: 18px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.metric-card {
    min-height: 150px;
    padding: 22px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
}

.metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.metric-icon svg {
    width: 23px;
    height: 23px;
    color: #FFFFFF;
}

.metric-icon.green {
    background: linear-gradient(135deg, #10B981, #059669);
}

.metric-icon.cyan {
    background: linear-gradient(135deg, #06B6D4, #0E7490);
}

.metric-icon.blue {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.metric-icon.purple {
    background: linear-gradient(135deg, #7C3AED, #5B21B6);
}

.metric-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.90);
}

.metric-sub {
    margin-top: 7px;
    font-size: 13px;
    color: #4ADE80;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 18px;
}

.dark-card {
    padding: 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 19px;
}

.card-header h3 {
    font-size: 17px;
    font-weight: 800;
}

.card-header button {
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: default;
    pointer-events: none;
}

.conversation-item,
.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.conversation-item:last-child,
.activity-item:last-child {
    margin-bottom: 0;
}

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CBD5E1, #64748B);
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversation-info {
    min-width: 0;
    flex: 1;
}

.conversation-info strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 5px;
}

.conversation-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.70);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.76);
}

.badge-count {
    margin-top: 8px;
    display: inline-flex;
    width: 24px;
    height: 22px;
    border-radius: 9px;
    background: #16A34A;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    align-items: center;
    justify-content: center;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.activity-icon svg {
    width: 18px;
    height: 18px;
    color: #FFFFFF;
}

.activity-icon.green {
    background: rgba(37, 211, 102, 0.16);
    color: #FFFFFF;
}

.activity-icon.blue {
    background: rgba(37, 99, 235, 0.18);
}

.activity-info {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #FFFFFF;
}

.activity-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 760px;
    }

    .hero-side {
        display: none;
    }

    .login-form-side {
        padding: 54px 42px;
    }
}

@media (max-width: 560px) {
    body.auth-page {
        padding: 14px;
    }

    .login-shell {
        border-radius: 22px;
        min-height: auto;
    }

    .login-form-side {
        padding: 38px 24px;
    }

    .brand {
        margin-bottom: 38px;
    }

    .brand-icon {
        width: 54px;
        height: 54px;
    }

    .brand-text h1 {
        font-size: 24px;
    }

    .login-title {
        font-size: 31px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .security-note {
        margin-top: 38px;
        align-items: flex-start;
    }
}
