/* ============================================
   NISAAB — Design tokens & foundation
   ============================================ */

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

:root {
    --ink: #0F1512;
    --surface: #182620;
    --surface-raised: #1F3129;
    --hairline: #2C4438;

    --text: #F5F1E8;
    --text-muted: #9BAFA0;
    --text-faint: #63756A;

    --marigold: #F2A93B;
    --marigold-dim: #C98A2A;
    --marigold-bright: #FFC062;
    --emerald: #3FBF8F;
    --coral: #F0665B;

    --radius: 12px;
    --radius-sm: 8px;

    --font-display: 'Manrope', sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

        /* Light fintech surfaces */
    --light-background: #f7f8f5;
    --light-card: #ffffff;
    --light-border: #e4e7e5;

    --light-text: #53645a;
    --light-muted: #78877e;
    --light-placeholder: #9aa59e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--ink);
    background-image: radial-gradient(circle at 15% 0%, rgba(242, 169, 59, 0.06), transparent 45%);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

h1 { font-size: 28px; }
h2 { font-size: 20px; font-weight: 500; }
h3 {
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

p {
    margin: 0;
    color: var(--text-muted);
}

a {
    color: var(--marigold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   Login / Signup — centered card
   ============================================ */

.container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    padding: 40px;
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px rgba(242, 169, 59, 0.04), 0 20px 60px -20px rgba(242, 169, 59, 0.15);
}

.wordmark {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 34px;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.tagline {
    font-size: 14px;
    margin-bottom: 28px;
}

.card h1 {
    margin-bottom: 24px;
}

input {
    width: 100%;
    padding: 13px 14px;
    margin: 0 0 14px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--hairline);
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.15s ease;
}

input::placeholder {
    color: var(--text-faint);
}

input:focus {
    outline: none;
    border-color: var(--marigold-dim);
}

input:focus-visible {
    outline: 2px solid var(--marigold);
    outline-offset: 2px;
}

button {
    width: 100%;
    padding: 13px;
    margin-top: 12px;
    background: var(--marigold);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

button:hover {
    background: var(--marigold-bright);
}

button:active {
    transform: scale(0.98);
}

button:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}


.card p {
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

.card .error {
    color: var(--coral);
    font-size: 13px;
    margin-top: 10px;
    min-height: 0;
}

.card .field-error {
    color: var(--coral);
    font-size: 12.5px;
    margin: -8px 0 10px 0;
    min-height: 13px;
    line-height: 13px;
}

/* ============================================
   Dashboard
   ============================================ */

.dashboard {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dashboard > h1 {
    grid-column: 1 / -1;
    font-size: 22px;
    margin-bottom: 4px;
}

.dashboard .card {
    max-width: none;
    width: auto;
    padding: 24px;
    margin: 0;
}

.dashboard .card:nth-of-type(1),
.dashboard .card:nth-of-type(2) {
    grid-column: 1 / -1;
}

/* Welcome card — avatar + greeting, no more dead center space */
.welcome-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--marigold), var(--marigold-dim));
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#welcome {
    font-size: 17px;
    font-weight: 500;
    font-family: var(--font-body);
    text-transform: none;
    letter-spacing: normal;
    color: var(--text);
    margin: 0 0 4px 0;
}

#user-email {
    font-size: 13px;
    color: var(--text-faint);
    margin: 0;
}

/* Signature element: ledger double-rule under the balance total */
#balance {
    font-family: var(--font-mono);
    font-size: 38px;
    font-weight: 600;
    color: var(--text);
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--text);
    position: relative;
}

#balance::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    height: 1px;
    background: var(--text);
}

#income {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 500;
    color: var(--emerald);
}

#expenses {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 500;
    color: var(--coral);
}

#category-breakdown,
#transactions {
    display: flex;
    flex-direction: column;
}

/* Category rows — living bar showing relative spend */
.category-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
}

.category-row:last-child {
    border-bottom: none;
}

.category-row-top {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.category-row-top .cat-name {
    text-transform: capitalize;
    color: var(--text);
}

.category-row-top .cat-amount {
    font-family: var(--font-mono);
    color: var(--coral);
}

.category-bar-track {
    height: 5px;
    background: var(--hairline);
    border-radius: 3px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--marigold-dim), var(--coral));
    border-radius: 3px;
}

