/* public/css/style.css */

:root {
    --color-primary: #063d33;
    --color-secondary: #c9942f;
    --color-accent: #0f766e;
    --background-color: #f8f4ea;
    --text-color: #1f2933;
    --button-radius: 14px;
    --mn-night: #042f2a;
    --mn-emerald: #063d33;
    --mn-emerald-2: #0f766e;
    --mn-gold: #c9942f;
    --mn-gold-soft: #f5e5bd;
    --mn-ivory: #fbf7ee;
    --mn-warm: #f8f4ea;
    --mn-graphite: #1f2933;
    --mn-muted: #647067;
    --mn-border: #d8e5dd;
    --mn-shadow: 0 20px 60px rgba(4, 47, 42, 0.12);
    --friendly-primary: var(--mn-emerald);
    --friendly-primary-dark: var(--mn-night);
    --friendly-secondary: var(--mn-gold);
    --friendly-accent: var(--mn-emerald-2);
    --friendly-soft: #edf8f3;
    --friendly-warm: #fff7e8;
    --friendly-border: var(--mn-border);
    --gradient: linear-gradient(135deg, #042f2a 0%, #063d33 48%, #0f766e 78%, #c9942f 135%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--mn-warm);
    color: var(--text-color);
}

.navbar-glass {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(215, 238, 231, 0.9);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.07);
}

.bg-brand-gradient {
    background:
        radial-gradient(circle at 15% 20%, rgba(201, 148, 47, 0.28), transparent 28%),
        linear-gradient(135deg, rgba(4, 47, 42, 0.98) 0%, rgba(6, 61, 51, 0.96) 52%, rgba(15, 118, 110, 0.94) 82%, rgba(201, 148, 47, 0.9) 138%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--friendly-primary) 0%, var(--friendly-accent) 100%);
    border-radius: var(--button-radius);
    display: inline-block;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.16);
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

a,
.nav-link:hover,
.text-purple-600 {
    color: var(--friendly-primary);
}

.border-purple-500 {
    border-color: var(--friendly-primary) !important;
}

.bg-purple-600,
.peer:checked ~ .peer-checked\:bg-purple-500 {
    background: var(--friendly-primary) !important;
}

.text-purple-300,
.text-purple-500,
.text-purple-700 {
    color: var(--friendly-primary) !important;
}

.bg-purple-50,
.bg-purple-100 {
    background: var(--friendly-soft) !important;
}

.bg-indigo-50 {
    background: var(--friendly-warm) !important;
}

.border-purple-100,
.border-purple-200,
.border-purple-300,
.border-purple-400 {
    border-color: var(--friendly-border) !important;
}

.focus\:border-purple-400:focus,
.focus\:border-purple-500:focus {
    border-color: var(--friendly-primary) !important;
}

.focus\:ring-purple-50:focus,
.focus\:ring-purple-100:focus {
    --tw-ring-color: rgba(15, 118, 110, 0.1) !important;
}

.group:hover .group-hover\:text-purple-600,
.hover\:text-purple-600:hover {
    color: var(--friendly-primary-dark) !important;
}

.group:hover .group-hover\:bg-purple-600 {
    background: var(--friendly-primary) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--friendly-primary-dark) 0%, #15803d 100%);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.2);
    transform: translateY(-1px);
}

.filter-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid transparent;
    transition: all 0.25s;
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--friendly-soft);
    color: var(--friendly-primary);
    border-color: var(--friendly-border);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--friendly-primary) 0%, var(--friendly-accent) 100%);
    color: #ffffff;
    border-color: transparent;
}

.product-card,
.project-card {
    transition: box-shadow 0.3s, transform 0.3s;
}

.product-card:hover,
.project-card:hover,
a.bg-white:hover {
    box-shadow: 0 18px 40px rgba(31, 41, 55, 0.09) !important;
}

.hero-section {
    min-height: calc(100vh - 2.5rem);
    background: #f7fbf8;
}

.hero-section .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 96px);
    opacity: 0.45;
}

.hero-section h1 {
    letter-spacing: 0;
}

.hero-section .bg-white\/15 {
    background: rgba(255, 255, 255, 0.18) !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--friendly-primary) 0%, var(--friendly-accent) 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    margin-right: 8px;
    transition: opacity 0.2s;
}

