*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'Roboto';
    src: /*url('../fonts/Roboto-Medium.woff2') format('woff2'),
         url('../fonts/Roboto-Medium.woff') format('woff'),*/
         url('../fonts/Roboto-Medium.ttf') format('truetype');
    font-style: normal;
}



:root {
    --bg: #f5f6f8;
    --white: #ffffff;
    --surface: #ffffff;
    --surface2: #f8f9fb;
    --border: #e5e7eb;
    --border-hover: #d1d5db;
    --accent: #f07800;
    --accent-dim: #fff8f0;
    --accent-mid: #ffd199;
    --text: #0f1117;
    --text-2: #374151;
    --text-3: #6b7280;
    --text-4: #9ca3af;
    --user-bg: linear-gradient(135deg, #f07800, #ffb300);
    --user-text: #ffffff;
    --bot-bg: #ffffff;
    --green: #16a34a;
    --green-bg: #f0fdf4;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
    --r: 20px;
	--font: 'Roboto';
	--font-serif: 'Roboto';
    /*--font: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;*/
}

html {
    height: 100%;
}

body {
    background: var(--bg);
    font-family: var(--font);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text);
}

    /* Subtle grid texture */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background-image: linear-gradient(rgba(240,120,0,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(240,120,0,0.025) 1px, transparent 1px);
        background-size: 32px 32px;
        pointer-events: none;
    }

    /* Soft orbs */
    body::after {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(ellipse 55% 45% at 15% 5%, rgba(240,120,0,0.06) 0%, transparent 60%), radial-gradient(ellipse 45% 35% at 85% 90%, rgba(255,179,0,0.05) 0%, transparent 60%);
        pointer-events: none;
    }

.app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* ─── HEADER ─── */
.header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--r) var(--r) 0 0;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.logo-mark {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(240,120,0,0.28);
}

    .logo-mark svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: #fff;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.header-text {
    flex: 1;
}

    .header-text h1 {
        font-family: var(--font);
        font-size: 15px;
        color: var(--text);
        letter-spacing: -0.02em;
    }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--green);
    margin-top: 2px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-saas {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-mid);
    padding: 3px 9px;
    border-radius: 20px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.15s;
    font-size: 14px;
}

    .icon-btn:hover {
        background: var(--white);
        border-color: var(--border-hover);
        color: var(--text-2);
        box-shadow: var(--shadow-sm);
    }

/* ─── BODY ─── */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 24px;
    background: var(--white);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 0;
    scroll-behavior: smooth;
}

    .chat-body::-webkit-scrollbar {
        width: 4px;
    }

    .chat-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .chat-body::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }

/* Divider */
.date-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-4);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

    .date-divider::before, .date-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* ─── MESSAGES ─── */
.msg-row {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    animation: msgSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes msgSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.msg-row.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 13px;
}

    .avatar.bot {
        background: none;
        box-shadow: none;
        overflow: hidden;
    }

        .avatar.bot svg {
            width: 15px;
            height: 15px;
            fill: none;
            stroke: #fff;
            stroke-width: 2.2;
            stroke-linecap: round;
        }

    .avatar.user {
        background: var(--surface2);
        border: 1px solid var(--border);
        font-size: 11px;
        color: var(--text-3);
        letter-spacing: 0.02em;
    }

.bubble-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 70%;
}

.msg-row.user .bubble-col {
    align-items: flex-end;
}

.sender-name {
    font-size: 11px;
    color: var(--text-4);
    letter-spacing: 0.02em;
    padding: 0 4px;
}

.msg-row.user .sender-name {
    text-align: right;
}

.bubble {
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.65;
    word-break: break-word;
    position: relative;
}

    .bubble.bot {
        background: var(--bot-bg);
        border: 1px solid var(--border);
        border-top-left-radius: 5px;
        color: var(--text-2);
        box-shadow: var(--shadow-sm);
    }

	.bubble.user {
		background: linear-gradient(135deg, #f07800, #ffb300);
		border-top-right-radius: 5px;
		color: #fff;
		box-shadow: 0 2px 12px rgba(240,120,0,0.25);
	}

    .bubble time {
        display: block;
        font-size: 10.5px;
        margin-top: 7px;
        color: var(--text-4);
    }

    .bubble.user time {
        color: rgba(255,255,255,0.5);
    }

    /* Rich formatting */
    .bubble strong {
        color: var(--text);
    }

    .bubble.user strong {
        color: #fff;
    }

    .bubble code {
        background: var(--accent-dim);
        border: 1px solid var(--accent-mid);
        border-radius: 5px;
        padding: 1px 6px;
        font-size: 12px;
        font-family: 'SF Mono', 'Fira Code', monospace;
        color: var(--accent);
        white-space: nowrap;
    }

.step-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
}

.step-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

    .step-item:last-child {
        border-bottom: none;
    }

.step-num {
    min-width: 22px;
    height: 22px;
    background: var(--accent-dim);
    border: 1.5px solid var(--accent-mid);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
    letter-spacing: -0.02em;
}

/* Typing */
.typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    height: 46px;
}

    .typing span {
        width: 6px;
        height: 6px;
        background: var(--border-hover);
        border-radius: 50%;
        animation: typingDot 1.3s ease-in-out infinite;
    }

        .typing span:nth-child(2) {
            animation-delay: 0.15s;
        }

        .typing span:nth-child(3) {
            animation-delay: 0.3s;
        }

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        background: var(--border-hover);
    }

    30% {
        transform: translateY(-5px);
        background: var(--accent);
    }
}

/* Quick replies */
.quick-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    animation: msgSlide 0.3s 0.05s both;
}

.qr-btn {
    padding: 7px 13px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    color: var(--text-2);
    font-family: var(--font);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .qr-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: var(--accent-dim);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(240,120,0,0.12);
    }

/* ─── INPUT ─── */
.input-shell {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 1px solid #f0f1f3;
    border-radius: 0 0 var(--r) var(--r);
    padding: 16px 18px 18px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.input-box {
    display: flex;
    align-items: center;     /* ← center vertically */
    gap: 10px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 10px 10px 10px 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .input-box:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(240,120,0,0.08);
        background: var(--white);
    }

textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 13.5px;
    resize: none;
    max-height: 110px;
    min-height: 22px;
    line-height: 1.55;
    overflow-y: auto;
}

    textarea::placeholder {
        color: var(--text-4);
    }

    textarea::-webkit-scrollbar {
        width: 3px;
    }

    textarea::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }

.send-btn {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    box-shadow: 0 1px 6px rgba(240,120,0,0.3);
}

    .send-btn:hover {
        background: #d46800;
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(240,120,0,0.35);
    }

    .send-btn:active {
        transform: scale(0.96);
    }

    .send-btn:disabled {
        background: var(--border);
        box-shadow: none;
        cursor: not-allowed;
        transform: none;
    }

    .send-btn svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: #fff;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 2px;
}

.powered {
    font-size: 11px;
    color: var(--text-4);
    display: flex;
    align-items: center;
    gap: 4px;
}

    .powered a {
        color: var(--accent);
        text-decoration: none;
    }

@media (max-width: 600px) {
    .app {
        padding: 0;
    }

    .header {
        border-radius: 0;
    }

    .input-shell {
        border-radius: 0;
    }

    .bubble-col {
        max-width: 82%;
    }

    .chat-body {
        border-radius: 0;
    }
}

input, textarea, select {
  font-size: 16px;
}
