:root {
  --bg: #f3efe6;
  --surface: rgba(255, 252, 246, 0.92);
  --text: #1f1d1a;
  --muted: #69635c;
  --line: #d5ccbc;
  --brand: #1e60bf;
  --brand-soft: #dbeafe;
  --danger: #b73d2a;
  --radius: 18px;
  --shadow: 0 18px 42px rgba(25, 31, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #ece6d8, #f3efe6 40%, #efe9dc 100%);
  min-height: 100vh;
}

.background-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

.shape-a {
  width: 320px;
  height: 320px;
  background: rgba(30, 96, 191, 0.2);
  top: -80px;
  right: -90px;
}

.shape-b {
  width: 240px;
  height: 240px;
  background: rgba(183, 61, 42, 0.12);
  bottom: -70px;
  left: -80px;
  animation-delay: 1.4s;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.brand-block {
  display: grid;
  gap: 6px;
  flex: 1;
  justify-items: center;
  text-align: center;
}

.hero-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
  min-width: 170px;
}

.hero-status {
  margin: 0;
  text-align: right;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 700;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.grid .full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.93rem;
  color: var(--muted);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffdf8;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(30, 96, 191, 0.28);
  border-color: var(--brand);
}

.hidden {
  display: none !important;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-muted {
  background: #e6e0d2;
  color: #3e392f;
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

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

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-box {
  margin: 12px 0 0;
  border-radius: 12px;
  background: #f7f4ec;
  border: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-row {
  margin-top: 10px;
}

.filter-form-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.2fr 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.filter-form-row .btn {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1380px;
  margin-top: 8px;
}

table.users-table {
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

th {
  color: #4f4a43;
}

.notes-cell {
  min-width: 220px;
  white-space: normal;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.status-active {
  background: var(--brand-soft);
  color: #0c5a4b;
}

.status-blocked,
.status-expired {
  background: #f6d8cf;
  color: #8c2b1e;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.login-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(520px, 100%);
  padding: 28px;
  display: grid;
  gap: 10px;
}

.login-logo {
  width: 74px;
  height: 74px;
  margin: 0 auto 6px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.login-card .eyebrow,
.login-card h1,
.login-card .hint {
  text-align: center;
}

.login-card h1 {
  margin: 2px 0 8px;
}

.login-card label {
  text-align: left;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 740px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .filter-form-row {
    grid-template-columns: 1fr;
  }

  .layout {
    padding: 18px 12px 36px;
  }

  .hero-top {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions {
    justify-items: center;
    width: 100%;
  }

  .hero-status {
    text-align: center;
  }

  .card {
    padding: 14px;
  }
}