input[type="file"]::file-selector-button:hover {
    opacity: 0.9;
}

input[type="checkbox"].sr-only:checked + div {
    background: var(--friendly-primary) !important;
}

input[type="checkbox"].sr-only:checked + div + div {
    transform: translateX(20px);
}

.prose p { margin-bottom: 1rem; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }

#sidebar a.active {
    background: rgba(255, 255, 255, 0.22);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@media (max-width: 768px) {
    #sidebar { display: none; }
    #sidebar.open {
        display: flex;
        position: fixed;
        z-index: 50;
        width: 260px;
        height: 100vh;
        top: 0;
        left: 0;
    }
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.share-fb { background: #1877F2; }
.share-wa { background: #25D366; }
.share-ig { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.share-copy { background: #374151; }

.share-feedback {
    width: 100%;
    font-size: 12px;
    color: #22c55e;
}

.share-feedback.hidden {
    display: none;
}

.agent-screen {
    height: calc(100dvh - 128px);
    min-height: 620px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
}

.agent-topbar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 0 auto;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.agent-topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.agent-title-block {
    min-width: 0;
}

.agent-title-block h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 750;
    color: #111827;
}

.agent-title-block p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
}

.agent-status-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    font-size: 11px;
    scrollbar-width: thin;
}

.agent-status-strip span {
    flex: 0 0 auto;
    line-height: 1.1;
    white-space: nowrap;
}

.agent-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.agent-top-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 650;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.agent-top-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.agent-top-action-danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.agent-top-action-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.agent-layout {
    display: grid;
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

.agent-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f8fafc;
}

.agent-sidebar-head,
.agent-chat-head {
    padding: 14px 18px;
}

.agent-sidebar-head h2,
.agent-chat-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.agent-sidebar-head p,
.agent-chat-head p {
    margin: 3px 0 0;
    font-size: 12px;
}

.agent-sidebar-head p {
    display: none;
}

.agent-conversations-list {
    padding: 0 10px 10px;
    overflow-y: auto;
}

.agent-conversation-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    cursor: pointer;
    margin-bottom: 6px;
}

.agent-conversation-open {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.agent-conversation-item:hover,
.agent-conversation-item.active {
    background: #ffffff;
    border-color: #ddd6fe;
    transform: translateY(-1px);
}

.agent-conversation-item strong,
.agent-conversation-item span {
    display: block;
}

.agent-conversation-item strong {
    color: #111827;
    font-size: 13px;
    margin-bottom: 3px;
}

.agent-conversation-item span {
    color: #6b7280;
    font-size: 11px;
}

.agent-conversation-actions {
    display: inline-flex !important;
    gap: 4px;
}

.agent-conversation-actions button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
}

.agent-conversation-actions button:hover {
    background: #e5e7eb;
    color: #111827;
}

.agent-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.agent-meta-badges span {
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
}

.agent-chat {
    padding: 10px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
}

