* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root {
  --bg: #0b0f19;
  --bg-soft: #111827;
  --panel: rgba(2, 6, 23, 0.92);
  --panel-2: rgba(15, 23, 42, 0.92);
  --line: #1e293b;
  --line-soft: rgba(71, 85, 105, 0.32);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --subtle: #64748b;
  --white: #ffffff;
  --admin: #ef4444;
  --helper: #06b6d4;
  --user: #6366f1;
  --success: #22c55e;
  --pending: #f59e0b;
  --danger: #f87171;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

html,
body {
  min-height: 100%;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.08), transparent 22%), radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 28%), linear-gradient(180deg, #020617 0%, #0b0f19 100%);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.orb-left {
  top: -120px;
  left: -120px;
  background: #06b6d4;
}

.orb-right {
  right: -120px;
  bottom: -120px;
  background: #6366f1;
}

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

.login-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.logo-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.logo-line img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.logo-line strong {
  display: block;
  font-size: 22px;
}

.logo-line span {
  display: block;
  color: var(--subtle);
  font-size: 13px;
  margin-top: 3px;
}

.eyebrow {
  font-size: 12px;
  color: #38bdf8;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.login-card h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.form-grid input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.9);
  color: var(--white);
  padding: 13px 14px;
  outline: none;
}

.form-grid input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  color: #08111d;
  background: linear-gradient(135deg, #8fc2ff 0%, #5f93ff 100%);
}

.btn-secondary {
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
}

.note,
.alert {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 16px;
}

.note {
  background: rgba(110, 168, 255, 0.09);
  border: 1px solid rgba(110, 168, 255, 0.14);
  color: #cddcff;
}

.alert {
  background: rgba(248, 113, 113, 0.09);
  border: 1px solid rgba(248, 113, 113, 0.18);
  color: #ffd4d4;
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  min-height: 100vh;
  background: rgba(2, 6, 23, 0.9);
  border-right: 1px solid rgba(30, 41, 59, 0.9);
  padding: 24px 18px;
  backdrop-filter: blur(14px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.logo-wrap img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
}

.logo-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--subtle);
}

.section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar a {
  display: block;
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 12px;
  margin-bottom: 6px;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.sidebar a.active,
.sidebar a:hover {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  color: var(--white);
  border-color: rgba(51, 65, 85, 0.9);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(30, 41, 59, 0.8);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.65);
}

.main {
  flex: 1;
  padding: 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 300px);
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 12px;
}

.search-wrap svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.search-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--white);
  outline: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filters button {
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.card {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 6px 18px;
}

.card-head h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.card-head p {
  color: var(--muted);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 13px;
  color: var(--subtle);
  padding: 12px;
  font-weight: 600;
}

td {
  padding: 16px 12px;
  border-top: 1px solid var(--line-soft);
  vertical-align: middle;
}

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

.user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.user strong {
  display: block;
  font-size: 14px;
}

.user small {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.badge.admin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.badge.helper {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.badge.viewer {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.status {
  font-weight: 700;
  font-size: 13px;
}

.status.active {
  color: var(--success);
}

.status.pending {
  color: var(--pending);
}

.empty-copy {
  color: var(--subtle);
  font-size: 14px;
}

@media (max-width: 980px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  }

  .main {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrap {
    min-width: 100%;
  }
}

@media (max-width: 640px) {

  .sidebar,
  .main {
    padding: 16px;
  }

  .card {
    padding: 12px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 14px;
  }

  table {
    min-width: 620px;
  }

  .login-card {
    padding: 22px;
  }
}