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

:root {
    --bg: #100b18;
    --panel: #171020;
    --panel2: #1d1428;
    --line: rgba(255,255,255,.075);
    --text: #f8f2fc;
    --muted: #9e91aa;
    --pink: #f18acb;
    --purple: #ad83f5;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
}
button, textarea { font: inherit; }
button { cursor: pointer; }

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 270px;
    flex-shrink: 0;
    background: #140e1d;
    border-right: 1px solid var(--line);
    padding: 25px 18px 17px;
    display: flex;
    flex-direction: column;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    padding: 3px 7px 30px;
}
.brand-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    font: 800 23px Manrope;
    background: linear-gradient(135deg,#f29bd0,#9d75ed);
    color: #24132b;
    box-shadow: 0 5px 25px #c47bce35;
}
.brand strong { display: block; font: 800 19px Manrope; letter-spacing: 1px; }
.brand strong span, .top-brand span { color: var(--pink); }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: 1.7px; }

.new-chat {
    width: 100%;
    padding: 13px;
    border: 1px solid #d88cc744;
    border-radius: 12px;
    background: linear-gradient(110deg,#d77bbd22,#9872e522);
    color: #f8d9f1;
    text-align: left;
    font-weight: 600;
}
.new-chat span { font-size: 19px; margin-right: 8px; }
.side-label { color: #81748d; font-size: 10px; letter-spacing: 1.5px; margin: 32px 8px 14px; }
.history { flex: 1; }
.empty-history { color: #776b80; font-size: 12px; padding: 8px; line-height: 1.6; }
.history-item {
    padding: 11px;
    border-radius: 9px;
    color: #cfc2d7;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-item:hover { background: #ffffff0b; }
.sidebar-bottom { margin-top: auto; }
.profile { display: flex; align-items: center; gap: 10px; padding: 15px 5px; border-top: 1px solid var(--line); }
.avatar {
    width: 35px; height: 35px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg,#f09acb,#9978e8);
    color: #25132c; font-weight: 800;
}
.profile strong { display: block; font-size: 12px; }
.profile small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.online-dot { width: 7px; height: 7px; background: #69dba7; border-radius: 50%; margin-left: auto; box-shadow: 0 0 10px #69dba7; }
.version { text-align: center; color: #65596e; font-size: 9px; letter-spacing: 1px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    height: 68px; flex-shrink: 0; display: flex; align-items: center;
    justify-content: space-between; padding: 0 34px;
    border-bottom: 1px solid var(--line);
}
.top-brand { font: 800 15px Manrope; letter-spacing: 1.5px; }
.top-status { color: #b6a9bf; font-size: 11px; }
.top-status i { display: inline-block; width: 7px; height: 7px; background: #69dba7; border-radius: 50%; margin-right: 7px; box-shadow: 0 0 9px #69dba7; }
.mobile-menu { display: none; background: none; border: 0; color: white; font-size: 21px; }

.conversation {
    flex: 1; width: 100%; max-width: 900px; margin: 0 auto;
    padding: 35px 35px 20px; display: flex; flex-direction: column;
}
.welcome { margin: auto 0; text-align: center; padding: 15px 0 35px; }
.welcome-orb { width: 100px; height: 100px; margin: 0 auto 25px; position: relative; display: grid; place-items: center; }
.orb-core {
    width: 66px; height: 66px; display: grid; place-items: center;
    border-radius: 23px; background: linear-gradient(145deg,#f4a1d1,#a27bf0);
    color: #28162e; font: 800 33px Manrope;
    box-shadow: 0 0 45px #c17ed34d;
}
.orb-ring { position: absolute; inset: 0; border: 1px solid #d58bdf55; border-radius: 31px; transform: rotate(25deg); }
.ring-two { inset: 9px; transform: rotate(65deg); border-color: #a786f255; }
.eyebrow { color: #c99bd0; font-size: 9px; letter-spacing: 2.2px; font-weight: 700; }
.eyebrow span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); margin: 0 7px 1px 0; }
h1 { font: 800 clamp(35px,5vw,53px)/1.13 Manrope; letter-spacing: -2px; margin: 17px 0 13px; }
h1 em { font-style: normal; background: linear-gradient(90deg,#f3a0d2,#b899ff); color: transparent; background-clip: text; }
.welcome > p { color: #a99caf; font-size: 13px; line-height: 1.8; margin: 0; }

.suggestions { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; max-width: 680px; margin: 30px auto 0; }
.suggestion {
    min-width: 0; display: flex; align-items: center; gap: 10px;
    padding: 13px 11px; text-align: left; color: var(--text);
    border: 1px solid var(--line); border-radius: 13px;
    background: #ffffff05; transition: .2s;
}
.suggestion:hover { border-color: #d78acb77; background: #d78acb10; transform: translateY(-2px); }
.suggestion > span { color: var(--pink); font-size: 18px; }
.suggestion div { flex: 1; min-width: 0; }
.suggestion strong { display: block; font-size: 10px; }
.suggestion small { display: block; color: #93869e; font-size: 9px; margin-top: 4px; }
.suggestion b { color: #86758f; font-size: 13px; }

.messages { display: flex; flex-direction: column; gap: 22px; padding-bottom: 20px; }
.message { display: flex; gap: 12px; align-items: flex-start; animation: appear .25s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.message-avatar {
    width: 31px; height: 31px; flex-shrink: 0; border-radius: 11px;
    display: grid; place-items: center; font-weight: 800; font-size: 13px;
    background: linear-gradient(135deg,#ee9bcd,#a17aeb); color: #26142e;
}
.message.user .message-avatar { background: #30243b; color: #e9c7e8; }
.message-content { min-width: 0; flex: 1; padding-top: 2px; }
.message-name { font-size: 11px; font-weight: 700; margin-bottom: 7px; color: #e5d8eb; }
.message-text { color: #cfc4d5; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-text { color: #f2eaf5; }
.typing { color: #c69acb; font-size: 12px; }

.composer-area { width: 100%; max-width: 820px; margin: 0 auto; padding: 10px 30px 20px; }
.composer {
    display: flex; align-items: flex-end; gap: 12px; padding: 12px 13px 12px 18px;
    border: 1px solid #c98bc044; border-radius: 17px;
    background: #1a1322; box-shadow: 0 10px 45px #0004;
}
.composer:focus-within { border-color: #d98bca99; }
.composer textarea {
    flex: 1; resize: none; max-height: 150px; min-height: 27px;
    border: 0; outline: 0; background: transparent; color: white;
    font-size: 13px; line-height: 1.6; padding: 3px 0;
}
.composer textarea::placeholder { color: #887b92; }
.send-button {
    width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 12px;
    background: linear-gradient(135deg,#f09acb,#a27aee); color: #24142d;
    font-size: 23px; font-weight: 700;
}
.send-button:disabled { opacity: .45; cursor: wait; }
.composer-note { text-align: center; color: #72677c; font-size: 9px; margin-top: 12px; }
.composer-note span { color: var(--pink); }

.mobile-overlay { display: none; }

@media(max-width:760px) {
    .sidebar { position: fixed; z-index: 10; top: 0; bottom: 0; left: 0; transform: translateX(-100%); transition: .25s; width: 280px; }
    .sidebar.open { transform: translateX(0); }
    .mobile-overlay.show { display: block; position: fixed; z-index: 9; inset: 0; background: #0009; }
    .mobile-menu { display: block; }
    .topbar { padding: 0 18px; height: 59px; }
    .top-brand { margin-right: auto; margin-left: 13px; }
    .conversation { padding: 20px 17px 10px; }
    .welcome { padding-top: 30px; }
    h1 { letter-spacing: -1.5px; }
    .suggestions { grid-template-columns: 1fr; max-width: 390px; margin-top: 23px; }
    .suggestion { padding: 12px; }
    .composer-area { padding: 10px 13px 15px; }
    .desktop-only { display: none; }
}

/* ===== AUTENTICAÇÃO LADY AI ===== */

.app[hidden],
.auth-screen[hidden],
.auth-form[hidden],
.admin-label[hidden] {
    display: none !important;
}

.auth-screen {
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 15% 20%, #a45caa20, transparent 40%),
        radial-gradient(ellipse at 85% 80%, #e47bb51b, transparent 40%),
        #100b18;
}

.auth-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.auth-glow-one {
    background: #b66be8;
    opacity: .12;
    top: -150px;
    left: -100px;
}

.auth-glow-two {
    background: #ed83bd;
    opacity: .12;
    bottom: -160px;
    right: -100px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    padding: 35px;
    border: 1px solid #ffffff12;
    border-radius: 25px;
    background: #191222eF;
    box-shadow: 0 25px 100px #0008, 0 0 50px #b878d00b;
    animation: authAppear .5s ease;
}

@keyframes authAppear {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    padding: 0;
    margin-bottom: 38px;
}

.auth-heading .auth-eyebrow {
    color: #d49bda;
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 700;
}

.auth-eyebrow span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pink);
    margin-right: 7px;
    box-shadow: 0 0 10px var(--pink);
}

.auth-heading h1 {
    font: 800 35px/1.15 Manrope, sans-serif;
    letter-spacing: -1.5px;
    margin: 15px 0 10px;
}

.auth-heading h1 em {
    font-style: normal;
    background: linear-gradient(90deg,#f3a0d2,#b899ff);
    color: transparent;
    background-clip: text;
}

.auth-heading p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    gap: 5px;
    background: #100b18;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 23px;
}

.auth-tab {
    border: 0;
    padding: 11px;
    border-radius: 9px;
    background: transparent;
    color: #93869e;
    font-size: 12px;
    font-weight: 700;
    transition: .2s;
}

.auth-tab.active {
    color: #fff;
    background: linear-gradient(110deg,#d77bbd44,#9872e544);
    box-shadow: inset 0 0 0 1px #d88cc733;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label {
    color: #d9cddd;
    font-size: 11px;
    font-weight: 600;
    margin-top: 7px;
}

.auth-form input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ffffff14;
    border-radius: 11px;
    outline: none;
    background: #100b18;
    color: white;
    font: 13px 'DM Sans', sans-serif;
    transition: .2s;
}

.auth-form input:focus {
    border-color: #d98bca99;
    box-shadow: 0 0 0 3px #d98bca12;
}

.auth-form input::placeholder {
    color: #776b80;
}

.auth-submit {
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(110deg,#ed9acb,#a17aee);
    color: #28152e;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 8px 25px #c47bce26;
    transition: .2s;
}

.auth-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.auth-submit:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}

.auth-submit span {
    float: right;
    font-size: 17px;
    line-height: 12px;
}

.auth-message {
    min-height: 20px;
    margin-top: 14px;
    text-align: center;
    color: #f0a4c9;
    font-size: 11px;
    line-height: 1.6;
}

.auth-message.success {
    color: #7de0b1;
}

.auth-footer {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 17px;
    text-align: center;
    color: #766a80;
    font-size: 10px;
}

.auth-footer span {
    color: var(--pink);
}

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

.profile-info strong,
.profile-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 165px;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0 5px 14px;
}

.admin-label {
    color: #e6a2da;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logout-button {
    width: 100%;
    padding: 9px 10px;
    text-align: left;
    color: #c7b6d0;
    background: #ffffff07;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 11px;
    transition: .2s;
}

.logout-button:hover {
    color: #ffacd0;
    border-color: #e88bbd55;
    background: #e88bbd0c;
}

@media(max-width:500px) {
    .auth-card {
        padding: 27px 22px;
        border-radius: 20px;
    }

    .auth-heading h1 {
        font-size: 31px;
    }
}