.agent-chat-wrapper {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.agent-messages {
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fbfcfe;
}

.agent-message {
    display: flex;
}

.agent-message-user {
    justify-content: flex-end;
}

.agent-message-agent {
    justify-content: flex-start;
}

.agent-bubble {
    max-width: min(78%, 860px);
    padding: 13px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal;
}

.km-chat-rich {
    display: block;
}

.km-chat-rich > *:first-child { margin-top: 0; }
.km-chat-rich > *:last-child { margin-bottom: 0; }

.km-chat-rich p {
    margin: 0 0 0.72rem;
}

.km-chat-rich strong {
    font-weight: 800;
    color: #064e3b;
}

.agent-bubble-user .km-chat-rich strong {
    color: #ffffff;
}

.km-chat-rich em {
    font-style: italic;
    color: #0f766e;
}

.km-chat-rich h3,
.km-chat-rich h4,
.km-chat-rich h5,
.km-chat-rich h6 {
    margin: 0.25rem 0 0.55rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.km-chat-rich h3 { font-size: 1.05rem; }
.km-chat-rich h4,
.km-chat-rich h5,
.km-chat-rich h6 { font-size: 0.98rem; }

.km-chat-rich ul,
.km-chat-rich ol {
    margin: 0.35rem 0 0.75rem;
    padding-left: 1.25rem;
}

.km-chat-rich ul { list-style: disc; }
.km-chat-rich ol { list-style: decimal; }

.km-chat-rich li {
    margin: 0.22rem 0;
    padding-left: 0.1rem;
}

.km-chat-rich code {
    display: inline-block;
    padding: 0.08rem 0.32rem;
    border-radius: 0.45rem;
    background: rgba(15, 118, 110, 0.11);
    color: #0f766e;
    font-size: 0.88em;
    font-weight: 700;
}

.km-chat-rich a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.km-chat-rich blockquote {
    margin: 0.45rem 0 0.75rem;
    padding: 0.6rem 0.75rem;
    border-left: 4px solid #14b8a6;
    border-radius: 0.75rem;
    background: rgba(20, 184, 166, 0.08);
    color: #134e4a;
}

.km-chat-table-wrap {
    width: 100%;
    margin: 0.55rem 0 0.85rem;
    overflow-x: auto;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 0.85rem;
    background: #ffffff;
}

.km-chat-table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    font-size: 0.92em;
}

.km-chat-table th,
.km-chat-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.km-chat-table th {
    background: #ecfdf5;
    color: #065f46;
    font-weight: 800;
}

.km-chat-table tr:last-child td {
    border-bottom: 0;
}

.support-rich-bubble .km-chat-rich {
    margin-top: 0.25rem;
}

.support-widget {
    filter: drop-shadow(0 18px 28px rgba(6, 78, 59, 0.24));
}

.support-fab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 178px;
    min-height: 64px;
    padding: 9px 9px 9px 17px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.35), transparent 24%),
        linear-gradient(135deg, #059669 0%, #0f766e 46%, #14b8a6 100%);
    box-shadow: 0 16px 34px rgba(15, 118, 110, 0.34), inset 0 1px 0 rgba(255,255,255,0.3);
    cursor: pointer;
    isolation: isolate;
    transform: translateZ(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.support-fab:hover,
.support-fab:focus-visible {
    transform: translateY(-3px) scale(1.025);
    box-shadow: 0 22px 44px rgba(15, 118, 110, 0.44), 0 0 0 5px rgba(20, 184, 166, 0.16);
    filter: saturate(1.08);
    outline: none;
}

.support-fab-pulse {
    position: absolute;
    inset: -7px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.28);
    z-index: -1;
    animation: supportPulse 2.1s ease-out infinite;
}

.support-fab-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
    text-align: left;
    white-space: nowrap;
}

.support-fab-label strong {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.support-fab-label small {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(236, 253, 245, 0.92);
}

.support-fab-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: #047857;
    box-shadow: inset 0 -4px 10px rgba(15, 118, 110, 0.12), 0 8px 18px rgba(6, 78, 59, 0.22);
    animation: supportFloat 3.2s ease-in-out infinite;
}

.support-fab-face {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
    font-size: 19px;
}

.support-fab-spark {
    position: absolute;
    top: -4px;
    right: -3px;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 9px;
    animation: supportSpark 1.65s ease-in-out infinite;
}

@keyframes supportPulse {
    0% { opacity: 0.65; transform: scale(0.94); }
    75%, 100% { opacity: 0; transform: scale(1.18); }
}

@keyframes supportFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -4px; }
}

@keyframes supportSpark {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50% { transform: rotate(9deg) scale(1.12); }
}

@media (max-width: 640px) {
    .support-fab {
        min-width: 64px;
        width: 64px;
        height: 64px;
        padding: 8px;
        justify-content: center;
    }

    .support-fab-label {
        display: none;
    }
}

.agent-bubble-user {
    background: #0f172a;
    color: #ffffff;
    border-top-right-radius: 8px;
}

.agent-bubble-agent {
    background: #eef6f4;
    color: #12332d;
    border-top-left-radius: 8px;
    border: 1px solid #d9ebe7;
}

.agent-bubble-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.agent-inline-actions {
    margin-left: 12px;
    align-self: flex-end;
}

