:root {
  --bg: #050607;
  --bg2: #0a110e;
  --line: #2b4a3a;
  --text: #eefaf5;
  --muted: #a8c1b8;
  --green: #49f2a3;
  --yellow: #e7c75a;
  --red: #ef6f6f;
  --blue: #58a7f8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background:
    radial-gradient(circle at 5% 8%, rgba(73, 242, 163, 0.17), transparent 35%),
    radial-gradient(circle at 92% 18%, rgba(34, 191, 123, 0.14), transparent 38%),
    linear-gradient(140deg, var(--bg), var(--bg2));
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #050607;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: .28;
  animation: drift 16s ease-in-out infinite alternate;
}

body::before {
  background: rgba(73, 242, 163, .28);
  top: -14vmax;
  left: -10vmax;
}

body::after {
  background: rgba(88, 167, 248, .24);
  bottom: -18vmax;
  right: -12vmax;
  animation-duration: 21s;
}

.container {
  width: min(1400px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  display: grid;
  gap: 1rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(9, 14, 11, 0.9), rgba(11, 20, 15, 0.8));
  padding: .95rem 1rem;
  animation: panelIn .45s ease both;
}

.login-panel {
  max-width: 520px;
  margin: 8vh auto;
  background:
    radial-gradient(circle at 88% 12%, rgba(73,242,163,.14), transparent 30%),
    linear-gradient(160deg, rgba(9, 14, 11, 0.94), rgba(11, 20, 15, 0.86));
}

.login-form {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.login-form input,
.login-form button {
  width: 100%;
}
.hidden { display: none !important; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap-8 { gap: .5rem; }
.gap-12 { gap: .75rem; }

#appBox {
  display: grid;
  gap: .62rem;
}

input, textarea, button, select {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 11, 0.88);
  color: var(--text);
  padding: .6rem .7rem;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #9fb8af;
}

select option {
  background: #0f1713;
  color: #eefaf5;
}

textarea { width: 100%; min-height: 54px; resize: vertical; }
button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-weight: 700;
  isolation: isolate;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), border-color .22s ease, background .22s ease, box-shadow .22s ease, filter .22s ease;
}
button::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.13) 48%, transparent 76%);
  transform: translateX(-130%);
  transition: transform .55s ease;
}
button:hover {
  filter: brightness(1.09);
  transform: translateY(-2px);
  border-color: rgba(73, 242, 163, .5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22), 0 0 0 1px rgba(73, 242, 163, .07);
}
button:hover::after { transform: translateX(130%); }
button:active {
  transform: translateY(0) scale(.97);
  transition-duration: .08s;
}
button:focus-visible {
  outline: 2px solid rgba(73, 242, 163, .9);
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: .7;
  transform: none;
}
button.is-loading { padding-left: 2rem; }
button.is-loading::before {
  content: "";
  position: absolute;
  left: .72rem;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -7px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: buttonSpin .65s linear infinite;
}
button.secondary { background: rgba(79, 167, 120, .16); }
button.danger { background: rgba(239, 111, 111, .12); border-color: rgba(239,111,111,.45); }
button.danger:hover {
  border-color: rgba(255, 120, 120, .85);
  box-shadow: 0 8px 22px rgba(0,0,0,.22), 0 0 18px rgba(239,111,111,.12);
}

.tabs {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .5rem;
  margin-top: -.12rem;
  margin-bottom: -.1rem;
}

.tab {
  background: rgba(255,255,255,.03);
  padding: .46rem .7rem;
  font-size: .86rem;
  border-radius: 9px;
}

.tab.active {
  background: linear-gradient(120deg, rgba(73,242,163,.22), rgba(34,191,123,.15));
  border-color: rgba(73,242,163,.6);
}

