:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --border: #262626;
  --text: #fafafa;
  --muted: #a3a3a3;
  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-ring: rgba(34, 211, 238, 0.4);
  --danger: #ec4899;
  --success: #22c55e;
  --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #0891b2 100%);
  --gradient-glow: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34,211,238,0.12), transparent);
  --glow-card: 0 0 0 1px rgba(255,255,255,0.05), 0 8px 32px rgba(0,0,0,0.4);
  --glow-btn: 0 0 16px rgba(34,211,238,0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: var(--gradient-glow);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: rgba(22, 22, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  padding: 20px;
}

.sidebar h1 {
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: var(--accent);
}

.sidebar a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 6px;
}

.sidebar a:hover,
.sidebar a.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.15) 0%, transparent 100%);
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: rgba(22, 22, 22, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 22px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
  box-shadow: 0 1px 0 rgba(34, 211, 238, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content {
  padding: 22px;
}

.card {
  background: rgba(26, 26, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: var(--glow-card);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ring);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0a0a0a;
  transition: box-shadow 0.2s;
}
.btn-primary:hover {
  box-shadow: var(--glow-btn);
  color: #0a0a0a;
}

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

.btn-outline:hover {
  background: rgba(34, 211, 238, 0.1);
}

.toast {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.toast.error {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid var(--danger);
}

.toast.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

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

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

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.15s;
}
tbody tr:hover {
  background: rgba(34, 211, 238, 0.06);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: rgba(22, 22, 22, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--glow-card);
}

.modal h3 {
  margin: 0 0 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
