:root {
  color-scheme: light;
  --petrol: #164b51;
  --petrol-deep: #10373c;
  --accent: #c4a561;
  --ink: #1c3032;
  --muted: #506264;
  --surface: #fff;
  --background: #f3f6f5;
  --line: #cdd9d7;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--petrol); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #aa631b; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 2rem, 69rem); margin-inline: auto; }
.masthead { color: white; background: var(--petrol-deep); border-bottom: 3px solid var(--accent); }
.header, .page-heading, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; }
.header { min-height: 5rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: white; line-height: 1.2; text-decoration: none; font-weight: 720; font-size: 1.15rem; }
.brand-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid #b6d1cd; border-radius: .55rem; color: #e4c78b; font-size: .9rem; }
.brand-company { display: block; color: #d3e2df; font-size: .72rem; font-weight: 540; margin-bottom: .15rem; }
nav { display: flex; flex-wrap: wrap; gap: .3rem; }
nav a { display: flex; align-items: center; min-height: 2.75rem; padding: .35rem .75rem; border-radius: .4rem; color: white; text-decoration: none; }
nav a:hover, nav a[aria-current] { background: #28616a; }
.logout { margin-left: auto; }
main { padding-block: clamp(1.25rem, 4vw, 3rem); }
.page-heading { justify-content: space-between; margin-bottom: 1.25rem; }
h1, h2 { margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.025em; }
h2 { font-size: 1.2rem; margin-bottom: .85rem; }
p { margin: 0 0 .9rem; }
.panel { min-width: 0; padding: clamp(1rem, 3vw, 1.6rem); background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; }
.panel > :last-child { margin-bottom: 0; }
.customer-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.import-panel { max-width: 48rem; }
.login { max-width: 30rem; }
.login h1 { font-size: 1.75rem; margin-bottom: 1rem; }
.back { display: inline-block; margin-bottom: .75rem; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; padding: .55rem .85rem; border: 1px solid transparent; border-radius: .45rem; color: white; background: var(--petrol); font: inherit; font-weight: 630; cursor: pointer; text-decoration: none; text-align: center; }
.button:hover { background: var(--petrol-deep); }
.button.secondary { border-color: var(--line); color: var(--petrol); background: var(--surface); }
.button.secondary:hover { background: #e8f1ef; }
.button:disabled { opacity: .62; cursor: default; }
label { display: block; margin: .85rem 0 .3rem; font-weight: 610; }
input:not([type="checkbox"]), select { display: block; width: 100%; min-width: 0; padding: .65rem; min-height: 2.75rem; font: inherit; color: var(--ink); background: white; border: 1px solid #829694; border-radius: .4rem; }
form > .button { margin-top: .9rem; }
.logout > .button { margin-top: 0; }
.actions { gap: .5rem; }
.actions input { width: min(100%, 22rem); }
.items, .preview { margin: .85rem 0 0; padding: 0; list-style: none; }
.items li + li, .preview li + li { border-top: 1px solid var(--line); }
.items a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.85rem; padding: .55rem .2rem; text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.items a:hover { text-decoration: underline; }
.preview li { padding: .6rem 0; overflow-wrap: anywhere; }
.preview label { margin: 0; font-weight: 500; }
.preview input { margin-inline-end: .45rem; }
#status:not(:empty) { margin-top: 1rem; color: var(--petrol-deep); }
dl { margin: 0; }
dt { color: var(--muted); font-weight: 650; }
dd { margin: 0 0 .85rem; overflow-wrap: anywhere; }
.secret { padding: .55rem; background: var(--background); font-family: ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; display: block; }
.error, .errorlist { color: #902c2b; }
@media (max-width: 41rem) {
  .customer-layout { grid-template-columns: minmax(0, 1fr); }
  .header { gap: .5rem; }
  nav { order: 2; flex-basis: 100%; }
}

.entry-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .65rem; list-style: none; padding: 0; }
.entry-kinds a { display: flex; align-items: center; gap: .6rem; padding: .7rem; border: 1px solid var(--line); border-radius: .5rem; min-height: 2.75rem; }
.entry-kinds span { font-size: 1.2em; }

.entry-kinds small { display: block; margin-top: .2rem; color: var(--muted); font-weight: 400; }
.credential-fields { margin: 0 0 1rem; padding: .85rem; border: 1px solid var(--line); border-radius: .5rem; min-width: 0; }
.credential-fields legend { font-weight: 700; padding-inline: .3rem; }

.entry-group { margin-block: .6rem; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: .5rem; }
.entry-group summary { cursor: pointer; font-weight: 700; }
.credential-fields textarea { display: block; width: 100%; padding: .65rem; font: inherit; }

.copy-secret[hidden] { display: none; }
.copy-secret { margin: .4rem .3rem .4rem 0; }
.copy-status { display: block; color: var(--muted); }