.legend { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.chip { padding: .28rem .5rem; border-radius: 999px; border: 1px solid transparent; font-size: .85rem; }
.chip.green { background: rgba(73,242,163,.14); color: #83ffc7; border-color: rgba(73,242,163,.4); }
.chip.yellow { background: rgba(231,199,90,.14); color: #ffe390; border-color: rgba(231,199,90,.45); }
.chip.red { background: rgba(239,111,111,.14); color: #ff9898; border-color: rgba(239,111,111,.45); }
.chip.blue { background: rgba(88,167,248,.14); color: #95c8ff; border-color: rgba(88,167,248,.45); }
.chip.gray { background: rgba(107,122,116,.14); color: #bccdc6; border-color: rgba(107,122,116,.45); }
.chip.pink { background: rgba(234, 117, 180, .14); color: #ffb1de; border-color: rgba(234,117,180,.45); }

.tab-panel {
  display: grid;
  gap: .6rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.member-card {
  position: relative;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(66, 92, 78, .45);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(8, 16, 12, 0.92), rgba(8, 18, 13, 0.75));
  padding: .8rem .86rem;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: .7rem;
  align-items: center;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  animation: cardIn .45s ease both;
}

.member-card:hover {
  transform: translateY(-2px);
  border-color: rgba(73,242,163,.55);
  box-shadow: 0 14px 28px rgba(0,0,0,.28);
}

.member-avatar,
.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
}

.member-main {
  display: grid;
  gap: .2rem;
}

.member-main strong { font-size: 1rem; }
.member-rank { color: #d9f8e9; font-weight: 600; }
.member-main small { color: var(--muted); }

.status-dot {
  position: absolute;
  top: .5rem;
  right: .55rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
}

.dot-green { background: var(--green); box-shadow: 0 0 12px rgba(73,242,163,.9); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 12px rgba(231,199,90,.9); }
.dot-red { background: var(--red); box-shadow: 0 0 12px rgba(239,111,111,.9); }
.dot-blue { background: var(--blue); box-shadow: 0 0 12px rgba(88,167,248,.9); }
.dot-gray { background: #6b7a74; box-shadow: 0 0 12px rgba(107,122,116,.9); }
.dot-pink { background: #ea75b4; box-shadow: 0 0 12px rgba(234,117,180,.9); }

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: .22rem .5rem;
  font-size: .8rem;
  border: 1px solid transparent;
}
.status-green { background: rgba(73,242,163,.14); color: #83ffc7; border-color: rgba(73,242,163,.4); }
.status-yellow { background: rgba(231,199,90,.14); color: #ffe390; border-color: rgba(231,199,90,.45); }
.status-red { background: rgba(239,111,111,.14); color: #ff9898; border-color: rgba(239,111,111,.45); }
.status-blue { background: rgba(88,167,248,.14); color: #95c8ff; border-color: rgba(88,167,248,.45); }
.status-gray { background: rgba(107,122,116,.14); color: #bccdc6; border-color: rgba(107,122,116,.45); }
.status-pink { background: rgba(234,117,180,.14); color: #ffb1de; border-color: rgba(234,117,180,.45); }
.detail-section {
  margin-top: .55rem;
  padding: .65rem .75rem;
  border: 1px solid rgba(73,242,163,.22);
  border-radius: 10px;
  background: rgba(8,14,11,.5);
}

.detail-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 0;
  font-size: .9rem;
}

.detail-label {
  color: var(--muted);
  min-width: 100px;
  flex-shrink: 0;
}

.status-indicator {
  font-weight: 600;
}

.status-indicator.blue { color: #95c8ff; }
.status-indicator.green { color: #83ffc7; }
.status-indicator.yellow { color: #ffe390; }
.status-indicator.red { color: #ff9898; }
.status-indicator.gray { color: #bccdc6; }
.status-indicator.pink { color: #ffb1de; }

.playtime-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(73,242,163,.28);
  border-radius: 10px;
  background: rgba(8,14,11,.6);
  color: #d8f7e9;
  font-size: .9rem;
}
.playtime-grid span { padding: .1rem 0; }
.playtime-grid strong { color: var(--green); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5,8,6,.44);
  backdrop-filter: blur(7px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(9, 14, 11, 0.98), rgba(11, 20, 15, 0.94));
  padding: 1.15rem;
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: transform .22s ease, opacity .22s ease;
}

.modal-backdrop.open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

.detail-title-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.log-item {
  position: relative;
  border: 1px solid rgba(88, 129, 109, .38);
  border-radius: 14px;
  padding: .78rem .95rem;
  margin-bottom: .7rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(73,242,163,.10), transparent 32%),
    linear-gradient(140deg, rgba(11, 19, 15, .92), rgba(9, 24, 17, .78));
  box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.log-item::before {
  content: "";
  position: absolute;
  left: .55rem;
  top: .75rem;
  bottom: .75rem;
  width: 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(73,242,163,.9), rgba(88,167,248,.75));
}

.log-item:hover {
  transform: translateY(-2px);
  border-color: rgba(73,242,163,.45);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .28);
}

.log-top,
.log-main,
.log-meta {
  margin-left: .6rem;
}

.log-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .28rem;
}

.log-actor {
  font-weight: 700;
  color: #dffef0;
}

.log-action {
  font-size: .78rem;
  letter-spacing: .02em;
  border: 1px solid rgba(73,242,163,.4);
  border-radius: 999px;
  padding: .14rem .44rem;
  color: #b9f8d7;
  background: rgba(73,242,163,.10);
}

.log-main {
  color: #f2fff8;
  margin-bottom: .35rem;
}

.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  color: var(--muted);
  font-size: .84rem;
}

.error { color: #ff9d9d; min-height: 1.2rem; }
.hint { color: var(--muted); font-size: .9rem; }

.admin-list {
  display: grid;
  gap: .5rem;
  margin-top: .75rem;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .65rem;
  border: 1px solid rgba(66, 92, 78, .45);
  border-radius: 10px;
  background: rgba(11, 19, 15, .6);
}

.admin-shell {
  overflow: hidden;
  padding: 0;
  border-color: rgba(73, 242, 163, .22);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid rgba(73, 242, 163, .13);
  background:
    radial-gradient(circle at 90% 10%, rgba(73, 242, 163, .1), transparent 34%),
    rgba(5, 14, 9, .45);
}

.admin-hero h3 { margin: .2rem 0; font-size: 1.3rem; }
.admin-hero p { margin: 0; color: var(--muted); font-size: .82rem; }

.admin-shield {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 14px;
  color: #64ecaa;
  background: rgba(73, 242, 163, .09);
  border: 1px solid rgba(73, 242, 163, .2);
}

.admin-shield svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-create-form {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.4fr auto;
  align-items: end;
  gap: .75rem;
  margin: 1rem 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  background: rgba(255, 255, 255, .022);
}

.admin-form-title { grid-column: 1 / -1; }
.admin-form-title strong { display: block; }
.admin-form-title small { color: var(--muted); }
.admin-create-form > label { display: grid; gap: .3rem; color: #dceee5; font-size: .78rem; }
.admin-create-form input[type="text"],
.admin-create-form input[type="password"] { width: 100%; box-sizing: border-box; }

.admin-access-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.admin-access-picks label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .58rem .7rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(0, 0, 0, .14);
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.admin-access-picks label:hover {
  transform: translateY(-1px);
  border-color: rgba(55, 232, 143, .3);
  background: rgba(34, 120, 74, .1);
}

.admin-access-picks b,
.admin-access-picks small { display: block; }
.admin-access-picks small { color: var(--muted); font-size: .62rem; }
.permission-copy { min-width: 0; }
.admin-info { margin: 0 1.35rem; }

.admin-shell .admin-list {
  gap: .65rem;
  margin: .8rem 1.35rem 1.35rem;
}

.admin-shell .admin-item {
  justify-content: flex-start;
  padding: .75rem .8rem;
  border-color: rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 28, 21, .8), rgba(8, 16, 11, .8));
  transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.admin-shell .admin-item:hover {
  transform: translateY(-2px);
  border-color: rgba(73, 242, 163, .2);
  background: linear-gradient(135deg, rgba(20, 38, 28, .9), rgba(8, 18, 12, .88));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.admin-shell .admin-item > span:first-child {
  flex: 1;
  min-width: 110px;
  font-weight: 700;
}

.admin-shell .admin-item label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .76rem;
}

.permission-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 25px;
}

.permission-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  background: #17231d;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: background .3s cubic-bezier(.2, .8, .2, 1), border-color .3s ease, box-shadow .3s ease;
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8b9a92;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .25s ease;
}

.permission-switch input:checked + .switch-track {
  border-color: rgba(58, 255, 157, .72);
  background: linear-gradient(110deg, #08713d, #12b967);
  box-shadow: 0 0 0 3px rgba(25, 225, 123, .08), 0 0 15px rgba(25, 225, 123, .22);
}

.permission-switch input:checked + .switch-track::before {
  transform: translateX(21px);
  background: #effff6;
}

.permission-switch input:focus-visible + .switch-track {
  outline: 2px solid #74ffb8;
  outline-offset: 3px;
}

.permission-switch input:disabled + .switch-track {
  cursor: default;
  opacity: .52;
  filter: saturate(.65);
}

.account-permission {
  padding: .3rem .45rem .3rem .65rem;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  background: rgba(0, 0, 0, .16);
}

.admin-shell #adminMsg { margin: -1rem 1.35rem 1.2rem; }

.toast-stack {
  position: fixed;
  z-index: 5000;
  right: 1.1rem;
  bottom: 1.1rem;
  display: grid;
  width: min(390px, calc(100vw - 2rem));
  gap: .6rem;
  pointer-events: none;
}

.app-toast {
  display: flex;
  align-items: center;
  gap: .72rem;
  padding: .78rem .9rem;
  border: 1px solid rgba(73, 242, 163, .3);
  border-radius: 13px;
  color: #effff7;
  background: linear-gradient(135deg, rgba(13, 37, 25, .97), rgba(7, 18, 12, .98));
  box-shadow: 0 18px 45px rgba(0,0,0,.4), 0 0 22px rgba(73,242,163,.1);
  opacity: 0;
  transform: translateX(35px) scale(.96);
  transition: opacity .3s ease, transform .38s cubic-bezier(.2, .9, .2, 1.15);
  backdrop-filter: blur(14px);
}

.app-toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.app-toast.error {
  border-color: rgba(239,111,111,.45);
  background: linear-gradient(135deg, rgba(52, 20, 20, .97), rgba(20, 9, 9, .98));
}

.toast-icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #062315;
  background: var(--green);
  font-weight: 900;
  box-shadow: 0 0 16px rgba(73,242,163,.35);
}

.app-toast.error .toast-icon {
  color: #2b0707;
  background: var(--red);
  box-shadow: 0 0 16px rgba(239,111,111,.3);
}

@keyframes buttonSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.overview-tools {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.member-count-chip {
  border: 1px solid rgba(73,242,163,.4);
  border-radius: 999px;
  padding: .36rem .65rem;
  font-size: .86rem;
  color: #d5fbe9;
  background: linear-gradient(120deg, rgba(73,242,163,.16), rgba(34,191,123,.08));
}

.stats-wrap {
  display: grid;
  gap: .7rem;
}

.stat-card {
  border: 1px solid rgba(73,242,163,.28);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(10, 20, 15, .9), rgba(8, 16, 12, .84));
  padding: .2rem .8rem .7rem;
}

.stat-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .55rem 0;
}

.stat-card summary::-webkit-details-marker { display: none; }

.stat-card summary small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
}

.stat-percent {
  border: 1px solid rgba(73,242,163,.4);
  border-radius: 999px;
  padding: .24rem .5rem;
  color: #bff9dd;
  background: rgba(73,242,163,.1);
  font-weight: 700;
}

.stat-details {
  color: #d8f7e9;
  font-size: .9rem;
  border-top: 1px solid rgba(73,242,163,.2);
  padding-top: .55rem;
}

.month-block {
  border-color: rgba(88,167,248,.35);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .9rem;
}

.manage-center {
  display: flex;
  justify-content: center;
}

.manage-card {
  width: 100%;
  min-height: 180px;
}

.manage-hero {
  border-color: rgba(73,242,163,.45);
  background:
    radial-gradient(circle at 90% 10%, rgba(73,242,163,.1), transparent 35%),
    linear-gradient(160deg, rgba(9, 14, 11, 0.95), rgba(11, 20, 15, 0.88));
}

.manage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.security-badges {
  margin-top: .45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3vmax, -2vmax, 0) scale(1.08); }
}

/* Aufträge */
.orders-shell {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: rgba(73, 242, 163, .24);
  background:
    radial-gradient(circle at 88% 0%, rgba(73, 242, 163, .12), transparent 32%),
    linear-gradient(155deg, rgba(8, 15, 11, .98), rgba(6, 11, 9, .96));
}

.orders-shell::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -170px;
  top: -230px;
  border: 1px solid rgba(73, 242, 163, .18);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(73, 242, 163, .08);
  pointer-events: none;
}

.orders-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.45rem 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(73, 242, 163, .14);
}

.orders-hero h3 {
  margin: .15rem 0 .2rem;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: -.04em;
}

.orders-hero p { margin: 0; color: var(--muted); }

.orders-eyebrow {
  color: #49f2a3;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.tab-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  color: inherit;
  text-decoration: none;
}

.tab-external span {
  font-size: .75em;
  opacity: .62;
  transition: transform .18s ease, opacity .18s ease;
}

.tab-external:hover span {
  opacity: 1;
  transform: translate(2px, -2px);
}

.hub-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-color: rgba(73, 242, 163, .3);
  background:
    radial-gradient(circle at 82% 20%, rgba(73, 242, 163, .15), transparent 30%),
    linear-gradient(145deg, rgba(8, 19, 13, .98), rgba(5, 12, 8, .96));
}

.hub-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(73, 242, 163, .16);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(73, 242, 163, .08);
}

.hub-hero h1 {
  position: relative;
  z-index: 1;
  margin: .4rem 0 .5rem;
  max-width: 650px;
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.hub-hero p {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.hub-system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-top: .85rem;
}

.hub-system-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  padding: .9rem;
  text-align: left;
  color: #eaf8f0;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18, 30, 23, .94), rgba(8, 16, 11, .96));
  box-shadow: 0 14px 35px rgba(0, 0, 0, .18);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: hubCardIn .5s cubic-bezier(.2, .8, .2, 1) both;
}

.hub-system-card:nth-child(2) { animation-delay: 70ms; }
.hub-system-card:nth-child(3) { animation-delay: 140ms; }

.hub-system-card:hover {
  transform: translateY(-4px);
  border-color: rgba(73, 242, 163, .32);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .26);
}

.hub-system-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 13px;
  color: #6bf2ac;
  background: rgba(73, 242, 163, .09);
  border: 1px solid rgba(73, 242, 163, .18);
}

.hub-system-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-system-card > span:nth-child(2) { min-width: 0; flex: 1; }
.hub-system-card small { display: block; color: #65dfa2; font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.hub-system-card strong { display: block; margin: .12rem 0; font-size: 1rem; }
.hub-system-card p { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.35; }
.hub-system-card > b { color: #73e5ab; transition: transform .2s ease; }
.hub-system-card:hover > b { transform: translateX(3px); }

@keyframes hubCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.active-subnav {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem;
  margin-bottom: .8rem;
}

.active-subtab {
  padding: .48rem .75rem;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.active-subtab.active {
  color: #dff9eb;
  border-color: rgba(73, 242, 163, .27);
  background: rgba(73, 242, 163, .09);
}

.order-add-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .72rem 1rem;
  border: 1px solid rgba(73, 242, 163, .5);
  background: linear-gradient(135deg, #3de799, #20bb77);
  color: #03150d;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(32, 187, 119, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.order-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(32, 187, 119, .28);
}

.order-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  padding: 1rem 1.5rem 0;
}

.order-stats article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem .85rem;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.order-stats span { color: var(--muted); font-size: .82rem; }
.order-stats strong { color: #d8ffea; font-size: 1.25rem; }

.orders-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1.2rem 1.5rem 1.6rem;
}

.order-card {
  position: relative;
  min-width: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(19, 29, 23, .92), rgba(9, 17, 13, .94));
  box-shadow: 0 14px 35px rgba(0, 0, 0, .18);
  animation: orderCardIn .45s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--order-index) * 55ms);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.order-card:hover {
  transform: translateY(-4px);
  border-color: rgba(73, 242, 163, .3);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .28);
}

.order-card-head {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.order-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 14px;
  color: #8ef6bd;
  background: rgba(73, 242, 163, .1);
  border: 1px solid rgba(73, 242, 163, .18);
}

.order-icon span {
  position: absolute;
  z-index: 0;
  font-size: 1.15rem;
}

.order-icon img {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .38));
  transition: transform .25s ease;
}

