:root {
  --bg: #08110c;
  --panel: #111a15;
  --panel-2: #16221a;
  --field: #0b140f;
  --text: #f2fff6;
  --muted: #9fb4a6;
  --green: #11b94b;
  --green-2: #75ee94;
  --line: #294634;
  --danger: #ff5f7a;
  --warning: #ffc85a;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -8%, rgba(17, 185, 75, 0.22), transparent 32rem),
    linear-gradient(180deg, #0b1a11 0, var(--bg) 19rem);
  color: var(--text);
  font-family: "Barlow", Arial, sans-serif;
}

.shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 22px 0 38px;
}

.topbar,
.brand,
.top-actions,
.section-title,
.two,
.item-head,
.tabs,
.stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(117, 238, 148, 0.44);
  border-radius: 8px;
  background: linear-gradient(145deg, #073316, #0fa642);
  box-shadow: 0 0 24px rgba(17, 185, 75, 0.36);
  color: white;
  font-size: 2rem;
  font-weight: 800;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--green-2);
  font-weight: 800;
  letter-spacing: 0;
}

.section-kicker {
  font-size: 0.82rem;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

h2 {
  font-size: 1.2rem;
}

button,
.tabs a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 11px 15px;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.tabs a:hover {
  border-color: var(--green);
  color: var(--green-2);
}

[hidden] {
  display: none !important;
}

.top-actions {
  justify-content: flex-end;
}

.version-control {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.version-control input {
  height: 40px;
}

.status {
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(17, 26, 21, 0.92);
  box-shadow: var(--shadow);
  padding: 13px 15px;
  color: var(--muted);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1fr);
  gap: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(117, 238, 148, 0.36);
  border-radius: 8px;
  background: rgba(17, 26, 21, 0.96);
  box-shadow: var(--shadow);
  padding: 18px;
}

.auth-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.status.ok {
  color: var(--green-2);
  border-color: rgba(117, 238, 148, 0.5);
}

.status.warning {
  color: var(--warning);
  border-color: rgba(255, 200, 90, 0.42);
}

.status.error {
  color: var(--danger);
  border-color: rgba(255, 95, 122, 0.44);
}

.detected {
  border: 1px solid rgba(117, 238, 148, 0.28);
  border-radius: 8px;
  background: rgba(117, 238, 148, 0.08);
  color: var(--muted);
  font-weight: 800;
  padding: 11px 12px;
}

.detected strong {
  color: var(--green-2);
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.mode {
  background: var(--field);
  color: var(--muted);
}

.mode.active {
  border-color: var(--green);
  background: rgba(17, 185, 75, 0.16);
  color: var(--green-2);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 17, 12, 0.9);
  backdrop-filter: blur(14px);
}

.tabs a {
  flex: 1;
  min-width: 130px;
  text-align: center;
  background: #0e1812;
}

.layout {
  display: grid;
  grid-template-columns: minmax(340px, 500px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.editor,
.profiles,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 26, 21, 0.94);
  box-shadow: var(--shadow);
}

.editor {
  display: grid;
  gap: 16px;
}

.panel,
.profiles {
  padding: 18px;
}

.profiles {
  position: sticky;
  top: 86px;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 15px;
}

.switch {
  display: flex;
  flex-direction: row;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

form,
label {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 800;
}

.two {
  align-items: start;
}

.two > label {
  flex: 1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(17, 185, 75, 0.14);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.primary {
  width: 100%;
  margin-top: 4px;
  color: #06140b;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  border-color: var(--green);
}

.secondary {
  width: 100%;
  margin-top: 8px;
  background: #0e1812;
  color: var(--green-2);
  border-color: rgba(117, 238, 148, 0.4);
}

.danger {
  width: 100%;
  color: #ffdce3;
  background: rgba(255, 95, 122, 0.1);
  border-color: rgba(255, 95, 122, 0.45);
}

.version {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(117, 238, 148, 0.4);
  border-radius: 999px;
  color: var(--green-2);
  font-weight: 800;
  padding: 7px 12px;
}

.stats {
  margin: 6px 0 16px;
}

.stats div {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.stats strong {
  display: block;
  color: var(--green-2);
  font-size: 2rem;
  line-height: 1;
}

.stats span {
  color: var(--muted);
  font-weight: 800;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 18px;
}

.list-title {
  margin-top: 18px;
}

.profile-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 13px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.card-actions .secondary,
.card-actions .danger {
  margin-top: 0;
}

.item-head {
  justify-content: space-between;
  align-items: start;
}

.item-title {
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(117, 238, 148, 0.13);
  color: var(--green-2);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.meta {
  margin-top: 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

@media (max-width: 920px) {
  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .layout,
  .two {
    grid-template-columns: 1fr;
    display: grid;
  }

  .profiles {
    position: static;
  }

  .auth-panel,
  .auth-form {
    grid-template-columns: 1fr;
  }
}
