:root {
    --velora-purple: #2b1f3a;
    --velora-deep-purple: #1f142c;
    --velora-lavender: #efe7f8;
    --velora-gold: #d9b65f;
    --velora-teal: #168f86;
    --velora-bg: #f3f1f6;
    --velora-card: rgba(255, 255, 255, 0.72);
    --velora-card-strong: rgba(255, 255, 255, 0.84);
    --velora-card-dark: rgba(43, 31, 58, 0.72);
    --velora-border: rgba(255, 255, 255, 0.38);
    --velora-shadow: 0 18px 45px rgba(31, 20, 44, 0.14);
    --velora-shadow-strong: 0 22px 55px rgba(31, 20, 44, 0.18);
    --velora-blur: blur(22px);
    --ink: #211d29;
    --muted: #6f6877;
    --line: rgba(92, 74, 104, 0.16);
    --surface: var(--velora-card);
    --surface-2: rgba(255, 255, 255, 0.48);
    --nav: var(--velora-deep-purple);
    --plum: #6b3f73;
    --rose: #d98ba2;
    --teal: var(--velora-teal);
    --mint: #dff5ef;
    --gold: var(--velora-gold);
    --danger: #b94040;
    --warning: #9f6a1b;
    --shadow: var(--velora-shadow);
    --radius: 22px;
    font-family: dmbrand, Arial, Helvetica, sans-serif;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* {
    box-sizing: border-box;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: dmbrand, Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(217, 182, 95, 0.20), transparent 28%),
        radial-gradient(circle at top right, rgba(126, 87, 194, 0.22), transparent 30%),
        linear-gradient(135deg, #f8f6fb 0%, #eee8f7 45%, #f7f5fa 100%);
    background-attachment: fixed;
}

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

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

button,
.button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 220ms ease;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px;
    color: #fbfaf8;
    background: var(--nav);
    transition: padding 220ms ease, width 220ms ease;
}

.sidebar-brand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: var(--nav);
    background: var(--gold);
    font-size: 1.25rem;
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand-copy,
.nav-label,
.sidebar-user-name,
.sidebar-footer .ghost-button {
    transition: opacity 160ms ease, transform 160ms ease, max-width 180ms ease;
}

.brand small,
.sidebar-footer span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.86rem;
}

.sidebar-collapse-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-content: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.sidebar-collapse-button span {
    width: 16px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-list {
    display: grid;
    gap: 6px;
}

.nav-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    color: rgba(255, 255, 255, 0.77);
    border: 1px solid transparent;
    border-radius: var(--radius);
}

.nav-item:hover,
.nav-item.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

.nav-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--nav);
    background: var(--gold);
    font-weight: 900;
    font-size: 0.75rem;
}

.nav-icon svg,
.mobile-nav-icon svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.app-shell.is-sidebar-collapsed {
    grid-template-columns: 88px minmax(0, 1fr);
}

.app-shell.is-sidebar-collapsed .sidebar {
    padding: 18px 12px;
    gap: 18px;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-row {
    grid-template-columns: 1fr;
    justify-items: center;
}

.app-shell.is-sidebar-collapsed .brand {
    justify-content: center;
}

.app-shell.is-sidebar-collapsed .brand-copy,
.app-shell.is-sidebar-collapsed .nav-label,
.app-shell.is-sidebar-collapsed .sidebar-user-name,
.app-shell.is-sidebar-collapsed .sidebar-footer .ghost-button {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    white-space: nowrap;
}

.app-shell.is-sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 9px;
}

.app-shell.is-sidebar-collapsed .nav-icon {
    width: 34px;
    height: 34px;
}

.app-shell.is-sidebar-collapsed .sidebar-footer {
    justify-items: center;
}

.app-shell.is-sidebar-collapsed .sidebar-collapse-button span:nth-child(1) {
    transform: translateY(4px) translateX(3px) rotate(38deg);
}

.app-shell.is-sidebar-collapsed .sidebar-collapse-button span:nth-child(2) {
    opacity: 1;
}

.app-shell.is-sidebar-collapsed .sidebar-collapse-button span:nth-child(3) {
    transform: translateY(-4px) translateX(3px) rotate(-38deg);
}

.mobile-bottom-nav {
    display: none;
}

.mobile-menu-button,
.mobile-sidebar-backdrop {
    display: none;
}

.mobile-menu-bars {
    width: 18px;
    display: grid;
    gap: 3px;
}

.mobile-menu-bars span {
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}

.main {
    min-width: 0;
    padding: 26px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.topbar h1,
.auth-card h1 {
    margin: 0;
    font-size: clamp(1.7rem, 1.2rem + 1vw, 2.35rem);
    letter-spacing: 0;
}

.topbar-actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--teal);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.metric,
.panel,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.metric {
    min-height: 116px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
}