.order-card:hover .order-icon img { transform: translateY(-2px) scale(1.08); }

.order-title { min-width: 0; flex: 1; }
.order-title h4 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.order-title span { color: var(--muted); font-size: .72rem; }

.order-status {
  flex: 0 0 auto;
  padding: .28rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  color: #ffc3c3;
  border: 1px solid rgba(255, 94, 94, .28);
  background: rgba(255, 94, 94, .09);
}

.order-progress .order-status {
  color: #ffe4a6;
  border-color: rgba(255, 190, 70, .3);
  background: rgba(255, 190, 70, .09);
}

.order-done .order-status {
  color: #a9f8cc;
  border-color: rgba(73, 242, 163, .28);
  background: rgba(73, 242, 163, .09);
}

.order-purpose {
  min-height: 0;
  margin: 1rem 0;
  padding: .75rem .85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, .18);
}

.order-purpose span {
  display: block;
  color: #71dca4;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.order-purpose p { margin: .25rem 0 0; color: #d9ebe1; font-size: .85rem; line-height: 1.4; }

.order-progress-label,
.order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  color: var(--muted);
  font-size: .76rem;
}

.order-progress-label strong { color: #b9f8d5; }

.order-progress-track {
  height: 7px;
  margin: .4rem 0 .85rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}

.order-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22bc78, #65f4aa);
  box-shadow: 0 0 15px rgba(73, 242, 163, .35);
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
}

