:root { --accent: #625bf6; --accent-soft: #eeedff; --ink: #172033; --muted: #748096; --line: #e8ebf1; --surface: #fff; --page: #f5f7fb; }
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: Inter, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.demo-theme-teal { --accent: #0f9f8f; --accent-soft: #e4f8f5; }
.demo-theme-navy { --accent: #274c77; --accent-soft: #e8f0f8; }
.demo-theme-amber { --accent: #c57a10; --accent-soft: #fff3db; }
.demo-theme-sky { --accent: #168aad; --accent-soft: #e3f5fb; }
.demo-theme-orange { --accent: #d96716; --accent-soft: #fff0e5; }
.demo-theme-violet { --accent: #7c3aed; --accent-soft: #f1eafe; }
.demo-theme-green { --accent: #248a57; --accent-soft: #e7f6ed; }
.demo-theme-rose { --accent: #d33f67; --accent-soft: #fdeaf0; }
.demo-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 250px; padding: 28px 18px; display: flex; flex-direction: column; color: #cbd2df; background: #111827; transition: transform .25s; }
.demo-logo { display: flex; align-items: center; gap: 12px; margin: 5px 10px 40px; color: #fff; text-decoration: none; }
.demo-logo > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--accent); font-weight: 800; }
.demo-logo strong { font-size: 14px; letter-spacing: .05em; }
.demo-sidebar nav { display: grid; gap: 8px; }
.demo-sidebar nav button { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border: 0; border-radius: 12px; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.demo-sidebar nav button:hover, .demo-sidebar nav button.active { color: #fff; background: rgba(255,255,255,.09); }
.demo-sidebar nav button span { width: 23px; color: #95a0b5; font-size: 17px; text-align: center; }
.demo-sidebar-footer { margin-top: auto; padding: 17px 12px; border-top: 1px solid #283247; }
.demo-sidebar-footer a { display: block; margin-bottom: 10px; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.demo-sidebar-footer small { color: #7f8aa0; }
.demo-main { min-height: 100vh; margin-left: 250px; }
.demo-topbar { height: 78px; padding: 0 34px; display: grid; grid-template-columns: 1fr minmax(260px, 430px) 1fr; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.demo-topbar > div:first-child { display: flex; align-items: center; gap: 12px; color: #48546a; font-size: 13px; font-weight: 700; }
.mobile-sidebar-button { display: none; border: 0; background: none; cursor: pointer; }
.demo-search { height: 42px; padding: 0 14px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.demo-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.demo-user { justify-self: end; display: flex; align-items: center; gap: 12px; }
.demo-user button { width: 39px; height: 39px; border: 0; border-radius: 11px; color: #fff; background: var(--accent); cursor: pointer; font-size: 20px; }
.demo-user span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 800; }
.demo-content { display: none; padding: 36px; }
.demo-content.active { display: block; }
.demo-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 30px; }
.demo-heading > div > span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.demo-heading h1, .demo-heading h2 { max-width: 720px; margin: 7px 0 8px; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.045em; }
.demo-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.demo-heading > button, .insight-panel button { padding: 12px 17px; border: 0; border-radius: 11px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-grid article, .panel { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 28px rgba(23,32,51,.04); }
.metric-grid article { position: relative; padding: 21px; }
.metric-grid article > span { display: block; margin-bottom: 13px; color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-grid article strong { display: block; font-size: clamp(22px, 2vw, 31px); letter-spacing: -.04em; }
.metric-grid article small { position: absolute; top: 20px; right: 18px; padding: 5px 7px; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: 1.7fr .8fr; gap: 18px; margin-bottom: 18px; }
.dashboard-grid.lower { grid-template-columns: 1.7fr .8fr; }
.panel { min-width: 0; padding: 23px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.panel-head span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.panel-head h2 { margin: 4px 0 0; font-size: 17px; }
.panel-head button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.panel-head > strong { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); }
.bar-chart { height: 220px; padding: 15px 5px 0; display: flex; align-items: end; gap: clamp(7px, 1.3vw, 18px); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 54px, #f0f2f6 55px); }
.bar-chart i { position: relative; flex: 1; height: var(--bar-height); min-width: 8px; border-radius: 6px 6px 0 0; background: linear-gradient(to top, var(--accent), color-mix(in srgb, var(--accent) 40%, white)); transition: height .5s; }
.bar-chart i span { position: absolute; opacity: 0; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); color: var(--accent); font-size: 9px; font-style: normal; font-weight: 800; }
.bar-chart i:hover span { opacity: 1; }
.chart-labels { display: flex; justify-content: space-between; padding-top: 12px; color: #9aa3b3; font-size: 10px; }
.insight-panel { display: flex; flex-direction: column; justify-content: center; color: #fff; background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #111827)); }
.insight-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 13px; background: rgba(255,255,255,.16); font-size: 20px; }
.insight-panel small { color: rgba(255,255,255,.7); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.insight-panel h2 { margin: 10px 0; font-size: 23px; line-height: 1.3; letter-spacing: -.03em; }
.insight-panel p { color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.6; }
.insight-panel button { align-self: flex-start; margin-top: 10px; color: var(--accent); background: #fff; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 12px; color: #919aad; background: #f8fafc; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 14px 12px; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.status { padding: 6px 8px; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 700; }
.task-panel ul { display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; }
.task-panel li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f0f2f5; color: #4b566a; font-size: 12px; line-height: 1.5; }
.task-panel li button { flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #cad0da; border-radius: 6px; background: #fff; cursor: pointer; }
.task-panel li.done { opacity: .5; text-decoration: line-through; }
.task-panel li.done button { border-color: var(--accent); background: var(--accent); }
.workflow-grid, .report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.workflow-card, .report-summary article, .customer-card { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 28px rgba(23,32,51,.04); }
.workflow-card { position: relative; min-height: 170px; padding: 24px; overflow: hidden; }
.workflow-card > span { position: absolute; top: 14px; right: 18px; color: var(--accent-soft); font-size: 46px; font-weight: 800; }
.workflow-card small, .report-summary span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.workflow-card strong { position: relative; display: block; margin-top: 32px; font-size: 28px; }
.workflow-card p { position: relative; margin: 8px 0 0; color: var(--accent); font-size: 12px; font-weight: 700; }
.activity-panel ol { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
.activity-panel li { display: grid; grid-template-columns: 48px 1fr; gap: 13px; align-items: start; }
.activity-panel li > span { padding-top: 3px; color: var(--accent); font-size: 11px; font-weight: 800; }
.activity-panel li div { padding: 0 0 16px 15px; border-left: 2px solid var(--accent-soft); }
.activity-panel li strong { font-size: 13px; }
.activity-panel li p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.customer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.customer-card { padding: 22px; display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; }
.customer-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--accent); background: var(--accent-soft); font-size: 18px; font-weight: 800; }
.customer-card div:nth-child(2) span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.customer-card h2 { margin: 4px 0; font-size: 16px; }
.customer-card p { margin: 0; color: var(--muted); font-size: 12px; }
.customer-card > strong { font-size: 13px; }
.customer-card > small { grid-column: 2; justify-self: start; }
.customer-card > button { grid-column: 3; border: 0; color: var(--accent); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.report-summary article { padding: 22px; }
.report-summary strong { display: block; margin: 10px 0 7px; font-size: 28px; }
.report-summary small { color: var(--accent); font-weight: 700; }
.report-chart { margin-top: 18px; }
.report-bars { height: 330px; padding: 20px 10px 0; display: flex; align-items: end; gap: clamp(8px, 2vw, 26px); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 64px, #f0f2f6 65px); }
.report-bars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 9px; }
.report-bars i { width: 100%; max-width: 46px; height: var(--bar-height); border-radius: 8px 8px 2px 2px; background: linear-gradient(to top, var(--accent), color-mix(in srgb, var(--accent) 35%, white)); }
.report-bars span { color: var(--muted); font-size: 9px; }
.demo-toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; padding: 14px 18px; opacity: 0; transform: translateY(20px); border-radius: 12px; color: #fff; background: #172033; box-shadow: 0 15px 40px rgba(0,0,0,.2); transition: .25s; font-size: 13px; font-weight: 700; pointer-events: none; }
.demo-toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1050px) { .metric-grid, .workflow-grid, .report-summary { grid-template-columns: 1fr 1fr; } .dashboard-grid, .dashboard-grid.lower { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .demo-sidebar { transform: translateX(-105%); box-shadow: 20px 0 60px rgba(0,0,0,.25); }
    body.sidebar-open .demo-sidebar { transform: translateX(0); }
    .demo-main { margin-left: 0; }
    .demo-topbar { padding: 0 16px; grid-template-columns: 1fr auto; }
    .mobile-sidebar-button { display: inline-block; }
    .demo-search { display: none; }
    .demo-content { padding: 25px 15px; }
    .demo-heading { align-items: flex-start; flex-direction: column; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric-grid article { padding: 16px; }
    .customer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .metric-grid, .workflow-grid, .report-summary { grid-template-columns: 1fr; }
    .customer-card { grid-template-columns: 45px 1fr; }
    .customer-card > strong, .customer-card > button { grid-column: 2; justify-self: start; }
    .report-bars { height: 250px; gap: 6px; }
}
