/* 
 * Mark AI - Apple Premium Aesthetic Stylesheet
 * Fully Responsive, Centered Layout, System-Synced Light/Dark Theme.
 */

:root {
    /* DEFAULT LIGHT THEME VARIABLES */
    --bg-main: #f5f5f7;            /* Apple light gray background */
    --bg-sidebar: #ffffff;         /* Pure white sidebar */
    --bg-card: #ffffff;            /* Card backgrounds */
    --bg-input: rgba(0, 0, 0, 0.03); /* Light text area background */
    
    --primary: #0071e3;            /* Apple System Blue */
    --primary-hover: #147ce5;
    --primary-glow: rgba(0, 113, 227, 0.15);
    
    --accent: #34c759;             /* Apple System Green */
    --accent-hover: #30b34f;
    --accent-glow: rgba(52, 199, 89, 0.15);

    --border-color: #e5e5ea;        /* Apple light border */
    
    --text-main: #1d1d1f;          /* Near black primary text */
    --text-muted: #86868b;         /* Apple light gray secondary text */
    --text-light: #515154;         /* Medium body text */
    
    --msg-bg-user: rgba(0, 0, 0, 0.015);
    --msg-bg-assistant: transparent;
    --msg-border-user: rgba(0, 0, 0, 0.06);
    --msg-border-assistant: transparent;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Display", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", Menlo, Courier, monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 24px;
    
    --danger: #ff3b30;
    
    --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.06);
}

/* SYSTEM-SYNCED DARK THEME OVERRIDES */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #161617;        /* Apple Dark mode body background */
        --bg-sidebar: #1d1d1f;     /* Apple Dark mode sidebar */
        --bg-card: #1d1d1f;        /* Card surfaces */
        --bg-input: rgba(255, 255, 255, 0.04);
        
        --primary: #2997ff;        /* Apple Dark mode system blue */
        --primary-hover: #40a4ff;
        --primary-glow: rgba(41, 151, 255, 0.2);
        
        --accent: #30d158;         /* Apple Dark mode system green */
        --accent-hover: #4cd964;
        --accent-glow: rgba(48, 209, 88, 0.2);

        --border-color: #2c2c2e;    /* Apple dark border */
        
        --text-main: #f5f5f7;      /* Clean off-white text */
        --text-muted: #86868b;     /* Gray secondary text */
        --text-light: #a1a1a6;     /* Slate medium body text */
        
        --msg-bg-user: rgba(255, 255, 255, 0.02);
        --msg-bg-assistant: transparent;
        --msg-border-user: rgba(255, 255, 255, 0.05);
        --msg-border-assistant: transparent;
        
        --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.3);
        --danger: #ff453a;
    }
}

/* Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Prevent double-tap zoom on all interactive elements */
button, a, input, textarea, select, [role="button"] {
    touch-action: manipulation;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height — handles mobile browser bar */
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent; /* remove tap flash on iOS */
    touch-action: manipulation; /* faster tap response */
}

/* App Core Grid */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* Sidebar Navigation (Apple Minimal Side Drawer) */
.workspace-sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 100;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    color: var(--accent);
    width: 20px;
    height: 20px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-main);
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 2px;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}

.close-sidebar-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
}

@media (prefers-color-scheme: dark) {
    .close-sidebar-btn:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Action Trigger Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.btn-action {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-action:hover {
    background: var(--border-color);
    transform: translateY(-0.5px);
}

.new-chat-btn {
    width: 100%;
    margin-bottom: 20px;
}

/* Sidebar Navigation Tiers */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: none;
    border: none;
    color: var(--text-light);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-main);
}

@media (prefers-color-scheme: dark) {
    .nav-item:hover {
        background: rgba(255, 255, 255, 0.03);
    }
}

.nav-item.active {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .nav-item.active {
        background: rgba(255, 255, 255, 0.05);
    }
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.advisor-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.01);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.advisor-avatar {
    font-size: 1.1rem;
    background: rgba(52, 199, 89, 0.12);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advisor-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.advisor-info {
    display: flex;
    flex-direction: column;
}

.advisor-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.advisor-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Workspace layout */
.workspace-layout {
    flex-grow: 1;
    display: flex;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Consultation Console Panel */
.consultation-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-status-container {
    margin-bottom: 18px;
    padding: 0 4px;
}

.floating-menu-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 90;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 245, 247, 0.75);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: background var(--transition), transform 0.1s ease;
}