.order-card-foot b { color: #fff; }
.order-card-foot button { padding: .4rem .62rem; font-size: .75rem; }
.order-card-foot button span { display: inline-block; transition: transform .2s ease; }
.order-card-foot button:hover span { transform: translateX(3px); }

.orders-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}
.orders-empty > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto .7rem;
  border-radius: 50%;
  color: #49f2a3;
  background: rgba(73, 242, 163, .1);
  border: 1px solid rgba(73, 242, 163, .2);
}
.orders-empty h4 { margin: 0; color: #e6f6ed; }
.orders-empty p { margin: .25rem 0 0; }

.order-modal-card {
  width: min(680px, calc(100vw - 2rem));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(73, 242, 163, .28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 242, 163, .1), transparent 35%),
    linear-gradient(155deg, #09130e, #07100c);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
}

.order-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.4rem 1.05rem;
  border-bottom: 1px solid rgba(73, 242, 163, .14);
}

.order-modal-head h3 {
  margin: .18rem 0 .18rem;
  font-size: 1.35rem;
  letter-spacing: -.025em;
}

.order-modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
}

.order-modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 11px;
  font-size: 1.35rem;
  line-height: 1;
  color: #cceadd;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
}

.order-modal-close:hover {
  color: #fff;
  border-color: rgba(73, 242, 163, .35);
  background: rgba(73, 242, 163, .08);
}