/* Transaction rows — color-coded, alive */
.txn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--hairline);
}

.txn-row:last-child {
    border-bottom: none;
}

.txn-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.txn-dot.income { background: var(--emerald); }
.txn-dot.expense { background: var(--coral); }

.txn-details {
    flex: 1;
    min-width: 0;
}

.txn-category {
    font-size: 14px;
    text-transform: capitalize;
    color: var(--text);
}

.txn-meta {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 2px;
}

.txn-amount {
    font-family: var(--font-mono);
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
}

.txn-amount.income { color: var(--emerald); }
.txn-amount.expense { color: var(--coral); }

.dashboard button {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* ============================================
   Chat — full page, Claude-style layout
   ============================================ */

body.chat-page {
    min-height: 100dvh;
    height: 100dvh;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.chat-page .chat-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    width: 100%;
}

.chat-page .back-link {
    font-size: 13px;
    color: var(--text-muted);
}

.chat-page .back-link:hover {
    color: var(--marigold);
}

.messages {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    padding: 0 24px 24px 24px;
}

.message {
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 24px 0;
    max-width: 100%;
}

.bot {
    color: var(--text);
    padding: 0;
    background: none;
    border-radius: 0;
}

.user {
    color: var(--ink);
    background: var(--marigold);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-left: auto;
    margin-bottom: 24px;
    max-width: 70%;
    width: fit-content;
    font-weight: 500;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    width: fit-content;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e3e8e4;
    border-left: 3px solid var(--emerald);
    border-radius: 16px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(15,21,18,0.05);
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9aa59e;
    animation: typing-bounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .typing-dot {
        animation: none;
        opacity: 0.7;
    }
}

.input-bar {
    flex-shrink: 0;
    padding: 16px 24px 24px 24px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.input-area {
    display: flex;
    gap: 10px;
}

.input-area input {
    flex: 1;
    margin: 0;
}

.input-area button {
    width: 100px;
    margin-top: 0;
    font-size: 14px;
    flex-shrink: 0;
}

.input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.message {
    animation: messageAppear 0.25s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 700px) {

    .dashboard {
        padding: 28px 16px 60px;
    }

    .balance-card #balance {
        font-size: 36px;
    }

    .chat-page {
        height: 100dvh;
        overflow: hidden;
    }

    .chat-header {
        padding: 18px 16px;
    }

    .messages {
        flex: 1;
        min-height: 0;
        padding: 16px;
    }

    .input-bar {
        padding: 12px 16px 16px;
    }

    .message {
        max-width: 90%;
    }

}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.toggle-password:hover {
    background: var(--surface-raised);
}

.view-all-link {
    display: block;
    text-align: center;
    padding: 12px 0 4px 0;
    font-size: 13px;
    color: var(--marigold);
}

.view-all-link:hover {
    color: var(--marigold-bright);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.full-width {
    grid-column: 1 / -1;
}

/* ============================================
   Authentication — Fintech Light Theme
   ============================================ */

.auth-page {
    min-height: 100vh;
    background: var(--light-background);
    color: var(--ink);
}


.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}


/* Brand section */

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 80px;
    padding-left: 120px;

    background: var(--light-background);
}

.auth-card .field-error {
    color: var(--coral);
    font-size: 12.5px;
    margin: -8px 0 10px 0;
    min-height: 13px;
    line-height: 13px;
}

.brand-name {
    font-family: var(--font-body);
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin-bottom: 22px;
}


.brand-description {
    max-width: 400px;
    font-size: 18px;
    line-height: 1.65;
    color: var(--light-text);
}


.brand-points {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}


.brand-points div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}


.brand-points span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border-radius: 50%;
    background: var(--emerald);
    color: white;

    font-size: 13px;
    font-weight: 700;
}


/* Login area */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 120px 40px 40px;
}

.auth-card {
    width: 100%;
    max-width: 390px;

    background: var(--light-card);
    border: 1px solid var(--light-border);
    border-radius: 16px;

    padding: 42px;

    box-shadow:
        0 20px 50px rgba(15, 21, 18, 0.08);
}


.auth-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;

    font-size: 12px;
    font-weight: 600;

    color: var(--light-muted);

    margin-bottom: 14px;
}


