:root {
    --sidebar-width: 270px;
    --brand-blue: #2563eb;
    --brand-dark: #0f172a;
    --body-bg: #f4f7fb;
}
* { box-sizing: border-box; }
body { background: var(--body-bg); color: #1f2937; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-icon, .login-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 24px;
}
.sidebar .nav-link { color: rgba(255,255,255,.75); border-radius: 12px; padding: 12px 14px; margin: 3px 0; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: rgba(255,255,255,.14); color: #fff; }
.offcanvas .nav-link { color: #1f2937; border-radius: 12px; padding: 12px 14px; }
.offcanvas .nav-link.active { background: #eff6ff; color: var(--brand-blue); font-weight: 600; }
.app-main { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); min-height: 100vh; }
.topbar { min-height: 74px; }
.card { border-radius: 18px; }
.btn { border-radius: 10px; }
.form-control, .form-select { border-radius: 10px; }
.stat-card { overflow: hidden; }
.stat-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.score-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 28px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 700; font-size: .85rem; }
.score-big { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: #eef2ff; color: #3730a3; font-size: 28px; font-weight: 800; }
.detail-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 3px; font-weight: 700; }
.message-box { background: #f8fafc; border: 1px solid #e2e8f0; padding: 14px; border-radius: 14px; min-height: 54px; }
.timeline-item { border-left: 3px solid #dbeafe; padding-left: 14px; padding-bottom: 18px; margin-left: 5px; }
.timeline-item:last-child { padding-bottom: 0; }
.bg-purple { background-color: #7c3aed !important; color: #fff; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at top left, #dbeafe, transparent 35%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); }
.login-card { width: 100%; max-width: 460px; border-radius: 24px; }
.login-icon { background: #2563eb; }
.table > :not(caption) > * > * { padding: 1rem .9rem; }
@media (max-width: 991.98px) {
    .app-main { margin-left: 0; width: 100%; }
    .topbar { min-height: 68px; }
}
.message-preview { white-space: normal; max-height: 170px; overflow: auto; }
.template-token { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; padding: 2px 6px; }
.package-feature-list li, .package-inclusion-list li { margin-bottom: 4px; }
.ai-output { line-height: 1.6; background: #f8fafc; }
.badge-soft-ai { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.followup-stat { transition: transform .15s ease, box-shadow .15s ease; }
.followup-stat:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .12) !important; }
.followup-history-item { border-left: 4px solid #dbeafe; padding: 12px 0 12px 14px; margin-left: 4px; border-bottom: 1px solid #eef2f7; }
.followup-history-item:last-child { border-bottom: 0; }

.public-inquiry-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #dbeafe, transparent 32%), linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}
.public-inquiry-embed { background: transparent; }
.public-inquiry-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 14px;
}
.public-inquiry-embed .public-inquiry-wrap { min-height: auto; padding: 0; }
.public-inquiry-card { width: 100%; max-width: 880px; border-radius: 26px; overflow: hidden; }
.public-inquiry-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 30px;
}