.order-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1.4rem;
}

.order-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.order-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .34rem;
  min-width: 0;
  color: #edf9f2;
}

.order-field > span {
  font-size: .84rem;
  font-weight: 700;
}

.order-field > small {
  min-height: 1.1em;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 400;
}

.order-field input,
.order-field textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid rgba(116, 178, 145, .28);
  border-radius: 11px;
  background: rgba(2, 10, 6, .72);
  color: #effbf4;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.order-field input {
  height: 46px;
  padding: 0 .85rem;
}

.order-field textarea {
  min-height: 105px;
  padding: .75rem .85rem;
  resize: vertical;
  line-height: 1.45;
}

.order-field input:focus,
.order-field textarea:focus {
  border-color: rgba(73, 242, 163, .72);
  background: rgba(5, 16, 10, .92);
  box-shadow: 0 0 0 3px rgba(73, 242, 163, .1);
}

.order-field input::placeholder,
.order-field textarea::placeholder {
  color: rgba(190, 218, 203, .42);
}

.order-form-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-top: .15rem;
}

.order-action-spacer { flex: 1; }

.order-form-actions button {
  min-height: 42px;
  padding: .58rem .9rem;
}

.order-save-btn {
  border-color: rgba(73, 242, 163, .55);
  background: linear-gradient(135deg, #48e99d, #24bd79);
  color: #03140c;
  font-weight: 800;
  box-shadow: 0 9px 25px rgba(36, 189, 121, .18);
}

@keyframes orderCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manage-grid { grid-template-columns: 1fr; }
  .hub-system-grid { grid-template-columns: 1fr; }
  .admin-create-form { grid-template-columns: 1fr 1fr; }
  .admin-access-picks { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .member-grid { grid-template-columns: 1fr; }
  .container { width: calc(100% - 1rem); margin: .5rem auto 1rem; }
  .panel { padding: .75rem; border-radius: 13px; }
  .tab { padding: .42rem .58rem; font-size: .82rem; }
  .orders-hero { align-items: flex-start; flex-direction: column; padding: 1rem; }
  .order-add-btn { width: 100%; justify-content: center; }
  .order-stats { padding: .8rem 1rem 0; }
  .orders-grid { padding: .8rem 1rem 1rem; }
  .order-modal-card { width: calc(100vw - 1rem); border-radius: 15px; }
  .order-modal-head { padding: 1rem; }
  .order-form { padding: 1rem; }
  .order-form-grid { grid-template-columns: 1fr; }
  .order-field > small { min-height: 0; }
  .order-form-actions { flex-wrap: wrap; }
  .order-action-spacer { display: none; }
  .order-form-actions button { flex: 1 1 calc(50% - .3rem); }
  .admin-create-form { grid-template-columns: 1fr; margin: .8rem; }
  .admin-access-picks { grid-column: auto; }
  .admin-info { margin: 0 .8rem; }
  .admin-shell .admin-list { margin: .7rem .8rem 1rem; }
  .admin-shell .admin-item { align-items: stretch; flex-direction: column; }
  .admin-shell #adminMsg { margin: -.5rem .8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .order-card { animation: none; transition: none; }
  .order-progress-track i { transition: none; }
}
