/* ==========================================================
   BLOGAI - LOGIN
   ========================================================== */

:root {
    --primary: #635bff;
    --primary-dark: #5046e5;
    --primary-light: #eeecff;

    --cyan: #24c8db;

    --dark: #101828;
    --dark-soft: #19243b;

    --white: #ffffff;
    --background: #f8faff;

    --text: #172033;
    --text-muted: #7d889c;

    --border: #e4e8f0;

    --radius: 14px;
    --transition: 0.25s ease;
}

/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
}

/* LAYOUT */

.login-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
}

/* ==========================================================
   SHOWCASE
   ========================================================== */

.showcase {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 75% 18%,
            rgba(99, 91, 255, 0.3),
            transparent 36%
        ),
        radial-gradient(
            circle at 10% 80%,
            rgba(36, 200, 219, 0.13),
            transparent 40%
        ),
        linear-gradient(145deg, #101828, #19243b 70%, #222850);
    color: var(--white);
}

.showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
    pointer-events: none;
}

.showcase-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -200px;
    bottom: 100px;
    border-radius: 50%;
    background: rgba(99, 91, 255, 0.16);
    filter: blur(70px);
}

.showcase-content {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: 42px clamp(30px, 6vw, 90px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 50px;
}

/* LOGOMARCA */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    color: var(--white);
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #7972ff, #4cbbf1);
    box-shadow: 0 7px 25px rgba(99, 91, 255, 0.3);
}

.brand-icon svg {
    width: 26px;
    height: 26px;
}

.brand-name {
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -1.4px;
}

.brand-name span {
    color: #8e88ff;
}

/* TEXTO INSTITUCIONAL */

.showcase-main {
    width: 100%;
    max-width: 590px;
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    color: #c5c9ff;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #54e4bc;
    box-shadow: 0 0 12px rgba(84, 228, 188, 0.6);
}

.showcase h1 {
    max-width: 590px;
    font-size: clamp(35px, 3.4vw, 52px);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -2px;
}

.showcase h1 span {
    display: block;
    background: linear-gradient(100deg, #aaa6ff, #6de4ef);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.showcase-main > p {
    max-width: 480px;
    margin-top: 20px;
    color: #aab5cb;
    font-size: 15px;
    line-height: 1.85;
}

/* ARTE DO DASHBOARD */

.dashboard-art {
    position: relative;
    margin-top: 45px;
    padding: 0 20px 28px 0;
}

.art-window {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #f8faff;
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.27);
    transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
}

.art-topbar {
    height: 41px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid #e8ebf3;
    color: #67728a;
    font-size: 11px;
}

.window-dots {
    display: flex;
    gap: 5px;
}

.window-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d6dbe7;
}

.window-dots i:first-child {
    background: #fd9c9c;
}

.window-dots i:nth-child(2) {
    background: #ffd37a;
}

.window-dots i:nth-child(3) {
    background: #68d5af;
}

.status-online {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #18956c;
}

.status-online span {
    width: 6px;
    height: 6px;
    background: #20b78b;
    border-radius: 50%;
}

.art-body {
    display: flex;
    min-height: 260px;
}

.art-sidebar {
    width: 54px;
    flex-shrink: 0;
    padding: 18px 10px;
    background: #eef0ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.sidebar-symbol {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 18px;
    color: #9197b5;
}

.sidebar-symbol.active {
    color: white;
    background: var(--primary);
}

.art-details {
    flex: 1;
    min-width: 0;
    padding: 18px;
}

.art-heading,
.conversation-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.art-heading small {
    display: block;
    color: #9ca5b8;
    font-size: 10px;
}

.art-heading strong {
    display: block;
    margin-top: 5px;
    color: #24314c;
    font-size: 16px;
}

.art-avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    background: #e9e7ff;
    color: var(--primary);
    border-radius: 50%;
    font-weight: 800;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 19px;
}

.metric-card {
    min-height: 100px;
    padding: 13px;
    border: 1px solid #edf0f6;
    border-radius: 12px;
    background: white;
}

.metric-icon {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    margin-bottom: 8px;
}

.metric-icon.violet {
    color: #685cf6;
    background: #efedff;
}

.metric-icon.cyan {
    color: #10a9c0;
    background: #e6fbff;
}

.metric-card small {
    display: block;
    font-size: 10px;
    color: #66758c;
}

.metric-line {
    display: block;
    height: 6px;
    margin-top: 7px;
    background: #eef1f8;
    border-radius: 20px;
}

.metric-line.wide {
    width: 80%;
}

