@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #0f172a;
  --card: #111827;
  --card-2: #0b1220;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #38bdf8;
  --secondary: #22d3ee;
  --accent: #f97316;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 25px 50px -20px rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.4), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(147, 51, 234, 0.25), transparent 50%), #030712;
  color: var(--text);
  min-height: 100vh;
}

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

.bg-blur {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.2), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.15), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.12), transparent 40%);
  z-index: -1;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: rgba(8, 12, 24, 0.9);
  position: sticky;
  top: 0;
  height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px 12px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}

.brand-logo {
  width: 160px;
  height: auto;
  display: block;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
}

.side-nav {
  display: grid;
  gap: 10px;
}

.side-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.side-nav a:hover {
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.9);
}

.side-nav a.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0b1220;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
}


.content {
  display: flex;
  flex-direction: column;
}

.container {
  padding: 0 36px 64px;
}

.card {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

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

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

.user-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 13px;
}

h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat .value {
  font-size: 36px;
  font-weight: 600;
  margin-top: 8px;
}

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

.form.compact {
  gap: 10px;
}

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

.form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.form-group.checkbox {
  align-items: center;
}

.form-group.checkbox input {
  margin-right: 8px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  width: 46px;
  height: 24px;
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.slider::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.3);
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.switch input:checked + .slider::after {
  transform: translateX(22px);
}

.switch-label {
  font-size: 14px;
  color: var(--muted);
}

.form-label {
  font-size: 14px;
  color: var(--muted);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  font-size: 15px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.7);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98), rgba(9, 12, 24, 0.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

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

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

.form.inline {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

label span {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  font-size: 15px;
}

select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  font-size: 15px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

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

.actions .search {
  min-width: 180px;
}

.btn {
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0b1220;
}

.btn.secondary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #0b1220;
}

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

.btn.success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.btn.mini {
  padding: 6px 12px;
  font-size: 13px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.table {
  display: grid;
  gap: 10px;
}


.details-section details {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 12px;
}

.detail-group {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.table-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  flex-wrap: wrap;
}

.search {
  min-width: 240px;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.row.head {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.row:last-child {
  border-bottom: none;
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
}

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

.value {
  font-size: 18px;
  font-weight: 600;
}

.status {
     width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.status.pending {
  background: rgba(249, 115, 22, 0.2);
  color: var(--accent);
}

.status.approved {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.messages {
  margin-bottom: 24px;
  display: grid;
  gap: 10px;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.pagination a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
}

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

.message {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.message.success {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.35);
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

  .topbar {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
  }

  .container {
    padding: 0 24px 48px;
  }

  .split {
    flex-direction: column;
  }
}
