.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.chat-bubble-left {
    border-bottom-left-radius: 4px;
}

.chat-bubble-right {
    border-bottom-right-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e0e3e5;
    border-radius: 10px;
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chip-primary {
    background: #4e6631;
    color: #ffffff;
    border: 1px solid #4e6631;
}

.chip-secondary {
    background: #f8f9f7;
    color: #2d5f62;
    border: 1px solid #dfe9df;
}

.chip-neutral {
    background: #f3f5f4;
    color: #2d3536;
    border: 1px solid #e4e7e5;
}

.privacy-card {
    background: #dbeff4;
    border: 1px solid rgba(91, 136, 139, 0.14);
    box-shadow: none;
}

.privacy-icon {
    background: #ffffff;
    color: #2f6874;
    width: 38px;
    height: 38px;
    border-radius: 9999px;
}

.privacy-card h3 {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 500;
    color: #2f6874;
}

.privacy-card p {
    color: rgba(47, 76, 86, 0.9);
    letter-spacing: 0.01em;
}

.chat-main {
    background: linear-gradient(90deg, rgba(200, 214, 235, 0.16) 0%, rgba(247, 250, 252, 1) 16%, rgba(247, 250, 252, 1) 84%, rgba(200, 214, 235, 0.16) 100%);
}

.bot-message {
    border: 1px solid #d5dae0;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(26, 36, 46, 0.04);
}

.user-message {
    background: #4e6631;
    color: #ffffff;
    border-radius: 14px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 6px 20px rgba(78, 102, 49, 0.28);
}

.quick-suggestion-wrap {
    margin-top: -6px;
}

.bottom-nav {
    background: #ffffff;
    border-top: 1px solid #dfe4e7;
}

.nav-item {
    color: #5a6168;
}

.nav-item .nav-pill {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: #4e6631;
}

.nav-item.active .nav-pill {
    background: #d8f1b8;
}

/* Footer sub-menu panel (SubNavigations) */
/* footer punya backdrop-filter (stacking context); tanpa z-index ia
   terpaint di bawah .chat-input-bar (sticky, z-index 5) sehingga panel
   sub-menu tertimpa di halaman chat. Naikkan di atasnya. */
#chat-footer {
    position: relative;
    z-index: 10;
}

.nav-sub-panel {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    min-width: 10rem;
    max-width: 16rem;
    background: #ffffff;
    border: 1px solid #dfe4e7;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(78, 102, 49, 0.28);
    z-index: 60;
    display: none;
}

/* Item pertama/terakhir: clamp panel agar tidak keluar frame sempit
   (footer_menu kini flex justify-evenly, item menyusut ke konten). */
.nav-item-wrap:first-child .nav-sub-panel {
    left: 0;
    transform: none;
}

.nav-item-wrap:last-child .nav-sub-panel {
    left: auto;
    right: 0;
    transform: none;
}

.nav-item-wrap:focus-within .nav-sub-panel,
.nav-item-wrap.nav-open .nav-sub-panel {
    display: block;
}

.nav-sub-item {
    white-space: nowrap;
}

.session-list {
    background: #f2f6fa;
    padding: 8px;
}

.session-card {
    border-radius: 8px;
    border: 1px solid #dbe3ea;
    padding: 14px 12px;
    text-align: center;
    margin-bottom: 8px;
}

.session-card h4 {
    color: #2867a8;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 6px;
}