.metric span {
    color: var(--muted);
    font-size: 0.85rem;
}

.metric strong {
    font-size: clamp(1.25rem, 1rem + 0.8vw, 1.9rem);
    letter-spacing: 0;
}

.metric small {
    color: var(--teal);
    font-weight: 800;
}

.panel {
    min-width: 0;
    padding: 18px;
    margin-bottom: 20px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.08rem;
}

.two-column,
.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px auto;
    gap: 10px;
    margin-bottom: 12px;
}

.source-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(190px, 260px) 150px auto auto;
}

.inventory-toolbar {
    grid-template-columns: minmax(240px, 1fr) 190px 150px auto;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d6cfd7;
    border-radius: 7px;
    padding: 9px 10px;
    color: var(--ink);
    background: #fff;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(45, 143, 134, 0.18);
    border-color: var(--teal);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wide-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.form-span {
    grid-column: 1 / -1;
}

.check-row {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.link-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 7px;
    border: 1px solid transparent;
    padding: 0 14px;
    font-weight: 900;
}

.primary-button {
    color: #ffffff;
    background: var(--plum);
}

.secondary-button,
.link-button {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

.danger-button {
    color: #ffffff;
    background: var(--danger);
}

.full-button {
    width: 100%;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.small-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.table-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 0.9rem;
}

th {
    color: var(--muted);
    background: var(--surface-2);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

tr:last-child td {
    border-bottom: 0;
}

.product-cell strong,
.summary-item strong,
.template-card strong,
.alert-item strong {
    display: block;
}

.product-cell span,
.summary-item span,
.template-card p,
.alert-item span,
.note {
    color: var(--muted);
    line-height: 1.45;
}

.inventory-thumb {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
    color: var(--muted);
    background: var(--surface-2);
    font-weight: 900;
}

.badge {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.badge.good {
    color: #1b5f57;
    background: var(--mint);
}

.badge.warn {
    color: var(--warning);
    background: #fff1d7;
}

.badge.danger {
    color: var(--danger);
    background: #ffe1e1;
}

.flash {
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 800;
}

.flash.success {
    color: #1b5f57;
    background: var(--mint);
}

.flash.error {
    color: var(--danger);
    background: #ffe1e1;
}

.alert-list,
.summary-list,
.template-grid,
.supplier-list {
    display: grid;
    gap: 10px;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

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

.alert-item,
.summary-item,
.template-card,
.source-card,
.supplier-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.supplier-card {
    display: grid;
    gap: 10px;
}

.supplier-card div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.supplier-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-card {
    display: block;
}

.stacked-mini {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.source-card {
    display: grid;
    gap: 12px;
}

.source-card img,
.source-placeholder {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.source-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

.price-row {
    display: grid;
    gap: 4px;
    margin: 10px 0 12px;
}

.price-row span:first-child {
    color: var(--muted);
}

.price-row span:last-child {
    color: var(--teal);
    font-weight: 900;
}

.source-note {
    display: block;
    color: var(--muted);
    line-height: 1.4;
}

.ai-answer {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    line-height: 1.6;
    white-space: normal;
}

.growth-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 244, 0.92)),
        radial-gradient(circle at top right, rgba(216, 179, 90, 0.18), transparent 34%);
}

.growth-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 1.1rem + 1vw, 2.05rem);
    letter-spacing: 0;
}

.growth-hero p:not(.eyebrow) {
    max-width: 640px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.growth-score-ring {
    --score: 0%;
    position: relative;
    width: 128px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: conic-gradient(var(--teal) var(--score), #ece7ec 0);
}

.growth-score-ring::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: inherit;
    background: #ffffff;
}

.growth-score-ring strong,
.growth-score-ring span {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
}

.growth-score-ring strong {
    align-self: end;
    font-size: 1.75rem;
    letter-spacing: 0;
}

.growth-score-ring span {
    align-self: start;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.growth-dashboard-grid,
.roadmap-grid,
.marketing-grid {
    display: grid;
    gap: 20px;
}

.growth-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.marketing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.health-list,
.task-list,
.focus-list,
.funnel-list,
.timeline-list,
.mini-product-list {
    display: grid;
    gap: 10px;
}

.health-row {
    display: grid;
    gap: 8px;
}

.health-row > div:first-child,
.roadmap-phase-head,
.focus-card,
.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.health-row span,
.roadmap-phase-head span,
.roadmap-task span,
.roadmap-task small,
.task-check small,
.focus-card small,
.coach-recommendation span,
.timeline-item span {
    color: var(--muted);
    line-height: 1.45;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #ede6ed;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--plum));
}

.coach-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(253, 249, 242, 0.94)),
        radial-gradient(circle at bottom right, rgba(216, 179, 90, 0.2), transparent 36%);
}

.coach-metrics,
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.coach-metrics div,
.coach-recommendation,
.task-card,
.focus-card,
.roadmap-phase,
.marketing-card,
.funnel-row,
.kpi-grid div,
.timeline-item,
.motivation-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 12px;
}

.coach-metrics span,
.kpi-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.coach-metrics strong,
.kpi-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 1.08rem;
}

