* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #090b0f;
    --panel: #11141a;
    --panel2: #181c23;
    --line: #292e38;

    --text: #f5f7f2;
    --muted: #979ca6;

    --accent: #d9ff55;
    --blue: #9fc5ff;
    --orange: #ffd18b;

    --danger: #ff7777;
}

body.light {
    --bg: #f4f5ef;
    --panel: #ffffff;
    --panel2: #eef0e9;
    --line: #dfe2d8;

    --text: #151711;
    --muted: #62675d;
}

body {
    font-family: Arial, sans-serif;

    background: var(--bg);
    color: var(--text);

    min-height: 100vh;

    transition: 0.3s;

    overflow-x: hidden;
}


/* ================= HEADER ================= */

.topbar {
    height: 76px;

    border-bottom: 1px solid var(--line);

    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 0 32px;

    position: sticky;

    top: 0;

    z-index: 20;

    background: rgba(9, 11, 15, 0.88);

    backdrop-filter: blur(20px);
}

body.light .topbar {
    background: rgba(244, 245, 239, 0.88);
}


.brand {
    display: flex;

    align-items: center;

    gap: 12px;
}


.brand-icon {
    width: 40px;
    height: 40px;

    border-radius: 12px;

    background: var(--accent);

    color: #111;

    display: grid;

    place-items: center;

    font-size: 21px;
}


.brand h2 {
    font-size: 15px;

    letter-spacing: 3px;
}


.brand span {
    font-size: 10px;

    color: var(--muted);
}


.header-right {
    display: flex;

    align-items: center;

    gap: 12px;
}


.local-status {
    border: 1px solid var(--line);

    border-radius: 50px;

    padding: 8px 13px;

    color: var(--muted);

    font-size: 11px;
}


.status-dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #86ff76;

    margin-right: 6px;
}


#themeBtn,
.profile {
    width: 37px;
    height: 37px;

    border-radius: 50%;

    border: 1px solid var(--line);

    background: var(--panel);

    color: var(--text);
}


.profile {
    display: grid;

    place-items: center;

    background: var(--accent);

    color: #111;

    font-weight: bold;
}


/* ================= APP ================= */

.app {
    max-width: 1500px;

    margin: auto;

    min-height: calc(100vh - 76px);

    display: flex;
}


.sidebar {
    width: 235px;

    border-right: 1px solid var(--line);

    padding: 25px 15px;

    display: flex;

    flex-direction: column;
}


.new-chat {
    width: 100%;

    padding: 13px;

    border-radius: 11px;

    background: var(--panel2);

    color: var(--text);

    border: 1px solid var(--line);

    text-align: left;

    margin-bottom: 24px;

    font-weight: bold;
}


nav {
    display: flex;

    flex-direction: column;
}


.nav {
    border: 0;

    background: transparent;

    color: var(--muted);

    text-align: left;

    padding: 12px;

    border-radius: 10px;

    margin: 2px 0;

    cursor: pointer;
}


.nav:hover,
.nav.active {
    background: var(--panel2);

    color: var(--text);
}


.nav.active {
    box-shadow: inset 2px 0 var(--accent);
}


.sidebar-bottom {
    margin-top: auto;
}


.privacy-box {
    display: flex;

    gap: 10px;

    padding: 12px;

    background: var(--panel2);

    border: 1px solid var(--line);

    border-radius: 12px;

    margin-bottom: 18px;
}


.privacy-icon {
    font-size: 20px;

    color: var(--accent);
}


.privacy-box strong {
    font-size: 11px;
}


.privacy-box p {
    color: var(--muted);

    font-size: 9px;

    line-height: 1.5;

    margin-top: 4px;
}


.model-selector label {
    font-size: 10px;

    color: var(--muted);

    display: block;

    margin-bottom: 5px;
}


.model-selector select {
    width: 100%;

    padding: 8px;

    border-radius: 7px;

    border: 1px solid var(--line);

    background: var(--panel);

    color: var(--text);

    font-size: 11px;
}


/* ================= CONTENT ================= */

.content {
    flex: 1;

    min-width: 0;

    padding: 45px 6vw 80px;
}


.page {
    display: none;

    animation: fade 0.3s ease;
}


.page.active {
    display: block;
}