.session-card p {
    color: #6a737d;
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.session-card.session-done {
    background: linear-gradient(180deg, #d6f5ad 0%, #d9f8b7 100%);
    border-color: #c9e9a5;
}

.session-card.session-active {
    background: #b6e8ec;
    border-color: #a7d7dc;
}

.session-card.session-locked {
    background: #edf1f5;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12px;
    color: #5d6672;
    background: #f6f8fa;
    border: 1px solid #e4e8ec;
    line-height: 1;
}

.status-pill .material-symbols-outlined {
    font-size: 14px;
}

.fab-next {
    position: absolute;
    right: 10px;
    bottom: 18px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #2468ad;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(36, 104, 173, 0.3);
}

/* Sidebar transition */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

#sidebar.hidden-sidebar {
    transform: translateX(-100%);
}

body {
    background: #e9eef1;
}

.mobile-frame {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #f7fafc;
    overflow: hidden;
}

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 420px) {
    .privacy-card h3 {
        font-size: 15px;
    }
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.chat-bubble-left {
    border-bottom-left-radius: 4px;
}

.chat-bubble-right {
    border-bottom-right-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e0e3e5;
    border-radius: 10px;
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chip-primary {
    background: #4e6631;
    color: #ffffff;
    border: 1px solid #4e6631;
}

.chip-secondary {
    background: #f8f9f7;
    color: #2d5f62;
    border: 1px solid #dfe9df;
}

.chip-neutral {
    background: #f3f5f4;
    color: #2d3536;
    border: 1px solid #e4e7e5;
}

.privacy-card {
    background: #dbeff4;
    border: 1px solid rgba(91, 136, 139, 0.14);
    box-shadow: none;
}

.privacy-icon {
    background: #ffffff;
    color: #2f6874;
    width: 38px;
    height: 38px;
    border-radius: 9999px;
}

.privacy-card h3 {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 500;
    color: #2f6874;
}

.privacy-card p {
    color: rgba(47, 76, 86, 0.9);
    letter-spacing: 0.01em;
}

.chat-main {
    background: linear-gradient(90deg, rgba(200, 214, 235, 0.16) 0%, rgba(247, 250, 252, 1) 16%, rgba(247, 250, 252, 1) 84%, rgba(200, 214, 235, 0.16) 100%);
}

.bot-message {
    border: 1px solid #d5dae0;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(26, 36, 46, 0.04);
}

.user-message {
    background: #4e6631;
    color: #ffffff;
    border-radius: 14px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 6px 20px rgba(78, 102, 49, 0.28);
}

.quick-suggestion-wrap {
    margin-top: 0;
    padding-top: 0;
}

.chat-input-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: auto;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.04);
}

/* ============================================================
   Persona selection cards (chat_persona.html) — scoped styles.
   Token warna mengikuti tailwind-config.js:
   primary #4e6631 · surface-variant #e0e3e5 · lowest #ffffff
   ============================================================ */
.persona-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
    /* surface-container-lowest */
    border: 1px solid #e0e3e5;
    /* surface-variant */
    border-radius: 0.75rem;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
        transform 0.2s ease;
}

.persona-card:hover {
    box-shadow: 0 4px 14px rgba(26, 36, 46, 0.08);
    transform: translateY(-1px);
}

.persona-card .persona-check {
    display: none;
}

.persona-card.persona-card-selected {
    background: #f3fbe7;
    /* tint lembut primary-container */
    border: 2px solid #4e6631;
    /* primary */
    padding: 15px;
    /* kompensasi border 2px agar konten tidak bergeser */
    box-shadow: 0 0 0 3px rgba(78, 102, 49, 0.15);
}

.persona-card.persona-card-selected:hover {
    transform: none;
    box-shadow: 0 0 0 3px rgba(78, 102, 49, 0.15), 0 4px 14px rgba(26, 36, 46, 0.08);
}

.persona-card.persona-card-selected .persona-check {
    display: inline-flex;
}

/* Tagline chip: selalu satu baris, aman di kolom sempit */
.persona-tagline-chip {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Layar sangat sempit: biarkan tagline wrap agar teks tetap terbaca penuh */
@media (max-width: 359px) {
    .persona-tagline-chip {
        white-space: normal;
        line-height: 1.4;
    }
}

.bottom-nav {
    background: #ffffff;
    border-top: 1px solid #dfe4e7;
}

.nav-item {
    color: #5a6168;
}

.nav-item .nav-pill {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: #4e6631;
}

.nav-item.active .nav-pill {
    background: #d8f1b8;
}

/* Sidebar transition */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

#sidebar.hidden-sidebar {
    transform: translateX(-100%);
}

body {
    background: #e9eef1;
}

.mobile-frame {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #f7fafc;
    overflow: hidden;
}

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 420px) {
    .privacy-card h3 {
        font-size: 15px;
    }
}