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

:root {
  --bg: #f4f7fb;
  --bg-soft: #edf3ff;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #1f2a37;
  --muted: #6b7280;
  --line: #d9e2f0;
  --brand: #1f6feb;
  --brand-dark: #194fb0;
  --accent: #0ea5a1;
  --danger: #dc3545;
  --shadow: 0 14px 40px rgba(31, 42, 55, 0.08);
  --radius-xl: 20px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1300px 600px at -10% -10%, #dbeafe 0%, transparent 70%),
    radial-gradient(700px 500px at 110% -20%, #cffafe 0%, transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title,
.app-title {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.01em;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
}

.app-sidebar {
  width: 280px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-right: 1px solid var(--line);
  box-shadow: 6px 0 24px rgba(31, 42, 55, 0.04);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.brand-box {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, #e0ecff 0%, #d4f4f2 100%);
}

.brand-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #3f5f8d;
}

.sidebar-menu {
  display: grid;
  gap: 8px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #2f3d55;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.sidebar-menu a:hover {
  background: #eef5ff;
  border-color: #d7e6ff;
}

.sidebar-menu a.active {
  background: linear-gradient(130deg, #e8f1ff 0%, #e6fffa 100%);
  border-color: #bfd6ff;
  color: #1d4ea5;
}

.sidebar-menu a.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.sidebar-footer {
  margin-top: auto;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.app-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.topbar-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.content-wrap {
  padding: 0 28px 28px;
}

.panel {
  background: var(--surface);
  border: 1px solid #dbe7f5;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.panel-body {
  padding: 20px;
}

.panel-soft {
  background: linear-gradient(130deg, #f8fbff 0%, #f3fffb 100%);
}

.panel-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
}

.app-alert .alert {
  border-radius: 12px;
  border: 1px solid transparent;
}

.btn {
  border-radius: 12px;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #2276f5 0%, #3b82f6 100%);
  border-color: #2f6fd1;
}

.btn-primary:hover {
  border-color: #275eb5;
  background: linear-gradient(135deg, #1c64d4 0%, #356fd8 100%);
}

.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success,
.btn-light {
  border-width: 1px;
}

.form-control,
.form-select {
  border-radius: 12px;
  border: 1px solid #d4deec;
  padding: 0.58rem 0.8rem;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(31, 111, 235, 0.13);
  border-color: #9fc0f7;
}

.table-wrap {
  border: 1px solid #dce6f4;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: #f6f9ff;
  color: #32435f;
  font-weight: 700;
  border-bottom-width: 1px;
}

.table td,
.table th {
  vertical-align: middle;
  padding: 0.74rem 0.72rem;
}

.nav-pills .nav-link {
  border-radius: 10px;
  border: 1px solid #d6e4f6;
  color: #3a5274;
  background: #f7faff;
}

.nav-pills .nav-link.active {
  border-color: #aec9f6;
  background: linear-gradient(130deg, #eaf2ff 0%, #e6fffb 100%);
  color: #1f4ea1;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ebf3ff;
  color: #2859aa;
}

.qr-box {
  min-height: 220px;
  border: 2px dashed #a8c4f5;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fbff;
}

.qr-box-large {
  min-height: 360px;
}

.qr-caption {
  font-size: 0.95rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
}

.admin-corner-link {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #3f5779;
  background: #ffffffd9;
  border: 1px solid #cbd9ee;
  box-shadow: 0 5px 18px rgba(31, 42, 55, 0.08);
}

.admin-corner-link:hover {
  color: #24497f;
  border-color: #a9c0e3;
  background: #fff;
}

.user-focus-card {
  max-width: 620px;
}

.auth-side {
  padding: 32px;
  background: linear-gradient(180deg, #e8f1ff 0%, #d5f7f4 100%);
  border-right: 1px solid #c8defb;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-side p {
  margin: 0;
  color: #355072;
}

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

.auth-nav a {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #bad4f8;
  background: #ffffffcc;
  font-weight: 600;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1px solid #d8e5f6;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.auth-card .panel-body {
  padding: 28px;
}

.sidebar-toggle {
  display: none;
}

.small-muted {
  font-size: 0.86rem;
  color: var(--muted);
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: -290px;
    top: 0;
    transition: left 0.2s ease;
    height: 100vh;
  }

  .app-shell.sidebar-open .app-sidebar {
    left: 0;
  }

  .app-shell.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
    z-index: 20;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .content-wrap {
    padding: 0 16px 20px;
  }

  .app-topbar {
    padding: 14px 16px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    border-right: 0;
    border-bottom: 1px solid #c8defb;
    padding: 20px;
  }

  .auth-main {
    padding: 16px;
  }

  .admin-corner-link {
    top: 10px;
    right: 10px;
  }

  .qr-box-large {
    min-height: 260px;
  }
}