.metric-line.short {
    width: 48%;
}

.conversation-card {
    margin-top: 12px;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #edf0f6;
    background: white;
}

.conversation-heading strong {
    font-size: 12px;
    color: #36415a;
}

.conversation-heading > span {
    color: #a6afc1;
}

.conversation-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 13px;
}

.avatar {
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
}

.violet-bg {
    background: #eceaff;
    color: #675bf2;
}

.cyan-bg {
    background: #dff8fc;
    color: #099aac;
}

.orange-bg {
    background: #fff0dc;
    color: #d28d2d;
}

.conversation-lines {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
}

.conversation-lines span {
    height: 6px;
    background: #e9edf5;
    border-radius: 10px;
}

.conversation-lines span:first-child {
    width: 57%;
}

.conversation-lines span:last-child {
    width: 84%;
}

.message-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #635bff;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    right: -8px;
    bottom: 0;
    padding: 13px 16px;
    border-radius: 13px;
    background: white;
    color: #24314c;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.floating-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: #dcf9ec;
    color: #159d72;
    border-radius: 10px;
    font-weight: bold;
}

.floating-card strong,
.floating-card small {
    display: block;
}

.floating-card strong {
    font-size: 12px;
}

.floating-card small {
    margin-top: 3px;
    font-size: 10px;
    color: #8793a6;
}

.showcase-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #78859e;
    font-size: 12px;
}

/* ==========================================================
   PAINEL DE LOGIN
   ========================================================== */

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    padding: 40px clamp(25px, 5vw, 85px) 26px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: auto 0;
    padding: 35px 0;
}

.mobile-brand {
    display: none;
}

.welcome-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 25px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
}

.welcome-icon svg {
    width: 27px;
    height: 27px;
}

.login-caption {
    display: block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.login-intro h2 {
    margin-top: 14px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -1.2px;
}

.login-intro p {
    margin-top: 13px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.login-form {
    margin-top: 37px;
}

.form-group {
    margin-bottom: 23px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 10px;
    color: #344054;
}

.label-row {
    display: flex;
    justify-content: space-between;
}

.input-wrapper {
    height: 53px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    transition: border-color var(--transition),
                box-shadow var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.09);
}

.input-wrapper > svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #98a3b8;
}

.input-wrapper input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.input-wrapper input::placeholder {
    color: #a4aebe;
}

.toggle-password {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #98a3b8;
}

.toggle-password:hover {
    color: var(--primary);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.submit-button {
    width: 100%;
    min-height: 54px;
    margin-top: 7px;
    padding: 0 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(120deg, #635bff, #5148e8);
    box-shadow: 0 8px 22px rgba(99, 91, 255, 0.2);
    color: white;
    font-size: 14px;
    font-weight: 700;
    transition: transform var(--transition),
                box-shadow var(--transition);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(99, 91, 255, 0.3);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.submit-button svg {
    width: 19px;
    height: 19px;
}

.login-help {
    margin-top: 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.login-help a {
    color: var(--primary);
    font-weight: 700;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    color: #98a2b3;
    font-size: 12px;
}

.security-note svg {
    width: 16px;
    height: 16px;
    color: #20a883;
}

.login-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: #98a2b3;
    font-size: 11px;
}

.login-footer a {
    color: var(--primary);
}

.alert-error {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding: 14px;
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    border-radius: 10px;
    color: #bd3434;
    font-size: 13px;
}

.alert-icon {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #d74646;
    color: white;
    font-weight: 800;
}

/* ==========================================================
   RESPONSIVIDADE
   ========================================================== */

@media (max-width: 1100px) {
    .showcase-content {
        padding: 35px;
    }

    .showcase h1 {
        font-size: 37px;
    }

    .login-panel {
        padding-left: 35px;
        padding-right: 35px;
    }
}

@media (max-width: 850px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .showcase {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 28px 24px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        align-self: flex-start;
        font-size: 25px;
        font-weight: 800;
        letter-spacing: -1px;
    }

    .mobile-brand strong {
        color: var(--primary);
    }

    .mobile-brand-icon {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 11px;
        background: var(--primary);
        color: white;
    }

    .login-container {
        max-width: 440px;
        padding: 60px 0;
    }

    .login-footer {
        max-width: 440px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 24px 20px;
    }

    .login-container {
        padding: 42px 0;
    }

    .login-intro h2 {
        font-size: 29px;
    }

    .login-form {
        margin-top: 30px;
    }

    .input-wrapper {
        height: 55px;
    }

    .login-footer {
        flex-direction: column;
        text-align: center;
        gap: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}