:root {
    --brand: #16a34a;
    --brand-dark: #15803d;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #eef2f6;
    --line: #e2e8f0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---- Navbar ---- */
.igbot-nav {
    background: linear-gradient(90deg, #0f172a 0%, #14532d 100%);
    box-shadow: 0 2px 12px rgba(2, 6, 23, .18);
}
.igbot-nav .navbar-brand { font-weight: 700; letter-spacing: .3px; }
.igbot-nav .nav-link {
    color: rgba(255, 255, 255, .78);
    border-radius: 8px;
    padding: .35rem .75rem;
    font-weight: 500;
    font-size: .95rem;
}
.igbot-nav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
}
.card h6 { font-weight: 600; color: var(--ink); }
h3 { font-weight: 700; }

/* ---- Stat tiles ---- */
.stat .fs-3 { font-weight: 700; }
.stat .text-muted { text-transform: uppercase; letter-spacing: .5px; font-size: .72rem; }

/* ---- Buttons ---- */
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-dark); border-color: var(--brand-dark); }

/* ---- Badges ---- */
.badge { font-weight: 600; border-radius: 7px; }

/* ---- Chat ---- */
.chat {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border-radius: 14px;
    max-height: 68vh;
    overflow-y: auto;
}
.msg { display: flex; gap: .5rem; max-width: 82%; align-items: flex-end; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; color: #fff;
}
.msg.in .avatar { background: #94a3b8; }
.msg.out .avatar { background: var(--brand); }
.bubble {
    padding: .55rem .85rem;
    border-radius: 18px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: .93rem;
}
.msg.in .bubble { background: #fff; color: #0f172a; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.out .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.msg .time { font-size: .67rem; color: var(--muted); margin-top: 3px; padding: 0 .3rem; }

/* ---- Profile key/value ---- */
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed #eef2f7; font-size: .9rem; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 500; text-align: right; }

/* ---- Media thumbnails ---- */
.media-thumb {
    width: 68px; height: 68px; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--line);
    transition: transform .12s ease;
}
.media-thumb:hover { transform: scale(1.04); }
.media-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .6rem; border-radius: 9px;
    background: #f1f5f9; color: #334155; text-decoration: none;
    font-size: .82rem; font-weight: 500; border: 1px solid var(--line);
    max-width: 100%;
}
.media-chip:hover { background: #e2e8f0; color: #0f172a; }
.media-chip .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

/* ---- Tables ---- */
.table > :not(caption) > * > * { padding: .65rem .75rem; }