.floating-menu-btn:active {
    transform: scale(0.95);
}

.floating-menu-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-main);
}

@media (prefers-color-scheme: dark) {
    .floating-menu-btn {
        background: rgba(22, 22, 23, 0.75);
    }
}

@media (max-width: 768px) {
    .floating-menu-btn {
        display: flex;
    }
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: none;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.02);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.72rem;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .status-indicator {
        background: rgba(255, 255, 255, 0.03);
    }
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: var(--accent);
}

.status-dot.offline {
    background-color: var(--danger);
}

/* Chat Section */
.chat-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    background: var(--bg-sidebar);
}

.messages-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 32px 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 740px;
    width: 100%;
    margin: 0 auto;
}

/* Scrollbar tuning */
.messages-container::-webkit-scrollbar {
    width: 4px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    .messages-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* Apple Typography-based message layout */
.message-wrapper {
    width: 100%;
    max-width: 540px; /* Restrict width so side distinction is visible */
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    animation: textFadeIn 0.22s ease-out;
}

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

.message-wrapper.user {
    background-color: var(--msg-bg-user);
    border: 1px solid var(--msg-border-user);
    align-self: flex-end; /* Align user cards to the right */
}

.message-wrapper.assistant {
    background-color: var(--msg-bg-assistant);
    border: 1px solid var(--msg-border-assistant);
    padding-left: 0;
    padding-right: 0;
    align-self: flex-start; /* Align AI cards to the left */
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem; /* Increased font-size for usernames */
    font-weight: 700;
    color: var(--text-muted);
}

.message-wrapper.user .message-meta {
    justify-content: flex-end; /* Align user name tag to the right */
}

.message-wrapper.assistant .sender-name {
    color: var(--accent);
}

.message-wrapper.user .sender-name {
    color: var(--accent);
}

.brief-id {
    font-family: var(--font-mono);
    opacity: 0.6;
    font-weight: 500;
}

.message-content {
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--text-light);
    word-break: break-word;
}

@media (prefers-color-scheme: dark) {
    .message-content {
        color: #e3e3e8;
    }
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul, 
.message-content ol {
    margin: 10px 0 10px 20px;
}

.message-content li {
    margin-bottom: 6px;
    padding-left: 2px;
}

.message-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Typographical message actions (Minimal text indicators) */
.message-actions {
    margin-top: 6px;
    display: flex;
    gap: 12px;
}

.message-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.message-action-btn:hover {
    color: var(--accent);
}

.message-action-btn svg {
    width: 12px;
    height: 12px;
}

.typing-indicator-wrapper {
    display: none;
    width: 100%;
    max-width: 540px;
    margin: 0 0 12px 0;
    padding: 8px 0;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
}

.typing-indicator {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 4px;
    height: 4px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: appleTyping 1.4s infinite ease-in-out both;
}

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

@keyframes appleTyping {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

.typing-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Command Bar Input console at bottom */
.input-area {
    padding: 16px 32px 32px 32px;
    /* Extend into iPhone home bar area */
    padding-bottom: max(32px, calc(16px + env(safe-area-inset-bottom)));
    background: linear-gradient(to top, var(--bg-sidebar) 75%, transparent);
    z-index: 5;
}

/* Quick Topic Pills selection */
.quick-action-container {
    max-width: 680px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chips-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.quick-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
}

.quick-chips::-webkit-scrollbar {
    display: none;
}

.chip-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all var(--transition);
}

.chip-btn:hover {
    background: var(--border-color);
    color: var(--text-main);
    transform: translateY(-0.5px);
}

.chip-icon {
    width: 10px;
    height: 10px;
    color: var(--text-muted);
}

/* Floating Input Search-like bar */
.command-bar-wrapper {
    max-width: 680px;
    margin: 0 auto;
}

.command-bar-form {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 8px 12px 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.command-bar-form:focus-within {
    border-color: rgba(0, 113, 227, 0.4);
    box-shadow: 0 0 12px var(--primary-glow);
    background: var(--bg-card);
}

.input-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.input-icon {
    width: 16px;
    height: 16px;
}

.command-bar-form textarea {
    flex-grow: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.94rem;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    padding: 6px 0;
}

.command-bar-form textarea::placeholder {
    color: var(--text-muted);
}

/* Rounded blue Arrow-up Button (Apple Chat Style) */
.send-btn {
    background: var(--primary);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
    flex-shrink: 0;
}

.send-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.send-btn span {
    display: none; /* Hide visual text label, show arrow only */
}

.send-btn:hover {
    background: var(--primary-hover);
}

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

.input-footer {
    max-width: 680px;
    margin: 6px auto 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0 4px;
}

#charCounter {
    font-weight: 700;
    transition: color 0.2s ease;
}

/* About Section */
.about-section {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-sidebar);
}

