:root {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172b4d;
    background: #f3f6fa;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --navy: #102a43;
    --blue: #1769aa;
    --muted: #6b7c93;
    --border: #dfe6ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 10% 5%, #e4edf8 0, transparent 38%),
        #f3f6fa;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #80b9ed;
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}

.app-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.topbar {
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(16, 42, 67, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--navy);
    text-decoration: none;
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.6px;
}

.brand-icon,
.mobile-brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--navy);
    color: white;
    font-weight: 800;
}

.brand-light {
    color: var(--blue);
}

.security-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #53677d;
    font-size: 12px;
    font-weight: 600;
}

.security-dot,
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #24a477;
}

.login-layout {
    min-height: calc(100vh - 89px);
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
    gap: 70px;
    padding: 55px 0 35px;
}

.welcome-panel {
    padding: 20px 0;
}

.eyebrow {
    color: var(--blue);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
}

.welcome-panel h1 {
    color: var(--navy);
    font-size: clamp(36px, 4.2vw, 53px);
    line-height: 1.12;
    letter-spacing: -2px;
    margin: 20px 0;
}

.welcome-panel>p {
    color: var(--muted);
    max-width: 430px;
    line-height: 1.8;
    font-size: 15px;
}

.benefit-list {
    display: grid;
    gap: 25px;
    margin-top: 43px;
}

.benefit {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.benefit-icon {
    flex: 0 0 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: #e2edf9;
    color: var(--blue);
    border-radius: 12px;
    font-size: 21px;
    font-weight: 700;
}

.benefit strong {
    display: block;
    font-size: 14px;
    margin: 2px 0 5px;
}

.benefit p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.panel-footer {
    color: #8190a3;
    font-size: 11px;
    margin-top: 48px;
}

.login-side {
    width: 100%;
    max-width: 440px;
    justify-self: end;
}

.login-card {
    background: #fff;
    padding: 38px;
    border: 1px solid #e6ebf1;
    border-radius: 20px;
    box-shadow: 0 18px 55px rgba(16, 42, 67, 0.08);
}

.mobile-brand-mark {
    display: none;
    margin-bottom: 22px;
}

.login-card h2 {
    color: var(--navy);
    font-size: 25px;
    letter-spacing: -0.7px;
    margin: 12px 0 8px;
}

.muted {
    color: var(--muted);
    line-height: 1.7;
    font-size: 13px;
}

.login-card>.muted {
    margin: 0 0 28px;
}

.login-card label {
    display: block;
    color: #344b63;
    font-size: 12px;
    font-weight: 700;
    margin: 20px 0 8px;
}

.login-card input {
    width: 100%;
    height: 48px;
    border: 1px solid #d7e0e9;
    border-radius: 9px;
    background: #fbfcfe;
    padding: 0 13px;
    color: var(--navy);
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.1);
    outline: none;
}

.login-card input::placeholder {
    color: #9aa8b8;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 62px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 4px;
}

.primary-button {
    min-height: 49px;
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 17px;
    transition: background 0.2s, transform 0.2s;
}

.primary-button:hover {
    background: #19486e;
}

.primary-button:active {
    transform: translateY(1px);
}

.login-card .primary-button {
    margin-top: 27px;
}

.primary-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.form-security {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #77879a;
    font-size: 10px;
}

.form-security span {
    color: #24866c;
    font-size: 15px;
}

.alert {
    border-radius: 8px;
    padding: 11px 12px;
    margin-top: 16px;
    font-size: 12px;
    line-height: 1.5;
}

.alert.error {
    color: #a52b36;
    background: #fff0f0;
    border: 1px solid #f4cece;
}

.copyright {
    color: #8b98a8;
    text-align: center;
    font-size: 10px;
    margin-top: 22px;
}

/* Authenticated dashboard */

.dashboard {
    padding: 55px 0 40px;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 35px;
}

.dashboard-heading h1 {
    color: var(--navy);
    font-size: 34px;
    letter-spacing: -1.2px;
    margin: 12px 0 0;
}

.dashboard-heading p {
    margin: 8px 0 0;
}

.secondary-button {
    border: 1px solid #d6e0e9;
    background: white;
    color: var(--navy);
    border-radius: 9px;
    padding: 11px 17px;
    font-size: 12px;
    font-weight: 700;
}

