html,
body {
    margin: 0;
    min-height: 100%;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: hsl(222.2 84% 4.9%);
    color: hsl(210 40% 98%);
}

:root {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 263.4 70% 50.4%;
    --primary-foreground: 210 40% 98%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 263.4 70% 50.4%;
    --radius: 0.5rem;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
}

* {
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

body {
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.75rem;
    line-height: 1.1;
}

p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

.gradient-text,
h1 span,
h2 span,
.headline span {
    background: linear-gradient(to right, #2563EB, #06B6D4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.app-shell {
    min-height: 100vh;
}

.shell {
    width: min(1280px, calc(100vw - 2rem));
    margin: 0 auto;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: hsl(222.2 84% 4.9% / 0.95);
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    padding: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
}

.brand-mark-small {
    width: 1.5rem;
    height: 1.5rem;
}

.brand-logo {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-copy strong {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0;
}

.top-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.18s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    right: 20%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.18s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    opacity: 0.65;
    transform: scaleX(1);
}

.nav-link.active {
    color: #60a5fa;
}

.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: currentColor;
    line-height: 1;
}

/* ── Private area: icon-only nav with blue bottom bar ── */
.private-shell .top-nav {
    gap: 0.125rem;
}

.private-shell .top-nav .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.625rem;
    height: 2.625rem;
    min-height: unset;
    padding: 0;
    border-radius: 0.55rem;
    color: rgb(255 255 255 / 0.4);
    gap: 0;
    overflow: visible;
}

.private-shell .top-nav .nav-link svg {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

/* Blue franja below icon */
.private-shell .top-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15%;
    right: 15%;
    height: 2.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    opacity: 0;
    transform: scaleX(0.5);
    transition: opacity 0.18s ease, transform 0.2s ease;
}

.private-shell .top-nav .nav-link:hover {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.1);
}

.private-shell .top-nav .nav-link:hover::after {
    opacity: 0.75;
    transform: scaleX(1);
}

.private-shell .top-nav .nav-link.active {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.15);
}

.private-shell .top-nav .nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.mobile-menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: rgb(255 255 255 / 0.72);
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.mobile-menu-toggle:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.1);
}

.mobile-menu-panel {
    display: none;
}

.session-pill {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
}

.app-main {
    padding: 6rem 0 3rem;
}

.public-home-body {
    width: 100%;
    min-width: 0;
    overflow-x: clip;
}

.private-shell .app-header {
    background: hsl(222.2 84% 4.9% / 0.95);
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.private-main {
    padding: 6rem 0 2rem;
}

.private-shell .app-footer {
    display: none;
}

.private-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    color: rgb(255 255 255 / 0.7);
    font-size: 0.875rem;
    transition: color 0.18s ease, background 0.18s ease;
}

.private-quick-link:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.05);
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: rgb(255 255 255 / 0.8);
    cursor: pointer;
    transition: background 0.18s ease;
}

.user-menu-trigger:hover {
    background: rgb(255 255 255 / 0.1);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
}

.user-avatar svg {
    width: 1rem;
    height: 1rem;
}

.user-avatar-large {
    width: 2.5rem;
    height: 2.5rem;
}

.user-avatar-large svg {
    width: 1.25rem;
    height: 1.25rem;
}

.user-menu-name {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.user-menu-chevron {
    color: rgb(255 255 255 / 0.6);
    transition: transform 0.18s ease;
}

.user-menu-chevron.open {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 60;
    width: 14rem;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: hsl(222.2 84% 4.9%);
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.35);
}

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.user-dropdown-head strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-head p {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.75rem;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-list {
    display: grid;
    gap: 0;
    padding: 0.5rem 0;
}

.user-dropdown-list a,
.user-dropdown-list button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: 0;
    background: transparent;
    color: rgb(255 255 255 / 0.7);
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.user-dropdown-list a:hover,
.user-dropdown-list button:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.05);
}

.user-dropdown-danger {
    border-top: 1px solid rgb(255 255 255 / 0.1);
}

.user-dropdown-danger button {
    color: #f87171;
}

.user-dropdown-danger button:hover {
    color: #fca5a5;
    background: rgb(239 68 68 / 0.1);
}

.hero {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    grid-template-columns: 1.4fr 1fr;
    padding: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-compact {
    grid-template-columns: 1fr;
    max-width: 48rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.1);
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
}

.headline {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #fff;
}

.headline span {
    display: inline;
}

.hero-copy {
    display: grid;
    gap: 1.5rem;
    max-width: 56rem;
}

.hero-copy p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.65;
    max-width: 42rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(to right, #2563eb, #06b6d4);
    color: #fff;
    box-shadow: none;
    font-weight: 500;
}

.button-secondary {
    background: transparent;
    color: rgb(255 255 255 / 0.7);
    border: 1px solid rgb(255 255 255 / 0.2);
}

.danger-soft {
    border-color: rgba(248, 113, 113, 0.24);
    color: #fecaca;
}

.button-small {
    min-height: 2rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
}

.panel,
.card,
.metric-card {
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.75rem;
    box-shadow: none;
    backdrop-filter: blur(4px);
}

.panel {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

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

.card {
    padding: 1.5rem;
    display: grid;
    gap: 0.65rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.card:hover {
    transform: translateY(-0.25rem);
    border-color: rgb(255 255 255 / 0.2);
}

.card-kicker,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.meta-row {
    color: #94a3b8;
    font-size: 0.92rem;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-active {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-inactive {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-pending {
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.status-failed {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.card h3 {
    font-size: 1.08rem;
}

.card p,
.muted {
    color: rgb(255 255 255 / 0.6);
}

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

.metric-card {
    padding: 1.5rem;
}

.metric-label {
    font-size: 0.88rem;
    color: rgb(255 255 255 / 0.6);
    text-transform: none;
    letter-spacing: 0;
}

.metric-value {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
}

.metric-caption {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    color: rgb(255 255 255 / 0.5);
}

.section {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.form-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 1fr);
    align-items: center;
    gap: 3rem;
    min-height: calc(100vh - 10rem);
    margin: 0;
}

.form-shell::after {
    content: "AssistantAI";
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34rem;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at center, rgb(6 182 212 / 0.22), transparent 34%),
        linear-gradient(to bottom right, rgb(30 58 138 / 0.5), rgb(22 78 99 / 0.5));
    border: 1px solid rgb(255 255 255 / 0.1);
    color: rgb(255 255 255 / 0.92);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.form-shell > .panel {
    width: min(100%, 32rem);
    justify-self: center;
    background: transparent;
    border: none;
    backdrop-filter: none;
    padding: 0;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    color: rgb(255 255 255 / 0.8);
    font-size: 0.94rem;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: #fff;
}

.field textarea {
    min-height: 7rem;
    resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: 2px solid rgba(34, 211, 238, 0.35);
    border-color: #2563eb;
}

.checkbox-field label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.callout,
.status-banner {
    padding: 1rem 1.1rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(37 99 235 / 0.2);
    background: rgb(37 99 235 / 0.1);
    color: rgb(219 234 254);
}

.status-banner.error {
    border-color: rgba(248, 113, 113, 0.25);
    background: rgba(127, 29, 29, 0.3);
    color: #fecaca;
}

.status-banner.success {
    border-color: rgba(74, 222, 128, 0.24);
    background: rgba(20, 83, 45, 0.3);
    color: #bbf7d0;
}

.placeholder-list {
    display: grid;
    gap: 0.75rem;
    padding-left: 1rem;
    color: #bfdbfe;
}

.widget-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.widget-main {
    display: grid;
    gap: 1rem;
}

.widget-side {
    display: grid;
    gap: 1rem;
}

.sticky-panel {
    position: sticky;
    top: 6.5rem;
}

.color-row {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.75rem;
}

.color-input {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.25rem;
}

.code-panel {
    margin: 0;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(2 6 23 / 0.8);
    color: #93c5fd;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.preview-shell {
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.preview-light {
    background: linear-gradient(180deg, #f8fafc 0%, #dbeafe 100%);
    color: #0f172a;
}

.preview-dark {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: #e2e8f0;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: #f8fafc;
}

.preview-header p {
    color: rgba(248, 250, 252, 0.88);
}

.preview-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-weight: 800;
}

.preview-body {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    min-height: 14rem;
}

.preview-bubble {
    max-width: 85%;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 1.8rem rgba(15, 23, 42, 0.15);
}

.preview-bubble-assistant {
    color: #f8fafc;
    border-top-left-radius: 0.35rem;
}

.preview-bubble-user {
    justify-self: end;
    background: rgba(148, 163, 184, 0.2);
    border-top-right-radius: 0.35rem;
}

.preview-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1rem 1rem;
    color: #64748b;
    font-size: 0.88rem;
}

.widget-action-bar {
    position: sticky;
    top: 4.75rem;
    z-index: 15;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 1rem;
    background: rgb(10 15 31 / 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 0.22);
}

.widget-private-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.82fr);
    gap: 1.5rem;
    align-items: start;
}

.widget-form-stack {
    display: grid;
    gap: 1.25rem;
}

.widget-card {
    gap: 1.25rem;
}

.widget-card .form-grid.compact {
    grid-template-columns: 1fr;
}

.color-picker-row {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
}

.kb-select-list {
    display: grid;
    gap: 0.75rem;
}

.kb-select-card {
    display: grid;
    gap: 0.3rem;
    width: 100%;
    padding: 1rem;
    text-align: left;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.95rem;
    background: rgb(255 255 255 / 0.045);
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.kb-select-card:hover,
.kb-select-card.selected {
    border-color: rgb(59 130 246 / 0.55);
    background: rgb(37 99 235 / 0.16);
    transform: translateY(-1px);
}

.kb-select-card span {
    color: #fff;
    font-weight: 700;
}

.kb-select-card small {
    color: rgb(255 255 255 / 0.56);
    line-height: 1.5;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.position-option {
    padding: 0.9rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.85rem;
    background: rgb(255 255 255 / 0.05);
    color: rgb(255 255 255 / 0.75);
    font-weight: 700;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.position-option:hover,
.position-option.active {
    border-color: rgb(34 211 238 / 0.55);
    background: linear-gradient(135deg, rgb(37 99 235 / 0.24), rgb(34 211 238 / 0.15));
    color: #fff;
}

.widget-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.9rem;
    background: rgb(255 255 255 / 0.045);
}

.widget-toggle-row div {
    display: grid;
    gap: 0.2rem;
}

.widget-toggle-row strong {
    color: #fff;
}

.widget-toggle-row span {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.86rem;
}

.widget-toggle-row input {
    width: 2.6rem;
    height: 1.35rem;
    accent-color: #2563eb;
}

.code-copy-box {
    position: relative;
}

.code-copy-box pre {
    margin: 0;
    min-height: 5.5rem;
    padding: 1rem 5.5rem 1rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.9rem;
    background: rgb(0 0 0 / 0.5);
    color: #4ade80;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-copy-box .button {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
}

.api-key-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.api-key-mini-grid article {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.9rem;
    background: rgb(255 255 255 / 0.045);
}

.api-key-mini-grid h3 {
    margin-bottom: 0.45rem;
    color: #fff;
    font-size: 0.95rem;
}

.api-key-mini-grid code,
.api-key-mini-grid p {
    display: block;
    overflow: hidden;
    color: rgb(255 255 255 / 0.62);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-preview-column {
    display: grid;
    gap: 1rem;
}

.widget-preview-card {
    position: sticky;
    top: 10rem;
}

.widget-api-chip {
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem;
    border: 1px solid rgb(37 99 235 / 0.22);
    border-radius: 0.95rem;
    background: rgb(37 99 235 / 0.12);
}

.widget-api-chip span {
    color: #bfdbfe;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.widget-api-chip code {
    overflow: hidden;
    color: #d8b4fe;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-preview-note {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.86rem;
    text-align: center;
}

.command-list {
    display: grid;
    gap: 1rem;
}

.command-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 1rem;
    background: rgb(255 255 255 / 0.045);
}

.command-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.command-card-head > div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.command-card-head code {
    padding: 0.35rem 0.65rem;
    border-radius: 0.6rem;
    background: rgb(37 99 235 / 0.18);
    color: #93c5fd;
    font-weight: 800;
}

.command-card-head span {
    color: #86efac;
    font-size: 0.82rem;
    font-weight: 800;
}

.empty-state-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.35rem;
    border: 1px dashed rgb(255 255 255 / 0.18);
    border-radius: 1rem;
    background: rgb(255 255 255 / 0.035);
    color: rgb(255 255 255 / 0.62);
}

.empty-state-card strong {
    color: #fff;
}

.widget-tip-list {
    display: grid;
    gap: 0.85rem;
}

.widget-tip-list article,
.widget-command-preview {
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.95rem;
    background: rgb(255 255 255 / 0.045);
}

.widget-tip-list h3 {
    margin-bottom: 0.35rem;
    color: #fff;
}

.widget-tip-list p,
.widget-command-preview p {
    color: rgb(255 255 255 / 0.58);
    line-height: 1.6;
}

.widget-command-preview {
    display: grid;
    gap: 0.65rem;
    border-color: rgb(34 211 238 / 0.22);
    background: linear-gradient(135deg, rgb(37 99 235 / 0.16), rgb(34 211 238 / 0.08));
}

.widget-command-preview span {
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.widget-command-preview code {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
}

.install-step-list {
    display: grid;
    gap: 1rem;
}

.install-step-list article {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.install-step-list article > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgb(37 99 235 / 0.2);
    color: #60a5fa;
    font-weight: 900;
}

.install-step-list h3 {
    margin-bottom: 0.25rem;
    color: #fff;
}

.install-step-list p {
    color: rgb(255 255 255 / 0.58);
    line-height: 1.6;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.platform-grid article {
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.95rem;
    background: rgb(255 255 255 / 0.045);
}

.platform-grid h3 {
    margin-bottom: 0.45rem;
    color: #fff;
}

.platform-grid p {
    color: rgb(255 255 255 / 0.58);
    line-height: 1.6;
}

.required-mark {
    color: #60a5fa;
    font-weight: 900;
}

.field small {
    display: block;
    margin-top: 0.45rem;
    color: rgb(255 255 255 / 0.42);
    font-size: 0.78rem;
    line-height: 1.5;
}

.behavior-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.behavior-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.025));
    transition: border-color 160ms ease, transform 160ms ease;
}

.behavior-card:hover {
    border-color: rgb(37 99 235 / 0.45);
    transform: translateY(-2px);
}

.behavior-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: start;
}

.behavior-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.85rem;
    background: rgb(37 99 235 / 0.18);
    color: #60a5fa;
}

.behavior-avatar.large {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.35rem;
}

.behavior-card h3 {
    color: #fff;
    font-size: 1.05rem;
}

.behavior-card-head p,
.behavior-objective {
    color: rgb(255 255 255 / 0.58);
    line-height: 1.6;
}

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

.behavior-kb-chip,
.behavior-kb-panel {
    border: 1px solid rgb(34 211 238 / 0.22);
    border-radius: 0.85rem;
    background: rgb(34 211 238 / 0.1);
}

.behavior-kb-chip {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
}

.behavior-kb-chip span {
    color: rgb(255 255 255 / 0.55);
    font-size: 0.78rem;
}

.behavior-kb-chip strong {
    color: #fff;
}

.behavior-actions {
    display: flex;
    gap: 0.55rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgb(255 255 255 / 0.06);
}

.behavior-actions .button {
    flex: 1;
}

.behavior-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    padding: 3rem 1rem;
    text-align: center;
}

.behavior-empty-state > div {
    font-size: 3rem;
    opacity: 0.35;
}

.behavior-empty-state h3 {
    color: #fff;
    font-size: 1.35rem;
}

.behavior-empty-state p {
    color: rgb(255 255 255 / 0.55);
}

.behavior-section-nav {
    position: sticky;
    top: 9rem;
    z-index: 14;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 1rem;
    background: rgb(10 15 31 / 0.82);
    backdrop-filter: blur(16px);
}

.behavior-section-nav a {
    padding: 0.55rem 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 0.75rem;
    color: rgb(255 255 255 / 0.72);
    font-size: 0.85rem;
}

.behavior-section-nav a:hover {
    border-color: rgb(37 99 235 / 0.45);
    color: #fff;
}

.scroll-anchor {
    scroll-margin-top: 12rem;
}

.behavior-detail-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.behavior-detail-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.behavior-detail-hero p {
    margin: 0.25rem 0 0.8rem;
    color: rgb(255 255 255 / 0.55);
}

.behavior-detail-list {
    display: grid;
    gap: 1rem;
}

.behavior-detail-list div {
    display: grid;
    gap: 0.4rem;
}

.behavior-detail-list span {
    color: rgb(255 255 255 / 0.55);
    font-size: 0.85rem;
}

.behavior-detail-list strong {
    color: #fff;
}

.behavior-detail-list p {
    margin: 0;
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 0.06);
    border-radius: 0.85rem;
    background: rgb(255 255 255 / 0.045);
    color: rgb(255 255 255 / 0.7);
    line-height: 1.7;
}

