:root {
  --bg: #f4f6f8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --text: #101316;
  --muted: #5f6873;
  --line: rgba(16, 19, 22, 0.12);
  --accent: #0b7a75;
  --accent-soft: rgba(11, 122, 117, 0.12);
  --danger: #c53d3d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, #d4eceb 0%, transparent 42%),
    radial-gradient(circle at 90% 90%, #d8e4ef 0%, transparent 40%),
    var(--bg);
  padding: 18px;
}

.page-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.topbar {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

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

h1 {
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  font-size: 20px;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.form-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 15px;
  padding: 10px 12px;
}

input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, white);
  outline-offset: 1px;
}

.btn {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  border-color: var(--text);
  background: var(--text);
  color: #f9fbfb;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.72);
}

.btn.danger {
  border-color: #9d2c2c;
  background: var(--danger);
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-list {
  display: grid;
  gap: 8px;
  min-height: 42px;
}

.user-list.compact {
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.user-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
}

.user-key {
  color: var(--muted);
  font-weight: 600;
}

.user-value {
  font-weight: 600;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.edit-form {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.bottom-home-wrap {
  display: flex;
  justify-content: center;
}

.bottom-home-btn {
  min-width: 190px;
  text-decoration: none;
  text-align: center;
}

@media (max-width: 980px) {
  body {
    padding: 10px;
  }

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

  .panel-wide {
    grid-column: auto;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