.auth-card h2 {
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 700;

    color: var(--ink);

    letter-spacing: -0.03em;

    margin-bottom: 8px;
}


.auth-subtitle {
    color: var(--light-text);
    font-size: 14px;

    margin-bottom: 30px;
}


/* Form labels */

.auth-card label {
    display: block;

    font-size: 13px;
    font-weight: 600;

    color: var(--ink);

    margin-bottom: 8px;
}


/* Inputs */

.auth-card input {

    background: #ffffff;

    color: var(--ink);

    border: 1px solid #d9dfda;

    padding: 14px;

    margin-bottom: 20px;

}


.auth-card input::placeholder {
    color: #9aa59e;
}


.auth-card input:focus {

    border-color: var(--emerald);

    box-shadow:
        0 0 0 3px rgba(63,191,143,0.14);

}


/* Button */

.auth-card button:not(.toggle-password) {

    background: var(--ink);

    color: white;

    margin-top: 4px;

    height: 48px;

}


.auth-card button:not(.toggle-password):hover {

    background: #26382f;

    transform: translateY(-1px);

}


/* Password toggle */
.auth-card .error {
    color: var(--coral);
    font-size: 13px;
    font-weight: 600;
    margin-top: 18px;
}

.auth-card input {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid #d9dfda;
    padding: 14px;
    margin-bottom: 8px;
}

.auth-card .field-error {
    color: var(--coral);
    font-size: 12.5px;
    margin: 0 0 10px 0;
    line-height: 13px;
    min-height: 0;
}
.auth-card .toggle-password {

    position: absolute;

    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    width: 32px;
    height: 32px;

    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;

    color: #78877e;
    cursor: pointer;
}


.auth-card .toggle-password svg {
    width: 18px;
    height: 18px;
}


.auth-card .toggle-password:hover {
    background: #f2f4f2;
}

/* Footer */

.auth-footer {

    margin-top: 24px;

    color: #6b776f;

}


.auth-footer a {

    color: var(--ink);

    font-weight: 600;

}


/* Mobile */
@media (max-width: 1000px) {

    .auth-brand {
        padding-left: 60px;
        padding-right: 40px;
    }

    .auth-container {
        padding: 80px 32px 40px;
    }

}


@media (max-width: 800px) {

    .auth-layout {
        grid-template-columns: 1fr;
    }


    .auth-brand {

        padding: 48px 28px 32px;

        text-align: center;

        align-items: center;

    }


    .brand-description {
        text-align: center;
        max-width: 360px;
    }


    .brand-points {
        align-items: flex-start;
        text-align: left;
    }


    .brand-name {
        font-size: 42px;
    }


    .auth-container {

        padding: 20px 20px 40px;

        align-items: center;

    }


    .auth-card {

        max-width: 420px;

        padding: 32px 24px;

    }

}

/* ============================================
   Dashboard — Fintech Light Redesign
   ============================================ */

.dashboard-page {
    background: var(--light-background);
    color: var(--ink);
}


.dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Header */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.wordmark-sm {
    font-family: var(--font-body);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin: 0;
}


.dashboard-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--light-muted);
    margin-bottom: 8px;
}


/* Logout */

.logout-btn {
    width: auto;
    padding: 10px 18px;
    margin: 0;

    background: transparent;
    color: var(--ink);

    border: 1px solid var(--light-border);
}


.logout-btn:hover {
    background: var(--light-card);
}


/* Shared cards */

.welcome-card,
.balance-card,
.finance-card {

    background: var(--light-card);

    border: 1px solid var(--light-border);

    border-radius: 18px;

    padding: 28px;

    box-shadow:
        0 10px 30px rgba(15,21,18,0.04);

}


/* Welcome */

.welcome-card {
    display: flex;
    align-items: center;
    gap: 16px;
}


.welcome-card h3 {
    margin: 0;
    color: var(--ink);
    text-transform: none;
    letter-spacing: normal;
    font-size: 17px;
}


/* Balance */

.balance-card {
    padding: 36px;
}


.balance-card #balance {

    font-family: var(--font-mono);

    font-size: 46px;

    font-weight: 600;

    color: var(--ink);

    border: none;

    padding: 0;
}


.balance-card #balance::after {
    display: none;
}