.behavior-kb-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.behavior-kb-panel div:nth-child(2) {
    display: grid;
    gap: 0.2rem;
}

.behavior-kb-panel strong {
    color: #fff;
}

.behavior-kb-panel span {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.85rem;
}

.danger-card {
    border-color: rgb(239 68 68 / 0.25);
    background: rgb(127 29 29 / 0.18);
}

.badge-danger {
    border-color: rgb(239 68 68 / 0.25);
    background: rgb(239 68 68 / 0.14);
    color: #fca5a5;
}

.kb-detail-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kb-detail-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.kb-detail-hero p {
    margin: 0.25rem 0 0.8rem;
    color: rgb(255 255 255 / 0.55);
}

.kb-document-list {
    display: grid;
    gap: 0.85rem;
}

.kb-document-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.95rem;
    background: rgb(255 255 255 / 0.045);
    transition: background 160ms ease, border-color 160ms ease;
}

.kb-document-row:hover {
    border-color: rgb(37 99 235 / 0.28);
    background: rgb(255 255 255 / 0.075);
}

.kb-document-row h3 {
    overflow: hidden;
    color: #fff;
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-document-row p {
    color: rgb(255 255 255 / 0.45);
    font-size: 0.82rem;
}

.kb-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    background: rgb(148 163 184 / 0.18);
    color: #cbd5e1;
}

.kb-document-icon.pdf {
    background: rgb(239 68 68 / 0.18);
    color: #f87171;
}

.kb-document-icon.sheet {
    background: rgb(34 197 94 / 0.18);
    color: #4ade80;
}

.kb-document-icon.doc {
    background: rgb(37 99 235 / 0.18);
    color: #60a5fa;
}

.upload-drop-zone {
    position: relative;
    border: 2px dashed rgb(255 255 255 / 0.12);
    border-radius: 1.2rem;
    background: rgb(255 255 255 / 0.035);
    transition: border-color 160ms ease, background 160ms ease;
}

.upload-drop-zone:hover {
    border-color: rgb(37 99 235 / 0.55);
    background: rgb(37 99 235 / 0.08);
}

.upload-drop-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-drop-zone label {
    display: grid;
    justify-items: center;
    gap: 0.8rem;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
}

.upload-drop-zone label > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    background: rgb(37 99 235 / 0.18);
    color: #60a5fa;
    font-size: 1.8rem;
}

.upload-drop-zone strong {
    color: #fff;
}

.upload-drop-zone small {
    color: rgb(255 255 255 / 0.45);
}

.upload-drop-zone em {
    padding: 0.6rem 1rem;
    border: 1px solid rgb(37 99 235 / 0.32);
    border-radius: 0.75rem;
    color: #60a5fa;
    font-style: normal;
    font-weight: 800;
}

.upload-file-section {
    display: grid;
    gap: 1rem;
}

.upload-file-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.upload-file-head h3 {
    color: #fff;
}

.upload-file-list {
    display: grid;
    gap: 0.75rem;
    max-height: 24rem;
    overflow-y: auto;
}

.upload-file-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.95rem;
    background: rgb(255 255 255 / 0.045);
}

.upload-file-row h4 {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-row p {
    color: rgb(255 255 255 / 0.45);
    font-size: 0.82rem;
}

.upload-progress {
    height: 0.28rem;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
}

.upload-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #22d3ee);
}

.ocr-content-box,
.ocr-chunk-card {
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.95rem;
    background: rgb(255 255 255 / 0.045);
}

.ocr-content-box {
    max-height: 28rem;
    overflow: auto;
    padding: 1rem;
}

.ocr-content-box pre,
.ocr-chunk-card pre {
    margin: 0;
    color: rgb(255 255 255 / 0.78);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.86rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

.ocr-chunk-list {
    display: grid;
    gap: 0.9rem;
    max-height: 38rem;
    overflow-y: auto;
}

.ocr-chunk-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.ocr-chunk-card pre {
    max-height: 8rem;
    overflow: hidden;
}

.ocr-chunk-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    color: rgb(255 255 255 / 0.55);
    font-size: 0.78rem;
}

.success-soft {
    border-color: rgb(34 197 94 / 0.28);
    color: #86efac;
}

.success-soft:hover {
    background: rgb(34 197 94 / 0.12);
}

.mono-field {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
}

.db-connection-list {
    display: grid;
    gap: 0.85rem;
}

.db-connection-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 1rem;
    background: rgb(255 255 255 / 0.045);
    transition: background 160ms ease, border-color 160ms ease;
}

.db-connection-row:hover {
    border-color: rgb(34 211 238 / 0.28);
    background: rgb(255 255 255 / 0.075);
}

.db-connection-main {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.db-connection-title {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.db-connection-title h3 {
    color: #fff;
    font-size: 1rem;
}

.db-connection-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgb(255 255 255 / 0.45);
    font-size: 0.82rem;
}

.db-connection-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.db-table-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.db-table-grid article {
    overflow: hidden;
    padding: 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.8rem;
    background: rgb(255 255 255 / 0.045);
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.muted-text {
    color: rgb(255 255 255 / 0.52);
}

.db-query-private-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.75fr);
    gap: 1.5rem;
    align-items: start;
}

.db-example-list {
    display: grid;
    gap: 0.55rem;
}

.db-example-list button {
    padding: 0.75rem 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.8rem;
    background: rgb(255 255 255 / 0.045);
    color: rgb(255 255 255 / 0.7);
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.db-example-list button:hover {
    border-color: rgb(34 211 238 / 0.3);
    background: rgb(34 211 238 / 0.08);
    color: #fff;
}

.db-schema-list {
    display: grid;
    gap: 0.65rem;
    max-height: 22rem;
    overflow-y: auto;
}

.db-schema-list article {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.8rem;
    background: rgb(255 255 255 / 0.045);
}

.db-schema-list strong {
    color: #fff;
}

.db-schema-list span {
    color: rgb(255 255 255 / 0.48);
    font-size: 0.82rem;
}

.db-query-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: stretch;
}

.db-query-input-row textarea {
    min-height: 4.5rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.85rem;
    background: rgb(255 255 255 / 0.05);
    color: #fff;
    resize: vertical;
}

.db-query-input-row textarea:focus {
    outline: 2px solid rgba(34, 211, 238, 0.35);
    border-color: #2563eb;
}

.db-history-list {
    display: grid;
    gap: 0.75rem;
}

.db-history-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.9rem;
    background: rgb(255 255 255 / 0.045);
}

.db-history-list strong {
    color: #fff;
}

.db-history-list p {
    margin-top: 0.25rem;
    color: rgb(255 255 255 / 0.48);
    font-size: 0.82rem;
}

.usage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.usage-bars {
    display: grid;
    gap: 1rem;
}

.usage-bar-row {
    display: grid;
    gap: 0.55rem;
}

.usage-bar-row strong {
    color: #f8fafc;
}