.coach-recommendation {
    margin-top: 12px;
}

.coach-recommendation p {
    margin: 8px 0;
    color: var(--ink);
    line-height: 1.55;
}

.task-card {
    display: block;
    transition: opacity 160ms ease, transform 160ms ease;
}

.task-card:hover,
.focus-card:hover,
.roadmap-phase:hover,
.marketing-card:hover,
.timeline-item:hover {
    transform: translateY(-1px);
}

.task-card.is-done {
    opacity: 0.72;
}

.task-check {
    display: flex;
    grid-template-columns: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink);
}

.task-check input {
    width: 20px;
    min-height: 20px;
    margin-top: 2px;
}

.task-check strong,
.focus-card strong {
    display: block;
}

.growth-inline-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 130px 130px auto;
    gap: 10px;
    margin-top: 14px;
}

.focus-card .secondary-button,
.roadmap-task .secondary-button,
.timeline-item .secondary-button,
.marketing-card .secondary-button {
    min-width: 84px;
}

.roadmap-phase {
    display: grid;
    gap: 12px;
    align-content: start;
}

.roadmap-phase-head b {
    color: var(--teal);
    font-size: 1.05rem;
}

.roadmap-task {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px 84px auto;
    gap: 10px;
    align-items: start;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.roadmap-task strong,
.roadmap-task span,
.roadmap-task small {
    display: block;
}

.roadmap-task span {
    margin-top: 4px;
}

.roadmap-task small {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 800;
}

.roadmap-add-form {
    grid-template-columns: 180px minmax(160px, 1fr) minmax(160px, 1fr) 150px 90px auto;
}

.compact-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.marketing-card {
    display: grid;
    gap: 10px;
    align-content: start;
}

.marketing-card .mini-grid label {
    gap: 5px;
}

.funnel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
}

.funnel-row .progress-track {
    grid-column: 1 / -1;
}

.mini-product-list span {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #ffffff;
    line-height: 1.4;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 100px 130px auto;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--teal);
    box-shadow: 0 0 0 5px var(--mint);
}

.timeline-item strong,
.timeline-item span {
    display: block;
}

.timeline-item .progress-track {
    margin-top: 8px;
}

.motivation-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 239, 249, 0.94)),
        radial-gradient(circle at right, rgba(216, 179, 90, 0.16), transparent 34%);
}

.motivation-card h2 {
    margin: 0 0 8px;
}

.motivation-card p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.glow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    align-items: center;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 251, 0.94)),
        radial-gradient(circle at top right, rgba(107, 63, 115, 0.16), transparent 36%);
}

.glow-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 1.1rem + 1vw, 2.05rem);
    letter-spacing: 0;
}

.glow-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.glow-rule-card,
.glow-insight-card,
.glow-chart-card,
.glow-followup-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 14px;
}

.glow-rule-card {
    display: grid;
    gap: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--plum), #8e5a94);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.glow-rule-card strong {
    font-size: 1.3rem;
}

.glow-rule-card span {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.45;
}

.glow-benefit-grid,
.glow-chart-grid,
.glow-reward-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

.glow-benefit-grid,
.glow-reward-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.glow-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.glow-action-row > * {
    min-width: 150px;
}

.glow-insight-card p {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.65;
}

.glow-chart-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.glow-chart-card {
    display: grid;
    gap: 12px;
    min-height: 210px;
}

.glow-chart-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.glow-bars {
    min-height: 118px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    padding-top: 8px;
}

.glow-bar {
    min-width: 0;
    height: 118px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.glow-bar span {
    width: 100%;
    min-height: 8px;
    align-self: end;
    border-radius: 999px 999px 3px 3px;
    background: linear-gradient(180deg, var(--plum), var(--teal));
}

.glow-bar small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.glow-followup-list {
    display: grid;
    gap: 10px;
}

.glow-followup-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.glow-followup-card strong,
.glow-followup-card small {
    display: block;
}

.glow-followup-card strong {
    margin-top: 8px;
}

.glow-followup-card small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.45;
}

