@font-face {
  font-family: Manrope;
  src: url("../assets/manrope.woff2") format("woff2"), url("../assets/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --petrol: #005a76;
  --petrol-dark: #06475b;
  --ink: #173644;
  --muted: #536973;
  --paper: #fff;
  --canvas: #f3f7f8;
  --line: #d6e1e5;
  --lime: #92c600;
  --soft-lime: #e7f3ca;
  --radius: 13px;
  --header: 64px;
  --sidebar: 249px;
  --offset: var(--sidebar);
  font-family: Manrope, system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
.admin {
  --petrol-dark: #06475b;
  --ink: #102f42;
  --muted: #35566e;
  --paper: #fcfdfe;
  --line: #c7e0ef;
  --soft-lime: #e2f1d0;
  --radius: 17px;
  --sidebar: 14.3rem;
  background: radial-gradient(ellipse at 61% 28%, #fbfdfe 10%, #eff7fa 100%);
}
body.rail-mode { --offset: 66px; }
button, input, select, textarea { font: inherit; }
button, [type="button"], summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: var(--petrol); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #1383a5; outline-offset: 3px; }
::selection { color: #123b3d; background: #daedab; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 2rem; font-weight: 800; line-height: 1.14; letter-spacing: -.035em; color: #123845; }
h2 { font-size: 1.15rem; font-weight: 800; line-height: 1.3; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -.015em; }
small, .hint, .muted { color: var(--muted); }
.hint { font-size: .85rem; line-height: 1.5; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; z-index: 40; inset: 8px auto auto 8px;
  background: white; padding: .65rem .9rem; border-radius: 7px;
}
.icon {
  width: 1.22rem; height: 1.22rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.icon-button {
  display: inline-grid; place-items: center; width: 2.48rem; min-height: 2.48rem;
  padding: .4rem; border: 0; border-radius: 8px; color: inherit; background: transparent;
}
.icon-button:hover { background: #dbecef; }

.workspace-bar {
  position: fixed; z-index: 10; inset: 0 0 auto 0; height: var(--header);
  display: flex; align-items: center; gap: .85rem; padding: 0 1.55rem;
  color: white; background: var(--petrol);
}
.workspace-bar a { color: inherit; }
.workspace-bar :focus-visible { outline-color: #d7f589; }
.workspace-bar .icon-button:hover { background: #ffffff24; }
.workspace-name { font-size: .99rem; font-weight: 800; white-space: nowrap; text-decoration: none; letter-spacing: -.01em; }
.workspace-name span { color: #d6ef9c; margin-left: .23rem; }
.admin .workspace-bar {
  gap: 1.15rem;
  padding-inline: .85rem 2.2rem;
  background: linear-gradient(106deg, #07536b, #006278 65%, #00495e);
  border-bottom-right-radius: 2.35rem;
}
.admin .workspace-bar .icon-button { border: 1px solid #a2c4ce80; flex: none; }
.workspace-brand { flex: none; }
.workspace-brand img { display: block; width: 7rem; filter: brightness(0) invert(1); }
.admin .workspace-name {
  display: inline-flex; align-items: center; gap: .6rem;
  padding-inline-start: 1.45rem; border-inline-start: 1px solid #83adba;
  font-size: 1.23rem; line-height: 1.2;
}
.admin .workspace-name span { color: inherit; margin: 0; }
.workspace-tools { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
.workspace-search { position: relative; }
.search-toggle {
  display: flex; align-items: center; gap: .62rem; min-width: 15.75rem; min-height: 2.45rem;
  border-radius: 8px; border: 1px solid #ffffff36; color: white; background: #004c67;
  padding: .45rem .57rem; font-size: .8rem; text-align: left;
}
.search-toggle:hover { background: #003a4f; }
kbd {
  margin-left: auto; padding: .14rem .26rem; border: 1px solid #ffffff5c; border-radius: 4px;
  color: #f2f8fb; font: inherit; font-size: .7rem;
}
.search-popover, .workspace-account > div {
  position: absolute; top: calc(100% + .65rem); right: 0; z-index: 12;
  padding: .64rem; border: 1px solid var(--line); border-radius: 10px; background: white;
  color: var(--ink); box-shadow: 0 14px 24px #17364424;
}
.search-popover { width: min(23rem, calc(100vw - 1.6rem)); }
.search-popover label { display: block; margin: .1rem 0 .4rem; font-weight: 800; font-size: .83rem; }
#global-results { margin-top: .4rem; max-height: 20rem; overflow: auto; }
.search-popover #global-results > a, .workspace-account > div :is(a,button) {
  display: block; width: 100%; padding: .46rem .55rem; border: 0; border-radius: 5px;
  color: var(--petrol-dark); background: white; font-size: .84rem; font-weight: 700;
  text-align: left; text-decoration: none;
}
.search-popover #global-results > a:hover, .workspace-account > div :is(a,button):hover { background: #ebf4f6; }
#global-results > p { padding: .5rem; color: var(--muted); font-size: .84rem; }
.workspace-account { position: relative; max-width: 12.5rem; }
.workspace-account summary { display: flex; align-items: center; gap: .58rem; list-style: none; }
.workspace-account summary::-webkit-details-marker { display: none; }
.workspace-account #account-name { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: .83rem; }
.account-identity { min-width: 0; line-height: 1.35; }
.account-identity > * { display: block; }
.account-identity small { white-space: nowrap; color: #d5edf0; font-size: .76rem; }
.account-chevron { width: .9rem; height: .9rem; }
.workspace-account[open] .account-chevron { transform: rotate(180deg); }
.workspace-account > div { min-width: 12rem; }
.account-avatar {
  display: grid; place-items: center; flex: none; width: 2.35rem; height: 2.35rem; border-radius: 50%;
  color: var(--petrol); background: #f8fdff;
}

.workspace-sidebar {
  display: flex; flex-direction: column; gap: .2rem; position: fixed; z-index: 8;
  inset: var(--header) auto 0 0; width: var(--offset); padding: 1rem .75rem 0;
  border-top-left-radius: 2.35rem; border-right: 1px solid #dce9f0;
  background:
    radial-gradient(ellipse 10rem 8rem at -4.2rem calc(100% + 6.2rem), #006881 98%, transparent),
    radial-gradient(ellipse 12rem 5rem at 0 calc(100% + 3.8rem), #9bc900 98%, transparent),
    linear-gradient(155deg, #f2f8fb, #e8f2f7);
  overflow: auto; overscroll-behavior: contain;
}
.admin::before {
  content: ""; position: fixed; inset: var(--header) auto auto 0; z-index: 8;
  width: 2.35rem; height: 2.35rem; pointer-events: none;
  background: radial-gradient(circle 2.35rem at bottom right, transparent 97%, #07536b 100%);
}
.rail-mode .workspace-sidebar { border-radius: 0; }
.admin.rail-mode::before { display: none; }
#sidebar-main { display: grid; gap: .24rem; }
#sidebar-footer { display: grid; gap: .2rem; margin-top: auto; padding: .58rem 0 .85rem; border-top: 1px solid var(--line); }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: .59rem; min-height: 2.61rem;
  padding: .5rem .66rem; border: 0; border-radius: .6rem; background: none; color: var(--ink);
  font-weight: 650; font-size: .86rem; text-align: left; text-decoration: none;
}
.nav-item:hover { background: #dbecef; }
.nav-item[aria-current="page"], .nav-group-current > .nav-item { background: var(--soft-lime); color: #153518; font-weight: 800; }
.nav-chevron { margin-left: auto; width: .9rem; height: .9rem; }
.nav-item[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-submenu { list-style: none; margin: .2rem 0 .35rem 1.22rem; padding: 0 0 0 .56rem; border-left: 1px solid #dce7eb; }
.nav-submenu a {
  display: block; padding: .48rem .55rem; border-radius: 7px;
  color: #4a616a; font-size: .82rem; font-weight: 700; text-decoration: none; line-height: 1.22;
}
.nav-submenu a:hover { background: #eaf4f7; color: var(--petrol-dark); }
.nav-submenu a[aria-current="page"] { background: var(--soft-lime); color: #294b16; font-weight: 800; }
.rail-mode .workspace-sidebar { padding-inline: .54rem; }
.rail-mode .nav-item { justify-content: center; padding-inline: .17rem; }
.rail-mode .nav-chevron, .rail-mode .nav-item span, .rail-mode .nav-submenu { display: none; }
#sidebar-overlay {
  position: fixed; z-index: 6; inset: var(--header) 0 0; width: 100%;
  background: #0d394566; border: none;
}

.workspace-main { margin-left: var(--offset); padding-top: var(--header); min-width: 0; }
.workspace-inner { padding: 1rem clamp(1rem, 2vw, 2.4rem) 2.7rem; }
.workspace-context {
  display: flex; justify-content: space-between; gap: .4rem .8rem; align-items: center;
  flex-wrap: wrap; margin: 0 0 .65rem; font-size: .8rem; color: #4e6068;
}
#breadcrumb { display: inline-flex; gap: .23rem; align-items: center; flex-wrap: wrap; }
#breadcrumb a { text-decoration: none; }
#breadcrumb a:hover { text-decoration: underline; }
#breadcrumb .icon { width: .75rem; height: .75rem; color: #59747e; }
#breadcrumb [aria-current] { color: #244956; font-weight: 800; }
.demo-label { color: #455e3f; font-weight: 750; }
.admin h1 { color: #083b4d; }
.page-heading {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
  gap: .75rem; margin: 0 0 1.1rem;
}
.page-heading p { margin-top: .38rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.dashboard-heading h1 { font-size: 2.2rem; }
.dashboard-heading p { font-size: 1rem; }
.page-heading h1:focus { outline: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin: 0 0 .88rem; }
.section-heading h2 { min-width: 0; }
.section-link { display: inline-flex; color: var(--petrol-dark); gap: .35rem; font-size: .81rem; font-weight: 800; white-space: nowrap; text-decoration: none; }
.section-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.surface {
  min-width: 0; padding: 1.15rem 1.23rem; margin: 0 0 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.surface > p { line-height: 1.55; }
.surface > p + p { margin-top: .65rem; }
.admin .surface { box-shadow: 0 .32rem 1rem #0b567b0c; }
.section-empty { padding: .4rem 0 .65rem; font-size: .86rem; }
.grid-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.stack { display: grid; gap: .7rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.primary, .outline, .button {
  display: inline-flex; justify-content: center; align-items: center; gap: .42rem; min-height: 2.55rem;
  padding: .52rem .77rem; border: 1px solid var(--line); border-radius: 8px;
  color: var(--petrol-dark); background: white; font-size: .83rem; line-height: 1.16;
  font-weight: 800; text-decoration: none; text-align: center;
}
.outline:hover, .button:hover { border-color: #9dbbc5; background: #edf5f8; }
.primary { color: #18370c; background: #aed841; border-color: #9fc533; }
.primary:hover { background: #9eca2a; border-color: #8bb420; }
.admin :is(.primary, .outline, .button) { border-radius: .85rem; }
.admin .primary { background: #a3ca2c; border-color: #a3ca2c; }
.admin .primary:hover { background: #92bc1c; border-color: #92bc1c; }
.primary .icon, .outline .icon, .button .icon { width: 1rem; height: 1rem; }
.link-button, .text-action {
  padding: 0; border: 0; background: transparent; color: var(--petrol-dark);
  font-weight: 800; font-size: .84rem; text-underline-offset: 3px;
}
.link-button:hover, .text-action:hover { text-decoration: underline; }
button.danger { border-color: #dea9a3; color: #943428; background: #fff5f4; }

input:not([type=checkbox],[type=radio]), select, textarea {
  width: 100%; min-height: 2.55rem; padding: .5rem .63rem;
  color: var(--ink); background: white; border: 1px solid #afc3cb; border-radius: 7px;
}
textarea { min-height: 5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #637982; opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: #598200; }
input[type=file] { font-size: .82rem; }
input[type=file]::file-selector-button {
  color: var(--petrol-dark); background: #ecf5f8; border: 1px solid var(--line);
  border-radius: 5px; padding: .31rem .5rem; margin-right: .6rem; font: inherit;
}
.field, .fields label { display: grid; gap: .3rem; min-width: 0; font-size: .84rem; font-weight: 750; }
.fields { display: grid; gap: .75rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.fields .wide, .field-wide { grid-column: 1 / -1; }
fieldset { margin: 0; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
legend { font-weight: 800; padding: 0 .35rem; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; border-spacing: 0; text-align: left; font-size: .83rem; }
table th {
  padding: .63rem .62rem; border-bottom: 1px solid var(--line);
  background: #f2f7f8; color: #465f69; font-weight: 800;
}
table td { padding: .64rem .62rem; border-bottom: 1px solid #e5ecef; vertical-align: middle; }
table tr:last-child td { border-bottom-color: transparent; }
table tbody tr:hover { background: #f8fbfc; }
table a { color: var(--petrol-dark); font-weight: 800; text-underline-offset: 3px; }
table .empty-cell { text-align: center; color: var(--muted); padding: 1.2rem; }
.badge {
  display: inline-flex; align-items: center; gap: .22rem; border-radius: 5px;
  padding: .24rem .45rem; background: #edf4f7; color: #28566a;
  font-size: .73rem; font-weight: 800; line-height: 1.16;
}
.badge--success { background: #e7f3d2; color: #335619; }
.badge--warning { background: #fff1d9; color: #75511e; }
.badge--danger { background: #f9e7e3; color: #902d23; }
.badge--info { background: #e4f2f6; color: #1d586e; }
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: .9rem; }
.tabs > :is(a,button) {
  border: 1px solid #d2dee3; background: white; color: var(--petrol-dark);
  padding: .45rem .64rem; border-radius: 7px; font-size: .82rem; font-weight: 800; text-decoration: none;
}
.tabs > :is([aria-current="page"],[aria-selected="true"],.active) { background: var(--soft-lime); border-color: #bada76; color: #294b16; }
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; margin: 0; }
.details-grid > div { padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.details-grid dt { color: var(--muted); font-size: .8rem; }
.details-grid dd { margin: .17rem 0 0; font-weight: 800; overflow-wrap: anywhere; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px,1fr); overflow-x: auto; gap: .65rem; padding-bottom: .5rem; }
.kanban-column { padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: #edf4f6; }
.kanban-column h3 { margin-bottom: .55rem; font-size: .85rem; }

dialog {
  width: min(42rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto;
  color: var(--ink); padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
}
dialog::backdrop { background: #092c3b8a; }
.toast {
  position: fixed; right: 1.2rem; bottom: 1.2rem; max-width: calc(100% - 2.4rem); z-index: 25;
  padding: .72rem .93rem; border-radius: 8px; color: white; background: var(--petrol-dark);
  font-size: .86rem; font-weight: 750; box-shadow: 0 8px 20px #062b3960;
}
.toast.error { background: #8b352a; }

.summary-strip {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin: 0 0 1rem;
}
.summary-strip a {
  display: grid; align-content: start; gap: .35rem; padding: .86rem 1rem;
  color: #083b4d; text-decoration: none; background: #f8fcfd;
  border: 1px solid #bdd9e6; border-radius: .8rem;
}
.summary-strip a:hover { background: #eaf5f9; border-color: #8db8cc; }
.summary-strip a:focus-visible { outline-offset: -3px; }
.summary-strip span { font-size: .85rem; color: var(--muted); line-height: 1.25; }
.summary-strip strong { font-size: 1.7rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dashboard-grid {
  display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr);
  gap: 1rem; margin: 0 0 1rem;
}
.dashboard-grid > .surface { margin-bottom: 0; }
.dashboard-pair, .dashboard-bottom { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dashboard-pair .actions :is(.primary, .outline) { min-height: 2.65rem; }
.chart-period select { min-height: 2.07rem; padding: .29rem .52rem; font-size: .78rem; }
.chart-layout { display: flex; gap: .65rem; height: 149px; margin: 1.18rem 0 .7rem; }
.chart-axis { display: flex; flex: none; flex-direction: column; justify-content: space-between; padding-bottom: 1.38rem; color: var(--muted); font-size: .71rem; }
.bar-chart {
  position: relative; display: flex; justify-content: space-evenly; align-items: stretch; gap: .35rem;
  width: 100%; color: #516774; font-size: .72rem;
}
.bar-chart::before {
  content: ""; position: absolute; inset: 6px 0 21px;
  background: repeating-linear-gradient(to top, #dce7eb 0 1px, transparent 1px 25%);
}
.chart-column { z-index: 1; display: flex; flex: 1; flex-direction: column; align-items: center; min-width: 0; }
.chart-column span { margin-top: .24rem; line-height: 1.2rem; }
.chart-bars {
  flex: 1; width: 100%; min-height: 0; display: flex; align-items: flex-end; justify-content: center;
  gap: .22rem; padding-top: 6px;
}
.bar { width: min(30%, 19px); height: var(--bar); display: block; border-radius: 3px 3px 0 0; }
.received { background: #16748d; }
.produced { background: #92bd31; }
.chart-key { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem .88rem; color: #4a626c; font-size: .75rem; font-weight: 700; }
.chart-key span { display: flex; align-items: center; gap: .34rem; }
.chart-key i { width: .58rem; height: .58rem; border-radius: 2px; }
.dashboard-list, .dashboard-bars { list-style: none; padding: 0; margin: 0; }
.dashboard-list > li {
  display: flex; align-items: center; gap: .58rem; padding: .48rem 0;
  border-bottom: 1px solid #e4ecef; font-size: .84rem;
}
.dashboard-list > li:last-child { border-bottom: 0; }
.dashboard-list > li > .icon { color: #21738d; }
.dashboard-list > li > div:last-child { margin-left: auto; text-align: right; }
.dashboard-list a { font-weight: 800; color: var(--petrol-dark); text-decoration: none; }
.dashboard-list a:hover { text-decoration: underline; }
.dashboard-list small { display: block; font-size: .73rem; margin-top: .09rem; }
.dashboard-list.activities > li > div:last-child { margin: 0; text-align: left; }
.activity-dot { width: .48rem; height: .48rem; border-radius: 50%; background: #538b9f; flex: none; margin: 0 .3rem; }
.stock-alert {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .53rem;
  padding: .62rem; border-radius: 8px; margin-top: .8rem; background: #f0f5e4; color: #395022;
  font-size: .75rem;
}
.stock-alert .icon { color: #5a7721; }
.stock-alert span { display: block; margin-top: .16rem; }
.stock-alert a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.dashboard-bars { display: grid; gap: .46rem; }
.dashboard-bars li { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) 1.2rem; align-items: center; gap: .5rem; font-size: .81rem; }
.dashboard-bars meter { width: 100%; block-size: .75rem; accent-color: #16748d; }
.dashboard-bars meter::-webkit-meter-bar { background: #e7f0f3; border: 0; border-radius: 4px; }
.dashboard-bars meter::-webkit-meter-optimum-value { background: #16748d; }
.finance-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem 1rem; margin: 0; }
.finance-summary div { border-bottom: 1px solid var(--line); padding: .1rem 0 .55rem; }
.finance-summary dt { color: var(--muted); font-weight: 750; font-size: .8rem; }
.finance-summary dd { margin: .18rem 0 0; font-size: 1.08rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.admin-login { display: flow-root; min-height: 100svh; background: #eaf3f6; }
.login-bar .workspace-name { border-left: 1px solid #75a3b2; padding-left: .91rem; }
.login-brand img { display: block; width: 4.8rem; filter: brightness(0) invert(1); }
.back-link {
  display: inline-flex; margin-left: auto; gap: .32rem; align-items: center;
  font-size: .81rem; font-weight: 750; text-underline-offset: 3px; white-space: nowrap;
}
.back-link .icon { width: 1rem; height: 1rem; }
.admin-login-main {
  display: grid;
  place-items: center;
  min-height: calc(100svh - var(--header));
  margin-top: var(--header);
  padding: clamp(.8rem,4vh,2.5rem) .8rem;
  background:
    radial-gradient(ellipse at 110% 112%, #d9eab9 0 20%, transparent 20.3%),
    radial-gradient(ellipse at -12% 104%, #d2e9ef 0 22%, transparent 22.3%),
    radial-gradient(ellipse at 50% 38%, #f9fcfd, #eaf3f6 72%);
}
.admin-login-center { width: min(100%,29rem); }
.login-panel {
  padding: clamp(1rem,4vw,1.75rem);
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.login-panel-logo { display: block; width: 8rem; margin: 0 auto 1.15rem; }
.admin-login-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.05rem; }
.security-icon {
  display: grid; place-items: center; flex: none; width: 2.9rem; height: 2.9rem;
  background: var(--soft-lime); color: #3b6310; border-radius: 13px;
}
.security-icon .icon { width: 1.65rem; height: 1.65rem; }
.login-panel h1 { font-size: clamp(1.25rem,4.5vw,1.62rem); line-height: 1.16; }
.login-description { margin: .28rem 0 0; color: var(--muted); font-size: .86rem; }
.login-form label { display: block; margin: .75rem 0 .3rem; color: #25434e; font-size: .83rem; font-weight: 800; }
.login-form input { min-height: 2.8rem; }
.password-field { position: relative; }
.password-field input { padding-right: 3rem; }
.password-field .icon-button { position: absolute; right: .16rem; top: .17rem; color: #315b69; }
.login-submit { min-height: 2.8rem; margin-top: 1rem; width: 100%; justify-content: space-between; padding-inline: .77rem; }
.login-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .9rem; margin-top: .75rem; }
.login-options .link-button { min-height: 2.5rem; }
.login-options .demo-entry { min-height: 2.5rem; padding: .48rem .78rem; background: #fff; }
.login-options .demo-entry:hover { background: #e9f4db; }
.demo-note { margin: .5rem 0 0; color: var(--muted); text-align: center; font-size: .77rem; }
.login-feedback { padding: .65rem .74rem; border-radius: 8px; font-size: .77rem; line-height: 1.45; }
.login-feedback { margin-top: .68rem; background: #e7f3f8; color: #215269; }
.login-feedback.error { background: #faebe8; color: #862b22; }

@media (max-width: 1050px) {
  .workspace-inner { padding-inline: 1.2rem; }
  .dashboard-grid { gap: .72rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid > .surface { padding: .86rem; }
  .search-toggle { min-width: auto; }
}
@media (max-width: 850px) {
  .admin:not(.mobile-nav-open)::before { display: none; }
  .workspace-sidebar {
    width: min(260px,87vw); transform: translateX(-100%); visibility: hidden;
    box-shadow: 6px 0 24px #143b4821;
  }
  .mobile-nav-open .workspace-sidebar { transform: translateX(0); visibility: visible; }
  .workspace-main { margin-left: 0; }
  .workspace-bar { padding-inline: .72rem; gap: .56rem; }
  .admin .workspace-bar { padding-inline: .65rem 1rem; gap: .65rem; }
  .admin .workspace-name { padding-inline-start: .65rem; font-size: .95rem; }
  .workspace-brand img { width: 5rem; }
  .workspace-tools { gap: .6rem; }
  .search-toggle { min-width: 0; }
  .search-toggle kbd { display: none; }
}
@media (max-width: 590px) {
  :root { --header: 58px; }
  h1 { font-size: 1.64rem; }
  .workspace-name { font-size: .82rem; }
  .admin .workspace-name { font-size: .82rem; white-space: normal; }
  .admin .workspace-name .icon, .account-identity, .account-chevron { display: none; }
  .workspace-brand img { width: 4rem; }
  .admin .workspace-tools { gap: .4rem; }
  .account-avatar { width: 2rem; height: 2rem; }
  .search-toggle { width: 2.42rem; min-height: 2.36rem; overflow: hidden; font-size: 0; gap: 0; }
  .search-popover { position: fixed; top: calc(var(--header) + .3rem); right: .58rem; }
  .workspace-inner { padding: .9rem .8rem 2rem; }
  .page-heading { align-items: flex-start; gap: .68rem; }
  .dashboard-heading h1 { font-size: 1.64rem; }
  .summary-strip { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .summary-strip a { padding: .7rem .75rem; }
  .dashboard-grid, .grid-two { grid-template-columns: minmax(0,1fr); }
  .surface { padding-inline: .8rem; }
  .fields { grid-template-columns: minmax(0,1fr); }
  .fields .wide, .field-wide { grid-column: auto; }
  table td, table th { padding: .53rem .48rem; }
  .login-panel-logo { width: 6.75rem; margin-bottom: .85rem; }
  .admin-login-heading { gap: .55rem; margin-bottom: .65rem; }
  .login-bar .workspace-name { display: none; }
}
@media print {
  .admin::before { display: none; }
  .workspace-bar, .workspace-sidebar, .workspace-context, .page-heading .actions, .skip-link, .toast { display: none !important; }
  .workspace-main { margin: 0; padding: 0; }
  .workspace-inner { padding: 0; }
  .surface { break-inside: avoid; }
  body { background: white; }
}

/* V4 — entrada com MFA e ativação por convite */
.login-hint { margin: .2rem 0 .4rem; font-size: .78rem; color: #5b7480; }
.invite-steps { list-style: none; display: flex; gap: .4rem; padding: 0; margin: .4rem 0 .8rem; font-size: .78rem; font-weight: 700; color: #5b7480; }
.invite-steps li { padding: .2rem .6rem; border-radius: 1rem; background: #eef5f7; }
.invite-steps li[aria-current] { background: #005a76; color: #fff; }
.secret-key code { display: block; font-size: 1.05rem; letter-spacing: .05em; padding: .6rem; background: #f3f8fa; border-radius: .6rem; text-align: center; word-break: break-all; }
code.wrap { word-break: break-all; font-size: .72rem; }
.recovery-codes { columns: 2; font-size: .95rem; }
.reauth-form { display: grid; gap: .6rem; }
.reauth-form label { display: grid; gap: .25rem; font-weight: 700; }
#admin-security { display: grid; gap: 1rem; }
#admin-security .data-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem 1rem; margin: 0 0 .8rem; }
#admin-security .data-list dt { font-size: .76rem; font-weight: 700; color: #5b7480; }
#admin-security .data-list dd { margin: .1rem 0 0; font-weight: 650; }
#admin-security form { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem 1rem; align-items: end; margin-top: 1rem; }
#admin-security form label { display: grid; gap: .25rem; font-size: .82rem; font-weight: 700; }
#admin-security form .actions { grid-column: 1 / -1; }
#admin-security .about { font-size: .84rem; color: #3b5965; }
#admin-security .notice { padding: .7rem .9rem; border-radius: .8rem; background: #fff7e6; border: 1px solid #f1d39b; font-size: .84rem; }
#admin-security code { word-break: break-all; }
#admin-security td small { color: #5b7480; }
#admin-security select { min-width: 10rem; }

.admin-login [hidden] { display: none !important; }
.login-options a.link-button { display: inline-flex; align-items: center; }
.login-form .lembrar-sessao { display: flex; align-items: center; gap: .55rem; min-height: 2.55rem; }
.login-form .lembrar-sessao input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; accent-color: var(--petroleo, #005a76); }
#mfa-intro p, .mfa-ajuda { font-size: .85rem; line-height: 1.5; margin: .4rem 0; }
.mfa-opcoes { margin: .7rem 0; }
.mfa-opcoes summary { cursor: pointer; font-weight: 750; }
.mfa-opcoes .qr { display: block; width: 180px; height: 180px; margin: .65rem auto; background: #fff; }
.mfa-opcoes .segredo { overflow-wrap: anywhere; user-select: all; background: #eef5f7; padding: .45rem .6rem; border-radius: .4rem; }
[data-copiar-chave] { min-height: 2.75rem; text-decoration: underline; text-underline-offset: .2em; }

.mfa-trocar { min-height: 2.75rem; text-decoration: underline; text-underline-offset: .2em; }
.password-field [data-mostrar][aria-pressed="false"] .olho-riscado,
.password-field [data-mostrar][aria-pressed="true"] .olho-aberto { display: none; }

@media (max-height: 740px) {
  .admin-login-main { padding-block: .65rem; }
  .login-panel { padding-block: .85rem; }
  .login-panel-logo { display: none; }
  .admin-login-heading { margin-bottom: .6rem; }
  .login-options { margin-top: .4rem; }
  .mfa-opcoes .qr { width: 145px; height: 145px; }
}
