:root {
    --nc-ink: #0f2420;
    --nc-sea: #0d4f4f;
    --nc-sea-deep: #062e2e;
    --nc-sand: #c4a35a;
    --nc-foam: #f4f7f5;
    --nc-mist: #e4eeea;
    --nc-coral: #c45c4a;
    --nc-glass: rgba(255, 255, 255, 0.78);
    --nc-glass-border: rgba(255, 255, 255, 0.55);
    --nc-shadow: 0 18px 50px rgba(6, 46, 46, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "DM Sans", system-ui, sans-serif;
    color: var(--nc-ink);
    min-height: 100vh;
    background-color: #0a2f2f;
    background-image:
        linear-gradient(165deg, rgba(6, 46, 46, 0.88) 0%, rgba(13, 79, 79, 0.55) 38%, rgba(244, 247, 245, 0.94) 58%, #eef3f0 100%),
        url('https://images.unsplash.com/photo-1571896349842-33c89424de2d?auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-attachment: fixed;
    background-position: center top;
}

body.app-shell {
    padding-bottom: 0;
}

h1, h2, .display-font {
    font-family: "Fraunces", Georgia, serif;
}

/* Branded text links */
a.app-link,
main a:not(.btn):not(.nav-link):not(.lead-card):not(.navbar-brand):not(.lead-card-title):not(.report-preset):not(.search-result-row):not(.global-search-item):not(.global-search-see-all) {
    color: var(--nc-sea);
    text-decoration: none;
    font-weight: 500;
}

a.app-link:hover,
main a:not(.btn):not(.nav-link):not(.lead-card):not(.navbar-brand):not(.lead-card-title):not(.report-preset):not(.search-result-row):not(.global-search-item):not(.global-search-see-all):hover {
    color: var(--nc-sea-deep);
    text-decoration: none;
}

/* High-contrast chips for back links / helper copy over atmospheric bg */
.page-nav-chip,
.hint-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--nc-ink);
    border: 1px solid rgba(15, 36, 32, 0.1);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(6, 46, 46, 0.12);
    text-decoration: none;
}

a.page-nav-chip,
a.page-nav-chip:hover {
    color: var(--nc-sea-deep) !important;
    text-decoration: none !important;
}

.hint-bar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #243832;
    line-height: 1.45;
}

.hint-bar strong {
    color: var(--nc-ink);
}

.hint-bar .hint-ok { color: #157347; font-weight: 700; }
.hint-bar .hint-warn { color: #9a6700; font-weight: 700; }
.hint-bar .hint-hot { color: #b42318; font-weight: 700; }

.app-frame {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Floating glass nav */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 1rem 0 0;
}

.app-nav {
    background: rgba(8, 40, 40, 0.72) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    padding: 0.4rem 0.85rem;
}

.app-nav > .container-fluid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.app-nav .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
    max-width: 11.5rem;
    min-width: 0;
    margin-right: 0;
    flex: 0 1 auto;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.app-nav .navbar-brand .nav-logo,
.app-nav .navbar-brand .brand-mark {
    flex-shrink: 0;
}

.nav-brand-text {
    min-width: 0;
    overflow: hidden;
}

.nav-brand-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    font-size: 0.92rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--nc-sand);
    color: var(--nc-sea-deep);
    font-weight: 800;
}

.app-nav .nav-link {
    color: rgba(255, 255, 255, 0.72) !important;
    font-weight: 500;
    border-radius: 999px;
    padding: 0.35rem 0.7rem !important;
    margin: 0;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.app-nav .nav-link.active,
.app-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}

.app-nav-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-logout-form {
    margin: 0;
    flex-shrink: 0;
}

.global-search {
    position: relative;
    width: 10.5rem;
    flex-shrink: 0;
}

.global-search-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    height: 2rem;
}

.global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.global-search-input:focus {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

@media (min-width: 992px) {
    .app-nav > .container-fluid {
        flex-wrap: nowrap;
    }

    .app-nav .navbar-collapse {
        display: flex !important;
        flex: 1 1 auto;
        flex-basis: auto !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        min-width: 0;
    }

    .app-nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.1rem;
        margin: 0 !important;
        min-width: 0;
    }

    .app-nav-tools {
        margin-left: auto;
    }

    .app-nav .navbar-brand {
        max-width: 13rem;
    }
}

@media (min-width: 1200px) {
    .app-nav .navbar-brand {
        max-width: 15rem;
    }

    .global-search {
        width: 12rem;
    }

    .app-nav .nav-link {
        padding: 0.4rem 0.8rem !important;
    }
}