.secondary-button:hover {
    background: #f8fafc;
}

.assistant-card {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 35px 35px;
    background: white;
    border: 1px solid #e3eaf1;
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(16, 42, 67, 0.06);
}

.assistant-orb {
    width: 94px;
    height: 94px;
    margin: 0 auto 27px;
    border-radius: 50%;
    background: linear-gradient(145deg, #173d60, #287eb1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 12px 28px rgba(23, 105, 170, 0.2);
}

.assistant-orb span {
    width: 5px;
    height: 18px;
    border-radius: 8px;
    background: #fff;
    opacity: 0.95;
}

.assistant-orb span:nth-child(2) {
    height: 34px;
}

.assistant-card h2 {
    color: var(--navy);
    font-size: 25px;
    letter-spacing: -0.6px;
    margin: 12px 0;
}

.assistant-card>p {
    max-width: 450px;
    margin: 0 auto 25px;
    line-height: 1.8;
}

.start-button {
    width: min(100%, 270px);
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
}

/* Pause / Resume button: same colour and size as the Start button */
.pause-button {
    margin: 12px auto 0;
}

.button-symbol {
    font-size: 11px;
}

.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64768b;
    font-size: 11px;
    margin-top: 20px;
}

.conversation-area {
    max-width: 510px;
    margin: 28px auto 0;
    padding: 22px;
    border: 1px solid #e1e9f1;
    background: #f8fafc;
    border-radius: 13px;
    text-align: left;
}

.message-label {
    color: var(--blue);
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.conversation-area>p:not(.muted) {
    color: var(--navy);
    line-height: 1.8;
    font-size: 14px;
}

.voice-notice {
    border-top: 1px solid #e1e9f1;
    padding-top: 12px;
    margin-bottom: 0;
    font-size: 11px;
}

/* "Please wait, Maya is thinking" animation */
.thinking-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 7px;
    vertical-align: middle;
}

.thinking-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
    animation: thinking-bounce 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes thinking-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* The round Maya icon moves like a sound wave while she is thinking */
.assistant-card:has(.thinking-dots) .assistant-orb span {
    animation: orb-wave 1s infinite ease-in-out;
}

.assistant-card:has(.thinking-dots) .assistant-orb span:nth-child(2) {
    animation-delay: 0.15s;
}

.assistant-card:has(.thinking-dots) .assistant-orb span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes orb-wave {

    0%,
    100% {
        transform: scaleY(0.55);
    }

    50% {
        transform: scaleY(1.3);
    }
}

@media (prefers-reduced-motion: reduce) {

    .thinking-dots span,
    .assistant-card:has(.thinking-dots) .assistant-orb span {
        animation: none;
    }
}

.dashboard-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 720px;
    margin: 20px auto 0;
    padding: 15px 18px;
    background: #eaf1f8;
    border-radius: 10px;
    color: #516980;
}

.dashboard-note span {
    font-size: 15px;
}

.dashboard-note p {
    font-size: 11px;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 850px) {
    .login-layout {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-top: 35px;
    }

    .welcome-panel {
        padding-bottom: 0;
    }

    .welcome-panel h1 {
        font-size: 40px;
    }

    .benefit-list {
        grid-template-columns: 1fr;
        margin-top: 25px;
        gap: 17px;
    }

    .panel-footer {
        display: none;
    }

    .login-side {
        justify-self: center;
        max-width: 520px;
    }
}

@media (max-width: 520px) {
    .app-shell {
        width: calc(100% - 30px);
    }

    .topbar {
        height: 70px;
    }

    .brand {
        font-size: 18px;
    }

    .security-label {
        font-size: 10px;
    }

    .login-layout {
        padding-top: 25px;
    }

    .welcome-panel h1 {
        font-size: 35px;
    }

    .welcome-panel>p {
        font-size: 13px;
    }

    .login-card {
        padding: 25px 21px;
        border-radius: 15px;
    }

    .dashboard {
        padding-top: 35px;
    }

    .dashboard-heading {
        align-items: flex-start;
    }

    .dashboard-heading h1 {
        font-size: 27px;
        overflow-wrap: anywhere;
    }

    .assistant-card {
        padding: 35px 20px 25px;
    }

    .assistant-card h2 {
        font-size: 22px;
    }
}