* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #030712;
  --card-bg: rgba(6, 12, 26, 0.72);
  --border: rgba(6, 182, 212, 0.18);
  --border-hover: rgba(6, 182, 212, 0.45);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.22);
  --danger: #fb7185;
  --success: #22c55e;
}

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(6, 182, 212, 0.16) 1px, transparent 0);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

.grid-bg::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 780px;
  height: 780px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.35;
  filter: blur(100px);
}

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

.login-card,
.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.login-card {
  width: min(100%, 420px);
  padding: 36px;
}

.login-card h1,
.panel-topbar h1 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-bottom: 10px;
}

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

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

.form-row {
  display: grid;
  gap: 8px;
}

label {
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2, 6, 16, 0.56);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
select:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:hover {
  border-color: var(--border-hover);
  background: rgba(6, 182, 212, 0.2);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn.danger {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
}

.btn.danger:hover {
  box-shadow: 0 0 24px rgba(251, 113, 133, 0.18);
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 18px;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.25);
}

.alert.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

.panel-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.panel-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: rgba(3, 7, 18, 0.74);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid var(--border);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 28px var(--accent-glow);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo img {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  filter: none;
  display: block;
}

.panel-brand small {
  display: block;
  color: var(--text-muted);
  margin-top: 3px;
}

.panel-menu {
  display: grid;
  gap: 10px;
}

.panel-menu a,
.logout-link {
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  color: var(--text);
  transition: all 0.25s ease;
}

.panel-menu a:hover,
.panel-menu a.active,
.logout-link:hover {
  border-color: var(--border-hover);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 22px var(--accent-glow);
}

.logout-link {
  margin-top: auto;
  color: #fecdd3;
}

.panel-main {
  padding: 30px;
}

.panel-topbar {
  margin-bottom: 24px;
}

.panel-card {
  padding: 24px;
}

.panel-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.12);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #67e8f9;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: #dbeafe;
}

.status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.08);
}

.status.passive {
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
}

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

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

  .panel-sidebar {
    position: static;
    height: auto;
  }

  .panel-main {
    padding: 18px;
  }
}