@media (max-width: 991.98px) {
    .app-nav .navbar-brand {
        max-width: calc(100% - 3.5rem);
    }

    .app-nav .navbar-collapse {
        width: 100%;
        padding-top: 0.65rem;
    }

    .app-nav-links {
        gap: 0.15rem;
        margin-bottom: 0.75rem !important;
    }

    .app-nav-tools {
        width: 100%;
        padding-bottom: 0.35rem;
    }

    .global-search {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
}

.global-search-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    min-width: 280px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    color: var(--nc-ink);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    z-index: 1050;
    padding: 0.4rem 0;
}

.global-search-group-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a8a84;
    padding: 0.45rem 0.9rem 0.2rem;
    font-weight: 700;
}

.global-search-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.55rem;
    padding: 0.45rem 0.9rem;
    text-decoration: none;
    color: inherit;
}

.global-search-item:hover,
.global-search-item.is-active {
    background: rgba(13, 79, 79, 0.08);
}

.global-search-type {
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nc-sea);
    background: rgba(13, 79, 79, 0.08);
    border-radius: 6px;
    padding: 0.2rem 0.35rem;
    text-align: center;
}

.global-search-label {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.25;
}

.global-search-meta {
    font-size: 0.75rem;
    color: #6a7c75;
}

.global-search-see-all,
.global-search-empty {
    display: block;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    color: var(--nc-sea);
    text-decoration: none;
    font-weight: 600;
}

.global-search-empty {
    color: #6a7c75;
    font-weight: 500;
}

.search-result-row {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(13, 79, 79, 0.08);
    text-decoration: none;
    color: inherit;
}

.search-result-row:last-of-type {
    border-bottom: none;
}

.search-result-row:hover {
    color: var(--nc-sea);
}

@media (max-width: 991.98px) {
    .global-search-panel {
        min-width: 100%;
        left: 0;
        right: 0;
    }
}

.nav-logo {
    height: 34px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 2px 6px;
}

.app-main {
    padding-top: 1.5rem;
    padding-bottom: 5.5rem;
}

.list-footer {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
}

/* Page hero strip inside app */
.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 1.75rem 1.75rem 1.6rem;
    margin-bottom: 1.5rem;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(6, 46, 46, 0.92), rgba(13, 79, 79, 0.75)),
        url('https://images.unsplash.com/photo-1582719508461-905c673771fd?auto=format&fit=crop&w=1600&q=80') center/cover;
    box-shadow: var(--nc-shadow);
    animation: riseIn 0.55s ease both;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -40% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 163, 90, 0.35), transparent 70%);
    pointer-events: none;
}

.page-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.35rem;
}

.page-hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin: 0 0 0.35rem;
}

.page-hero .lede {
    opacity: 0.9;
    max-width: 36rem;
    margin: 0;
}

.page-hero .hero-actions {
    position: relative;
    z-index: 1;
}

.panel {
    background: var(--nc-glass);
    border: 1px solid var(--nc-glass-border);
    border-radius: 20px;
    box-shadow: var(--nc-shadow);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: riseIn 0.6s ease both;
}

.report-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    padding: 1rem 1.15rem;
}

.report-filter-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #678078;
    margin-bottom: 0.4rem;
}

.report-filter-presets {
    flex: 1 1 18rem;
    min-width: 0;
}

.report-preset-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.report-preset {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 79, 79, 0.16);
    background: #fff;
    color: #3f534c;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.report-preset:hover {
    border-color: rgba(13, 79, 79, 0.35);
    color: var(--nc-sea-deep);
    background: rgba(13, 79, 79, 0.04);
}

.report-preset.is-active,
.report-preset.is-active:hover,
.report-preset.is-active:focus,
a.report-preset.is-active {
    background: var(--nc-sea);
    border-color: var(--nc-sea);
    color: #fff !important;
}

.report-filter-custom {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.55rem;
    flex: 0 1 auto;
}

.report-date-field {
    min-width: 9.5rem;
}

.report-date-field .form-control {
    min-height: 2.1rem;
}

.report-apply-btn {
    min-height: 2.1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .report-filter-custom {
        width: 100%;
        flex-wrap: wrap;
    }

    .report-date-field {
        flex: 1 1 calc(50% - 0.55rem);
        min-width: 0;
    }

    .report-apply-btn {
        width: 100%;
    }
}

.panel-dark {
    background: linear-gradient(145deg, rgba(6, 46, 46, 0.92), rgba(13, 79, 79, 0.88));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
}

.panel-dark .text-muted,
.panel-dark .small {
    color: rgba(255, 255, 255, 0.7) !important;
}

.btn-primary {
    --bs-btn-bg: var(--nc-sea);
    --bs-btn-border-color: var(--nc-sea);
    --bs-btn-hover-bg: var(--nc-sea-deep);
    --bs-btn-hover-border-color: var(--nc-sea-deep);
}

.btn-accent {
    background: var(--nc-sand);
    border-color: var(--nc-sand);
    color: #1b1b1b;
    font-weight: 600;
}