/* Income / expense */

.summary-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;

}


.finance-card span {

    font-family: var(--font-mono);

    font-size: 28px;

    font-weight: 600;

}


#income {
    color: var(--emerald);
}


#expenses {
    color: var(--coral);
}


/* Sections */

.finance-card h3 {

    color: var(--ink);

    text-transform: none;

    letter-spacing: normal;

    font-size: 17px;

}


/* Chat button */

.chat-btn {

    margin-top: 8px;

    background: var(--ink);

    color: white;

}


.chat-btn:hover {

    background: #26382f;

}


/* Mobile */

@media(max-width:700px){

    .dashboard {
        padding: 28px 16px 60px;
    }


    .dashboard-header {
        align-items: flex-start;
    }


    .summary-grid {
        grid-template-columns: 1fr;
    }


    .balance-card #balance {
        font-size: 34px;
    }

}

/* Dashboard text visibility fixes */

.dashboard,
.dashboard p {
    color: var(--ink);
}

.dashboard h1,
.dashboard h2,
.dashboard h3,
.dashboard .wordmark-sm {
    color: var(--ink);
}

.dashboard #welcome {
    color: var(--ink);
}

.dashboard #user-email {
    color: #64736b;
}

.dashboard .finance-card p,
.dashboard .welcome-card p {
    color: #64736b;
}

.dashboard .card,
.dashboard .welcome-card,
.dashboard .balance-card,
.dashboard .finance-card {
    color: var(--ink);
}

.dashboard .txn-category {
    color: var(--ink);
}

.dashboard .txn-meta {
    color: #64736b;
}

/* ============================================
   Dashboard — unified light fintech palette
   ============================================ */

.dashboard {
    --dash-bg: #f7f8f5;
    --dash-card: #ffffff;
    --dash-border: #e3e7e3;
    --dash-text: #0F1512;
    --dash-muted: #66756c;
    --dash-faint: #8a968f;
}


.dashboard {
    color: var(--dash-text);
}


/* All dashboard text */

.dashboard h1,
.dashboard h2,
.dashboard h3,
.dashboard p,
.dashboard span,
.dashboard div {
    color: inherit;
}


.dashboard h3 {
    color: var(--dash-text);
}


/* Cards */

.dashboard .card,
.dashboard .welcome-card,
.dashboard .balance-card,
.dashboard .finance-card {

    background: var(--dash-card);

    border-color: var(--dash-border);

    color: var(--dash-text);

}


/* Secondary text */

.dashboard #user-email,
.dashboard .txn-meta {
    color: var(--dash-muted);
}


/* Transaction text */

.dashboard .txn-category {
    color: var(--dash-text);
}


.dashboard .txn-amount {
    color: var(--dash-text);
}


/* Category section */

.dashboard .category-row {
    border-color: var(--dash-border);
}


.dashboard .cat-name {
    color: var(--dash-text);
}


.dashboard .cat-amount {
    color: var(--coral);
}


/* Buttons */

.dashboard button {
    background: var(--ink);
    color: #ffffff;
}


.dashboard button:hover {
    background: #26382f;
}


/* Remove old dark theme influence */

.dashboard .text-muted,
.dashboard .text-faint {
    color: var(--dash-muted);
}

/* ============================================
   Dashboard Typography Cleanup
   ============================================ */

.dashboard .dashboard-label {
    color: #66756c;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}


.dashboard h3 {
    color: #0F1512;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 18px;
}


.dashboard p {
    color: #66756c;
}


.dashboard .welcome-text #welcome {
    color: #0F1512;
}


.dashboard .wordmark-sm {
    color: #0F1512;
}


.dashboard .balance-card #balance {
    color: #0F1512;
}


.dashboard .finance-card span {
    color: #0F1512;
}


/* Keep financial colors */

.dashboard #income {
    color: var(--emerald);
}


.dashboard #expenses {
    color: var(--coral);
}

/* ============================================
   Dashboard — Premium Finance Layout
   ============================================ */


/* Main spacing */

.dashboard {
    gap: 24px;
}


/* Header refinement */

.dashboard-header {
    margin-bottom: 12px;
}


.wordmark-sm {
    font-size: 34px;
}


/* Welcome card */