.glow-followup-card p {
    margin: 10px 0 0;
    color: var(--ink);
    line-height: 1.55;
}

.glow-template-grid {
    align-items: start;
}

.glow-campaign-form {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.glow-template-card {
    display: grid;
    gap: 12px;
}

.glow-template-card small {
    color: var(--muted);
    font-weight: 800;
}

.glow-template-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.glow-template-card details {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.glow-template-card summary {
    color: var(--teal);
    cursor: pointer;
    font-weight: 900;
}

.glow-template-card details form {
    margin-top: 12px;
}

.source-save-form {
    margin-top: 10px;
}

.pricing-automation-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(246, 240, 255, 0.62));
    box-shadow: 0 16px 34px rgba(31, 20, 44, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.pricing-automation-panel h3 {
    margin: 4px 0 6px;
    color: var(--ink);
    font-size: 1.02rem;
}

.pricing-automation-panel small {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}

.pricing-automation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.pricing-preview-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pricing-preview-grid span {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(92, 74, 104, 0.10);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.pricing-preview-grid small,
.pricing-preview-grid strong {
    display: block;
}

.pricing-preview-grid strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.academy-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(243, 235, 255, 0.74)),
        radial-gradient(circle at 88% 18%, rgba(217, 182, 95, 0.24), transparent 30%);
}

.academy-hero-copy h2 {
    margin: 0;
    font-size: clamp(1.65rem, 1.1rem + 1.4vw, 2.45rem);
    letter-spacing: 0;
}

.academy-hero-copy p:not(.eyebrow) {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.academy-hero-actions,
.academy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.academy-hero-score {
    width: 150px;
    min-height: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 36px rgba(31, 20, 44, 0.12);
}

.academy-hero-score span {
    width: 72px;
    aspect-ratio: 1;
    border-radius: 999px;
    background: conic-gradient(var(--teal) var(--score), rgba(107, 63, 115, 0.14) 0);
}

.academy-hero-score strong {
    color: var(--ink);
    font-size: 1.55rem;
}

.academy-hero-score small {
    color: var(--muted);
    font-weight: 900;
}

.academy-tabbar {
    position: sticky;
    top: 12px;
    z-index: 8;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 16px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 14px 30px rgba(31, 20, 44, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.academy-tab {
    min-height: 40px;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 0 14px;
    color: var(--muted);
    background: transparent;
    font-weight: 900;
}

.academy-tab.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #5b2a86, #7b3fb8);
    box-shadow: 0 10px 22px rgba(91, 42, 134, 0.22);
}

.academy-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
    margin-bottom: 0;
}

.academy-disclaimer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border-color: rgba(217, 182, 95, 0.34);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 231, 0.58)),
        radial-gradient(circle at 96% 20%, rgba(217, 182, 95, 0.22), transparent 26%);
}

.academy-disclaimer strong {
    color: var(--ink);
}

.academy-disclaimer span,
.academy-content-batch-note span {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.48;
}

.academy-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.academy-filter-grid select {
    min-width: 0;
}

.academy-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.academy-ai-form {
    display: grid;
    gap: 12px;
}

.academy-ai-form textarea {
    width: 100%;
    min-height: 132px;
    resize: vertical;
    border: 1px solid rgba(92, 74, 104, 0.12);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
    font: inherit;
    line-height: 1.5;
}

.academy-ai-output {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(92, 74, 104, 0.12);
}

.academy-ai-output-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.academy-ai-output-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.18rem;
}

.academy-ai-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.academy-ai-result-card,
.academy-content-batch-note {
    padding: 13px;
    border: 1px solid rgba(92, 74, 104, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
}

.academy-ai-result-card strong,
.academy-content-batch-note strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
}