.btn-accent:hover {
    background: #b89245;
    border-color: #b89245;
    color: #1b1b1b;
}

.btn-ghost-light {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.badge-potential {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.stat-card {
    background: var(--nc-glass);
    border: 1px solid var(--nc-glass-border);
    border-radius: 18px;
    padding: 1.1rem 1.15rem;
    height: 100%;
    box-shadow: var(--nc-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: riseIn 0.5s ease both;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 45px rgba(6, 46, 46, 0.16);
}

.stat-card-alert {
    border-color: rgba(196, 92, 74, 0.45);
    background: linear-gradient(180deg, #fff7f5, rgba(255, 255, 255, 0.9));
}

.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5f736c;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--nc-ink);
}

.stat-sub {
    font-size: 0.78rem;
    color: #6b7c75;
    margin-top: 0.3rem;
}

.activity-row {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-col {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border-top: 4px solid #9aa7a1;
    min-height: 420px;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(6, 46, 46, 0.08);
}

.kanban-col[data-status="new"] { border-top-color: #6c757d; }
.kanban-col[data-status="quoted"] { border-top-color: #2f6fed; }
.kanban-col[data-status="awaiting_reply"] { border-top-color: #d39e00; }
.kanban-col[data-status="won"] { border-top-color: #1f8a4c; }
.kanban-col[data-status="lost"] { border-top-color: #8a8a8a; }

.kanban-col h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #51635c;
    margin-bottom: 0.75rem;
}

.kanban-list {
    min-height: 360px;
    padding-bottom: 0.5rem;
}

.leads-view-toggle .btn.active {
    background: var(--nc-sea);
    border-color: var(--nc-sea);
    color: #fff;
}

.leads-list-table .list-status-select {
    min-width: 9.5rem;
    font-size: 0.85rem;
}

.leads-pagination .pagination {
    margin-bottom: 0;
}

.leads-pagination .page-link {
    color: var(--nc-sea);
    border-radius: 8px;
    margin: 0 0.12rem;
    border: 1px solid rgba(13, 79, 79, 0.15);
}

.leads-pagination .page-item.active .page-link {
    background: var(--nc-sea);
    border-color: var(--nc-sea);
    color: #fff;
}

.leads-pagination .page-item.disabled .page-link {
    color: #8a9a94;
}

.lead-card {
    background: #fff;
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    cursor: grab;
    border-left: 5px solid #9aa7a1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: block;
}

.lead-card:hover { transform: translateY(-1px); }
.lead-card.age-fresh { border-left-color: #1f8a4c; }
.lead-card.age-warm { border-left-color: #d39e00; }
.lead-card.age-hot { border-left-color: var(--nc-coral); }
.lead-card.age-done { border-left-color: #b0b0b0; }

.lead-card-title {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.lead-card-title:hover {
    color: var(--nc-sea);
    text-decoration: none;
}

.lead-note {
    margin-top: 0.45rem;
    padding: 0.4rem 0.5rem;
    background: var(--nc-foam);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #4a5c55;
    white-space: pre-wrap;
    max-height: 3.2em;
    overflow: hidden;
}

.lead-note.empty { display: none; }

.lead-card-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.lead-card-actions .btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
}

.lead-card .meta {
    font-size: 0.78rem;
    color: #5d6f68;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.result-tile {
    background: rgba(13, 79, 79, 0.06);
    border-radius: 12px;
    padding: 0.9rem;
}

.result-tile .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #678078;
}

.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        linear-gradient(120deg, rgba(8, 56, 56, 0.88), rgba(13, 79, 79, 0.72)),
        url('https://images.unsplash.com/photo-1582719508461-905c673771fd?auto=format&fit=crop&w=1800&q=80') center/cover;
    color: #fff;
}

.landing-nc-logo {
    height: 120px;
    width: auto;
    max-width: min(520px, 92vw);
    object-fit: contain;
    display: block;
    margin-left: 0;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 0.65rem 1.1rem;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

@media (min-width: 992px) {
    .landing-nc-logo {
        height: 140px;
        max-width: 560px;
    }
}

.landing-card {
    background: rgba(255, 255, 255, 0.96);
    color: var(--nc-ink);
    border-radius: 20px;
    padding: 1.75rem;
}

.alert {
    border-radius: 14px;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.table {
    --bs-table-bg: transparent;
}

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

@media (max-width: 1200px) {
    .kanban-board { grid-template-columns: repeat(5, 260px); }
}

@media (max-width: 768px) {
    .app-frame { padding: 0 0.85rem; }
    .page-hero { padding: 1.25rem; border-radius: 18px; }
}

/* -- Nico desk assistant -- */
.nico-desk {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 1080;
    font-family: "DM Sans", system-ui, sans-serif;
}

.nico-fab {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    background: linear-gradient(135deg, #0d4f4f, #146363);
    color: #fff;
    box-shadow: 0 14px 34px rgba(6, 46, 46, 0.28);
    transition: transform .18s ease, box-shadow .18s ease;
}

.nico-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(6, 46, 46, 0.34);
}

.nico-fab-avatar,
.nico-msg-avatar,
.nico-panel-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #f4f1ea;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.nico-fab-label {
    font-weight: 600;
    font-size: 0.92rem;
    padding-right: 0.25rem;
}

.nico-avatar-img.is-thinking {
    animation: nicoPulse 1s ease-in-out infinite;
}

.nico-avatar-img.is-happy {
    transform: scale(1.05);
}

@keyframes nicoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.nico-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(380px, calc(100vw - 1.5rem));
    height: min(520px, calc(100vh - 6.5rem));
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    border: 1px solid rgba(13, 79, 79, 0.12);
    box-shadow: 0 24px 60px rgba(6, 46, 46, 0.22);
    overflow: hidden;
}

.nico-desk.is-open .nico-panel {
    display: flex;
    animation: riseIn .22s ease;
}

.nico-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #0d4f4f, #1a6b6b);
    color: #fff;
}

.nico-panel-header h2 {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.1rem;
    margin: 0;
}

.nico-panel-header .sub {
    font-size: 0.75rem;
    opacity: 0.85;
}

.nico-close {
    margin-left: auto;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.nico-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem 0.25rem;
}

.nico-chip {
    border: 1px solid rgba(13, 79, 79, 0.18);
    background: rgba(13, 79, 79, 0.05);
    color: #0d4f4f;
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.28rem 0.65rem;
}

.nico-chip:hover {
    background: rgba(13, 79, 79, 0.1);
}

.nico-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.nico-msg {
    display: flex;
    gap: 0.45rem;
    align-items: flex-end;
    max-width: 100%;
}

.nico-msg.is-user {
    justify-content: flex-end;
}

.nico-msg-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nico-bubble {
    max-width: 82%;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.nico-msg.is-bot .nico-bubble {
    background: rgba(13, 79, 79, 0.07);
    color: #163333;
    border-bottom-left-radius: 5px;
}

.nico-msg.is-user .nico-bubble {
    background: #0d4f4f;
    color: #fff;
    border-bottom-right-radius: 5px;
}

.nico-inline-link {
    color: #0d4f4f;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nico-msg.is-user .nico-inline-link {
    color: #fff;
}
.nico-bullet {
    color: var(--nc-sea, #0d4f4f);
    font-weight: 700;
    margin-right: 0.15rem;
}
.nico-bubble strong {
    font-weight: 600;
}

.nico-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.nico-link-chip {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(13, 79, 79, 0.2);
    color: #0d4f4f;
    text-decoration: none;
}

.nico-typing {
    padding: 0 0.85rem 0.35rem;
    font-size: 0.78rem;
    color: #5d6f6a;
}

.nico-composer {
    display: flex;
    gap: 0.45rem;
    padding: 0.75rem;
    border-top: 1px solid rgba(13, 79, 79, 0.08);
    background: #fff;
}

.nico-composer textarea {
    flex: 1;
    resize: none;
    border-radius: 12px;
    border: 1px solid rgba(13, 79, 79, 0.18);
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    min-height: 42px;
    max-height: 90px;
}

.nico-composer button {
    border: none;
    border-radius: 12px;
    background: #c4a35a;
    color: #1b160c;
    font-weight: 600;
    padding: 0 0.9rem;
}

.nico-composer button:disabled {
    opacity: 0.6;
}

@media (max-width: 576px) {
    .nico-desk { right: 0.75rem; bottom: 0.75rem; }
    .nico-fab-label { display: none; }
    .nico-fab { padding: 0.3rem; }
    .nico-panel {
        width: calc(100vw - 1.2rem);
        height: min(70vh, 520px);
    }
}

.nico-hero-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.15rem;
    vertical-align: -5px;
    border: 1px solid rgba(255,255,255,0.35);
}

.swal2-popup.nico-intro-swal {
    border-radius: 22px;
    padding: 1.5rem 1.25rem 1.25rem;
}

.nico-intro-body {
    text-align: left;
    color: #163333;
}

.nico-intro-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 0.85rem;
    border: 3px solid rgba(13, 79, 79, 0.15);
    box-shadow: 0 10px 28px rgba(6, 46, 46, 0.16);
}

.nico-intro-body h3 {
    font-family: Fraunces, Georgia, serif;
    text-align: center;
    font-size: 1.35rem;
    margin: 0 0 0.35rem;
}

.nico-intro-body .lede {
    text-align: center;
    color: #5d6f6a;
    font-size: 0.92rem;
    margin-bottom: 0.9rem;
}

.nico-intro-body ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
}

.nico-intro-body li {
    margin-bottom: 0.35rem;
}