.about-card {
    max-width: 520px;
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    animation: textFadeIn 0.3s ease-out;
}

.about-header {
    text-align: center;
    margin-bottom: 20px;
}

.about-avatar-large {
    font-size: 2rem;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 199, 89, 0.1);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.about-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}

.about-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.about-quote {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-light);
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.about-details h3 {
    font-size: 0.8rem;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.metric-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
}

.metric-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.about-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.hidden {
    display: none !important;
}

/* ============================================================
   MOBILE — full responsive overhaul (≤768px)
   ============================================================ */
@media (max-width: 768px) {

    /* ----- Sidebar: slide-in overlay ----- */
    .workspace-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.2);
        z-index: 200;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .workspace-sidebar.open {
        transform: translateX(0);
    }

    /* Dim backdrop when sidebar is open */
    .workspace-sidebar.open::before {
        content: "";
        position: fixed;
        inset: 0;
        left: 280px;
        background: rgba(0, 0, 0, 0.35);
        z-index: -1;
    }

    .close-sidebar-btn {
        display: flex;
    }

    /* ----- Floating hamburger ----- */
    .floating-menu-btn {
        display: flex;
        top: 12px;
        left: 12px;
    }

    /* ----- Messages: tighter padding, full width bubbles ----- */
    .messages-container {
        padding: 60px 12px 16px 12px; /* top clearance for menu btn */
        gap: 20px;
    }

    .message-wrapper {
        max-width: 100%;   /* bubbles fill full width on mobile */
        padding: 12px 14px;
    }

    .message-wrapper.assistant {
        padding-left: 0;
        padding-right: 0;
    }

    .message-content {
        font-size: 0.93rem;
    }

    /* ----- Input area ----- */
    .input-area {
        padding: 8px 12px 16px 12px;
        padding-bottom: max(16px, calc(8px + env(safe-area-inset-bottom)));
    }

    /* Quick chips: SHOW them, scroll horizontally — never hide */
    .quick-action-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 10px;
        max-width: 100%;
    }

    .chips-label {
        font-size: 0.65rem;
    }

    .quick-chips {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        width: 100%;
        padding-bottom: 4px;
        /* Hide scrollbar on mobile too */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .quick-chips::-webkit-scrollbar {
        display: none;
    }

    .chip-btn {
        flex-shrink: 0;          /* never wrap / truncate chips */
        padding: 7px 12px;
        font-size: 0.76rem;
        min-height: 34px;        /* finger-friendly tap target */
    }

    /* Command bar stretches full width */
    .command-bar-wrapper {
        max-width: 100%;
    }

    .command-bar-form {
        padding: 8px 10px 8px 14px;
        border-radius: 18px;
    }

    .command-bar-form textarea {
        font-size: 16px;         /* prevents iOS zoom-on-focus */
        max-height: 100px;
    }

    /* Bigger send button tap target */
    .send-btn {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }

    .send-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Input footer hint — center it, smaller */
    .input-footer {
        flex-direction: row;
        justify-content: center;
        gap: 6px;
        font-size: 0.6rem;
        margin-top: 4px;
    }

    /* ----- About card ----- */
    .about-section {
        padding: 16px;
        align-items: flex-start;
    }

    .about-card {
        padding: 20px 16px;
        border-radius: var(--radius-md);
    }

    .metric-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .metric-val {
        font-size: 0.9rem;
    }
}

/* ============================================================
   SMALL PHONES (≤390px) — extra compact
   ============================================================ */
@media (max-width: 390px) {
    .chip-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .messages-container {
        padding: 56px 10px 12px 10px;
    }

    .input-area {
        padding: 6px 10px 16px 10px;
    }

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