.welcome-card {

    padding: 26px 30px;

    border-radius: 20px;

}


.avatar {

    width: 56px;
    height: 56px;

    font-size: 24px;

}


/* Balance hero card */

.balance-card {

    padding: 38px 34px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8faf7
        );

}


.balance-card #balance {

    display: block;

    font-size: 48px;

    letter-spacing: -0.03em;

    margin-top: 8px;

}


/* Income / expense cards */

.summary-grid {

    gap: 24px;

}


.finance-card {

    border-radius: 20px;

    padding: 26px 28px;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;

}


.finance-card:hover,
.welcome-card:hover,
.balance-card:hover {

    transform: translateY(-2px);

    box-shadow:
        0 16px 35px rgba(15,21,18,0.07);

}


/* Income / expense numbers */

.finance-card span {

    display: block;

    margin-top: 8px;

    font-size: 30px;

    letter-spacing: -0.02em;

}


/* Analytics sections */

#category-breakdown,
#transactions {

    margin-top: 4px;

}


/* Transaction rows */

.txn-row {

    padding: 16px 0;

}


.txn-category {

    font-weight: 600;

}


.txn-amount {

    font-weight: 600;

}


/* Buttons */

.chat-btn {

    height: 52px;

    border-radius: 12px;

    font-size: 15px;

    font-weight: 600;

}


.logout-btn {

    border-radius: 10px;

}


/* Mobile refinement */

@media(max-width:700px){

    .balance-card {

        padding: 28px 22px;

    }


    .balance-card #balance {

        font-size: 36px;

    }


    .finance-card span {

        font-size: 26px;

    }

}

/* ============================================
   Dashboard — Transactions & Categories
   ============================================ */


/* Category breakdown */

.category-row {

    padding: 16px 0;

    border-bottom: 1px solid var(--dash-border, #e3e7e3);

}


.category-row:last-child {

    border-bottom: none;

}


.category-row-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 10px;

}


.cat-name {

    font-size: 14px;

    font-weight: 600;

    color: #0F1512;

}


.cat-amount {

    font-family: var(--font-mono);

    font-size: 14px;

    font-weight: 600;

    color: var(--coral);

}


/* Spending progress bar */

.category-bar-track {

    height: 7px;

    background: #e9ede9;

    border-radius: 10px;

    overflow: hidden;

}


.category-bar-fill {

    height: 100%;

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            var(--marigold),
            var(--coral)
        );

}



/* ============================================
   Transactions
   ============================================ */