@keyframes fade {

    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ================= TYPOGRAPHY ================= */

.eyebrow,
.page-heading small,
.section-title small,
.memory-banner small,
.modal-box small {
    color: var(--muted);

    font-size: 10px;

    letter-spacing: 2px;

    font-weight: bold;
}


.hero {
    min-height: 410px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 40px;

    border-bottom: 1px solid var(--line);

    padding-bottom: 45px;
}


.hero h1 {
    font-size: clamp(50px, 6vw, 82px);

    line-height: .94;

    letter-spacing: -4px;

    margin: 15px 0 20px;
}


.hero h1 span {
    color: var(--accent);
}


.hero-text > p {
    color: var(--muted);

    max-width: 520px;

    line-height: 1.7;

    font-size: 14px;
}


.hero-buttons {
    display: flex;

    gap: 10px;

    margin-top: 27px;
}


.primary {
    border: 0;

    background: var(--accent);

    color: #10130b;

    padding: 13px 18px;

    border-radius: 10px;

    font-weight: bold;

    cursor: pointer;
}


.primary:hover {
    transform: translateY(-2px);
}


.secondary,
.text-button {
    border: 0;

    background: transparent;

    color: var(--muted);

    padding: 12px;

    cursor: pointer;
}


.secondary:hover,
.text-button:hover {
    color: var(--text);
}


/* ================= AI ORB ================= */

.ai-orb {
    width: 260px;
    height: 260px;

    border-radius: 50%;

    border: 1px solid var(--line);

    position: relative;

    display: grid;

    place-items: center;

    flex-shrink: 0;
}


.ring {
    position: absolute;

    border: 1px solid var(--line);

    border-radius: 50%;
}


.ring1 {
    inset: 24px;

    animation: spin 12s linear infinite;
}


.ring2 {
    inset: 55px;

    border-style: dashed;

    animation: spin 8s linear infinite reverse;
}


.orb-center {
    width: 105px;
    height: 105px;

    border-radius: 50%;

    background: var(--accent);

    color: #111;

    display: grid;

    place-items: center;

    font-size: 35px;

    box-shadow: 0 0 70px rgba(217,255,85,.2);
}


.ai-orb > span {
    position: absolute;

    bottom: -30px;

    color: var(--muted);

    font-size: 10px;
}


@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}


/* ================= CARDS ================= */

.section-title,
.page-heading {
    display: flex;

    align-items: end;

    justify-content: space-between;

    margin: 40px 0 18px;
}


.section-title h2,
.page-heading h2 {
    font-size: 28px;

    margin-top: 5px;

    letter-spacing: -1px;
}


.cards {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 13px;
}


.card {
    min-height: 225px;

    padding: 21px;

    border: 1px solid var(--line);

    background: var(--panel);

    border-radius: 16px;

    display: flex;

    flex-direction: column;

    transition: .2s;
}


.card:hover,
.goal-card:hover {
    transform: translateY(-3px);

    border-color: #505662;
}


.card-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    color: var(--muted);

    font-size: 9px;

    letter-spacing: 1px;
}


.card-icon {
    width: 35px;
    height: 35px;

    display: grid;

    place-items: center;

    border-radius: 9px;

    color: var(--accent);

    background: rgba(217,255,85,.1);

    font-size: 17px;
}


.card-icon.orange {
    color: var(--orange);

    background: rgba(255,209,139,.1);
}


.card-icon.blue {
    color: var(--blue);

    background: rgba(159,197,255,.1);
}


.card h3 {
    margin: 22px 0 8px;

    font-size: 18px;
}


.card p {
    color: var(--muted);

    font-size: 11px;

    line-height: 1.6;
}


.progress,
.goal-progress {
    height: 5px;

    background: var(--panel2);

    border-radius: 10px;

    overflow: hidden;

    margin-top: auto;
}


.progress span,
.goal-progress span {
    display: block;

    height: 100%;

    background: var(--accent);
}


.card small {
    color: var(--muted);

    font-size: 9px;

    margin-top: 8px;
}


.card-link {
    background: none;

    color: var(--accent);

    text-align: left;

    font-size: 11px;

    margin-top: auto;

    cursor: pointer;
}


/* ================= LOWER ================= */

.lower-grid {
    display: grid;

    grid-template-columns: .8fr 1.2fr;

    gap: 13px;

    margin-top: 13px;
}


.quote-card,
.open-ai-card {
    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 16px;

    padding: 25px;
}


.quote {
    color: var(--accent);

    font-size: 65px;

    line-height: .5;
}


.quote-card p {
    font-size: 18px;

    line-height: 1.5;

    margin: 15px 0;
}


.quote-card small {
    color: var(--muted);
}


.open-ai-card {
    display: flex;

    gap: 20px;

    align-items: center;
}


.open-ai-icon {
    width: 68px;
    height: 68px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 15px;

    background: var(--panel2);

    color: var(--accent);

    font-size: 30px;
}


.open-ai-card h3 {
    margin: 6px 0;

    font-size: 18px;
}


.open-ai-card p {
    color: var(--muted);

    font-size: 11px;

    line-height: 1.6;

    max-width: 600px;
}