.progress-track {
    width: 100%;
    height: 0.65rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.progress-fill.success {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.progress-fill.accent {
    background: linear-gradient(90deg, #f59e0b, #22d3ee);
}

.query-list {
    display: grid;
    gap: 0.75rem;
}

.query-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.85rem;
    padding: 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.32);
}

.query-row strong {
    display: block;
    color: #f8fafc;
    overflow-wrap: anywhere;
}

.opportunity-list {
    display: grid;
    gap: 0.85rem;
}

.opportunity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.32);
}

.avatar-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #f8fafc;
    font-weight: 800;
}

.opportunity-main {
    min-width: 0;
}

.opportunity-main h3 {
    margin-bottom: 0.4rem;
}

.opportunity-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compact-field {
    min-width: 14rem;
}

.inner-panel {
    margin-top: 1rem;
    box-shadow: none;
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.7rem;
}

.subscription-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.18)),
        rgba(15, 23, 42, 0.72);
}

.subscription-price {
    display: grid;
    justify-items: end;
    gap: 0.25rem;
    min-width: 11rem;
}

.subscription-price strong {
    font-size: 1.65rem;
    color: #f8fafc;
}

.subscription-price span,
.subscription-feature-title span {
    color: #7dd3fc;
}

.subscription-feature-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.warning-progress {
    background: linear-gradient(90deg, #f59e0b, #facc15);
}

.danger-progress {
    background: linear-gradient(90deg, #dc2626, #f97316);
}

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

.plan-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.02);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
    transform: scale(1.02);
    border-color: rgb(255 255 255 / 0.2);
}

.current-plan {
    border-color: rgb(59 130 246 / 0.5);
    background: linear-gradient(to bottom, rgb(37 99 235 / 0.3), rgb(6 182 212 / 0.3));
    box-shadow: 0 25px 50px -12px rgb(59 130 246 / 0.2);
}

.plan-price {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.plan-price strong {
    font-size: 3rem;
    color: #fff;
}

.plan-price span {
    color: #7dd3fc;
}

.plan-features {
    display: grid;
    gap: 0.6rem;
}

.plan-feature {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    color: #bfdbfe;
    font-size: 0.94rem;
}

.plan-feature strong {
    color: #f8fafc;
}

.db-query-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.5fr);
    gap: 1rem;
    align-items: start;
}

.table-scroll {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 36rem;
    font-size: 0.92rem;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    vertical-align: middle;
    color: #dbeafe;
}

.data-table th {
    color: rgb(255 255 255 / 0.5);
    background: rgb(255 255 255 / 0.04);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.data-table tbody tr {
    border-top: 1px solid rgb(255 255 255 / 0.05);
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgb(255 255 255 / 0.04);
}

.data-table td {
    overflow-wrap: anywhere;
    color: rgb(255 255 255 / 0.85);
}

.data-table td strong {
    color: #fff;
    font-weight: 600;
}

.data-table td span {
    display: block;
    color: rgb(255 255 255 / 0.45);
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.code-textarea {
    width: 100%;
    min-height: 28rem;
    resize: vertical;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.72);
    color: #dbeafe;
    padding: 1rem;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.86rem;
    line-height: 1.5;
}

.legal-copy {
    color: #bfdbfe;
    line-height: 1.7;
}

.legal-copy h2 {
    color: #f8fafc;
    margin-top: 1.3rem;
}

.demo-surface {
    position: relative;
    min-height: 34rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.64));
}

.demo-site {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 30rem;
    text-align: center;
    gap: 0.7rem;
}

.demo-widget {
    position: absolute;
    bottom: 1.2rem;
    width: min(22rem, calc(100% - 2rem));
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 1.5rem 3rem rgba(2, 6, 23, 0.36);
    background: rgba(2, 6, 23, 0.92);
}

.demo-widget.right {
    right: 1.2rem;
}

.demo-widget.left {
    left: 1.2rem;
}

.demo-widget-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    color: #f8fafc;
}

.demo-widget-body,
.chat-test-messages {
    display: grid;
    gap: 0.75rem;
    max-height: 22rem;
    overflow-y: auto;
    padding: 1rem;
}

.demo-message {
    max-width: 84%;
    padding: 0.72rem 0.85rem;
    border-radius: 1rem;
    color: #e0f2fe;
    background: rgba(148, 163, 184, 0.14);
}

.demo-message.user {
    justify-self: end;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #f8fafc;
}

.demo-widget-input {
    display: flex;
    gap: 0.6rem;
    padding: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.demo-widget-input input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.78);
    color: #f8fafc;
    padding: 0.75rem;
}

.small-code {
    min-height: 11rem;
}

.chat-test-shell {
    display: grid;
    gap: 1rem;
}

.bot-card {
    border-color: rgba(6, 182, 212, 0.22);
}

.user-card {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(37, 99, 235, 0.12);
}

.footer-note {
    color: #64748b;
    font-size: 0.92rem;
}

.loading-progress {
    position: relative;
    display: block;
    width: 7rem;
    height: 7rem;
    margin: 18vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(148, 163, 184, 0.2);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #22d3ee;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 700;
    inset: calc(18vh + 2.8rem) 0 auto 0.2rem;
    color: #e0f2fe;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Cargando");
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #7f1d1d;
    color: #fff;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #fff;
    font-weight: 700;
    margin-left: 0.8rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.8rem;
    top: 0.5rem;
}

.validation-message {
    color: #fca5a5;
    font-size: 0.85rem;
}

/* ── Auth split layout (Login / Register / RecoverPassword) ── */

.auth-split {
    display: flex;
    min-height: 100vh;
}

.auth-split::after {
    display: none;
}

.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem;
}

.auth-form-side > * {
    width: min(100%, 28rem);
    margin-left: auto;
    margin-right: auto;
}

.auth-form-inner {
    max-width: 28rem;
    width: 100%;
    margin: 0 auto;
}

.auth-right-side {
    display: none;
    flex: 1;
    position: relative;
}

@media (min-width: 1024px) {
    .auth-right-side {
        display: block;
    }
}

.auth-right-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.5), rgba(6, 182, 212, 0.5));
}

.auth-right-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.auth-right-content h2 {
    font-size: 2.4rem;
    color: #f8fafc;
    margin-bottom: 1rem;
}

.auth-right-content p {
    font-size: 1.15rem;
    color: rgba(248, 250, 252, 0.7);
    max-width: 24rem;
}

.auth-logo-box {
    width: 8rem;
    height: 8rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.auth-logo-box svg {
    width: 5rem;
    height: 5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(248, 250, 252, 0.5);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.18s ease;
}

.back-link:hover {
    color: #f8fafc;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2rem;
    text-decoration: none;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    font-size: 1rem;
    font-weight: 800;
    color: #f8fafc;
    overflow: hidden;
}

.auth-brand-mark svg {
    width: 2.5rem;
    height: 2.5rem;
}

.auth-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-heading {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1.6rem;
}

.auth-heading h1 {
    color: #f8fafc;
    font-size: 1.85rem;
}

.auth-subheading {
    color: rgba(248, 250, 252, 0.5);
    margin-bottom: 2rem;
}

.input-icon {
    position: relative;
}

.input-icon-prefix {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(248, 250, 252, 0.4);
    pointer-events: none;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.input-icon-prefix svg,
.input-icon-suffix svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
    flex-shrink: 0;
}

.input-icon input {
    padding-left: 2.6rem;
}

.input-icon input.has-prefix {
    padding-left: 2.6rem;
}

.input-icon input.has-suffix {
    padding-right: 2.6rem;
}

.input-icon-suffix {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(248, 250, 252, 0.4);
    cursor: pointer;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1;
    transition: color 0.18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.input-icon-suffix:hover {
    color: rgba(248, 250, 252, 0.7);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkbox-row input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.checkbox-row span,
.checkbox-row label {
    color: rgba(248, 250, 252, 0.6);
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-row label a {
    color: #60a5fa;
}

.turnstile-wrapper {
    min-height: 70px;
}

.turnstile-wrapper #turnstile-container {
    min-height: 70px;
}

.free-plan-card {
    margin-top: 2rem;
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(74, 222, 128, 0.24);
    background: rgba(20, 83, 45, 0.3);
}

.free-plan-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.free-plan-check {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
    color: #4ade80;
}

.free-plan-card p {
    color: #bbf7d0;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.free-plan-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: rgba(187, 247, 208, 0.8);
    font-size: 0.88rem;
    display: grid;
    gap: 0.2rem;
}

/* Recovery step icon */
.step-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
}

.step-icon-blue {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

/* Private client application UI */
.private-page {
    display: grid;
    gap: 1.5rem;
}

.dashboard-page {
    gap: 1.65rem;
}

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
    gap: 1.5rem;
    overflow: hidden;
    padding: 1.6rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 10% 10%, rgb(37 99 235 / 0.28), transparent 28rem),
        radial-gradient(circle at 85% 15%, rgb(6 182 212 / 0.18), transparent 24rem),
        linear-gradient(135deg, rgb(15 23 42 / 0.96), rgb(2 6 23 / 0.92));
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.22);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    pointer-events: none;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px);
    background-size: 3rem 3rem;
    mask-image: linear-gradient(90deg, #000, transparent 78%);
}

.dashboard-hero-copy,
.dashboard-hero-panel {
    position: relative;
    z-index: 1;
}

.dashboard-hero-copy {
    display: grid;
    align-content: center;
    min-height: 13rem;
}

.dashboard-hero-copy h1 {
    margin: 0.35rem 0 0.55rem;
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 0.92;
    letter-spacing: -0.075em;
}

.dashboard-hero-copy p {
    max-width: 43rem;
    color: rgb(226 232 240 / 0.72);
    font-size: 1rem;
    line-height: 1.7;
}

.dashboard-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.dashboard-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 999px;
    color: rgb(255 255 255 / 0.72);
    background: rgb(255 255 255 / 0.06);
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-hero-tags i {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0.35rem rgb(34 197 94 / 0.14);
}

.dashboard-hero-panel {
    display: grid;
    gap: 1rem;
    align-content: space-between;
    padding: 1.15rem;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.045));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
    backdrop-filter: blur(14px);
}

.dashboard-hero-panel > div:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-hero-panel strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.dashboard-hero-panel p {
    color: rgb(255 255 255 / 0.58);
    font-size: 0.88rem;
    line-height: 1.5;
}

.dashboard-health-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    flex: 0 0 auto;
    border-radius: 999px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    background:
        radial-gradient(circle at center, rgb(15 23 42) 57%, transparent 58%),
        conic-gradient(#22c55e 0 98%, rgb(255 255 255 / 0.14) 98% 100%);
    box-shadow: 0 0 2rem rgb(34 197 94 / 0.18);
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.private-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.private-page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.private-page-header p {
    color: rgb(255 255 255 / 0.5);
}

.private-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.private-alert {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.private-alert-error {
    border: 1px solid rgb(239 68 68 / 0.2);
    background: rgb(239 68 68 / 0.1);
}

.private-alert-error p {
    color: #f87171;
}

.private-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.dashboard-stats-grid {
    gap: 1rem;
}

.private-stat-card,
.private-card {
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    border-radius: 0.75rem;
    backdrop-filter: blur(4px);
}

.private-stat-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 8.4rem;
    padding: 1.5rem;
}

.dashboard-stat-card {
    isolation: isolate;
    border-radius: 1.15rem;
    background:
        linear-gradient(145deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.035)),
        rgb(15 23 42 / 0.7);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.dashboard-stat-card::before {
    content: "";
    position: absolute;
    inset: auto -2rem -3.2rem auto;
    width: 9rem;
    height: 9rem;
    z-index: -1;
    border-radius: 999px;
    filter: blur(0.2rem);
    opacity: 0.28;
}

.dashboard-stat-card.stat-blue::before {
    background: #2563eb;
}

.dashboard-stat-card.stat-green::before {
    background: #22c55e;
}

.dashboard-stat-card.stat-cyan::before {
    background: #06b6d4;
}

.dashboard-stat-card.stat-yellow::before {
    background: #eab308;
}

.private-stat-card p {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.private-stat-card strong {
    color: #fff;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.private-stat-card small {
    display: block;
    max-width: 13rem;
    margin-top: 0.35rem;
    color: rgb(255 255 255 / 0.42);
    font-size: 0.76rem;
    line-height: 1.35;
}

.private-card {
    padding: 1.5rem;
}

.private-card-wide {
    grid-column: span 2;
}

.private-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.private-card-title p {
    color: rgb(255 255 255 / 0.45);
    font-size: 0.78rem;
    line-height: 1.35;
    margin-top: 0.2rem;
}

.private-card-title h2 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.private-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    border-radius: 0.75rem;
    font-size: 1.4rem;
}

.private-card-title .private-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.private-card-icon.blue,
.quick-action-icon.blue {
    color: #60a5fa;
    background: rgb(37 99 235 / 0.2);
}

.private-card-icon.green,
.quick-action-icon.green {
    color: #4ade80;
    background: rgb(34 197 94 / 0.2);
}

.private-card-icon.cyan,
.quick-action-icon.cyan {
    color: #22d3ee;
    background: rgb(6 182 212 / 0.2);
}

.private-card-icon.yellow,
.quick-action-icon.yellow {
    color: #facc15;
    background: rgb(234 179 8 / 0.2);
}

.quick-action-icon.pink {
    color: #f472b6;
    background: rgb(236 72 153 / 0.2);
}

.private-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.dashboard-chart-card {
    overflow: hidden;
    border-radius: 1.15rem;
    background:
        linear-gradient(180deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.035)),
        rgb(15 23 42 / 0.72);
}