.txn-row {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 17px 0;

    border-bottom:
        1px solid var(--dash-border, #e3e7e3);

}


.txn-row:last-child {

    border-bottom: none;

}


/* Transaction indicator */

.txn-dot {

    width: 10px;

    height: 10px;

    border-radius: 50%;

}


.txn-dot.income {

    background: var(--emerald);

}


.txn-dot.expense {

    background: var(--coral);

}



/* Details */

.txn-details {

    flex: 1;

}


.txn-category {

    color: #0F1512;

    font-size: 14px;

    font-weight: 600;

}


.txn-meta {

    margin-top: 3px;

    font-size: 12px;

    color: #7c8982;

}



/* Amount */

.txn-amount {

    font-family: var(--font-mono);

    font-size: 15px;

    font-weight: 600;

}


.txn-amount.income {

    color: var(--emerald);

}


.txn-amount.expense {

    color: var(--coral);

}

/* ============================================
   Nisaab AI Chat Redesign
   ============================================ */


.chat-page {
    background: #f7f8f5;
    color: var(--ink);
}


/* Header */

.chat-header {

    display:flex;
    justify-content:space-between;
    align-items:center;

    max-width:760px;
    width:100%;

    margin:0 auto;

    padding:28px 24px;

}


.chat-brand {

    display:flex;
    align-items:center;
    gap:12px;

}


.chat-avatar {

    width:42px;
    height:42px;

    border-radius:50%;

    background:var(--ink);
    color:white;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:700;
}


.chat-title {

    font-size:20px;
    margin:0;

    color:var(--ink);

}


.chat-status {

    font-size:12px;
    color:#66756c;

}


/* Messages */


.messages {

    flex:1;

    max-width:760px;

    width:100%;

    margin:auto;

    padding:20px 24px;

    overflow-y:auto;

}



.message {

    max-width:75%;

    padding:14px 18px;

    border-radius:16px;

    margin-bottom:18px;

    font-size:15px;

    line-height:1.6;

}



/* AI */

.bot {

    background: #ffffff;

    color:var(--ink);

    border:1px solid #e3e8e4;
    border-left:3px solid var(--emerald);

    margin-right:auto;

    box-shadow:
    0 8px 20px rgba(15,21,18,0.05);

}



/* User */


.user {

    background:var(--ink);

    color:white;

    margin-left:auto;

}



/* Input */


.input-bar {

    max-width:760px;

    width:100%;

    margin:auto;

    padding:20px 24px 30px;

}



.input-area {

    display:flex;

    gap:12px;

    background:white;

    padding:8px;

    border-radius:16px;

    border:1px solid #dfe5e1;

    box-shadow:
    0 10px 30px rgba(15,21,18,0.08);

}


.input-area input,
.input-area textarea {

    border:none;
    background:transparent;
    margin:0;
    color:var(--ink);

    resize:none;
    font-family:var(--font-body);
    font-size:15px;
    line-height:1.5;

}

.input-area textarea {
    min-height: 42px;
}

.input-area textarea:focus {
    outline:none;
    box-shadow:none;
}

.input-area input:focus {

    box-shadow:none;

}


.input-area button {
    width: 42px;
    height: 42px;

    padding: 0;
    margin: 0;

    border-radius: 50%;

    background: var(--ink);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    align-self: flex-end;
}

.input-area button svg {
    width: 18px;
    height: 18px;
}

.input-area button:hover {
    background: #26382f;
}

/* CHAT HEADER */
.chat-brand {
    display: flex;
    align-items: center;
}


.chat-status {
    margin-top: 2px;
    font-size: 13px;
    color: #6b776f;
}

/* ============================================
   Transactions Page
   ============================================ */

.transaction-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;

    margin-bottom: 20px;
}


.transaction-summary > div {

    background: var(--light-card);

    border: 1px solid var(--light-border);

    border-radius: 20px;

    padding: 26px 28px;

    box-shadow:
        0 10px 30px rgba(15,21,18,0.04);

}


.transaction-summary span {

    display: block;

    font-size: 12px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: var(--light-muted);

    margin-bottom: 10px;

}


.transaction-summary strong {

    display: block;

    font-family: var(--font-mono);

    font-size: 30px;

    font-weight: 600;

    color: var(--ink);

}


/* Income / expense colors */

#total-income {
    color: var(--emerald);
}


#total-expenses {
    color: var(--coral);
}


/* Transaction history card */

.full-width h3 {

    margin-bottom: 6px;

}


.section-subtitle {

    color: #66756c;

    font-size: 14px;

    margin-bottom: 20px;

}


/* Responsive */

@media(max-width:700px){

    .transaction-summary {

        grid-template-columns: 1fr;

    }

}

/* ============================================
   Transactions Page Polish
   ============================================ */

.txn-row {
    transition: background 0.15s ease, transform 0.15s ease;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}


.txn-row:hover {
    background: #f7f9f7;
    transform: translateX(2px);
}


/* Empty transaction state */

.empty-state {

    padding: 40px 20px;

    text-align: center;

    color: #7c8982;

    font-size: 14px;

}

.input-area textarea {

    flex: 1;

    resize: none;

    border: none;

    background: transparent;

    font-family: var(--font-body);

    font-size: 15px;

    line-height: 1.5;

    max-height: 150px;

    overflow-y: auto;

    padding: 10px;

}

.input-area textarea:focus {
    outline: none;
}

/* Chat textarea alignment fix */

.chat-page .input-area {
    align-items: flex-end;
}

.chat-page .input-area textarea {
    min-height: 42px;
    max-height: 150px;
    overflow-y: auto;
}

.chat-page .input-area button {
    align-self: flex-end;
}

/* Final chat input sizing fix */

.chat-page .input-area {
    align-items: center;
}

.chat-page .input-area textarea {
    height: 42px;
    min-height: 42px;
    max-height: 150px;
    padding: 10px;
    margin: 0;
}

.chat-page .input-area button {
    height: 42px;
    width: 42px;
    margin: 0;
}