:root {
  --navy:#0b1620;
  --navy-2:#122638;
  --blue:#1f5fa8;
  --blue-dark:#174c8a;
  --bright:#8fc6ea;
  --text:#17283a;
  --muted:#526577;
  --line:#dce5ed;
  --surface:#fff;
  --canvas:#f2f5f8;
  --shadow:0 2px 4px #0b162005,0 12px 35px #17344b07;
  font-family:"Schibsted Grotesk","Segoe UI",Arial,sans-serif;
  color:var(--text);
  background:var(--canvas);
  font-synthesis:none;
  font-size:16px;
}
* {box-sizing:border-box}
body {margin:0}
button,input,select,textarea {font:inherit;color:inherit}
button,a,input,textarea,select {outline-offset:3px}
:focus-visible {outline:2px solid #3986d0}
a {color:inherit;text-decoration:none}
button {cursor:pointer}
button:disabled {cursor:wait;opacity:.6}
button:hover:not(:disabled) {filter:brightness(.96)}
img {display:block;max-width:100%}
h1,h2,h3,p {margin:0}
small {font-size:.8125rem}
[hidden] {display:none!important}
.i {width:18px;height:18px;display:inline-block;vertical-align:middle;flex:0 0 auto;opacity:.78}
.i.small {width:15px;height:15px}
.i.large {width:24px;height:24px}
.sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.loading {display:grid;gap:1rem;place-content:center;min-height:100vh;text-align:center;color:var(--muted)}
.layout {display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100vh}
.sidebar {background:var(--navy);color:#d6e3ee;display:flex;flex-direction:column;position:sticky;top:0;height:100dvh;padding:26px 16px 15px;z-index:4}
.brand {display:flex;gap:10px;align-items:center;color:#f5f9ff;margin:0 6px 31px}
.brand img {width:44px;height:44px;border-radius:9px;object-fit:cover;background:var(--navy)}
.brand strong {display:block;font-weight:750;font-size:1.21rem;letter-spacing:-.025em;line-height:1.1}
.brand small {display:block;font-size:.75rem;color:#9eb5c8;margin-top:4px}
.sidebar nav {flex:1;overflow:auto}
.nav-group {font-size:.75rem;font-weight:700;color:#91aabd;letter-spacing:.07em;margin:22px 12px 8px;text-transform:uppercase}
.nav-link {display:flex;align-items:center;gap:11px;min-height:43px;padding:8px 11px;border-radius:8px;font-size:.91rem;margin:2px 0}
.nav-link .i,.sidebar .i,.hero .i {filter:invert(1)}
.nav-link:hover {background:#142b3e}
.nav-link.active {color:#e4f4ff;font-weight:680;background:#1a354c;box-shadow:inset 3px 0 var(--bright)}
.sidebar-bottom {border-top:1px solid #203443;display:flex;align-items:center;gap:9px;padding:15px 4px 0;margin-top:14px}
.avatar {background:#203c53;color:#d1eaff;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;font-size:.74rem;font-weight:750;flex:none}
.profile {flex:1;min-width:0}
.profile strong,.profile small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile strong {font-size:.86rem;color:#f1f7fb}
.profile small {font-size:.72rem;color:#9cb0c0;margin-top:2px}
.main-area {min-width:0}
.topbar {height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:0 clamp(17px,3vw,42px)}
.breadcrumb {display:flex;align-items:center;gap:10px;font-size:.88rem;color:var(--muted);margin-right:auto}
.breadcrumb strong {color:var(--text)}
.button {min-height:40px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:680;font-size:.875rem;padding:8px 13px;text-align:center;white-space:nowrap}
.button.primary {background:var(--blue);color:white;border-color:var(--blue)}
.button.primary:hover {background:var(--blue-dark)}
.button.primary .i {filter:invert(1);opacity:1}
.button.icon {width:36px;min-height:36px;padding:5px;flex:none}
.button.subtle,.button.global-search {background:transparent}
.button.subtle {border-color:transparent}
.sidebar .button.subtle {color:#fff}
.button.global-search {border-color:var(--line);color:var(--muted);min-width:198px;justify-content:flex-start}
kbd {border:1px solid var(--line);background:var(--canvas);border-radius:4px;padding:2px 4px;font-size:.7rem;margin-left:auto}
.mobile-toggle {display:none!important}
.content {padding:28px clamp(17px,3vw,42px) 40px;max-width:1660px;margin:auto}
.dashboard {display:grid;gap:20px}
.hero {min-height:162px;padding:26px 28px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px;position:relative;isolation:isolate;overflow:hidden;color:#fff;background:linear-gradient(103deg,#0b1620 8%,#142c42 74%,#183b57);border-radius:14px}
.hero::after {content:"";position:absolute;inset:-70px -32px -130px 51%;transform:rotate(-18deg);z-index:-1;background:repeating-linear-gradient(90deg,transparent 0 30px,#8fc6ea15 31px 32px,transparent 33px 54px);mask-image:linear-gradient(90deg,transparent,#000 76%)}
.hero-date {display:flex;align-items:center;gap:7px;color:#badbf1;font-size:.86rem;margin-bottom:11px;text-transform:capitalize}
h1 {font-size:clamp(1.8rem,3vw,2.6rem);letter-spacing:-.04em;line-height:1.05;font-weight:750}
.hero p {margin-top:10px;color:#c2d6e7}
.hero-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hero .primary {background:#8fc6ea;border-color:#8fc6ea;color:#0b263c}
.hero .primary:hover {background:#addefc}
.hero .primary .i {filter:none}
.button.hero-secondary {background:#ffffff0d;border-color:#9ec0db69;color:#fff}
.metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.metric {min-width:0;display:flex;flex-direction:column;gap:7px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow);padding:15px 16px}
.metric:hover,.card a:hover {border-color:#9fbbd3}
.metric-top {display:flex;align-items:center;gap:9px;font-size:.88rem;color:#435970;font-weight:650}
.metric-icon,.feed-icon,.login-lock {width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:none;background:#e9f2fa}
.metric strong {font-size:clamp(1.35rem,2.15vw,1.92rem);letter-spacing:-.035em;line-height:1.12;overflow-wrap:anywhere}
.metric small,.feed small,.table-wrap small {color:var(--muted)}
.metric-icon.amber {background:#fdf2d7}
.metric-icon.green {background:#e6f4eb}
.dashboard-grid {display:grid;grid-template-columns:minmax(0,1.16fr) minmax(0,1fr);gap:18px}
.card {min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.card-head {display:flex;align-items:center;justify-content:space-between;gap:14px;padding:17px 18px;border-bottom:1px solid var(--line)}
.card-head h2 {font-size:1.05rem;letter-spacing:-.016em}
.text-action {color:var(--blue);font-weight:700;font-size:.85rem}
.text-action:hover,.record-link:hover {text-decoration:underline}
.feed {padding:1px 17px}
.feed-row {display:grid;grid-template-columns:auto minmax(0,1fr) max-content;gap:11px;align-items:center;padding:13px 0}
.feed-row + .feed-row {border-top:1px solid var(--line)}
.feed-icon.red {background:#fce9e9}
.feed small {display:block;margin-top:4px}
.feed-end {text-align:right}
.feed-end strong {font-size:.87rem;text-transform:capitalize}
.record-link {display:inline;min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:left;font-weight:700;color:#1d4269;background:none;border:0;padding:0;line-height:1.35}
.funnel {display:grid;gap:16px;padding:21px 19px 25px}
.funnel-row {display:grid;grid-template-columns:94px minmax(50px,1fr) 27px;gap:8px;align-items:center;font-size:.85rem}
.funnel-row strong {text-align:right}
.funnel progress {appearance:none;width:100%;height:9px;border:0;border-radius:9px;overflow:hidden;background:#eaf0f5}
.funnel progress::-webkit-progress-bar {background:#eaf0f5}
.funnel progress::-webkit-progress-value {background:#4085c2;border-radius:9px}
.funnel progress::-moz-progress-bar {background:#4085c2}
.funnel .stage-1::-webkit-progress-value {background:#528db5}
.funnel .stage-2::-webkit-progress-value {background:#295e97}
.funnel .stage-3::-webkit-progress-value {background:#143f6e}
.finance-metrics {grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:19px}
.finance-overview .finance-metrics {padding:15px 17px 17px;margin:0}
.page-head {display:flex;justify-content:space-between;align-items:center;gap:15px;margin:6px 0 22px}
.page-head p {color:var(--muted);margin-top:9px}
.toolbar {display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:0 0 15px}
.search-box {display:flex;align-items:center;gap:8px;min-width:180px;min-height:40px;padding:0 11px;border:1px solid var(--line);border-radius:8px;background:white}
.search-box:focus-within {outline:2px solid #3986d0;outline-offset:2px}
.search-box input {padding:8px 0;min-width:0;width:100%;border:0;outline:0;font-size:.875rem;background:transparent}
.toolbar .search-box {flex:1 1 225px}
select,.month-filter {min-height:40px;border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:#fff;font-size:.875rem}
.toolbar select {max-width:100%;min-width:140px}
.month-filter input {min-width:0;max-width:140px;border:0;background:transparent}
.view-switch {display:flex;gap:2px;padding:2px;border-radius:9px;border:1px solid var(--line);background:#fff}
.view-switch .button {border:0;border-radius:6px;min-height:34px}
.view-switch [aria-pressed=true] {background:#e5f0fa}
.table-wrap {overflow-x:auto}
table {border-collapse:collapse;width:100%;text-align:left;font-size:.91rem}
th,td {padding:13px 16px;border-bottom:1px solid #e8eef3}
th {background:#f7f9fb;color:#475c71;font-size:.8125rem;white-space:nowrap}
td {overflow-wrap:anywhere}
td:last-child {width:54px;padding:4px 9px;text-align:right}
td small {display:block;margin-top:4px}
tbody tr:hover {background:#f7fbff}
tbody tr:last-child td {border-bottom:0}
.table-count {padding:10px 16px;border-top:1px solid var(--line);font-size:.82rem;color:var(--muted)}
.badge {display:inline-flex;align-items:center;font-size:.78rem;font-weight:720;border-radius:20px;padding:4px 8px;white-space:nowrap}
.badge.blue {background:#e7f1fb;color:#194f83}
.badge.green {background:#e0f2e7;color:#22593b}
.badge.amber {background:#fff1d1;color:#795000}
.badge.violet {background:#ede9fa;color:#554092}
.badge.red {background:#fce8e8;color:#8e3134}
.badge.neutral {background:#edf1f4;color:#435563}
.empty {display:grid;justify-items:center;align-content:center;text-align:center;gap:10px;padding:30px 15px;min-height:145px;color:var(--muted)}
.empty .i {opacity:.55}
.board {display:grid;grid-auto-flow:column;grid-auto-columns:minmax(184px,1fr);overflow-x:auto;gap:10px;padding-bottom:12px}
.lane {min-height:250px;border:1px solid var(--line);background:#eaf0f5;border-radius:10px;padding:12px}
.lane header,.deal-card footer {display:flex;justify-content:space-between;align-items:center;gap:6px}
.lane header h2 {font-size:.875rem}
.lane header span:not(.badge) {color:var(--muted);font-size:.85rem}
.lane p {font-weight:700;margin:7px 0 13px}
.deal-card {display:grid;gap:6px;padding:11px;background:#fff;border:1px solid var(--line);border-radius:8px;margin-bottom:8px}
.deal-card small,.lane-empty {color:var(--muted)}
.deal-card footer {margin-top:6px;align-items:flex-end;font-size:.81rem}
.lane-add {margin-top:13px;background:transparent;width:100%;border:1px dashed #a9bccd}
.calendar .card-head h2 {text-transform:capitalize}
.calendar-controls {display:flex;gap:4px}
.calendar-scroll {overflow:auto}
.calendar-grid {display:grid;grid-template-columns:repeat(7,minmax(100px,1fr))}
.calendar-day {font-size:.85rem;padding:10px;text-align:center;background:#f7f9fb;color:var(--muted)}
.calendar-cell {border-top:1px solid var(--line);border-right:1px solid var(--line);min-height:90px;padding:6px;overflow:hidden}
.calendar-cell.current {background:#f0f7fd}
.calendar-cell.pad {background:#f7f9fb}
.calendar-cell span {display:inline-block;margin:2px 4px;font-weight:700;font-size:.875rem}
.calendar-entry {display:grid;gap:3px;padding:5px;border-radius:6px;margin:5px 0;background:#e7f1fb;font-size:.82rem}
.calendar-entry.late {background:#fce8e8}
dialog {width:min(680px,100%);max-height:100dvh;height:100dvh;max-width:100%;margin:0 0 0 auto;border:0;border-left:1px solid var(--line);padding:0;color:var(--text);box-shadow:-20px 0 50px #0b16202a}
dialog::backdrop {background:#08162377}
.panel-head {position:sticky;top:0;background:#fff;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:21px 24px;border-bottom:1px solid var(--line)}
.panel-head h2 {font-size:1.55rem;letter-spacing:-.032em;overflow-wrap:anywhere}
.panel-head small {display:block;color:var(--muted);margin-bottom:4px}
.panel-body {padding:20px 24px 30px}
.detail-actions {display:flex;flex-wrap:wrap;gap:7px;margin-bottom:17px}
.details,.fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.details {margin:0;background:var(--canvas);padding:16px;border-radius:10px}
.details dt,.fields label,.items legend {font-weight:650;font-size:.875rem}
.details dt {color:var(--muted)}
.details dd {margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.wide {grid-column:1/-1}
.detail-section {padding:17px 0;border-bottom:1px solid var(--line)}
.detail-section h3 {font-size:1.02rem;margin-bottom:8px}
.detail-section h3 small,.muted,.related small,.timeline small {color:var(--muted)}
.related,.timeline {list-style:none;margin:0;padding:0}
.related li,.timeline li {padding:8px 0;display:flex;justify-content:space-between;align-items:baseline;gap:12px;border-bottom:1px solid #edf1f5;overflow-wrap:anywhere}
.timeline li div {display:grid;gap:3px}
.timeline li span {font-size:.875rem;color:var(--muted)}
.timeline li small {white-space:nowrap}
.form-error {background:#fbe8e8;color:#8e272b;border:1px solid #f2bfc1;border-radius:8px;padding:10px 12px;margin:12px 0;font-size:.88rem}
.fields input,.fields textarea,.fields select {display:block;width:100%;min-height:40px;border:1px solid #c8d6e2;border-radius:7px;background:#fff;padding:8px 10px;margin-top:5px;font-size:.95rem;font-weight:400}
.fields textarea {resize:vertical}
.panel-foot {display:flex;justify-content:flex-end;gap:8px;margin-top:20px;border-top:1px solid var(--line);padding-top:16px}
.items {border:1px solid var(--line);border-radius:8px;padding:12px;min-width:0;margin:0}
.item-line {display:grid;grid-template-columns:minmax(90px,1fr) minmax(55px,.32fr) minmax(85px,.56fr) 34px;gap:6px;margin-bottom:10px;align-items:end}
#items-total {font-weight:700;margin-left:12px}
.attach-form {display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-top:12px}
.attach-form label {display:grid;gap:5px;font-size:.875rem}
.attach-form .form-error {width:100%}
.toast {position:fixed;right:20px;bottom:20px;z-index:5;background:#10293d;color:#fff;padding:12px 17px;border-radius:9px;box-shadow:var(--shadow);max-width:calc(100vw - 40px)}
.login {min-height:100dvh;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.login-intro {position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;justify-content:center;min-height:530px;padding:50px clamp(24px,6vw,100px);color:#fff;background:linear-gradient(140deg,#0b1620,#142e44)}
.login-intro .brand {position:absolute;top:30px;left:clamp(18px,5vw,90px);margin:0}
.login-copy {max-width:550px}
.login-copy h1 {font-size:clamp(2.4rem,5.5vw,5.1rem);line-height:1.03}
.login-copy p {margin-top:22px;color:#bdd6e9;max-width:420px;font-size:1.08rem}
.login-watermark {position:absolute;width:min(55vw,530px);bottom:-21%;right:-18%;z-index:-1;opacity:.17;mix-blend-mode:screen}
.login-card {align-self:center;margin:35px auto;padding:25px clamp(18px,4vw,55px);width:min(100%,490px)}
.login-lock {width:53px;height:53px;margin-bottom:16px}
.login-card h2 {font-size:1.8rem;letter-spacing:-.03em}
.login-card p {margin:9px 0 17px;color:var(--muted)}
.login-card small {display:block;margin-top:12px;color:var(--muted)}
.setup-notice {border:1px solid var(--line);background:#fff;border-radius:8px;padding:13px}
.ms-mark {display:grid;width:16px;height:16px;background:conic-gradient(#7fba00 0 25%,#ffb900 0 50%,#00a4ef 0 75%,#f25022 0);border:1px solid #ffffff6b}
#global-results {margin-top:15px}
@media (max-width:1050px) {
  .layout {grid-template-columns:200px minmax(0,1fr)}
  .metrics:not(.finance-metrics) {grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero {align-items:flex-start;flex-direction:column}
}
@media (max-width:760px) {
  .layout {display:block}
  .sidebar {position:fixed;left:0;top:60px;bottom:0;width:min(245px,85vw);height:calc(100dvh - 60px);display:none;box-shadow:15px 0 30px #0b16203b}
  .sidebar.shown {display:flex}
  .topbar {height:60px;position:sticky;top:0;z-index:4}
  .mobile-toggle {display:inline-flex!important}
  .global-search {min-width:0!important}
  .global-search kbd {display:none}
  .content {padding-top:18px}
  .dashboard-grid {grid-template-columns:1fr}
  .hero {padding:20px}
  .finance-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
  .finance-metrics .metric:last-child {grid-column:1/-1}
  .page-head {align-items:flex-start;flex-direction:column}
  .login {grid-template-columns:1fr}
  .login-intro {min-height:310px;padding-top:105px;padding-bottom:33px}
  .login-card {margin-top:14px;padding-top:12px}
  .login-watermark {width:300px}
  .panel-body,.panel-head {padding-left:16px;padding-right:16px}
}
@media (max-width:480px) {
  .content {padding-left:12px;padding-right:12px}
  .global-search span {display:none}
  .metric {padding:11px}
  .metric-top {gap:5px}
  .metric-icon {width:27px;height:27px}
  .details,.fields {grid-template-columns:1fr}
  .timeline li {flex-wrap:wrap}
  table,tbody {display:block}
  thead {display:none}
  tr {display:grid;position:relative;gap:6px;padding:12px 48px 12px 13px;border-bottom:1px solid var(--line)}
  tr td {padding:0;border:0;overflow-wrap:anywhere;display:flex;align-items:baseline;gap:7px}
  tr td:first-child {display:block}
  tr td:not(:first-child):not(:last-child)::before {content:attr(data-label);color:var(--muted);font-size:.8rem}
  tr td:last-child {position:absolute;right:4px;top:8px}
}