.academy-ai-result-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.academy-sticky-actions {
    position: sticky;
    bottom: 14px;
    z-index: 4;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 32px rgba(31, 20, 44, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.academy-content-batch-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.academy-subsection {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(92, 74, 104, 0.12);
}

.compact-heading {
    margin-bottom: 12px;
}

.academy-calendar-table td {
    vertical-align: top;
}

.academy-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.academy-card {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 14px 30px rgba(31, 20, 44, 0.09);
}

.academy-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.04rem;
}

.academy-card p,
.academy-card li,
.academy-card small,
.academy-empty span {
    color: var(--muted);
    line-height: 1.48;
}

.academy-card p,
.academy-card ul {
    margin: 0;
}

.academy-card ul {
    padding-left: 18px;
}

.academy-card details {
    padding-top: 8px;
    border-top: 1px solid rgba(92, 74, 104, 0.12);
}

.academy-card summary,
.academy-modal-panel summary {
    color: var(--teal);
    cursor: pointer;
    font-weight: 900;
}

.academy-lesson-grid,
.academy-routine-columns,
.academy-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.academy-lesson-grid > div,
.academy-routine-columns > div,
.academy-modal-grid details,
.academy-empty {
    padding: 12px;
    border: 1px solid rgba(92, 74, 104, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
}

.academy-lesson-grid strong,
.academy-routine-columns strong,
.academy-empty strong {
    display: block;
    margin-bottom: 5px;
}

.academy-product-head {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.academy-product-head img,
.academy-product-head span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
    color: var(--plum);
    font-weight: 900;
}

.academy-section[hidden] {
    display: none;
}

.academy-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    max-width: min(340px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b2551, #6b3f73);
    box-shadow: 0 18px 38px rgba(31, 20, 44, 0.24);
    font-weight: 900;
}

.academy-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    padding: 18px;
    overflow: auto;
    background: rgba(31, 20, 44, 0.42);
}

.academy-modal.is-open {
    display: grid;
    place-items: start center;
}

.academy-modal-panel {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 24px 60px rgba(31, 20, 44, 0.28);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.academy-modal-panel h2 {
    margin: 0 38px 8px 0;
}

.academy-modal-panel > p:not(.eyebrow) {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.5;
}

.academy-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.76);
    font-size: 1.35rem;
    font-weight: 900;
}

.quiz-card .secondary-button {
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
}

.quiz-correct {
    color: #ffffff !important;
    background: var(--teal) !important;
}

.quiz-wrong {
    color: #ffffff !important;
    background: var(--danger) !important;
}

.quiz-explanation {
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-weight: 800;
}

.pagination-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.pagination-row span {
    color: var(--muted);
    font-weight: 800;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.48;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: #eeeff1;
}

.auth-card {
    width: min(460px, 100%);
    padding: 24px;
}

.auth-brand {
    margin-bottom: 18px;
    color: var(--ink);
}

.auth-brand small {
    color: var(--muted);
}

.auth-form {
    margin-top: 18px;
}

/* Liquid Glass design system */
.glass-page {
    min-height: 100vh;
}

.glass-shell {
    position: relative;
}

.glass-card,
.glass-widget,
.glass-table,
.glass-modal,
.panel,
.metric,
.auth-card,
.alert-item,
.summary-item,
.template-card,
.source-card,
.supplier-card,
.coach-metrics div,
.coach-recommendation,
.task-card,
.focus-card,
.roadmap-phase,
.marketing-card,
.funnel-row,
.kpi-grid div,
.timeline-item,
.motivation-card,
.glow-rule-card,
.glow-insight-card,
.glow-chart-card,
.glow-followup-card,
.glow-campaign-form {
    border: 1px solid var(--velora-border);
    border-radius: var(--radius);
    background: var(--velora-card);
    box-shadow: var(--velora-shadow);
    backdrop-filter: var(--velora-blur);
    -webkit-backdrop-filter: var(--velora-blur);
}

.glass-card-dark,
.glass-sidebar,
.sidebar {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 18%),
        linear-gradient(145deg, rgba(31, 20, 44, 0.94), rgba(43, 31, 58, 0.82));
    box-shadow: 16px 0 42px rgba(31, 20, 44, 0.20), inset -1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.glass-topbar,
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 14px 34px rgba(31, 20, 44, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.panel,
.metric,
.template-card,
.source-card,
.supplier-card,
.summary-item,
.alert-item,
.roadmap-phase,
.marketing-card,
.task-card,
.focus-card,
.timeline-item,
.glow-followup-card,
.glow-chart-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.panel:hover,
.metric:hover,
.template-card:hover,
.source-card:hover,
.supplier-card:hover,
.summary-item:hover,
.alert-item:hover,
.roadmap-phase:hover,
.marketing-card:hover,
.task-card:hover,
.focus-card:hover,
.timeline-item:hover,
.glow-followup-card:hover,
.glow-chart-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow: var(--velora-shadow-strong);
}

