:root {
  color-scheme: light;
  --bg: #f6f2eb;
  --bg-2: #efe7da;
  --ink: #1a1a1a;
  --muted: #5f5f5f;
  --brand: #0e4d92;
  --brand-2: #e1a100;
  --card: #ffffff;
  --border: #e1d7c6;
  --shadow: 0 18px 40px rgba(15, 15, 15, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top left, #fff9f0, transparent 40%),
    radial-gradient(circle at 20% 10%, #f3e3cc, transparent 50%),
    radial-gradient(circle at 90% 20%, #e9f0fb, transparent 45%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.app {
  padding: 28px;
  max-width: 1280px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #043f77);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.status {
  padding: 8px 16px;
  border-radius: 999px;
  background: #f6d36d;
  color: #5c4200;
  font-weight: 600;
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-left {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.panel-right {
  min-height: 70vh;
}

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

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

p {
  margin: 0 0 16px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field.inline {
  flex-direction: row;
  gap: 14px;
  flex-wrap: wrap;
}

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

input,
select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fdfbf8;
  font-family: inherit;
  font-size: 14px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(14, 77, 146, 0.25);
  border-color: var(--brand);
}

.btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f3ece1;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #0a67c2);
  color: white;
  border: none;
}

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

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e8f0fa;
  color: #0a4880;
}

.badge.secondary {
  background: #f7efda;
  color: #6e4d00;
}

.badge.suspended {
  background: #fde1e1;
  color: #8c2b2b;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.empty {
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
}

.hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 90vw);
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

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

  .panel-left {
    position: static;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