.private-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.private-line-chart,
.private-bar-chart {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 1rem;
    height: 16rem;
    padding: 1.15rem 0.35rem 0.2rem;
}

.dashboard-chart-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.06);
    border-radius: 1rem;
    background:
        radial-gradient(circle at 50% 0%, rgb(37 99 235 / 0.12), transparent 18rem),
        rgb(2 6 23 / 0.28);
}

.chart-grid-lines {
    position: absolute;
    inset: 1rem 0.85rem 2rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.12);
    background:
        linear-gradient(to bottom, rgb(255 255 255 / 0.08) 1px, transparent 1px),
        linear-gradient(to right, rgb(255 255 255 / 0.035) 1px, transparent 1px);
    background-size: 100% 25%, 25% 100%;
    mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

.private-line-point,
.private-bar-chart > div {
    display: grid;
    justify-items: center;
    align-items: end;
    height: 100%;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.75rem;
}

.private-line-point i {
    position: relative;
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    margin-top: auto;
    margin-bottom: calc(var(--height) * 1%);
    border-radius: 999px;
    background: linear-gradient(135deg, #93c5fd, #2563eb);
    border: 2px solid rgb(191 219 254 / 0.9);
    box-shadow: 0 0 0 7px rgb(59 130 246 / 0.12), 0 0 2rem rgb(37 99 235 / 0.3);
}

.private-line-point i::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 1px;
    height: 12rem;
    background: linear-gradient(to top, rgb(59 130 246 / 0.34), transparent);
    transform: translateX(-50%);
}

.private-bar-chart i {
    display: block;
    width: min(3rem, 70%);
    min-height: 0.5rem;
    border-radius: 0.85rem 0.85rem 0.25rem 0.25rem;
    background: linear-gradient(180deg, #86efac, #10b981 58%, #047857);
    box-shadow: 0 0.8rem 2rem rgb(16 185 129 / 0.22);
}

.private-line-point span,
.private-bar-chart span {
    color: rgb(255 255 255 / 0.7);
    margin-bottom: 0.5rem;
}

.private-line-point small,
.private-bar-chart small {
    margin-top: 0.5rem;
    color: rgb(255 255 255 / 0.6);
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.quick-action-card {
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: start;
    gap: 0.75rem;
    min-height: 9rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background:
        linear-gradient(145deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.035)),
        rgb(15 23 42 / 0.42);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-action-card::after {
    content: "";
    position: absolute;
    right: -2.5rem;
    bottom: -2.5rem;
    width: 6rem;
    height: 6rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.05);
}

.quick-action-card:hover {
    transform: translateY(-3px);
    border-color: rgb(37 99 235 / 0.3);
    background: rgb(37 99 235 / 0.1);
    box-shadow: 0 1rem 2.2rem rgb(0 0 0 / 0.18);
}

.quick-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    font-size: 1.45rem;
    transition: transform 0.18s ease;
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1);
}

.quick-action-card strong {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 750;
}

.quick-action-card p {
    color: rgb(255 255 255 / 0.46);
    font-size: 0.78rem;
    line-height: 1.45;
}

.system-status {
    display: grid;
    gap: 1rem;
}

.dashboard-start-card {
    border-radius: 1.15rem;
}

.system-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.system-row span {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.system-row strong {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-track {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.system-status p {
    color: rgb(255 255 255 / 0.4);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.system-list {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(255 255 255 / 0.1);
}

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-modern i {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: currentColor;
}

.badge-primary {
    color: #bfdbfe;
    background: rgb(37 99 235 / 0.22);
}

.badge-success {
    color: #86efac;
    background: rgb(34 197 94 / 0.16);
}

.badge-error {
    color: #fca5a5;
    background: rgb(239 68 68 / 0.16);
}

.badge-info {
    color: #93c5fd;
    background: rgb(59 130 246 / 0.16);
}

.badge-warning {
    color: #fde68a;
    background: rgb(245 158 11 / 0.16);
}

.period-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.usage-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.private-card-title-between {
    justify-content: space-between;
}

.private-card-title-between > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.private-list {
    display: grid;
    gap: 0.75rem;
}

.private-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.05);
    background: rgb(255 255 255 / 0.05);
    transition: background 0.18s ease;
}

.private-list-row:hover {
    background: rgb(255 255 255 / 0.1);
}

.private-list-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.private-list-main > div {
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.private-list-main h3 {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.private-list-main p {
    color: rgb(255 255 255 / 0.4);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-pin {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 999px;
}

.status-pin.success {
    background: #4ade80;
}

.status-pin.error {
    background: #f87171;
}

.empty-state-card.compact {
    padding: 2rem 1rem;
}

.empty-state-card.compact > span {
    font-size: 3rem;
}

.opportunity-private-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.05);
    background: rgb(255 255 255 / 0.05);
    transition: background 0.18s ease;
}

.opportunity-private-row:hover {
    background: rgb(255 255 255 / 0.1);
}

.opportunity-private-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.opportunity-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgb(37 99 235 / 0.2);
    color: #60a5fa;
    font-weight: 700;
}

.opportunity-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.opportunity-title-row h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.opportunity-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgb(255 255 255 / 0.4);
    font-size: 0.75rem;
}

.opportunity-side {
    display: grid;
    justify-items: end;
    gap: 0.35rem;
    flex: 0 0 auto;
    text-align: right;
}

.opportunity-side p {
    color: rgb(255 255 255 / 0.4);
    font-size: 0.75rem;
}

.opportunity-side small {
    color: rgb(255 255 255 / 0.3);
    font-size: 0.75rem;
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
    gap: 1.5rem;
}

.account-main-card {
    min-width: 0;
}

.account-side {
    display: grid;
    align-content: start;
    gap: 1.5rem;
}

.account-form {
    display: grid;
    gap: 1rem;
}

.account-form .field input {
    min-height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: #fff;
}

.account-form .field input:disabled {
    color: rgb(255 255 255 / 0.5);
    cursor: not-allowed;
}

.account-info-list {
    display: grid;
    gap: 1rem;
    color: rgb(255 255 255 / 0.7);
    font-size: 0.875rem;
}

.account-info-list > div {
    display: grid;
    gap: 0.35rem;
}

.account-info-list span {
    color: rgb(255 255 255 / 0.6);
}

.account-info-list p {
    color: #fff;
    font-weight: 500;
}

.account-action-list {
    display: grid;
    gap: 0.5rem;
}

.account-action-list .button {
    justify-content: flex-start;
    width: 100%;
}

.info-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(59 130 246 / 0.2);
    background: rgb(59 130 246 / 0.1);
}

.info-callout > span {
    color: #60a5fa;
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 0.1rem;
}

.info-callout h2 {
    color: #60a5fa;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.info-callout p {
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
    line-height: 1.55;
}

.api-key-form {
    display: grid;
    gap: 1rem;
}

.api-key-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
}

.api-key-name span {
    color: #4ade80;
}

.api-key-name strong {
    color: #fff;
    font-weight: 500;
}

.api-key-name em {
    margin-left: auto;
    color: rgb(255 255 255 / 0.5);
    font-style: normal;
    font-size: 0.875rem;
}

.copy-row.modern {
    display: flex;
    gap: 0.5rem;
}

