/* MVLine company theme. Layout and operational behavior live in workspace.css/js. */
:root {
  --navy: #051f73;
  --navy2: #1b3583;
  --lime: #b8dc19;
  --ink: #142443;
  --text: #526079;
  --muted: #657188;
  --line: #e2e7ef;
  --canvas: #f6f7f3;
  --green: #16704f;
  --red: #b12b3b;
  --amber: #8b5a0a;
  --radius: 20px;
  --shadow: 0 3px 12px #051f7304, 0 12px 30px #051f7303;
  --blue-soft: #eff3fd;
  --lime-soft: #f1f7d9;
  --focus: #3154a9;
}

/* Navigation carries the brand; working surfaces stay calm and readable. */
.sidebar { width: 268px; background: var(--navy); border-right: 1px solid #ffffff12; }
.sidebar .brand { padding: 26px 24px 22px; flex-direction: column; align-items: flex-start; gap: 10px; border-bottom: 1px solid #ffffff18; }
.brand-image { display: block; width: 220px; height: 60px; overflow: hidden; }
.brand-image img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.brand-caption { color: #c2cef0; font: 500 10px/1.5 Inter, Arial, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; padding-left: 3px; }
.nav-scroll { padding: 22px 16px 28px; scrollbar-width: thin; scrollbar-color: #ffffff40 transparent; }
.nav-item { gap: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: #dbe3fc; border-radius: 11px; margin: 4px 0; }
.nav-item span { min-width: 0; }
.nav-item svg { opacity: .8; }
.nav-item:hover { background: #ffffff0e; color: white; }
.nav-item.active { color: white; background: #ffffff16; box-shadow: inset 3px 0 var(--lime); font-weight: 600; }
.nav-item.active svg { color: var(--lime); opacity: 1; }
.nav-item.featured { background: var(--lime); color: var(--navy); padding: 16px 14px; margin-bottom: 18px; font-weight: 650; box-shadow: 0 5px 18px #02123a18; }
.nav-item.featured:hover, .nav-item.featured.active { background: #c7e74b; color: var(--navy); }
.nav-item.featured svg, .nav-item.featured.active svg { color: var(--navy); opacity: 1; }
.nav-label, details.nav-group > summary { color: #bbc9f0; font-size: 10px; letter-spacing: 1.45px; padding: 23px 13px 10px; }
.nav-group > summary::after { font-size: 13px; line-height: 1; }
.sidebar-foot { padding: 18px 22px; border-color: #ffffff20; background: #0014502b; }
.sidebar .avatar { background: #ffffff16; color: #e7f6a2; border: 1px solid #ffffff24; }
.account-link > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.account-link small { color: #bac8ec; font-size: 11px; margin-top: 3px; }
.sidebar a:focus-visible, .sidebar summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.workspace { margin-left: 268px; }
.topbar { height: 80px; padding-inline: 36px; background: #fffffff2; border-color: var(--line); }
.topbar .trail { color: var(--muted); gap: 14px; font-size: 12px; }
.topbar .trail strong { color: var(--navy); font-weight: 650; }
.topbar .trail svg { color: #909bb1; }
.top-actions { gap: 12px; }
.top-actions .date { font-size: 12px; margin-right: 10px; }
.live-dot { background: var(--green); }
.icon-button { border-radius: 13px; border-color: var(--line); color: var(--navy); transition: background .18s, border-color .18s; }
.icon-button:hover { background: var(--blue-soft); border-color: #c7d2eb; }
.avatar { background: var(--blue-soft); color: var(--navy); border: 1px solid #dfe6f6; border-radius: 13px; }
.avatar.large { background: var(--lime-soft); border-color: #dce9a5; color: var(--navy); }
.unread { box-shadow: 0 0 0 2px white; }
.main { padding: 36px 36px 56px; max-width: 1720px; }
.workspace h1 { font-weight: 600; letter-spacing: -1.2px; color: var(--navy); overflow-wrap: anywhere; }
.workspace h2 { font-weight: 600; line-height: 1.35; }
.workspace h3 { font-weight: 600; }
.page-head { margin-bottom: 30px; gap: 24px; }
.page-head > div:first-child { min-width: 0; }
.page-head p { max-width: 740px; line-height: 1.75; color: var(--text); }
.eyebrow { color: var(--navy); font-size: 10px; letter-spacing: 1.75px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.workspace .eyebrow::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: #819d0c; flex: none; }
.grid { gap: 24px; }
.spaced { margin-top: 26px; }
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 28px; }
.card-head { padding: 22px 26px; border-color: #e9edf3; background: #fff; }
.card-head h2 { font-size: 19px; color: var(--ink); }
.card-head .btn.quiet { padding-right: 0; }

/* Consistent actions, input states and readable status colors. */
.btn { border-color: #d4dce9; border-radius: 11px; color: var(--navy); font-weight: 600; transition: background .16s, border-color .16s, box-shadow .16s; }
.btn:hover { background: var(--blue-soft); border-color: #bac9e8; }
.btn.primary { background: var(--lime); border-color: #abc921; color: #132c0a; box-shadow: 0 2px 2px #4254090a; }
.btn.primary:hover { background: #c5e63d; border-color: #a0bd17; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: white; }
.btn.navy:hover { background: #173b99; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--navy); }
.btn.quiet:hover { background: var(--blue-soft); }
.btn.danger { background: #fff5f4; color: var(--red); border-color: #f0d2d6; }
.btn.danger:hover { background: #fde9e9; border-color: #e8b5bd; }
.btn:disabled { box-shadow: none; opacity: .55; }
.workspace a:focus-visible, .workspace button:focus-visible, .mobile-nav :focus-visible,
dialog button:focus-visible, dialog a:focus-visible, dialog summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.field input, .field select, .field textarea, input.control, select.control { border-color: #cdd6e5; border-radius: 11px; background: #fff; transition: border-color .16s, box-shadow .16s; }
.field input:hover, .field select:hover, .field textarea:hover, .control:hover { border-color: #9bacce; }
.field input:focus, .field select:focus, .field textarea:focus, input.control:focus, select.control:focus { outline: 2px solid #3154a933; outline-offset: 1px; border-color: var(--focus); box-shadow: 0 0 0 4px #051f7307; }
.field input::placeholder, .field textarea::placeholder, input.control::placeholder { color: #76829a; opacity: 1; }
.field > span, .field > label { color: #45526b; }
.check input { accent-color: var(--navy); }
.section-label { color: var(--navy); border-color: var(--line); font-size: 11px; letter-spacing: 1.2px; }
.tabs { background: #edf0f7; padding: 5px; border: 1px solid #e0e5ef; border-radius: 13px; gap: 5px; }
.tab { border-radius: 9px; color: #53617c; }
.tab:hover { color: var(--navy); background: #ffffff80; }
.tab.active { color: var(--navy); background: white; font-weight: 650; box-shadow: 0 2px 5px #051f7310; }
.badge { border: 1px solid #e2e7ee; color: #536078; background: #f2f4f8; border-radius: 7px; }
.badge.good { color: #126844; background: #edf8f0; border-color: #d1eadc; }
.badge.warn { color: #80510a; background: #fff7e6; border-color: #f0e1bc; }
.badge.bad { color: #a72b3c; background: #fff0f1; border-color: #f2d6dc; }
.badge.blue { color: var(--navy); background: #edf2ff; border-color: #d7e1fa; }
.count { background: #ebeff7; color: #596781; }
.notice { background: #f5f8e9; border-color: #dce7b6; color: #45551d; border-radius: 13px; }
.notice.amber { background: #fff9ed; color: #80540b; border-color: #eddfbd; }
.notice.red, .error { background: #fff2f3; color: #a42b3b; border-color: #edcfd5; }
.loading { color: var(--muted); }

/* Dashboard: the same real records, with a clearer overview hierarchy. */
.dashboard-header { padding: 34px 34px 0; border-radius: 23px; background: var(--navy); color: white; position: relative; overflow: hidden; }
.dashboard-header .page-head { margin-bottom: 28px; position: relative; }
.dashboard-header h1 { color: white; font-size: 38px; margin-bottom: 14px; }
.dashboard-header .eyebrow { color: #e2ebb9; letter-spacing: 2px; margin-bottom: 14px; }
.dashboard-header .eyebrow::before { background: var(--lime); }
.dashboard-header p { color: #d2ddfb; font-size: 15px; max-width: 590px; }
.dashboard-header .head-actions { padding-top: 4px; }
.dashboard-header a:focus-visible, .dashboard-header button:focus-visible { outline-color: var(--lime); }
.dashboard-shortcuts { border-top: 1px solid #ffffff25; display: flex; flex-wrap: wrap; gap: 10px 30px; padding: 16px 0 18px; }
.dashboard-shortcuts a { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; color: #f2f5ff; font-size: 12px; font-weight: 500; }
.dashboard-shortcuts a > svg:first-child { color: #d1e867; }
.dashboard-shortcuts a > svg:last-child { width: 12px; height: 12px; opacity: .75; margin-left: 8px; }
.dashboard-shortcuts a:hover { color: var(--lime); }
.setup-guide { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: 15px; }
.setup-guide > div:first-child { max-width: 590px; }
.setup-guide .eyebrow { font-size: 9px; margin-bottom: 6px; }
.setup-guide h2 { font-size: 17px; margin: 0 0 6px; }
.setup-guide p { margin: 0; font-size: 13px; line-height: 1.7; }
.setup-guide .actions { flex-shrink: 0; justify-content: flex-end; max-width: 400px; }
.kpis { gap: 20px; margin-block: 24px; }
.kpi { padding: 24px; position: relative; border-color: var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.kpi:first-child { background: #fff; color: var(--ink); border-color: #cfd8ee; }
.kpi:first-child .kpi-label, .kpi:first-child small { color: var(--muted); }
.kpi-label { color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.5; margin: 0; }
.kpi-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.kpi-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--navy); background: var(--blue-soft); flex: none; }
.kpi:first-child .kpi-icon { background: var(--lime-soft); }
.kpi-value { color: var(--navy); font-size: 36px; font-weight: 600; letter-spacing: -1.3px; }
.kpi small { color: var(--muted); font-size: 11px; margin-top: 9px; }
.hero { background: var(--navy); }
.hero .eyebrow { color: var(--lime); }
.hero p { color: #d2ddfb; }
.progress { background: #edf0f5; height: 6px; }
.progress > i { background: #9ab815; }
.chart { border-color: var(--line); gap: 24px; }
.chart-bar { background: var(--navy); border-radius: 6px 6px 0 0; }
.chart-bar.lime { background: var(--lime); }
.legend { color: var(--text); }
.legend i { background: var(--navy); }
.legend i.lime { background: var(--lime); outline: 1px solid #92ae13; }

/* Lists reflow to labelled records; no small-screen horizontal tables. */
.toolbar { padding: 22px 26px; background: #fff; border-color: var(--line); gap: 12px; }
.record-header { background: #f6f8fc; color: #596984; font-size: 10px; font-weight: 650; letter-spacing: 1.15px; padding-block: 15px; }
.record-row { border-color: #e9edf4; padding-block: 22px; transition: background .15s; }
.record-row:hover { background: #f8faff; }
.row-title > a { color: var(--ink); font-weight: 600; }
.row-title > a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.row-title > a small { font-weight: 400; color: var(--muted); }
.row-actions .btn { border-color: #dbe3f3; background: #f8faff; color: var(--navy); }
.row-actions .btn:hover { background: #eaf0ff; border-color: #b9c9ee; }
.cell-label { color: #596981; font-weight: 500; }
.list-footer { padding: 20px 26px; border-top: 1px solid #edf0f5; background: #fcfdff; }
.definition { gap: 24px; margin-block: 20px 0; }
.definition dt { color: #637089; margin-bottom: 7px; }
.definition dd { color: var(--ink); line-height: 1.65; }
.metric-link { background: #fcfdff; border-color: var(--line); border-radius: 14px; transition: border-color .16s, background .16s; }
.metric-link b { color: var(--navy); }
.metric-link:hover { border-color: #adbfeb; background: var(--blue-soft); }
.simple-row, .file-row { border-color: #e9edf4; }
.timeline-item { border-color: #dce4f4; }
.timeline-item:before { background: var(--navy); border-color: #e8eefc; }
.empty { padding: 48px 24px; }
.empty .empty-icon { background: var(--blue-soft); border: 1px solid #dfe6f7; color: var(--navy); border-radius: 18px; width: 60px; height: 60px; }
.empty h3 { color: var(--ink); font-size: 19px; line-height: 1.4; margin-bottom: 10px; }
.empty p { color: var(--muted); font-size: 13px; line-height: 1.8; max-width: 365px; margin-inline: auto; }

dialog { background: white; border-color: #d4ddee; border-radius: 22px; box-shadow: 0 30px 100px #03164f33; }
dialog::backdrop { background: #03164f80; backdrop-filter: blur(4px); }
.dialog-head { padding: 24px 28px; background: #f7f9ff; border-bottom: 1px solid #dce4f4; }
.dialog-head h2 { color: var(--navy); font-size: 22px; letter-spacing: -.5px; }
.dialog-head .icon-button { background: #edf2fe; color: var(--navy); }
.dialog-body { padding: 28px; }
.dialog-foot { background: #fff; border-color: var(--line); box-shadow: 0 -5px 20px #051f7304; }
.code-box { color: var(--navy); background: #f0f4fc; }
#toast { background: var(--navy); border: 1px solid #3550a1; box-shadow: 0 8px 30px #03164f30; }
.more-menu .nav-item { color: var(--ink); }
.more-menu .nav-item:hover, .more-menu .nav-item:focus { background: var(--blue-soft); color: var(--navy); }
.more-menu .nav-item.active { background: var(--blue-soft); color: var(--navy); box-shadow: inset 3px 0 var(--navy); }
.more-menu .nav-item.active svg { color: var(--navy); }
.more-menu .nav-item.featured, .more-menu .nav-item.featured:focus { background: var(--lime); color: var(--navy); box-shadow: none; border: 1px solid #afcf25; }
.more-menu .nav-item.featured:hover { background: #c7e74b; }
.more-menu .nav-group > summary { color: #51607b; font-weight: 650; }
.more-menu .nav-group { border-color: var(--line); }

@container (max-width: 850px) {
  .record-row { padding: 26px; gap: 20px; }
  .record-row:nth-child(even) { background: #fbfcff; }
  .record-row:hover { background: #f4f7ff; }
}
@media (min-width: 601px) {
  .workspace h1 { font-size: 34px; }
  .dashboard-header h1 { font-size: 38px; }
  .btn { font-size: 14px; min-height: 46px; padding: 11px 17px; }
  .btn.small { font-size: 12px; min-height: 36px; padding: 8px 12px; }
  .field input, .field select, .field textarea, input.control, select.control { min-height: 47px; }
  .toolbar select { max-width: 210px; }
}
@media (min-width: 1900px) { .main { padding-inline: 48px; } }
@media (max-width: 1250px) {
  .sidebar { width: 236px; }
  .sidebar .brand { padding-inline: 20px; }
  .brand-image { width: 196px; height: 55px; }
  .brand-caption { font-size: 9px; letter-spacing: 1.2px; }
  .workspace { margin-left: 236px; }
  .main { padding: 30px 28px 48px; }
  .topbar { padding-inline: 28px; }
  .dashboard-header { padding: 30px 28px 0; }
  .setup-guide { flex-wrap: wrap; }
  .setup-guide .actions { justify-content: flex-start; max-width: 100%; }
}
@media (max-width: 1000px) {
  .workspace { margin-left: 0; }
  .topbar { background: var(--navy); border-bottom-color: #ffffff20; height: 76px; padding-inline: 24px; }
  .mobile-brand { display: flex; padding: 0; gap: 0; }
  .mobile-brand .brand-image { width: 194px; height: 54px; }
  .mobile-brand .brand-caption { display: none; }
  .topbar .icon-button { color: white; border-color: #ffffff30; background: #ffffff0b; }
  .topbar .icon-button:hover { background: #ffffff20; }
  .topbar .avatar { background: #ffffff15; color: white; border-color: #ffffff30; }
  .topbar a:focus-visible { outline-color: var(--lime); }
  .topbar .unread { background: var(--lime); box-shadow: 0 0 0 2px var(--navy); }
  .main { padding: 30px 24px 116px; }
  .mobile-nav { border-top: 1px solid #dce3ef; background: #fffffff5; box-shadow: 0 -4px 20px #051f7305; gap: 5px; }
  .mobile-nav a, .mobile-nav button { border-radius: 12px; color: #657188; padding-block: 9px; }
  .mobile-nav .active { background: var(--blue-soft); color: var(--navy); font-weight: 650; }
  .mobile-nav .active svg { background: transparent; padding: 0; margin: 0; color: var(--navy); }
  .mobile-nav [data-action=more] { color: var(--navy); }
}
@media (max-width: 600px) {
  .topbar { height: 76px; padding-inline: 16px; gap: 10px; }
  .mobile-brand .brand-image { width: 170px; height: 49px; }
  .top-actions { gap: 8px; }
  .top-actions > a:last-child { display: none; }
  .main { padding: 28px 18px 118px; }
  .workspace h1 { font-size: 32px; letter-spacing: -.9px; }
  .page-head { margin-bottom: 26px; }
  .page-head p { font-size: 17px; line-height: 1.65; }
  .eyebrow { font-size: 11px; letter-spacing: 1.5px; }
  .grid { gap: 20px; }
  .card { border-radius: 18px; }
  .card-pad { padding: 25px 21px; }
  .card-head { padding: 22px 21px; }
  .card-head h2 { font-size: 21px; }
  .card-head .btn.quiet { padding: 8px 0; }
  .btn { min-height: 52px; font-size: 17px; padding: 13px 17px; border-radius: 12px; }
  .btn.small { min-height: 44px; font-size: 16px; padding: 10px 14px; }
  .field input, .field select, .field textarea, input.control, select.control { min-height: 54px; font-size: 18px; }
  .section-label { font-size: 13px; }
  .dashboard-header { padding: 27px 22px 0; border-radius: 20px; }
  .dashboard-header h1 { font-size: 34px; line-height: 1.18; }
  .dashboard-header .page-head { margin-bottom: 22px; gap: 22px; }
  .dashboard-header .eyebrow { font-size: 10px; letter-spacing: 1.6px; }
  .dashboard-header p { font-size: 17px; line-height: 1.65; }
  .dashboard-header .head-actions { padding: 0; }
  .dashboard-shortcuts { display: grid; grid-template-columns: 1fr; gap: 0; padding: 9px 0 12px; }
  .dashboard-shortcuts a { min-height: 48px; font-size: 15px; gap: 12px; }
  .dashboard-shortcuts a > svg:last-child { margin-left: auto; }
  .setup-guide { padding: 22px 20px; margin-top: 20px; gap: 18px; }
  .setup-guide .eyebrow { font-size: 10px; }
  .setup-guide h2 { font-size: 21px; margin-block: 7px 10px; }
  .setup-guide p { font-size: 16px; }
  .setup-guide .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .kpis { gap: 16px; margin-block: 22px; }
  .kpi { padding: 24px; }
  .kpi-heading { margin-bottom: 15px; }
  .kpi-label { font-size: 16px; }
  .kpi-icon { width: 38px; height: 38px; border-radius: 12px; }
  .kpi-value { font-size: 40px; }
  .kpi small { font-size: 14px; }
  .toolbar { padding: 22px 20px; }
  .record-row { padding: 26px 21px; }
  .record-row .cell { margin-top: 20px; }
  .record-row .cell:first-child { margin-top: 0; }
  .row-title > a { font-size: 20px; }
  .cell-label { font-size: 13px; }
  .list-footer { padding: 20px; }
  .empty { padding: 36px 20px; }
  .empty h3 { font-size: 23px; }
  .empty p { font-size: 17px; line-height: 1.7; }
  .definition { gap: 24px; }
  .legend { gap: 14px; flex-wrap: wrap; }
  dialog { border: 0; border-radius: 0; }
  .dialog-head { padding: 20px; }
  .dialog-head h2 { font-size: 23px; }
  .dialog-body { padding: 26px 20px; }
  .dialog-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
  .more-menu .nav-item.featured { font-size: 18px; padding: 21px 18px; }
  .more-menu .nav-group > summary { font-size: 12px; min-height: 52px; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 12px; gap: 6px; }
  .mobile-brand .brand-image { width: 162px; }
  .top-actions { gap: 6px; }
  .main { padding-inline: 14px; }
  .dashboard-header { padding-inline: 20px; }
  .card-pad, .card-head { padding-inline: 18px; }
}
@media print {
  .workspace { margin: 0; }
  .main { padding: 0; }
  .dashboard-header { background: white; padding: 0; border-radius: 0; color: var(--ink); }
  .dashboard-header h1, .dashboard-header p, .dashboard-header .eyebrow { color: var(--ink); }
  .dashboard-shortcuts { display: none; }
  .card, .kpi { box-shadow: none; }
}