.alert-item,
.summary-item,
.template-card,
.source-card,
.supplier-card,
.coach-metrics div,
.coach-recommendation,
.task-card,
.focus-card,
.roadmap-phase,
.marketing-card,
.funnel-row,
.kpi-grid div,
.timeline-item,
.mini-product-list span,
.glow-chart-card,
.glow-followup-card,
.glow-campaign-form {
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 10px 26px rgba(31, 20, 44, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.panel-heading {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(92, 74, 104, 0.10);
}

.eyebrow {
    color: var(--velora-teal);
}

.brand-mark,
.nav-icon {
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(217, 182, 95, 0.96), rgba(241, 216, 137, 0.92));
    box-shadow: 0 10px 22px rgba(217, 182, 95, 0.22), inset 0 1px rgba(255, 255, 255, 0.55);
}

.glass-nav-item,
.nav-item {
    min-height: 46px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.glass-nav-item:hover,
.glass-nav-item.is-active,
.nav-item:hover,
.nav-item.is-active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background:
        linear-gradient(135deg, rgba(239, 231, 248, 0.22), rgba(217, 182, 95, 0.14)),
        rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(31, 20, 44, 0.22), inset 0 1px rgba(255, 255, 255, 0.16);
    transform: translateX(2px);
}

.glass-bottom-nav,
.mobile-bottom-nav {
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.mobile-nav-item {
    border-radius: 16px;
}

.mobile-nav-item.is-active {
    background: linear-gradient(135deg, #5b2a86, #7b3fb8);
    box-shadow: 0 10px 22px rgba(91, 42, 134, 0.22);
}

.glass-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.link-button {
    position: relative;
    overflow: hidden;
    min-height: 46px;
    border-radius: 16px;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.glass-button::after,
.primary-button::after,
.secondary-button::after,
.ghost-button::after,
.danger-button::after,
.link-button::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: translateX(-120%);
    transition: transform 420ms ease;
}

.glass-button:hover::after,
.primary-button:hover::after,
.secondary-button:hover::after,
.ghost-button:hover::after,
.danger-button:hover::after,
.link-button:hover::after {
    transform: translateX(120%);
}

.glass-button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.link-button:hover {
    transform: translateY(-1px);
}

.glass-button-primary,
.primary-button {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.20);
    background: linear-gradient(135deg, #5b2a86, #7b3fb8);
    box-shadow: 0 12px 28px rgba(91, 42, 134, 0.28);
}

.glass-button-gold {
    color: #24162f;
    border-color: rgba(255, 255, 255, 0.42);
    background: linear-gradient(135deg, #d9b65f, #f1d889);
    box-shadow: 0 12px 28px rgba(217, 182, 95, 0.24);
}

.secondary-button,
.link-button {
    color: var(--ink);
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.70);
    box-shadow: 0 8px 22px rgba(31, 20, 44, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ghost-button {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.danger-button {
    color: #7d2222;
    border-color: rgba(185, 64, 64, 0.16);
    background: rgba(255, 225, 225, 0.82);
}

.glass-input,
.glass-select,
input,
select,
textarea {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.55), 0 8px 20px rgba(31, 20, 44, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

input:focus,
select:focus,
textarea:focus,
.glass-input:focus,
.glass-select:focus {
    outline: 3px solid rgba(22, 143, 134, 0.20);
    border-color: rgba(22, 143, 134, 0.54);
    box-shadow: 0 0 0 6px rgba(22, 143, 134, 0.08), inset 0 1px rgba(255, 255, 255, 0.65);
}

.glass-table,
.table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--velora-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: rgba(33, 29, 41, 0.70);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

td,
th {
    border-bottom-color: rgba(92, 74, 104, 0.12);
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: rgba(239, 231, 248, 0.36);
}

.glass-badge,
.badge {
    border: 1px solid rgba(255, 255, 255, 0.46);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.42);
}

.badge.good {
    color: #115d56;
    background: rgba(223, 245, 239, 0.84);
}

.badge.warn {
    color: #7b5316;
    background: rgba(255, 241, 215, 0.86);
}

.badge.danger {
    color: #8a2e2e;
    background: rgba(255, 225, 225, 0.86);
}

.glass-progress,
.progress-track {
    background: rgba(92, 74, 104, 0.12);
    box-shadow: inset 0 1px 2px rgba(31, 20, 44, 0.08);
}

.progress-track span {
    background: linear-gradient(90deg, var(--velora-teal), #7b3fb8, var(--velora-gold));
    animation: glass-progress-fill 520ms ease both;
}

.flash {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: var(--velora-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.flash.success {
    background: rgba(223, 245, 239, 0.80);
}

.flash.error {
    background: rgba(255, 225, 225, 0.82);
}

.auth-body {
    background:
        radial-gradient(circle at top left, rgba(217, 182, 95, 0.20), transparent 28%),
        radial-gradient(circle at top right, rgba(126, 87, 194, 0.22), transparent 30%),
        linear-gradient(135deg, #f8f6fb 0%, #eee8f7 45%, #f7f5fa 100%);
}

@keyframes glass-progress-fill {
    from {
        opacity: 0.58;
        transform: scaleX(0.86);
        transform-origin: left;
    }
    to {
        opacity: 1;
        transform: scaleX(1);
        transform-origin: left;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f7f1fb;
        --muted: rgba(247, 241, 251, 0.70);
        --line: rgba(255, 255, 255, 0.16);
        --surface: rgba(43, 31, 58, 0.64);
        --surface-2: rgba(43, 31, 58, 0.42);
        --velora-card: rgba(43, 31, 58, 0.66);
        --velora-card-strong: rgba(43, 31, 58, 0.78);
        --velora-border: rgba(255, 255, 255, 0.16);
    }

    body,
    .auth-body {
        background:
            radial-gradient(circle at top left, rgba(217, 182, 95, 0.14), transparent 28%),
            radial-gradient(circle at top right, rgba(126, 87, 194, 0.22), transparent 30%),
            linear-gradient(135deg, #1b1225 0%, #231831 48%, #170f20 100%);
    }

    .topbar,
    .mobile-bottom-nav,
    .table-wrap,
    .alert-item,
    .summary-item,
    .template-card,
    .source-card,
    .supplier-card,
    .coach-metrics div,
    .coach-recommendation,
    .task-card,
    .focus-card,
    .roadmap-phase,
    .marketing-card,
    .funnel-row,
    .kpi-grid div,
    .timeline-item,
    .mini-product-list span,
    .glow-chart-card,
    .glow-followup-card,
    .glow-campaign-form,
    input,
    select,
    textarea,
    th,
    .secondary-button,
    .link-button {
        color: var(--ink);
        background: rgba(43, 31, 58, 0.58);
        border-color: rgba(255, 255, 255, 0.16);
    }

    .source-card img,
    .source-placeholder,
    .mini-product-list span {
        background: rgba(255, 255, 255, 0.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 1080px) {
    body.is-mobile-menu-open {
        overflow: hidden;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 42;
        width: min(380px, calc(100vw - 28px));
        height: 100dvh;
        padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
        border-radius: 0 24px 24px 0;
        transform: translateX(-108%);
        transition: transform 220ms ease;
        overscroll-behavior: contain;
    }

    .app-shell.is-mobile-menu-open .sidebar {
        transform: translateX(0);
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: block;
        border: 0;
        padding: 0;
        background: rgba(31, 20, 44, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .app-shell.is-mobile-menu-open .mobile-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .sidebar-collapse-button {
        display: none;
    }

    .sidebar-brand-row {
        grid-template-columns: 1fr;
    }

    .nav-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-item {
        min-height: 50px;
        align-items: flex-start;
        border-radius: 16px;
    }

    .nav-label {
        min-width: 0;
        overflow-wrap: anywhere;
        line-height: 1.22;
    }

    .sidebar-footer {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .source-toolbar,
    .inventory-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid,
    .source-grid,
    .template-grid,
    .glow-benefit-grid,
    .glow-chart-grid,
    .glow-reward-grid,
    .compact-metrics,
    .wide-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .growth-dashboard-grid,
    .glow-hero,
    .roadmap-grid,
    .marketing-grid,
    .growth-inline-form,
    .roadmap-add-form,
    .roadmap-task,
    .timeline-item {
        grid-template-columns: 1fr;
    }

    .pricing-automation-panel,
    .pricing-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .academy-card-grid,
    .academy-lesson-grid,
    .academy-modal-grid,
    .academy-ai-grid,
    .academy-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .academy-hero-panel,
    .academy-routine-columns {
        grid-template-columns: 1fr;
    }

    .academy-hero-score {
        width: 100%;
        min-height: auto;
        grid-template-columns: auto 1fr;
        justify-content: start;
        border-radius: var(--radius);
        padding: 14px;
    }

    .academy-hero-score small {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    :root {
        --radius: 18px;
    }

    body {
        padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    }

    .main {
        padding: 12px 12px calc(92px + env(safe-area-inset-bottom, 0px));
    }

    .topbar,
    .panel-heading,
    .two-column,
    .split-layout,
    .toolbar,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .panel-heading {
        display: grid;
    }

    .topbar {
        gap: 12px;
        margin-bottom: 14px;
        padding: 12px;
    }

    .topbar h1,
    .auth-card h1 {
        font-size: 1.45rem;
        line-height: 1.12;
    }

    .topbar-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .topbar-actions > * {
        width: auto;
        min-width: 0;
        padding-inline: 8px;
        font-size: 0.78rem;
        line-height: 1.15;
        white-space: normal;
    }

    .button-row {
        align-items: stretch;
    }

    .button-row > * {
        width: 100%;
    }

    .panel,
    .metric {
        padding: 14px;
    }

    .panel {
        margin-bottom: 14px;
    }

    .metric-grid {
        gap: 10px;
        margin-bottom: 14px;
    }

    .metric {
        min-height: auto;
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .danger-button,
    .link-button,
    input,
    select,
    textarea {
        min-height: 46px;
    }

    .nav-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid,
    .source-grid,
    .template-grid,
    .wide-form,
    .glow-benefit-grid,
    .glow-chart-grid,
    .glow-reward-grid,
    .compact-metrics,
    .coach-metrics,
    .kpi-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .growth-hero {
        grid-template-columns: 1fr;
    }

    .growth-score-ring {
        width: 118px;
    }

    .glow-action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .glow-action-row > *,
    .glow-followup-card .button-row > * {
        width: 100%;
    }

    .glow-followup-card,
    .glow-template-card > div:first-child {
        grid-template-columns: 1fr;
        display: grid;
    }

    .pricing-automation-panel,
    .pricing-preview-grid,
    .pricing-automation-actions {
        grid-template-columns: 1fr;
    }

    .pricing-automation-panel {
        display: grid;
        align-items: stretch;
    }

    .pricing-automation-actions {
        display: grid;
        justify-content: stretch;
    }

    .pricing-automation-actions > * {
        width: 100%;
    }

    .academy-toolbar,
    .academy-card-grid,
    .academy-lesson-grid,
    .academy-routine-columns,
    .academy-modal-grid,
    .academy-ai-grid,
    .academy-filter-grid,
    .academy-disclaimer,
    .academy-content-batch-note,
    .academy-product-head {
        grid-template-columns: 1fr;
    }

    .academy-hero-actions,
    .academy-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .academy-actions > *,
    .academy-hero-actions > * {
        width: 100%;
    }

    .academy-tabbar {
        top: 8px;
        margin-right: -16px;
        margin-left: -16px;
        border-radius: 0;
    }

    .academy-product-head img,
    .academy-product-head span {
        width: 100%;
        height: auto;
        aspect-ratio: 1.35;
    }

    .academy-modal {
        padding: 10px;
    }

    .academy-modal-panel {
        max-height: calc(100vh - 20px);
        padding: 16px;
    }

    .focus-card,
    .health-row > div:first-child,
    .roadmap-phase-head,
    .funnel-row {
        align-items: flex-start;
    }

    .focus-card,
    .roadmap-phase-head,
    .funnel-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sidebar-footer {
        grid-template-columns: 1fr;
    }

    .form-span {
        grid-column: auto;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        left: 10px;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.78);
        box-shadow: 0 16px 34px rgba(43, 35, 54, 0.18);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
    }

    .mobile-nav-item {
        min-height: 52px;
        display: grid;
        place-items: center;
        gap: 2px;
        border-radius: 16px;
        color: var(--muted);
        font-weight: 900;
    }

    .mobile-nav-item span {
        font-size: 0.78rem;
    }

    .mobile-nav-icon {
        width: 24px;
        height: 24px;
        display: grid;
        place-items: center;
        color: inherit;
    }

    .mobile-nav-icon svg {
        width: 19px;
        height: 19px;
    }

    .mobile-nav-item small {
        max-width: 100%;
        overflow: hidden;
        font-size: 0.68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-item.is-active {
        color: #ffffff;
        background: linear-gradient(135deg, #5b2a86, #7b3fb8);
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .table-wrap tbody {
        display: grid;
        gap: 12px;
    }

    .table-wrap tr {
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.52);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.70);
        box-shadow: 0 12px 28px rgba(31, 20, 44, 0.10);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .table-wrap td {
        display: grid;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        gap: 10px;
        padding: 9px 0;
        border-bottom: 1px solid rgba(92, 74, 104, 0.12);
        font-size: 0.92rem;
        overflow-wrap: anywhere;
    }

    .table-wrap td:last-child {
        border-bottom: 0;
    }

    .table-wrap td[colspan] {
        display: block;
    }

    .table-wrap td[colspan]::before {
        display: none;
    }

    .table-wrap td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .table-actions,
    td .academy-actions,
    td .button-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .badge {
        max-width: 100%;
        white-space: normal;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 760px) {
    .table-wrap tr {
        background: rgba(43, 31, 58, 0.62);
        border-color: rgba(255, 255, 255, 0.16);
    }

    .table-wrap td {
        border-bottom-color: rgba(255, 255, 255, 0.12);
    }
}

@media (max-width: 420px) {
    .topbar-actions,
    .nav-list {
        grid-template-columns: 1fr;
    }

    .table-wrap td {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .table-wrap td::before {
        margin-bottom: 1px;
    }
}

@media print {
    .sidebar,
    .topbar-actions,
    .mobile-bottom-nav,
    .secondary-button,
    .primary-button {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .main {
        padding: 0;
    }

    .panel,
    .metric {
        box-shadow: none;
    }
}