.copy-row.modern input {
    flex: 1;
    min-width: 0;
    min-height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.blue-soft {
    border-color: rgb(37 99 235 / 0.3);
    color: #60a5fa;
}

.blue-soft:hover {
    background: rgb(37 99 235 / 0.1);
}

.field-help {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.api-usage-list {
    display: grid;
    gap: 0.75rem;
}

.api-usage-list > div {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: rgb(255 255 255 / 0.7);
    font-size: 0.875rem;
}

.api-usage-list i {
    width: 0.375rem;
    height: 0.375rem;
    flex: 0 0 auto;
    margin-top: 0.45rem;
    border-radius: 999px;
    background: #60a5fa;
}

.api-usage-list h3 {
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.api-usage-list p {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.875rem;
    line-height: 1.5;
}

.api-usage-list code {
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    background: rgb(255 255 255 / 0.1);
    color: #e0f2fe;
}

.subscription-current-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(37 99 235 / 0.3);
    background: linear-gradient(90deg, rgb(37 99 235 / 0.2), rgb(6 182 212 / 0.2));
}

.subscription-current-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.subscription-current-body p {
    color: rgb(255 255 255 / 0.7);
    margin-bottom: 0.5rem;
}

.subscription-current-body strong {
    color: #fff;
}

.subscription-ok {
    display: inline-flex;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.subscription-limit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.limit-card {
    display: grid;
    gap: 0.75rem;
}

.limit-card h3 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.limit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.75rem;
}

.limit-row strong {
    color: #fff;
}

.limit-card p {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.75rem;
}

.progress-track .success {
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.progress-track .warning-progress {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.progress-track .danger-progress {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.feature-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.feature-check-grid > div {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: rgb(255 255 255 / 0.7);
    font-size: 0.875rem;
}

.feature-check-grid span {
    color: #4ade80;
}

.feature-check-grid h3 {
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-check-grid p {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.875rem;
}

.billing-summary {
    display: grid;
    gap: 0.75rem;
}

.billing-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgb(255 255 255 / 0.05);
}

.billing-summary h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.billing-summary strong {
    color: #fff;
    font-size: 1.1rem;
}

.billing-summary small {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.8rem;
}

.billing-note {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(59 130 246 / 0.2);
    background: rgb(59 130 246 / 0.1);
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.payment-list {
    display: grid;
    gap: 0.75rem;
}

.payment-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.05);
    background: rgb(255 255 255 / 0.05);
}

.payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
}

.payment-icon.success { color: #4ade80; background: rgb(34 197 94 / 0.2); }
.payment-icon.warning { color: #facc15; background: rgb(234 179 8 / 0.2); }
.payment-icon.error { color: #f87171; background: rgb(239 68 68 / 0.2); }

.payment-row h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.payment-row p {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.75rem;
}

.payment-side {
    display: grid;
    justify-items: end;
    gap: 0.35rem;
}

.payment-side strong {
    color: #fff;
    font-size: 1.1rem;
}

.private-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.private-plan-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    transition: border-color 0.18s ease;
}

.private-plan-card:hover {
    border-color: rgb(37 99 235 / 0.4);
}

.private-plan-card.is-current {
    border-color: rgb(34 197 94 / 0.5);
    box-shadow: 0 0 0 2px rgb(34 197 94 / 0.2);
}

.current-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0.75rem 0 0.5rem;
    background: #22c55e;
    color: #fff;
    font-size: 0.75rem;
}

.private-plan-card h2 {
    color: #fff;
    font-size: 1.25rem;
}

.private-plan-card header p {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.private-plan-price {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.private-plan-price strong {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.private-plan-price span,
.private-plan-price small {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.875rem;
}

.private-plan-features {
    display: grid;
    gap: 0.75rem;
}

.private-plan-features > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.private-plan-features .included {
    color: #60a5fa;
}

.private-plan-features .excluded {
    color: rgb(255 255 255 / 0.3);
}

.private-plan-features p {
    color: rgb(255 255 255 / 0.8);
}

.private-plan-features strong {
    color: #fff;
}

.getting-started-list {
    display: grid;
    gap: 1rem;
}

.getting-started-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.05);
    background: rgb(255 255 255 / 0.05);
    transition: border-color 0.18s ease;
}

.getting-started-item:hover {
    border-color: rgb(37 99 235 / 0.3);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    font-weight: 700;
}

.getting-started-item h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.getting-started-item p {
    color: rgb(255 255 255 / 0.5);
    font-size: 0.875rem;
}

.kb-action-grid,
.system-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.kb-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.kb-action-card:hover {
    transform: translateY(-2px);
}

.kb-action-card.green {
    border-color: rgb(34 197 94 / 0.3);
    background: linear-gradient(135deg, rgb(34 197 94 / 0.2), rgb(16 185 129 / 0.2));
}

.kb-action-card.green:hover {
    border-color: rgb(34 197 94 / 0.5);
    box-shadow: 0 18px 34px rgb(34 197 94 / 0.16);
}

.kb-action-card.cyan {
    border-color: rgb(6 182 212 / 0.3);
    background: linear-gradient(135deg, rgb(6 182 212 / 0.2), rgb(37 99 235 / 0.2));
}

.kb-action-card.cyan:hover {
    border-color: rgb(6 182 212 / 0.5);
    box-shadow: 0 18px 34px rgb(6 182 212 / 0.16);
}

.kb-action-card.blue {
    border-color: rgb(37 99 235 / 0.3);
    background: linear-gradient(135deg, rgb(37 99 235 / 0.22), rgb(147 51 234 / 0.16));
}

.kb-action-card.blue:hover {
    border-color: rgb(37 99 235 / 0.5);
    box-shadow: 0 18px 34px rgb(37 99 235 / 0.16);
}

.kb-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
    border-radius: 0.75rem;
    font-size: 1.7rem;
}

.kb-action-card.green .kb-action-icon {
    color: #4ade80;
    background: rgb(34 197 94 / 0.3);
}

.kb-action-card.cyan .kb-action-icon {
    color: #22d3ee;
    background: rgb(6 182 212 / 0.3);
}

.kb-action-card.blue .kb-action-icon {
    color: #93c5fd;
    background: rgb(37 99 235 / 0.3);
}

.kb-action-card h2 {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.kb-action-card p {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.kb-action-card strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    margin-left: auto;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
}

.kb-action-card.green strong {
    background: #22c55e;
}

.kb-action-card.cyan strong {
    background: #06b6d4;
}

.kb-action-card.blue strong {
    background: #2563eb;
}

.private-alert-success {
    border: 1px solid rgb(34 197 94 / 0.2);
    background: rgb(34 197 94 / 0.1);
}

.private-alert-success p {
    color: #86efac;
}

.badge-secondary {
    color: #cbd5e1;
    background: rgb(148 163 184 / 0.16);
}

.kb-filter-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.kb-filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kb-filter-row label {
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.kb-filter-row select {
    min-height: 2.5rem;
    min-width: 16rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: #fff;
    padding: 0.5rem 1rem;
}

.kb-filter-row select:focus {
    outline: none;
    border-color: #2563eb;
}

.kb-filter-note {
    max-width: 34rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(6 182 212 / 0.2);
    background: rgb(6 182 212 / 0.1);
    color: #cffafe;
    font-size: 0.875rem;
}

.kb-filter-note strong {
    color: #fff;
}

/* ── KB List layout (reemplaza el grid de cards) ── */

.kb-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    overflow: hidden;
}

.behavior-list {
    border-color: rgb(37 99 235 / 0.16);
}

.kb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.07);
    background: rgb(255 255 255 / 0.03);
    transition: background 0.15s ease;
}

.behavior-row {
    background:
        linear-gradient(90deg, rgb(37 99 235 / 0.035), transparent 42%),
        rgb(255 255 255 / 0.03);
}

.kb-row:last-child {
    border-bottom: none;
}

.kb-row:hover {
    background: rgb(255 255 255 / 0.06);
}

.kb-row-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.kb-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 0.55rem;
    background: rgb(255 255 255 / 0.07);
    font-size: 1.1rem;
}

.kb-row-icon.blue { color: #60a5fa; }
.kb-row-icon.cyan { color: #22d3ee; }
.kb-row-icon.green { color: #4ade80; }

.kb-row-info {
    flex: 1;
    min-width: 0;
}

.kb-row-info h3 {
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.behavior-row-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.behavior-row-title h3 {
    min-width: 0;
}

.kb-row-info p {
    color: rgb(255 255 255 / 0.45);
    font-size: 0.8125rem;
    margin: 0 0 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40rem;
}

.kb-row-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: rgb(255 255 255 / 0.5);
    font-size: 0.75rem;
}

.kb-type-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    color: #4ade80;
    background: rgb(34 197 94 / 0.1);
    font-size: 0.7rem;
}

.kb-row-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.kb-row-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.kb-row-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.kb-delete-btn {
    color: #f87171 !important;
    border-color: rgb(239 68 68 / 0.25) !important;
    background: transparent !important;
}

.kb-delete-btn:hover {
    background: rgb(239 68 68 / 0.12) !important;
    border-color: rgb(239 68 68 / 0.45) !important;
}

.empty-state-card {
    justify-items: center;
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-card > span {
    color: rgb(255 255 255 / 0.2);
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.empty-state-card h2 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state-card p {
    color: rgb(255 255 255 / 0.5);
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .private-stats-grid,
    .private-chart-grid,
    .private-dashboard-grid,
    .usage-stat-grid,
    .subscription-limit-grid,
    .private-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .private-card-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .private-main {
        padding-top: 5rem;
    }

    .dashboard-hero {
        padding: 1.15rem;
        border-radius: 1.1rem;
    }

    .dashboard-hero-copy {
        min-height: auto;
    }

    .dashboard-hero-panel > div:first-child,
    .dashboard-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-health-ring {
        width: 4.25rem;
        height: 4.25rem;
    }

    .private-stats-grid,
    .private-chart-grid,
    .private-dashboard-grid,
    .quick-action-grid,
    .kb-action-grid,
    .usage-stat-grid,
    .account-grid,
    .subscription-limit-grid,
    .feature-check-grid,
    .private-plan-grid {
        grid-template-columns: 1fr;
    }

    .kb-row {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .kb-row-right {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.5rem;
        border-top: 1px solid rgb(255 255 255 / 0.07);
    }

    .subscription-current-body,
    .billing-summary > div,
    .payment-row {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .payment-side {
        justify-items: start;
    }

    .copy-row.modern {
        flex-direction: column;
    }

    .private-list-row,
    .opportunity-private-row {
        align-items: stretch;
        flex-direction: column;
    }

    .opportunity-side {
        justify-items: start;
        text-align: left;
    }

    .kb-filter-card,
    .kb-filter-row,
    .kb-action-card {
        align-items: stretch;
        flex-direction: column;
    }

    .kb-filter-row select {
        min-width: 0;
        width: 100%;
    }

    .kb-action-card strong {
        margin-left: 0;
    }

    .getting-started-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .getting-started-item .button {
        grid-column: 1 / -1;
    }

    .private-quick-link,
    .user-menu-name {
        display: none;
    }
}

/* Contact page - mirrors the React split-screen contact UI */
.contact-split {
    display: flex;
    min-height: calc(100vh - 4.5rem);
    overflow: hidden;
}

.contact-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem;
    overflow-y: auto;
}

.contact-inner {
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
}

.contact-inner-narrow {
    max-width: 28rem;
}

.contact-heading {
    margin-bottom: 2rem;
}

.contact-heading h1,
.contact-success h1 {
    color: #fff;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.contact-heading p,
.contact-success p {
    color: rgb(255 255 255 / 0.5);
    line-height: 1.6;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.1);
}

.contact-info-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-info-icon svg {
    width: 100%;
    height: 100%;
}

.contact-info-blue {
    color: #60a5fa;
}

.contact-info-cyan {
    color: #22d3ee;
}

.contact-info-green {
    color: #4ade80;
}

.contact-info-card h3 {
    font-size: 0.875rem;
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-info-card p {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.75rem;
}

.contact-form {
    display: grid;
    gap: 1.25rem;
}

.contact-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.contact-form .field {
    gap: 0.5rem;
}

.contact-form .field label {
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
}

.contact-form .field input,
.contact-form .field textarea {
    min-height: 2.5rem;
    border-radius: 0.375rem;
    background: rgb(255 255 255 / 0.05);
    border-color: rgb(255 255 255 / 0.1);
    color: #fff;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.contact-form .field textarea {
    min-height: 7.5rem;
}

.contact-form .field input::placeholder,
.contact-form .field textarea::placeholder {
    color: rgb(255 255 255 / 0.3);
}

.contact-form .field input:focus,
.contact-form .field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgb(37 99 235 / 0.45);
}

.contact-submit {
    width: 100%;
    min-height: 2.5rem;
    font-weight: 500;
}

.button-icon {
    width: 1rem;
    height: 1rem;
}

.required {
    color: #f87171;
}

.contact-required {
    margin-top: 1.5rem;
    text-align: center;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.contact-visual {
    display: none;
    flex: 1;
    position: relative;
    min-height: 44rem;
    background:
        radial-gradient(circle at 50% 35%, rgb(6 182 212 / 0.22), transparent 32%),
        linear-gradient(135deg, rgb(30 58 138 / 0.5), rgb(22 78 99 / 0.5));
}

.contact-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgb(30 58 138 / 0.5), rgb(22 78 99 / 0.5));
}

.contact-visual-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.contact-visual-icon {
    position: relative;
    width: 8rem;
    height: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
}

.contact-visual-icon svg {
    width: 5rem;
    height: 5rem;
}

.contact-visual-content h2 {
    position: relative;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-visual-content > p {
    position: relative;
    max-width: 28rem;
    color: rgb(255 255 255 / 0.7);
    font-size: 1.25rem;
    line-height: 1.55;
}

.contact-benefits {
    position: relative;
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-benefits div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgb(255 255 255 / 0.7);
}

.contact-benefits svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: #4ade80;
}

.contact-benefits span {
    color: inherit;
}

.contact-success {
    text-align: center;
}

.contact-success-icon {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border-radius: 999px;
    background: rgb(34 197 94 / 0.2);
    color: #4ade80;
}

.contact-success-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.contact-success .button {
    margin-top: 2rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid rgb(255 255 255 / 0.35);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.fade-in {
    animation: fade-in 0.28s ease-out both;
}

.animate-accordion-down {
    animation: accordion-down 0.2s ease-out;
}

.animate-accordion-up {
    animation: accordion-up 0.2s ease-out;
}

.animate-spin {
    animation: spin 0.8s linear infinite;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.backdrop-blur,
.backdrop-blur-sm,
.backdrop-blur-xl {
    backdrop-filter: blur(12px);
}

.shadow-xl {
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.35);
}

.shadow-2xl {
    box-shadow: 0 25px 60px rgb(0 0 0 / 0.42);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes accordion-down {
    from {
        height: 0;
    }

    to {
        height: var(--radix-accordion-content-height);
    }
}

@keyframes accordion-up {
    from {
        height: var(--radix-accordion-content-height);
    }

    to {
        height: 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1024px) {
    .contact-visual {
        display: flex;
    }
}

@media (max-width: 768px) {
    .contact-split {
        border-radius: 0;
        min-height: auto;
    }

    .contact-form-side {
        padding: 2rem 0;
    }

    .contact-info-grid,
    .contact-form-row {
        grid-template-columns: 1fr;
    }
}

.step-icon-cyan {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

.step-icon-green {
    width: 5rem;
    height: 5rem;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    font-size: 2rem;
}

.step-hint {
    text-align: center;
    margin-bottom: 1.2rem;
}

.step-hint p {
    font-size: 0.88rem;
    color: rgba(248, 250, 252, 0.7);
}

.resend-link {
    text-align: center;
    margin-top: 0.75rem;
}

.resend-link button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    padding: 0;
    color: #60a5fa;
    transition: color 0.18s;
}

.resend-link button:hover {
    color: #c4b5fd;
}

.resend-link button:disabled {
    color: rgba(248, 250, 252, 0.35);
    cursor: default;
}

.success-block {
    text-align: center;
}

.success-block h3 {
    font-size: 1.5rem;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.success-block p {
    color: rgba(248, 250, 252, 0.6);
    margin-bottom: 1.5rem;
}

/* ── Hero centered (matching React) ── */

.hero-centered {
    position: relative;
    padding: 4rem 0 3rem;
    overflow: hidden;
}

.hero-centered-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), transparent);
    pointer-events: none;
}

.hero-centered-inner {
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    font-size: 0.88rem;
    color: rgba(248, 250, 252, 0.8);
}

.hero-badge-icon {
    color: #facc15;
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero-title .gradient-text {
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(248, 250, 252, 0.7);
    max-width: 40rem;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 52rem;
    margin: 0 auto;
}

.hero-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-metric-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.hero-metric-icon.blue   { background: rgba(37, 99, 235, 0.2);  color: #60a5fa; }
.hero-metric-icon.cyan   { background: rgba(6, 182, 212, 0.2);   color: #22d3ee; }
.hero-metric-icon.green  { background: rgba(34, 197, 94, 0.2);   color: #4ade80; }
.hero-metric-icon.yellow { background: rgba(234, 179, 8, 0.2);   color: #facc15; }

.hero-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.hero-metric-label {
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.6);
}

/* ── Footer ── */

.app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.01);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    color: rgba(248, 250, 252, 0.6);
    font-size: 0.88rem;
    margin: 0.75rem 0 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: rgba(248, 250, 252, 0.4);
    font-size: 1.05rem;
    transition: color 0.18s;
}

.footer-social a:hover {
    color: #f8fafc;
}

.footer-col h4 {
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.footer-col ul li a {
    color: rgba(248, 250, 252, 0.6);
    font-size: 0.88rem;
    transition: color 0.18s;
}

.footer-col ul li a:hover {
    color: #f8fafc;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(248, 250, 252, 0.4);
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(248, 250, 252, 0.4);
    transition: color 0.18s;
}

.footer-bottom-links a:hover {
    color: #f8fafc;
}

/* React visual parity layer */

.landing-hero {
    position: relative;
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.landing-hero-bg {
    position: absolute;
    inset: -6rem -2rem auto;
    height: 24rem;
    background: linear-gradient(to bottom, rgb(30 64 175 / 0.2), transparent);
    pointer-events: none;
}

.landing-hero-inner {
    position: relative;
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.1);
    color: rgb(255 255 255 / 0.8);
    font-size: 0.875rem;
}

.landing-title {
    max-width: 64rem;
    margin: 0 auto 1.5rem;
    font-size: clamp(2.25rem, 7vw, 4.5rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    color: #fff;
    font-weight: 800;
}

.landing-subtitle {
    max-width: 42rem;
    margin: 0 auto 2rem;
    color: rgb(255 255 255 / 0.7);
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.65;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.button-lg {
    min-height: 3rem;
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 56rem;
    margin: 3rem auto 0;
}

.landing-metric {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    text-align: center;
}

.landing-icon,
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    font-size: 1.25rem;
}

.landing-icon.blue,
.feature-icon.blue { background: rgb(37 99 235 / 0.2); color: #60a5fa; }
.landing-icon.cyan,
.feature-icon.cyan { background: rgb(6 182 212 / 0.2); color: #22d3ee; }
.landing-icon.green,
.feature-icon.green { background: rgb(34 197 94 / 0.2); color: #4ade80; }
.landing-icon.yellow,
.feature-icon.yellow { background: rgb(234 179 8 / 0.2); color: #facc15; }
.feature-icon.pink { background: rgb(236 72 153 / 0.2); color: #f472b6; }

.landing-metric strong {
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
}

.landing-metric span {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.feature-section {
    padding: 5rem 0;
    margin-left: calc((100vw - min(1280px, calc(100vw - 2rem))) / -2);
    margin-right: calc((100vw - min(1280px, calc(100vw - 2rem))) / -2);
    padding-left: calc((100vw - min(1280px, calc(100vw - 2rem))) / 2);
    padding-right: calc((100vw - min(1280px, calc(100vw - 2rem))) / 2);
}

.feature-section:nth-of-type(even) {
    background: rgb(255 255 255 / 0.02);
}

.section-center {
    max-width: 48rem;
    margin: 0 auto 4rem;
    text-align: center;
}

.section-center h2,
.cta-panel h2 {
    color: #fff;
    font-size: clamp(1.875rem, 4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-center p,
.cta-panel p {
    color: rgb(255 255 255 / 0.6);
    font-size: 1.125rem;
    line-height: 1.6;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.step-card {
    position: relative;
    text-align: center;
}

.step-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(to bottom right, #2563eb, #06b6d4);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
}

.step-card h3 {
    color: #fff;
    font-size: 1.25rem;
}

.step-card p {
    color: rgb(255 255 255 / 0.6);
    line-height: 1.6;
}

.cta-section {
    position: relative;
    max-width: 64rem;
    margin: 5rem auto;
}

.cta-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgb(37 99 235 / 0.2), rgb(6 182 212 / 0.2));
    border-radius: 1.5rem;
    filter: blur(48px);
}

.cta-panel {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 1.5rem;
    padding: clamp(2rem, 6vw, 4rem);
    text-align: center;
    border-radius: 1.5rem;
    background: linear-gradient(to right, rgb(37 99 235 / 0.1), rgb(6 182 212 / 0.1));
    border: 1px solid rgb(255 255 255 / 0.1);
}

.social-row {
    display: flex;
    gap: 0.5rem;
}

.social-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: rgb(255 255 255 / 0.4);
    transition: color 0.18s ease, background 0.18s ease;
}

.social-row a svg {
    width: 1.1rem;
    height: 1.1rem;
}

.social-row a:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.1);
}

.footer-grid > div {
    display: grid;
    align-content: start;
    gap: 0.55rem;
}

.footer-grid h4 {
    color: #fff;
    font-size: 1rem;
}

.footer-grid a,
.footer-bottom a {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.875rem;
}

.footer-grid a:hover,
.footer-bottom a:hover {
    color: #fff;
}

.footer-bottom > div {
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .top-nav {
        display: none;
    }

    .app-header-inner {
        min-height: 4rem;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .top-actions {
        display: none;
        flex-wrap: nowrap;
    }

    .mobile-menu-panel {
        display: grid;
        gap: 0.35rem;
        padding: 0.75rem 0 1rem;
        border-top: 1px solid rgb(255 255 255 / 0.1);
        background: linear-gradient(to bottom, rgb(15 23 42 / 0.96), rgb(30 64 175 / 0.9), rgb(15 23 42 / 0.96));
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.3);
    }

    .mobile-menu-panel .nav-link,
    .mobile-menu-panel .button {
        justify-content: center;
        width: 100%;
        min-height: 2.5rem;
        border-radius: 0.65rem;
        text-align: center;
    }

    .widget-layout {
        grid-template-columns: 1fr;
    }

    .widget-private-grid,
    .api-key-mini-grid,
    .platform-grid {
        grid-template-columns: 1fr;
    }

    .widget-action-bar,
    .command-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .widget-preview-card {
        position: static;
    }

    .position-grid {
        grid-template-columns: 1fr;
    }

    .behavior-card-grid {
        grid-template-columns: 1fr;
    }

    .system-option-grid {
        grid-template-columns: 1fr;
    }

    .behavior-card-head,
    .behavior-kb-panel,
    .kb-document-row,
    .upload-file-row,
    .db-connection-row,
    .db-table-grid,
    .db-query-private-grid,
    .db-query-input-row,
    .db-history-list article {
        grid-template-columns: 1fr;
    }

    .upload-file-head {
        flex-direction: column;
        align-items: stretch;
    }

    .db-connection-actions {
        justify-content: stretch;
    }

    .db-connection-actions .button {
        flex: 1;
    }

    .behavior-actions {
        flex-direction: column;
    }

    .usage-layout {
        grid-template-columns: 1fr;
    }

    .opportunity-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .opportunity-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

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

    .subscription-hero,
    .subscription-feature-title {
        flex-direction: column;
        align-items: stretch;
    }

    .subscription-price {
        justify-items: start;
    }

    .db-query-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }

    .top-nav,
    .top-actions {
        justify-content: flex-start;
    }

    .hero-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-metrics,
    .step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 2rem 0;
    }

    .form-shell::after {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════
   HOME PAGE — IMPACTFUL AI LANDING
   ═══════════════════════════════════════════════════ */

/* ── Button XL ── */
.button-xl {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border-radius: 0.6rem;
    gap: 0.5rem;
}

/* ── Shell utility ── */
.shell {
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* ═══ HERO ═══════════════════════════════════════════ */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: 7rem 0 5rem;
    text-align: center;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37,99,235,0.22) 0%, transparent 70%);
}

.home-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: orb-drift 12s ease-in-out infinite alternate;
}

.home-hero-orb-1 {
    width: 520px;
    height: 520px;
    top: -160px;
    left: -100px;
    background: radial-gradient(circle, rgba(37,99,235,0.28) 0%, transparent 70%);
    animation-duration: 14s;
}

.home-hero-orb-2 {
    width: 420px;
    height: 420px;
    top: -80px;
    right: -120px;
    background: radial-gradient(circle, rgba(6,182,212,0.22) 0%, transparent 70%);
    animation-duration: 10s;
    animation-delay: -4s;
}

.home-hero-orb-3 {
    width: 300px;
    height: 300px;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
    animation-duration: 16s;
    animation-delay: -8s;
}

@keyframes orb-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.06); }
}

.home-hero-orb-3 {
    animation-name: orb-drift-center;
}

@keyframes orb-drift-center {
    from { transform: translateX(-50%) scale(1); }
    to   { transform: translateX(calc(-50% + 20px)) scale(1.08); }
}

.home-hero-shell {
    position: relative;
    z-index: 1;
}

/* Eyebrow pill */
.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(37,99,235,0.35);
    background: rgba(37,99,235,0.1);
    color: #60a5fa;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
}

.home-eyebrow-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 0 rgba(34,211,238,0.4);
    animation: pulse-ring 2s ease-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(34,211,238,0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(34,211,238,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

/* Hero title */
.home-hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--foreground, #f8fafc);
    margin: 0 auto 1.5rem;
    max-width: 780px;
}

.home-hero-title span {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-sub {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--muted-foreground, #94a3b8);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.home-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-bottom: 3.5rem;
}

/* Trust bar */
.home-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.03);
    padding: 1.25rem 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}

.home-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 2rem;
}

.home-trust-item strong {
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-trust-item span {
    font-size: 0.75rem;
    color: var(--muted-foreground, #94a3b8);
    white-space: nowrap;
}

.home-trust-sep {
    width: 1px;
    height: 2.5rem;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* ═══ SECTION COMMON ════════════════════════════════ */
.home-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #60a5fa;
    margin-bottom: 0.875rem;
}

.home-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.625rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--foreground, #f8fafc);
    margin: 0 0 1rem;
}

.home-section-title span {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-section-sub {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--muted-foreground, #94a3b8);
    max-width: 600px;
    margin: 0 0 3rem;
}

/* ═══ CHAT PREVIEW ══════════════════════════════════ */
.home-preview-section {
    padding: 5rem 0;
    background: rgba(255,255,255,0.015);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.home-preview-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.home-preview-copy h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0.5rem 0 1rem;
}

.home-preview-copy h2 span {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-preview-copy p {
    color: var(--muted-foreground, #94a3b8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.home-preview-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.home-preview-list li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--foreground, #f8fafc);
}

.home-preview-list li svg {
    color: #22d3ee;
    flex-shrink: 0;
}

/* Chat window */
.home-chat-window {
    background: rgb(15 23 42 / 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(37,99,235,0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.home-chat-topbar {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.home-chat-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.home-chat-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.home-chat-avatar svg {
    width: 1.2rem;
    height: 1.2rem;
}

.home-chat-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid rgb(15,23,42);
}

.home-chat-agent-info {
    flex: 1;
    min-width: 0;
}

.home-chat-agent-info strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground, #f8fafc);
}

.home-chat-agent-info span {
    font-size: 0.75rem;
    color: #22c55e;
}

.home-chat-brand-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.35);
    color: #60a5fa;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.home-chat-messages {
    padding: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.home-chat-msg {
    max-width: 85%;
    padding: 0.625rem 0.875rem;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.home-chat-msg ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.home-chat-user {
    align-self: flex-end;
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.25);
    color: var(--foreground, #f8fafc);
    border-bottom-right-radius: 0.25rem;
}

.home-chat-ai {
    align-self: flex-start;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--foreground, #f8fafc);
    border-bottom-left-radius: 0.25rem;
}

.home-chat-typing-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.home-chat-inputbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.02);
    color: var(--muted-foreground, #94a3b8);
    font-size: 0.875rem;
}

.home-chat-inputbar span {
    flex: 1;
}

.home-chat-inputbar button {
    width: 2rem;
    height: 2rem;
    border-radius: 0.45rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: default;
    flex-shrink: 0;
}

/* ═══ COMPARE ═══════════════════════════════════════ */
.home-compare-section {
    padding: 5rem 0;
    text-align: center;
}

.home-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    overflow: hidden;
    text-align: left;
    margin-top: 1rem;
}

.home-compare-col {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.home-compare-before {
    background: rgba(239,68,68,0.04);
}

.home-compare-after {
    background: rgba(34,197,94,0.04);
}

.home-compare-header {
    margin-bottom: 0.375rem;
}

.home-compare-tag {
    display: inline-block;
    padding: 0.3rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.home-compare-tag-bad {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
}

.home-compare-tag-good {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.3);
    color: #4ade80;
}

.home-compare-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background: rgba(255,255,255,0.03);
    border-left: 1px solid rgba(255,255,255,0.07);
    border-right: 1px solid rgba(255,255,255,0.07);
}

.home-compare-divider span {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted-foreground, #94a3b8);
}

.home-compare-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    color: var(--foreground, #f8fafc);
    padding: 0.375rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    min-width: 0;
    overflow-wrap: anywhere;
}

.home-compare-row:last-child {
    border-bottom: none;
}

.home-compare-before .home-compare-row svg {
    color: #f87171;
    flex-shrink: 0;
}

.home-compare-after .home-compare-row svg {
    color: #4ade80;
    flex-shrink: 0;
}

/* ═══ STEPS ══════════════════════════════════════════ */
.home-steps-section {
    padding: 5rem 0;
    background: rgba(255,255,255,0.015);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.home-steps-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
    flex-wrap: nowrap;
}

.home-step {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.875rem;
    padding: 1.5rem 1.25rem;
}

.home-step-num {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.home-step-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-step-icon.blue {
    background: rgba(37,99,235,0.15);
    border: 1px solid rgba(37,99,235,0.3);
    color: #60a5fa;
}

.home-step-icon.cyan {
    background: rgba(6,182,212,0.15);
    border: 1px solid rgba(6,182,212,0.3);
    color: #22d3ee;
}

.home-step-icon.green {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.25);
    color: #4ade80;
}

.home-step-icon.yellow {
    background: rgba(234,179,8,0.12);
    border: 1px solid rgba(234,179,8,0.25);
    color: #facc15;
}

.home-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--foreground, #f8fafc);
}

.home-step p {
    font-size: 0.875rem;
    color: var(--muted-foreground, #94a3b8);
    line-height: 1.6;
    margin: 0;
}

.home-step-connector {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 3.75rem;
    flex-shrink: 0;
    color: #334155;
}

/* ═══ FEATURES ══════════════════════════════════════ */
.home-features-section {
    padding: 5rem 0;
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.home-feature-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.875rem;
    padding: 1.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home-feature-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(37,99,235,0.3);
    transform: translateY(-2px);
}

.home-feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-feature-icon.blue {
    background: rgba(37,99,235,0.15);
    border: 1px solid rgba(37,99,235,0.3);
    color: #60a5fa;
}

.home-feature-icon.cyan {
    background: rgba(6,182,212,0.15);
    border: 1px solid rgba(6,182,212,0.3);
    color: #22d3ee;
}

.home-feature-icon.green {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.25);
    color: #4ade80;
}

.home-feature-icon.yellow {
    background: rgba(234,179,8,0.12);
    border: 1px solid rgba(234,179,8,0.25);
    color: #facc15;
}

.home-feature-icon.pink {
    background: rgba(236,72,153,0.12);
    border: 1px solid rgba(236,72,153,0.25);
    color: #f472b6;
}

.home-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--foreground, #f8fafc);
}

.home-feature-card p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--muted-foreground, #94a3b8);
    margin: 0;
    overflow-wrap: anywhere;
}

/* ═══ USE CASES ══════════════════════════════════════ */
.home-usecases-section {
    padding: 5rem 0;
    background: rgba(255,255,255,0.015);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.home-usecases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.home-usecase-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.875rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home-usecase-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(6,182,212,0.3);
    transform: translateY(-2px);
}

.home-usecase-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(37,99,235,0.12);
    border: 1px solid rgba(37,99,235,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    flex-shrink: 0;
}

.home-usecase-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--foreground, #f8fafc);
}

.home-usecase-card p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--muted-foreground, #94a3b8);
    margin: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.home-usecase-stat {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.2);
    color: #22d3ee;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: auto;
}

/* ═══ CTA ════════════════════════════════════════════ */
.home-cta-section {
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
    text-align: center;
}

.home-cta-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
}

.home-cta-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
    top: 30%;
    left: 60%;
}

.home-cta-inner {
    position: relative;
    z-index: 1;
}

.home-cta-inner h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--foreground, #f8fafc);
    margin: 1rem 0 1.25rem;
}

.home-cta-inner h2 span {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-cta-inner p {
    font-size: 1.0625rem;
    color: var(--muted-foreground, #94a3b8);
    line-height: 1.75;
    max-width: 540px;
    margin: 0 auto 2.5rem;
}

.home-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(34,211,238,0.25);
    background: rgba(34,211,238,0.08);
    color: #22d3ee;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.home-cta-features {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground, #94a3b8);
}

/* ═══ HOME RESPONSIVE ════════════════════════════════ */
@media (max-width: 1024px) {
    .home-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-steps-grid {
        flex-wrap: wrap;
        gap: 0;
    }

    .home-step {
        flex: 0 0 calc(50% - 1.5rem);
    }

    .home-step-connector {
        display: none;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 4.5rem 0 3.25rem;
    }

    .home-hero-title {
        font-size: 2.15rem;
        line-height: 1.12;
    }

    .home-hero-sub {
        font-size: 1rem;
        line-height: 1.65;
    }

    .home-hero-actions {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 2rem;
    }

    .home-trust-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
        padding: 1rem;
    }

    .home-trust-item {
        min-width: 0;
        padding: 0.25rem 0.5rem;
    }

    .home-trust-sep {
        display: none;
    }

    .home-preview-shell {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .home-compare-grid {
        grid-template-columns: 1fr;
    }

    .home-compare-divider {
        padding: 0.75rem 1.75rem;
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(255,255,255,0.07);
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    .home-steps-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .home-step {
        flex: unset;
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        padding: 1rem 0;
    }

    .home-step-connector {
        display: none;
    }

    .home-features-grid {
        grid-template-columns: 1fr;
    }

    .home-usecases-grid {
        grid-template-columns: 1fr;
    }

    .button-xl {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .home-hero {
        padding: 3.75rem 0 2.75rem;
    }

    .home-eyebrow,
    .home-cta-badge {
        max-width: 100%;
        align-items: flex-start;
        white-space: normal;
        text-align: left;
        line-height: 1.45;
    }

    .home-hero-title,
    .home-section-title,
    .home-cta-inner h2 {
        letter-spacing: 0;
    }

    .home-hero-title {
        font-size: 1.95rem;
    }

    .home-hero-title br,
    .home-cta-inner h2 br {
        display: none;
    }

    .home-preview-section,
    .home-compare-section,
    .home-steps-section,
    .home-features-section,
    .home-usecases-section {
        padding: 3.5rem 0;
    }

    .home-section-sub {
        margin-bottom: 2rem;
        font-size: 1rem;
    }

    .home-chat-topbar {
        padding: 0.75rem;
        gap: 0.65rem;
    }

    .home-chat-brand-pill {
        display: none;
    }

    .home-chat-messages {
        padding: 0.8rem;
    }

    .home-chat-msg {
        max-width: 100%;
        font-size: 0.82rem;
    }

    .home-chat-msg ul {
        padding-left: 1rem;
    }

    .home-chat-inputbar {
        padding: 0.7rem;
    }

    .home-compare-col {
        padding: 1.1rem;
    }

    .home-compare-row {
        align-items: flex-start;
        line-height: 1.45;
    }

    .home-step {
        gap: 0.8rem;
    }

    .home-step-icon {
        width: 3rem;
        height: 3rem;
        border-radius: 0.85rem;
    }

    .home-feature-card,
    .home-usecase-card {
        padding: 1.2rem;
    }

    .home-cta-section {
        padding: 4rem 0;
    }

    .home-cta-features {
        align-items: stretch;
        flex-direction: column;
        gap: 0.65rem;
    }
}

@media (max-width: 380px) {
    .shell {
        width: min(100%, calc(100vw - 1.25rem));
        padding-inline: 0;
    }

    .home-trust-bar {
        grid-template-columns: 1fr;
    }

    .home-hero-title {
        font-size: 1.72rem;
    }

    .home-section-title,
    .home-cta-inner h2 {
        font-size: 1.55rem;
    }
}

/* ═══════════════════════════════════════════════════
   DOCUMENTATION PAGE
   ═══════════════════════════════════════════════════ */

.doc-page {
    min-height: calc(100vh - 4.5rem);
    padding: 4rem 1.5rem;
}

.doc-container {
    max-width: 52rem;
    margin-inline: auto;
}

.doc-header {
    text-align: center;
    margin-bottom: 3rem;
}

.doc-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--foreground, #f8fafc);
    margin-bottom: 0.75rem;
}

.doc-header p {
    font-size: 1.0625rem;
    color: var(--muted-foreground, #94a3b8);
    line-height: 1.6;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.doc-card {
    display: block;
    padding: 1.5rem;
    border-radius: 0.875rem;
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.1);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.doc-card:hover {
    border-color: rgb(255 255 255 / 0.2);
    transform: translateY(-3px);
    background: rgb(255 255 255 / 0.07);
}

.doc-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(37,99,235,0.2) 0%, rgba(6,182,212,0.2) 100%);
    border: 1px solid rgba(37,99,235,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.doc-card:hover .doc-card-icon {
    color: #a78bfa;
}

.doc-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground, #f8fafc);
    margin-bottom: 0.5rem;
}

.doc-card p {
    font-size: 0.9375rem;
    color: var(--muted-foreground, #94a3b8);
    line-height: 1.6;
    margin: 0;
}

.doc-help-panel {
    padding: 1.5rem;
    border-radius: 0.875rem;
    background: rgba(37,99,235,0.1);
    border: 1px solid rgba(37,99,235,0.2);
}

.doc-help-panel h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--foreground, #f8fafc);
    margin-bottom: 0.5rem;
}

.doc-help-panel p {
    font-size: 0.9375rem;
    color: var(--muted-foreground, #94a3b8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.doc-help-panel a {
    color: #60a5fa;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.doc-help-panel a:hover {
    color: #a78bfa;
}

@media (max-width: 640px) {
    .doc-grid {
        grid-template-columns: 1fr;
    }

    .doc-page {
        padding: 2.5rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════
   CHECKOUT PAGE
   ═══════════════════════════════════════════════════ */

.checkout-page {
    min-height: calc(100vh - 4.5rem);
    padding: 3rem 1.5rem 4rem;
    background: linear-gradient(to bottom, var(--background, #0f172a), var(--background, #0f172a) 70%, rgba(37,99,235,0.08));
}

.checkout-loading {
    min-height: calc(100vh - 12rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-lg {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

.checkout-container {
    max-width: 72rem;
    margin-inline: auto;
}

.checkout-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    min-height: 20rem;
}

.checkout-empty h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground, #f8fafc);
}

.checkout-empty p {
    color: var(--muted-foreground, #94a3b8);
}

.checkout-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgb(255 255 255 / 0.5);
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.checkout-back-link:hover {
    color: #fff;
}

/* ── Grid ── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ── Form side ── */
.checkout-form-side h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--foreground, #f8fafc);
    margin-bottom: 0.5rem;
}

.checkout-subtitle {
    color: rgb(255 255 255 / 0.5);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.checkout-security-badges {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.checkout-security-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.8125rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Coupon row */
.checkout-coupon-row {
    display: flex;
    gap: 0.625rem;
}

.checkout-coupon-row input {
    flex: 1;
    text-transform: uppercase;
}

.checkout-coupon-success {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #4ade80;
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

/* Payment methods */
.checkout-payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.checkout-payment-method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
}

.checkout-payment-method span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground, #f8fafc);
}

.checkout-payment-method small {
    font-size: 0.75rem;
    color: rgb(255 255 255 / 0.5);
}

.checkout-payment-method.active {
    background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(6,182,212,0.2));
    border-color: rgba(37,99,235,0.5);
    color: #60a5fa;
}

.checkout-payment-method.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.checkout-payment-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: rgb(255 255 255 / 0.2);
}

/* Terms */
.checkout-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.checkout-terms input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border-radius: 0.25rem;
    border: 1px solid rgb(255 255 255 / 0.2);
    background: rgb(255 255 255 / 0.05);
    accent-color: #2563eb;
}

.checkout-terms label {
    font-size: 0.875rem;
    color: rgb(255 255 255 / 0.6);
    line-height: 1.5;
    cursor: pointer;
}

.checkout-terms label a {
    color: #60a5fa;
    text-decoration: none;
}

.checkout-terms label a:hover {
    text-decoration: underline;
}

/* Submit button */
.checkout-submit {
    width: 100%;
    height: 3rem;
    font-size: 1rem;
    font-weight: 600;
    gap: 0.5rem;
    justify-content: center;
}

/* Flow alert */
.checkout-flow-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: rgba(37,99,235,0.1);
    border: 1px solid rgba(37,99,235,0.3);
    color: rgb(255 255 255 / 0.7);
}

.checkout-flow-alert svg {
    flex-shrink: 0;
    color: #60a5fa;
    margin-top: 0.1rem;
}

.checkout-flow-alert p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ── Summary side ── */
.checkout-summary-card {
    background: rgb(255 255 255 / 0.02);
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.875rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.checkout-summary-card-header {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground, #f8fafc);
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.checkout-summary-plan {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.checkout-summary-plan-info p {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--foreground, #f8fafc);
    margin: 0 0 0.25rem;
}

.checkout-summary-plan-info small {
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.5);
}

.checkout-summary-plan-price {
    text-align: right;
    flex-shrink: 0;
}

.checkout-summary-plan-price strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--foreground, #f8fafc);
}

.checkout-summary-plan-price small {
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.5);
}

.checkout-summary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.checkout-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: rgb(255 255 255 / 0.6);
}

.checkout-breakdown-discount {
    color: #4ade80;
}

.checkout-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.checkout-summary-total > span {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--foreground, #f8fafc);
}

.checkout-summary-total-right {
    text-align: right;
}

.checkout-summary-total-right strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground, #f8fafc);
}

.checkout-summary-total-right small {
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.5);
}

.checkout-summary-features {
    padding: 1rem 1.5rem;
}

.checkout-summary-features > p {
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.6);
    margin-bottom: 0.625rem;
}

.checkout-feature-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgb(255 255 255 / 0.7);
    padding: 0.3rem 0;
}

.checkout-feature-row svg {
    color: #4ade80;
    flex-shrink: 0;
}

/* Guarantee card */
.checkout-guarantee-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
    border: 1px solid rgba(37,99,235,0.3);
}

.checkout-guarantee-card svg {
    color: #60a5fa;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.checkout-guarantee-card p {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--foreground, #f8fafc);
    margin: 0 0 0.35rem;
}

.checkout-guarantee-card small {
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.6);
    line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .checkout-summary-side {
        order: -1;
    }
}

@media (max-width: 560px) {
    .checkout-page {
        padding: 2rem 1rem 3rem;
    }

    .checkout-payment-methods {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════
   Admin design system improvements
   ═══════════════════════════════════════ */

/* Metric card icon box */
.metric-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}
.metric-icon svg { width: 1.375rem; height: 1.375rem; }
.metric-icon.blue   { background: rgba(37, 99, 235, 0.2);   color: #60a5fa; }
.metric-icon.cyan   { background: rgba(6, 182, 212, 0.2);   color: #22d3ee; }
.metric-icon.green  { background: rgba(34, 197, 94, 0.2);   color: #4ade80; }
.metric-icon.purple { background: rgba(168, 85, 247, 0.2);  color: #c084fc; }
.metric-icon.yellow { background: rgba(234, 179, 8, 0.2);   color: #facc15; }
.metric-icon.pink   { background: rgba(236, 72, 153, 0.2);  color: #f472b6; }
.metric-icon.orange { background: rgba(249, 115, 22, 0.2);  color: #fb923c; }
.metric-icon.red    { background: rgba(239, 68, 68, 0.2);   color: #f87171; }

/* Metric card row layout (icon on right) */
.metric-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.metric-card-row .metric-icon { margin-bottom: 0; }

/* Icon action buttons */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
.icon-btn.btn-blue   { color: #60a5fa; }
.icon-btn.btn-blue:hover   { background: rgba(37, 99, 235, 0.15); color: #93c5fd; }
.icon-btn.btn-green  { color: #4ade80; }
.icon-btn.btn-green:hover  { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.icon-btn.btn-orange { color: #fb923c; }
.icon-btn.btn-orange:hover { background: rgba(249, 115, 22, 0.15); color: #fdba74; }
.icon-btn.btn-purple { color: #c084fc; }
.icon-btn.btn-purple:hover { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
.icon-btn.btn-red    { color: #f87171; }
.icon-btn.btn-red:hover    { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.icon-btn:disabled   { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.icon-btn-group { display: flex; align-items: center; gap: 0.125rem; }

/* Quick actions grid (dashboard) */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border-radius: 0.875rem;
    background: rgb(255 255 255 / 0.05);
    border: 1px solid rgb(255 255 255 / 0.1);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-align: center;
}
.quick-action-card:hover {
    background: rgb(255 255 255 / 0.09);
    border-color: rgb(255 255 255 / 0.2);
    transform: translateY(-2px);
}
.quick-action-card .metric-icon { margin-bottom: 0; }
.quick-action-card span { font-size: 0.8125rem; font-weight: 600; color: rgb(255 255 255 / 0.85); line-height: 1.3; }

/* Admin loading spinner */
.admin-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
}
.spinner-ring {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgb(255 255 255 / 0.1);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.admin-spinner p { color: rgb(255 255 255 / 0.5); font-size: 0.875rem; }

/* Admin empty state */
.admin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem;
    text-align: center;
}
.admin-empty svg { width: 3.5rem; height: 3.5rem; color: rgb(255 255 255 / 0.2); }
.admin-empty h3 { font-size: 1.1rem; color: #fff; }
.admin-empty p { color: rgb(255 255 255 / 0.45); font-size: 0.875rem; }

/* Analytics bar rows */
.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.625rem;
}
.analytics-bar-label {
    min-width: 7rem;
    max-width: 7rem;
    font-size: 0.8rem;
    color: rgb(255 255 255 / 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-bar-track {
    flex: 1;
    height: 1.75rem;
    background: rgb(255 255 255 / 0.05);
    border-radius: 0.375rem;
    overflow: hidden;
}
.analytics-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 0.375rem;
    transition: width 0.6s ease;
    min-width: 2px;
}
.analytics-bar-count {
    min-width: 3rem;
    text-align: right;
    font-size: 0.875rem;
    color: #60a5fa;
    font-weight: 600;
}

/* Rank list (top KBs, top users) */
.rank-list { display: grid; gap: 0.5rem; }
.rank-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgb(255 255 255 / 0.04);
    border: 1px solid rgb(255 255 255 / 0.06);
    transition: background 0.15s ease;
}
.rank-item:hover { background: rgb(255 255 255 / 0.08); }
.rank-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.rank-badge.blue   { background: rgba(37, 99, 235, 0.2);  color: #60a5fa; }
.rank-badge.purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.rank-badge.cyan   { background: rgba(6, 182, 212, 0.2);  color: #22d3ee; }
.rank-name {
    flex: 1;
    font-size: 0.875rem;
    color: #fff;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #60a5fa;
    white-space: nowrap;
}

/* System health rows */
.health-list { display: grid; gap: 0.625rem; }
.health-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: 0.625rem;
    background: rgb(255 255 255 / 0.04);
    border: 1px solid rgb(255 255 255 / 0.06);
}
.health-row-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgb(255 255 255 / 0.75);
    font-size: 0.875rem;
}
.health-row-label svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.health-row-value { font-size: 1.5rem; font-weight: 700; }
.health-row-value.green  { color: #4ade80; }
.health-row-value.red    { color: #f87171; }
.health-row-value.blue   { color: #60a5fa; }

/* Plan card improvements */
.plan-card-header { padding: 1.5rem; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.plan-card-price { display: flex; align-items: baseline; gap: 0.25rem; margin-top: 1rem; }
.plan-card-price strong { font-size: 2.25rem; font-weight: 800; color: #fff; }
.plan-card-price span { font-size: 0.875rem; color: rgb(255 255 255 / 0.5); }
.plan-card-body { padding: 1.25rem 1.5rem; flex: 1; }
.plan-card-footer { padding: 1rem 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.08); background: rgb(255 255 255 / 0.02); }
.plan-popular-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(234,179,8,0.25), rgba(249,115,22,0.25));
    color: #fbbf24;
    border: 1px solid rgba(234,179,8,0.35);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.plan-features-check { display: grid; gap: 0.5rem; }
.plan-feature-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.75);
}
.plan-feature-check svg { width: 1rem; height: 1rem; color: #4ade80; flex-shrink: 0; }
.plan-feature-check strong { color: #fff; }

/* Card hover border glow on admin cards */
.admin-plan-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.admin-plan-card:hover {
    border-color: rgba(37, 99, 235, 0.45);
    transform: translateY(-2px);
}

/* Compact metric header row */
.section-title-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}
.section-title-row svg { width: 1.125rem; height: 1.125rem; }
.section-title-row h3 { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }

/* Chat message transcript cards */
.chat-msg {
    padding: 1rem 1.25rem;
    border-radius: 0.625rem;
    border: 1px solid rgb(255 255 255 / 0.07);
    background: rgb(255 255 255 / 0.03);
}
.chat-msg.assistant { border-color: rgba(37, 99, 235, 0.2); background: rgba(37, 99, 235, 0.06); }
.chat-msg-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.chat-msg-meta strong { font-size: 0.8rem; text-transform: capitalize; color: #fff; }
.chat-msg-meta time { font-size: 0.75rem; color: rgb(255 255 255 / 0.4); }
.chat-msg p { font-size: 0.875rem; color: rgb(255 255 255 / 0.8); line-height: 1.6; margin: 0; }
.chat-msg-list { display: grid; gap: 0.75rem; }

@media (max-width: 600px) {
    .quick-actions-grid { grid-template-columns: repeat(3, 1fr); }
    .analytics-bar-label { min-width: 5rem; max-width: 5rem; }
}