/* ================= CHAT ================= */

.chat-layout {
    display: grid;

    grid-template-columns: 1fr 250px;

    gap: 14px;
}


.chat-panel,
.context {
    border: 1px solid var(--line);

    background: var(--panel);

    border-radius: 16px;
}


.chat-panel {
    min-height: 600px;

    padding: 20px;

    display: flex;

    flex-direction: column;
}


.messages {
    flex: 1;

    overflow-y: auto;

    padding: 15px 5px;
}


.message {
    display: flex;

    gap: 10px;

    max-width: 80%;

    margin: 18px 0;
}


.message.user {
    margin-left: auto;

    flex-direction: row-reverse;
}


.avatar {
    width: 31px;
    height: 31px;

    border-radius: 9px;

    display: grid;

    place-items: center;

    background: var(--accent);

    color: #111;

    flex-shrink: 0;

    font-weight: bold;
}


.message.user .avatar {
    background: var(--panel2);

    color: var(--accent);

    border: 1px solid var(--line);
}


.bubble {
    background: var(--panel2);

    border: 1px solid var(--line);

    padding: 12px 14px;

    border-radius: 5px 14px 14px 14px;
}


.user .bubble {
    border-radius: 14px 5px 14px 14px;
}


.bubble p {
    font-size: 12px;

    line-height: 1.65;
}


.bubble small {
    color: #686d77;

    font-size: 8px;

    display: block;

    margin-top: 7px;
}


.suggestions {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;

    margin: 10px 0;
}


.suggestions button {
    border: 1px solid var(--line);

    background: transparent;

    color: var(--muted);

    border-radius: 50px;

    padding: 7px 10px;

    font-size: 9px;
}


.chat-input {
    display: flex;

    gap: 8px;

    padding: 8px;

    border: 1px solid var(--line);

    background: var(--panel2);

    border-radius: 12px;
}


.chat-input textarea {
    flex: 1;

    resize: none;

    background: transparent;

    border: 0;

    outline: 0;

    color: var(--text);

    padding: 8px;

    font-size: 12px;
}


.chat-input button {
    width: 40px;

    border: 0;

    border-radius: 9px;

    background: var(--accent);

    color: #111;

    font-weight: bold;

    cursor: pointer;
}


.input-note {
    text-align: center;

    font-size: 8px;

    color: #686d77;

    margin-top: 8px;
}


.context {
    height: max-content;

    padding: 20px;
}


.context h3 {
    margin: 7px 0 18px;

    font-size: 17px;
}


.context-item {
    display: flex;

    gap: 10px;

    border-top: 1px solid var(--line);

    padding: 13px 0;
}


.context-item > span {
    color: var(--accent);
}


.context-item strong {
    font-size: 11px;

    display: block;
}


.context-item p {
    color: var(--muted);

    font-size: 9px;

    margin-top: 4px;
}


.outline {
    width: 100%;

    padding: 10px;

    background: transparent;

    color: var(--text);

    border: 1px solid var(--line);

    border-radius: 9px;

    font-size: 10px;

    cursor: pointer;
}


/* ================= TODAY ================= */

.day-score {
    display: flex;

    align-items: center;

    gap: 25px;

    padding: 25px;

    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 16px;
}


.score {
    width: 105px;
    height: 105px;

    border-radius: 50%;

    border: 8px solid var(--accent);

    display: grid;

    place-content: center;

    text-align: center;

    flex-shrink: 0;
}


.score strong {
    font-size: 27px;
}


.score span {
    font-size: 9px;

    color: var(--muted);
}


.day-score h3 {
    margin: 5px 0;
}


.day-score p {
    color: var(--muted);

    font-size: 11px;
}


.timeline {
    border-left: 1px solid var(--line);

    margin: 30px 0 0 45px;
}


.timeline-item {
    display: grid;

    grid-template-columns: 70px 20px 1fr;

    gap: 12px;

    margin-left: -8px;

    padding-bottom: 30px;
}


.time {
    color: var(--muted);

    font-size: 9px;
}


.timeline-dot {
    width: 15px;
    height: 15px;

    border-radius: 50%;

    border: 2px solid var(--line);

    background: var(--panel);
}


.done .timeline-dot {
    background: var(--accent);

    border-color: var(--accent);
}


.current .timeline-dot {
    border-color: var(--accent);

    box-shadow: 0 0 0 5px rgba(217,255,85,.1);
}


.timeline-item small {
    color: var(--accent);

    font-size: 8px;

    letter-spacing: 1px;
}


.timeline-item h3 {
    font-size: 17px;

    margin: 5px 0;
}


.timeline-item p {
    color: var(--muted);

    font-size: 10px;
}


