:root {
  --green-950: #0d3937;
  --green-900: #124844;
  --green-700: #1d625b;
  --green-100: #eaf2ef;
  --lime: #cfe958;
  --canvas: #f3f6f4;
  --white: #fff;
  --ink: #163330;
  --muted: #6f817e;
  --line: #dce6e2;
  --shadow: 0 20px 55px rgba(14, 57, 55, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", "Segoe UI", sans-serif; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(220, 230, 226, .8);
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 8px 28px rgba(13, 57, 55, .04);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 5px;
  color: var(--green-950);
  background: var(--lime);
  font: 800 15px/1 Manrope, sans-serif;
  box-shadow: 0 9px 24px rgba(13, 57, 55, .17);
}
.brand strong, .brand small { display: block; }
.brand strong { font: 800 17px/1.25 Manrope, sans-serif; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.account-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf9;
}
.account-avatar {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--lime);
  background: var(--green-950);
  font-size: 10px;
  font-weight: 800;
}
.account-copy { min-width: 0; flex: 1; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 11px; }
.account-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.account-action {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--green-950);
  background: var(--green-100);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.account-action:hover { background: var(--lime); }
.admin-action { color: #fff; background: var(--green-700); }
.admin-action:hover { color: var(--green-950); }
[hidden] { display: none !important; }

main { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 48px; }
.hero {
  position: relative;
  min-height: 350px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  overflow: hidden;
  padding: clamp(38px, 6vw, 82px);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 25%, rgba(207, 233, 88, .14), transparent 27%),
    linear-gradient(120deg, #0c3735 0%, #17544f 70%, #23675e 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  position: absolute;
  inset: auto -80px -140px auto;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  content: "";
}
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.eyebrow { margin: 0 0 14px; color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
.hero h1 { margin: 0; font: 800 clamp(38px, 5.5vw, 72px)/1.03 Manrope, sans-serif; letter-spacing: -3px; }
.hero h1 span { color: var(--lime); }
.hero-copy > p:not(.eyebrow) { max-width: 640px; margin: 23px 0 0; color: #c5d7d3; font-size: 15px; line-height: 1.7; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 30px; color: #9eb7b2; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.hero-meta span { display: inline-flex; align-items: center; }
.hero-meta i, .system-footer i { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #61d09b; box-shadow: 0 0 0 4px rgba(97, 208, 155, .1); }
.hero-symbol { position: relative; z-index: 2; width: 250px; height: 250px; display: grid; place-items: center; justify-self: center; }
.hero-symbol strong { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 25px 25px 8px; color: var(--green-950); background: var(--lime); font: 800 27px Manrope, sans-serif; box-shadow: 0 25px 60px rgba(4, 28, 27, .32); }
.orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; }
.orbit-one { inset: 26px; }
.orbit-two { inset: 0; border-color: rgba(255, 255, 255, .08); }

.systems { padding: 50px clamp(4px, 2vw, 18px) 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 23px; }
.section-heading .eyebrow { margin-bottom: 8px; color: var(--green-700); }
.section-heading h2 { margin: 0; font: 800 clamp(25px, 3vw, 36px) Manrope, sans-serif; letter-spacing: -1.2px; }
.section-heading > p { margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.system-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.system-card {
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--white);
  box-shadow: 0 10px 35px rgba(13, 57, 55, .045);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.system-card:hover { z-index: 2; border-color: #b9cec7; box-shadow: 0 22px 55px rgba(13, 57, 55, .12); transform: translateY(-5px); }
.system-card::before { position: absolute; inset: 0 0 auto; height: 4px; background: var(--lime); content: ""; }
.system-number { position: absolute; top: 23px; right: 24px; color: #a5b5b1; font: 700 10px Manrope, sans-serif; letter-spacing: 1px; }
.system-icon { width: 53px; height: 53px; display: grid; place-items: center; margin-top: 10px; border-radius: 16px 16px 5px; color: var(--green-950); background: var(--lime); font: 800 21px Manrope, sans-serif; }
.medsim .system-icon { border-radius: 50%; color: var(--lime); background: var(--green-700); font-size: 27px; }
.lagerklar .system-icon { color: #fff; background: var(--green-950); }
.system-copy { display: block; margin-top: 27px; }
.system-copy small, .system-copy strong, .system-copy > span { display: block; }
.system-copy small { color: var(--green-700); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.system-copy strong { margin-top: 6px; font: 800 24px Manrope, sans-serif; }
.system-copy > span { margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.system-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid #edf1ef; color: #718682; font-size: 9px; font-weight: 700; }
.system-footer > span { display: flex; align-items: center; }
.system-footer b { color: var(--green-700); font-size: 10px; }
.future { border-style: dashed; background: rgba(255, 255, 255, .45); box-shadow: none; }
.future::before { background: #cbd7d3; }
.future .system-icon { color: #8da09c; background: #e5ece9; }
.future .system-copy, .future .system-footer { opacity: .62; }

.page-footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px clamp(20px, 5vw, 72px); border-top: 1px solid var(--line); color: #82928f; background: #edf2ef; font-size: 9px; }
.page-footer span:first-child { color: var(--green-950); font-weight: 800; }

.account-dialog { width: min(1040px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: #fff; box-shadow: 0 35px 100px rgba(4, 29, 28, .3); }
.account-dialog::backdrop { background: rgba(6, 34, 32, .72); backdrop-filter: blur(5px); }
.dialog-shell { padding: clamp(22px, 4vw, 38px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.dialog-head .eyebrow { margin-bottom: 7px; color: var(--green-700); }
.dialog-head h2 { margin: 0; font: 800 28px Manrope, sans-serif; }
.dialog-head p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.dialog-close { width: 38px; height: 38px; flex: none; border: 0; border-radius: 10px; color: var(--green-950); background: var(--green-100); font-size: 22px; cursor: pointer; }
.account-admin-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 30px; padding-top: 26px; }
.account-form { align-self: start; display: grid; gap: 13px; padding: 21px; border-radius: 16px; background: #f2f6f4; }
.account-form h3, .account-list-head h3 { margin: 0; font: 800 16px Manrope, sans-serif; }
.account-form label { display: grid; gap: 5px; color: #526b67; font-size: 9px; font-weight: 800; }
.account-form input, .account-form select { width: 100%; padding: 11px 12px; border: 1px solid #d3dfdb; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font: 500 11px "DM Sans", sans-serif; }
.account-form input:focus, .account-form select:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(29, 98, 91, .1); }
.primary-button { padding: 12px; border: 0; border-radius: 9px; color: var(--green-950); background: var(--lime); font-size: 10px; font-weight: 800; cursor: pointer; }
.primary-button:disabled { cursor: wait; opacity: .6; }
.form-message { min-height: 17px; margin: 0; color: #a33c36; font-size: 9px; line-height: 1.5; }
.form-message.success { color: var(--green-700); }
.account-list-section { min-width: 0; }
.account-list-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.account-list-head span { color: var(--muted); font-size: 9px; }
.account-list { max-height: 470px; display: grid; gap: 8px; overflow: auto; padding-right: 4px; }
.account-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.account-row.inactive { opacity: .55; background: #f4f6f5; }
.account-row-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--lime); background: var(--green-950); font-size: 9px; font-weight: 800; }
.account-row-copy { min-width: 0; }
.account-row-copy strong, .account-row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row-copy strong { font-size: 11px; }
.account-row-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.status-button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--green-700); background: #f5f8f7; font-size: 8px; font-weight: 800; cursor: pointer; }
.status-button.deactivate { color: #9c443f; }

@media (max-width: 1100px) {
  .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) 250px; }
}
@media (max-width: 720px) {
  .topbar { position: static; min-height: 72px; padding: 12px 16px; }
  .brand small, .account-copy { display: none; }
  .account-panel { min-width: auto; padding: 6px; }
  .account-avatar { width: 32px; height: 32px; }
  main { width: min(100% - 24px, 1480px); padding-top: 12px; }
  .hero { min-height: 440px; grid-template-columns: 1fr; padding: 34px 27px; }
  .hero h1 { letter-spacing: -2px; }
  .hero-symbol { position: absolute; right: -40px; bottom: -48px; width: 210px; height: 210px; opacity: .55; }
  .hero-meta { max-width: 260px; }
  .systems { padding-top: 38px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .system-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 285px; }
  .page-footer { align-items: start; flex-direction: column; }
  .account-dialog { max-height: calc(100vh - 16px); }
  .account-admin-grid { grid-template-columns: 1fr; }
  .account-list { max-height: none; }
  .dialog-shell { padding: 20px; }
  .account-row { grid-template-columns: 34px minmax(0, 1fr); }
  .status-button { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
