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

:root {
  --bg: #f3f4fb;
  --panel: #ffffff;
  --ink: #0f1535;
  --muted: #5b6175;
  --border: #e5e7f3;
  --primary: #5b6cf8;
  --primary-strong: #434fcb;
  --accent: #b86bff;
  --shadow: 0 18px 48px rgba(31, 41, 123, 0.12);
  font-family: 'Space Grotesk', 'Manrope', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 12% 20%, rgba(91,108,248,0.14), transparent 32%),
              radial-gradient(circle at 88% 12%, rgba(184,107,255,0.16), transparent 28%),
              var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.main_brand {
  background: url('hero-bkg.jpg') center/cover no-repeat, linear-gradient(120deg, #1c2a5c, #5b6cf8);
  color: #fff;
  padding: 26px 28px;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(11, 60, 99, 0.25);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.main_brand img { height: 48px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25)); }

.top {
  background: #111a35;
  color: #dfe7f5;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top a { color: #dfe7f5; text-decoration: none; }
.top .brand { font-weight: 700; letter-spacing: .3px; }

.top2 {
  background: linear-gradient(115deg, rgba(17,26,53,0.94), rgba(91,108,248,0.9));
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
}
.top2 nav { display: flex; flex-wrap: wrap; gap: 10px; }
.top2 a {
  background: rgba(255,255,255,0.10);
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  transition: transform .15s ease, background .15s ease, box-shadow .2s, border-color .15s ease;
}
.top2 a:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.28); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,0.18); }

main {
  max-width: 1100px;
  margin: 26px auto 36px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(245,248,253,0.9));
  padding: 26px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid #e9edf5;
}
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 36, 64, 0.06);
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inline { display: inline-block; }

label { display: block; font-size: 14px; margin: 10px 0 6px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fbfe;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,140,127,0.14);
  background: #fff;
}

.btn {
  border: 0;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .18s ease, background .15s ease;
  box-shadow: 0 10px 20px rgba(91, 108, 248, 0.22);
}
.btn.primary { background: linear-gradient(120deg, var(--primary), var(--primary-strong)); }
.btn.danger { background: #e4504d; box-shadow: 0 10px 18px rgba(228,80,77,0.25); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(91, 108, 248, 0.28); }
.btn:active { transform: translateY(0); }

.actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.muted2 { color: #dfe7f5; font-size: 13px; }

.notice, .error {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
  font-weight: 600;
  letter-spacing: .1px;
}
.notice { background: #eaf0ff; color: #2c3fa3; border: 1px solid #c5d2ff; }
.error { background: #fff1f0; color: #b42318; border: 1px solid #fac8c3; }

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

details summary { list-style: none; cursor: pointer; display: inline-block; }
details summary::marker, details > summary::-webkit-details-marker { display: none; }
.popover {
  position: absolute;
  background: var(--panel);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 36, 64, 0.14);
  transform: translateY(6px);
  width: 320px;
  z-index: 10;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 36, 64, 0.08);
}
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid #eef1f7; }
th { background: #f3f6fb; color: var(--muted); font-weight: 700; letter-spacing: .2px; }
tbody tr:hover { background: #f9fbff; }
.card > table { margin-top: 0; }

@media (max-width: 800px) {
  body { background-position: center; }
  main { margin: 14px 10px 24px; padding: 16px; border-radius: 14px; }
  .grid, .grid3 { grid-template-columns: 1fr; }
  .top, .top2 { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
  .top2 { position: relative; }
  .nav-toggle { display: inline-flex; }
  .top2 nav {
    width: 100%;
    gap: 8px;
    display: none;
    flex-direction: column;
    margin-top: 8px;
  }
  .top2 a { width: 100%; justify-content: center; text-align: center; }
  .nav-open .top2 nav { display: flex; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar form, .toolbar .btn { width: 100%; }
  table { display: block; overflow-x: auto; border-radius: 10px; }
  th, td { white-space: nowrap; }
}
.nav-toggle {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  width: 44px;
  height: 42px;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (min-width: 801px) {
  .nav-toggle { display: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