.agent-confirm-btn {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.agent-confirm-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.agent-typing {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.agent-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0f766e;
    animation: agentTyping 1s infinite ease-in-out;
}

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

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

.agent-action-banner {
    display: none;
    margin: 0 22px 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 700;
}

.agent-action-banner.visible {
    display: block;
}

@keyframes agentTyping {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

.agent-quick-replies {
    min-height: 36px;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.agent-quick {
    flex: 0 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    padding: 7px 11px;
    font-size: 12px;
    transition: background 0.2s, border-color 0.2s;
}

.agent-quick:hover {
    background: #ecfdf5;
    border-color: #99f6e4;
}

.agent-input-area {
    min-height: 76px;
    border-top: 1px solid #e5e7eb;
    padding: 12px 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.agent-composer-row {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
    min-height: 54px;
}

.agent-drop-zone {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 7px 9px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #374151;
    cursor: pointer;
    min-width: 0;
}

.agent-drop-zone.dragover {
    background: #eef2ff;
    border-color: #6366f1;
}

.agent-drop-zone span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.agent-drop-zone small {
    color: #6b7280;
    font-size: 10px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.35;
    outline: none;
    min-height: 54px;
    max-height: 130px;
    resize: none;
    background: #fff;
}

.agent-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.agent-send-btn,
.agent-input-area button.agent-send-btn {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 112px;
    padding: 0 18px;
    background: #0f766e;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.agent-send-btn:hover,
.agent-input-area button.agent-send-btn:hover {
    background: #115e59;
}

@media (max-width: 980px) {
    .agent-screen {
        height: auto;
        min-height: calc(100dvh - 118px);
    }

    .agent-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(130px, 180px) minmax(520px, 1fr);
    }

    .agent-sidebar {
        border-right: 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .agent-messages {
        min-height: 0;
    }

    .agent-conversations-list {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .agent-topbar-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .agent-top-actions {
        width: 100%;
    }

    .agent-top-action {
        flex: 1;
        min-width: 0;
        padding: 0 10px;
    }

    .agent-title-block h1 {
        font-size: 20px;
    }

    .agent-title-block p {
        font-size: 12px;
    }

    .agent-layout {
        grid-template-rows: minmax(120px, 170px) minmax(500px, 1fr);
    }

    .agent-chat {
        padding: 10px;
    }

    .agent-chat-wrapper {
        height: 100%;
        max-height: none;
        min-height: 0;
    }

    .agent-sidebar-head,
    .agent-chat-head,
    .agent-messages,
    .agent-quick-replies {
        padding-left: 14px;
        padding-right: 14px;
    }

    .agent-bubble {
        max-width: 100%;
    }

    .agent-input-area {
        flex-direction: column;
    }

    .agent-composer-row {
        grid-template-columns: 1fr;
    }

    .agent-send-btn,
    .agent-input-area button.agent-send-btn {
        width: 100%;
        min-height: 46px;
    }

    .agent-drop-zone {
        min-height: 44px;
    }
}


/* MameNode public design system — 20260620 */
.font-display,
.mamenode-public h1,
.mamenode-public h2 {
    font-family: 'Fraunces', serif;
    letter-spacing: -0.025em;
}

.mamenode-public {
    background:
        radial-gradient(circle at top left, rgba(201, 148, 47, 0.08), transparent 28rem),
        var(--mn-warm);
}

.navbar-glass {
    background: rgba(251, 247, 238, 0.94);
    border-bottom: 1px solid rgba(216, 229, 221, 0.95);
    box-shadow: 0 12px 32px rgba(4, 47, 42, 0.08);
}

.mn-logo-mark {
    box-shadow: 0 10px 24px rgba(4, 47, 42, 0.18);
}

.mn-cart-pill,
.mn-admin-link {
    border: 1px solid rgba(201, 148, 47, 0.26);
}

.mn-page-hero,
.mn-hero,
.mn-cta {
    position: relative;
    isolation: isolate;
}

.mn-page-hero::after,
.mn-hero::after,
.mn-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 96px 96px;
    opacity: 0.18;
    z-index: -1;
}

.mn-hero-badge {
    color: #fff7df;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

.mn-hero-primary,
.mn-hero-secondary,
.btn-primary {
    min-height: 44px;
}

.mn-hero-metrics .mn-metric {
    min-width: 128px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.mn-section {
    background-image: radial-gradient(circle at 10% 0%, rgba(201, 148, 47, 0.08), transparent 22rem);
}

.mn-section-muted {
    background-color: var(--mn-warm) !important;
}

.mn-kicker {
    color: var(--mn-gold);
}

.mn-card,
.mn-product-card,
.mn-empty-state,
.mn-summary-card,
.mn-checkout-panel,
.mn-product-visual {
    border: 1px solid rgba(216, 229, 221, 0.9);
    box-shadow: var(--mn-shadow);
}

.mn-product-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--mn-ivory) 100%);
}

.mn-product-card img {
    background: #e9efe9;
}

.mn-price {
    color: var(--mn-emerald) !important;
}

.mn-chip,
.mn-secondary-action {
    background: #edf8f3;
    color: var(--mn-emerald);
    border-color: var(--mn-border) !important;
}

.mn-chip:hover,
.group:hover .mn-chip,
.mn-secondary-action:hover {
    background: var(--mn-emerald) !important;
    color: #fff !important;
}

.mn-category-badge {
    color: #fff;
    background: color-mix(in srgb, var(--category-color, var(--mn-emerald)) 88%, #042f2a 12%);
    box-shadow: 0 10px 22px rgba(4, 47, 42, 0.16);
}

.mn-filter-bar {
    padding: 8px;
    border: 1px solid var(--mn-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(4, 47, 42, 0.06);
}

.mn-empty-state {
    color: var(--mn-muted);
    background: linear-gradient(180deg, #fff 0%, var(--mn-ivory) 100%);
}

.mn-empty-state i {
    color: var(--mn-gold);
}

.mn-checkout-panel {
    background: linear-gradient(135deg, #edf8f3 0%, #fff8e8 100%) !important;
    color: var(--mn-emerald) !important;
}

.mn-summary-card {
    background: #fbfaf5 !important;
}

.mn-product-page input,
.mn-product-page select,
.mn-product-page textarea,
.mamenode-public input,
.mamenode-public select,
.mamenode-public textarea {
    border-color: var(--mn-border) !important;
}

.mn-product-page input:focus,
.mn-product-page select:focus,
.mn-product-page textarea:focus,
.mamenode-public input:focus,
.mamenode-public select:focus,
.mamenode-public textarea:focus {
    border-color: var(--mn-emerald-2) !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12) !important;
}

@media (max-width: 768px) {
    .mn-filter-bar {
        border-radius: 24px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .mn-page-hero,
    .mn-section {
        padding-left: 0;
        padding-right: 0;
    }

    .mn-hero-metrics .mn-metric {
        min-width: 102px;
        padding: 12px;
    }
}


/* MameNode secondary public UI — 20260620 */
.mn-project-card,
.mn-project-hero {
    box-shadow: var(--mn-shadow);
    border: 1px solid rgba(216, 229, 221, 0.65);
}

.mn-project-overlay {
    background: linear-gradient(180deg, rgba(4, 47, 42, 0.04) 0%, rgba(4, 47, 42, 0.46) 42%, rgba(4, 47, 42, 0.88) 100%);
}

.mn-project-kicker {
    color: #f5d58a;
}

.mn-advice-card {
    background: linear-gradient(135deg, #fffaf0 0%, #edf8f3 100%);
    border-color: rgba(201, 148, 47, 0.24) !important;
    box-shadow: 0 18px 44px rgba(4, 47, 42, 0.08);
}

.mn-auth-section {
    background:
        radial-gradient(circle at top, rgba(201, 148, 47, 0.1), transparent 26rem),
        var(--mn-warm) !important;
}

.mn-auth-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--mn-ivory) 100%);
}

.mn-login-modes label:has(input:checked) {
    border-color: var(--mn-emerald-2);
    background: #edf8f3;
    color: var(--mn-emerald);
}

.mn-form-head {
    border-left: 4px solid var(--mn-gold);
    padding-left: 14px;
}

@supports not selector(:has(*)) {
    .mn-login-modes label {
        background: #fff;
    }
}