.small-button {
    background: var(--accent);

    color: #111;

    border: 0;

    border-radius: 8px;

    padding: 8px 11px;

    font-size: 9px;

    margin-top: 9px;
}


/* ================= MEMORY ================= */

.memory-banner {
    display: flex;

    gap: 17px;

    align-items: center;

    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 16px;
}


.memory-symbol {
    width: 65px;
    height: 65px;

    display: grid;

    place-items: center;

    background: var(--panel2);

    border-radius: 14px;

    color: var(--accent);

    font-size: 28px;

    flex-shrink: 0;
}


.memory-banner h3 {
    margin-bottom: 5px;
}


.memory-banner p {
    color: var(--muted);

    font-size: 10px;
}


.memory-list {
    margin-top: 15px;
}


.memory-row {
    display: flex;

    align-items: center;

    gap: 13px;

    padding: 16px;

    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 12px;

    margin-bottom: 8px;
}


.memory-row .memory-symbol {
    width: 35px;
    height: 35px;

    font-size: 16px;
}


.memory-row strong {
    font-size: 11px;
}


.memory-row p {
    color: var(--muted);

    font-size: 10px;

    margin-top: 4px;
}


.delete-memory {
    margin-left: auto;

    background: transparent;

    color: var(--muted);

    font-size: 18px;

    cursor: pointer;
}


/* ================= GOALS ================= */

.goals {
    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 13px;
}


.goal-card {
    min-height: 200px;

    padding: 21px;

    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 16px;

    transition: .2s;
}


.goal-card > span {
    color: var(--muted);

    font-size: 9px;

    letter-spacing: 1px;
}


.goal-card h3 {
    font-size: 18px;

    margin: 30px 0;
}


.goal-card p {
    color: var(--muted);

    font-size: 10px;

    margin-top: 8px;
}


/* ================= MODAL ================= */

.modal {
    position: fixed;

    inset: 0;

    display: none;

    place-items: center;

    background: rgba(0,0,0,.65);

    backdrop-filter: blur(7px);

    z-index: 100;
}


.modal.show {
    display: grid;
}


.modal-box {
    width: min(470px, 90%);

    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 18px;

    padding: 28px;

    position: relative;
}


.modal-box h2 {
    margin: 8px 0;
}


.modal-box p {
    color: var(--muted);

    font-size: 10px;

    margin-bottom: 15px;
}


.modal-box textarea {
    width: 100%;

    height: 110px;

    padding: 12px;

    resize: none;

    background: var(--panel2);

    color: var(--text);

    border: 1px solid var(--line);

    border-radius: 10px;

    outline: 0;

    margin-bottom: 12px;
}


.modal-box .primary {
    width: 100%;
}


.close {
    position: absolute;

    right: 15px;

    top: 10px;

    background: transparent;

    color: var(--muted);

    font-size: 22px;
}


/* ================= TOAST ================= */

.toast {
    position: fixed;

    right: 25px;

    bottom: 25px;

    padding: 12px 15px;

    border-radius: 10px;

    background: var(--panel2);

    border: 1px solid var(--line);

    font-size: 10px;

    opacity: 0;

    transform: translateY(10px);

    transition: .3s;

    z-index: 200;
}


.toast.show {
    opacity: 1;

    transform: translateY(0);
}


/* ================= RESPONSIVE ================= */

@media(max-width:950px) {

    .sidebar {
        width: 190px;
    }

    .cards,
    .goals {
        grid-template-columns: 1fr 1fr;
    }

    .lower-grid {
        grid-template-columns: 1fr;
    }

    .chat-layout {
        grid-template-columns: 1fr;
    }

    .context {
        display: none;
    }

}


@media(max-width:700px) {

    .topbar {
        padding: 0 15px;
    }

    .local-status {
        display: none;
    }

    .app {
        display: block;
    }

    .sidebar {
        width: 100%;

        border-right: 0;

        border-bottom: 1px solid var(--line);

        padding: 9px;

        position: sticky;

        top: 76px;

        z-index: 15;

        background: var(--bg);
    }

    .new-chat,
    .sidebar-bottom {
        display: none;
    }

    nav {
        flex-direction: row;

        overflow-x: auto;
    }

    .nav {
        white-space: nowrap;
    }

    .content {
        padding: 30px 15px;
    }

    .hero {
        display: block;
    }

    .hero h1 {
        font-size: 55px;
    }

    .ai-orb {
        margin: 55px auto 25px;
    }

    .cards,
    .goals {
        grid-template-columns: 1fr;
    }

    .day-score {
        align-items: flex-start;
    }

    .timeline {
        margin-left: 5px;
    }

    .timeline-item {
        grid-template-columns: 50px 15px 1fr;
    }

}