/* Appskall fra IN-portalen: NBBO-logo, varme flater og turkise handlinger. */
:root {
  font-family: Soleto, Arial, Helvetica, sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.55;
  color: #242424;
  background: #f5f4f2;
  --brand: #007f91;
  --accent: #006c7c;
  --border: #d3d0cb;
  --muted: #595652;
  --surface: #eceae6;
  --error: #9f2d20;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 10; background: white; padding: 12px 20px; }
.skip-link:focus { top: 10px; }
.topbar {
  min-height: 96px;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 28px; text-decoration: none; }
.nbbo-logo { display: block; width: 120px; height: auto; flex: none; }
.brand span { color: var(--muted); font-size: 15px; padding-left: 28px; border-left: 1px solid var(--border); }
.account { display: flex; align-items: center; gap: 14px; font-size: 14px; min-width: 0; }
#staff-name { overflow-wrap: anywhere; }
#logout { flex: none; }
.profile-initials { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; color: var(--accent); background: #e3f1f1; font-weight: 700; }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 96px); }
.sidebar { display: flex; flex-direction: column; background: var(--surface); padding: 36px 20px 24px; border-right: 1px solid var(--border); }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { min-height: 48px; padding: 12px 14px; text-align: left; color: #3d3936; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 15px; }
.nav-item.active { background: white; color: var(--accent); border-color: var(--border); box-shadow: inset 3px 0 var(--accent); font-weight: 700; }
.nav-item:hover { background: #f5f4f2; }
.sidebar-bottom { margin-top: auto; padding: 40px 14px 0; color: var(--muted); font-size: 13px; }
#main-content { min-width: 0; width: 100%; max-width: 1420px; margin: 0 auto; padding: 44px 48px; }
.in-login { min-height: calc(100vh - 96px); display: grid; place-items: start center; padding: 12vh 20px 32px; }
.in-login-card { width: min(100%, 420px); padding: 40px 34px; text-align: center; border: 1px solid var(--border); border-radius: 14px; background: white; }
.in-login-card p { color: var(--muted); margin: 0 0 24px; }
.in-login-card p:last-child { margin-bottom: 0; }
.microsoft-mark { width: 14px; height: 14px; display: grid; place-self: center; background: conic-gradient(#7fba00 0 25%, #ffb900 25% 50%, #00a4ef 50% 75%, #f25022 75% 100%); border: 1px solid white; }
h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.2; letter-spacing: -.7px; }
h2 { margin: 0; font-size: 20px; line-height: 1.35; }
h3 { margin: 0; font-size: 15px; }
.page-heading { margin-bottom: 26px; }
.page-heading p, .muted { color: var(--muted); margin: 0; }
.demo-note { width: fit-content; margin: 0 0 24px; border: 1px solid #c5dfe0; border-radius: 6px; background: #eaf5f4; padding: 6px 11px; color: #165761; font-size: 13px; }
.card { min-width: 0; background: white; padding: 24px; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 3px 12px #24242405; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { overflow-wrap: anywhere; }
.card-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.connections, .accounting-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.accounting-grid { margin-top: 20px; }
.connection > p:not(.message) { color: var(--muted); margin: 10px 0 18px; }
.status { display: inline-block; border-radius: 999px; background: var(--surface); color: var(--muted); padding: 3px 10px; font-size: 13px; }
.status[data-state="ok"] { background: #dbf4e6; color: #205c3c; }
.status[data-state="error"] { background: #fce7e1; color: var(--error); }
.primary, .secondary, .text-button { display: inline-flex; gap: 9px; justify-content: center; align-items: center; min-height: 38px; font-size: 14px; font-weight: 700; }
.primary, .secondary { padding: 8px 13px; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--accent); text-decoration: none; }
.primary { background: var(--brand); border-color: var(--accent); color: white; }
.primary:hover:not(:disabled) { background: #005968; }
.secondary:hover:not(:disabled) { background: #f5f4f2; }
.text-button { padding: 6px 0; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.message { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.message:empty { display: none; }
.message.error { color: var(--error); }
#global-error { margin: 0 0 20px; }
.document-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 20px; }
.document-list { list-style: none; padding: 0; margin: 12px 0 0; }
.document-list li { border-top: 1px solid #e9e5df; display: flex; padding: 8px 0; gap: 10px; }
.document-list button { text-align: left; justify-content: flex-start; overflow-wrap: anywhere; }
.document-size { margin: auto 0 auto auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pages { display: grid; gap: 10px; margin-top: 14px; }
.pages details { border: 1px solid var(--border); border-radius: 6px; padding: 9px 12px; }
.pages summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.page-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 440px; overflow: auto; font-size: 13px; line-height: 1.55; }
.search-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.search-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.search-form input, .search-form select { min-height: 42px; min-width: 110px; max-width: 100%; background: white; color: inherit; border: 1px solid #88837d; border-radius: 6px; padding: 6px 10px; font-weight: 400; }
.search-form button { min-height: 42px; }
#client-data { margin-top: 20px; }
#client-data > h2 { margin-bottom: 4px; }
.related-accounts { display: flex; flex-wrap: wrap; gap: 22px 38px; margin: 16px 0 20px; }
.related-accounts ul { font-size: 14px; margin: 4px 0 0; padding-left: 18px; }
.table-wrap { overflow: auto; margin-top: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #e9e5df; }
th { background: #f5f4f2; }
.amount { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1050px) {
  .layout { grid-template-columns: 176px minmax(0, 1fr); }
  #main-content { padding: 32px 26px; }
  .document-grid, .accounting-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .topbar { min-height: 76px; gap: 12px; padding: 16px; }
  .nbbo-logo { width: 86px; }
  .brand { gap: 10px; }
  .brand span { padding-left: 10px; font-size: 14px; }
  .account { gap: 8px; }
  #staff-name { display: none; }
  .layout { display: block; }
  .sidebar { padding: 9px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { display: flex; gap: 4px; flex-wrap: wrap; }
  .nav-item { min-height: 40px; padding: 8px 9px; font-size: 14px; }
  .sidebar-bottom { display: none; }
  #main-content { padding: 26px 16px; }
  .connections { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  h1 { font-size: 27px; }
}
