:root{
  --bg: #0b1220;
  --surface: #0f1629;
  --card: #121b33;
  --muted: #9fb0cc;
  --text: #eaf1ff;

  /* Soft & shiny gradient accents */
  --grad-1: linear-gradient(135deg, #8bd3ff 0%, #b8a5ff 50%, #ffb8ec 100%);
  --grad-2: linear-gradient(135deg, #a7f3d0 0%, #93c5fd 50%, #fbcfe8 100%);

  --primary: #7aa2ff;
  --primary-ink: #0b1220;
  --danger: #ff7a9e;

  --ring: rgba(123, 183, 255, 0.55);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(123, 163, 255, .15), transparent 70%),
    radial-gradient(1000px 600px at 120% 10%, rgba(255, 157, 236, .12), transparent 70%),
    var(--bg);
  line-height: 1.5;
}

/* Accessibility */
.skip-link{
  position: absolute; left: -999px; top: -999px;
}
.skip-link:focus{
  left: 1rem; top: 1rem; background: #fff; color:#000; padding: .5rem .75rem; border-radius: .5rem;
}

.shell{ width: min(1100px, 92%); margin-inline: auto; }

/* Header */
.site-header{
  background-image: var(--grad-1);
  color: #0c1222;
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
  box-shadow: var(--shadow);
}
.nav{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand{ display: flex; gap: .5rem; align-items: center; font-weight: 700; letter-spacing: .5px; }
.brand .logo{ font-size: 1.35rem; }
.brand .accent {
  background: var(--grad-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* makes it stand out */
}
.nav-links{
  list-style: none; display: flex; gap: .6rem; margin: 0; padding: 0;
}
.nav-links a{ text-decoration: none; color: #0c1222; font-weight: 600; padding: .5rem .75rem; border-radius: 999px; }
.nav-links a:hover{ background: rgba(255,255,255,.55); }

.hero{
  padding: 38px 0 44px;
  text-align: center;
}
.hero h1{
  margin: 0 0 .4rem 0;
  font-size: clamp(1.75rem, 2.8vw + 1rem, 2.6rem);
}
.lead{
  margin: .5rem auto 1.25rem;
  max-width: 60ch;
  color: #1a294a;
}
.btn{ appearance: none; border: none; border-radius: 12px; padding: .7rem 1rem; cursor: pointer; font-weight: 600; box-shadow: var(--shadow); }
.btn-primary{
  background: var(--text);
  color: #0c1222;
}
.btn-soft{
  background: rgba(255,255,255,.35);
  color: #0c1222;
}
.btn-soft.danger{ background: rgba(255, 122, 158, .25); }

/* Sections */
.section{ padding: 48px 0; }
.section.alt{ background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); }

.grid.two{
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem;
}
@media (max-width: 1024px){
  .grid.two{ grid-template-columns: 1fr; }
}

/* Cards */
.card{
  background: radial-gradient(120% 120% at 10% 10%, rgba(255,255,255,.06), rgba(255,255,255,.02) 50%, rgba(255,255,255,.01) 100%),
              var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(8px);
}
.card-header{
  border-bottom: 1px dashed rgba(255,255,255,.1);
  margin-bottom: 14px;
  padding-bottom: 10px;
}
.card-footer{
  margin-top: 10px; color: var(--muted);
}
.tips ul{ margin: .4rem 0 0; padding-left: 1.1rem; }
.tips li{ margin: .3rem 0; color: var(--muted); }

/* Form */
.form-card form{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-card .actions{ grid-column: 1 / -1; display: flex; gap: .6rem; flex-wrap: wrap; }
.field{ display: grid; gap: .3rem; }
label{ font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"]{
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  background: #0e162a;
  color: var(--text);
  padding: .7rem .8rem;
  border-radius: 12px;
  outline: none;
  transition: box-shadow .2s, border-color .2s, transform .05s;
}
input::placeholder{ color: #8aa0c6; }
input:focus{ border-color: var(--ring); box-shadow: 0 0 0 4px rgba(123, 183, 255, .18); }
input:active{ transform: translateY(1px); }
.hint{ color: var(--muted); }
.req{ color: #ffd14d; }
.error{ color: #ff99ad; min-height: 1.15em; display: block; }

/* Records */
.section-header{
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.toolbar{ display: flex; align-items: center; gap: .6rem; }
.search{ min-width: 220px; }
.count{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 .6rem;
  border-radius: 999px;
  background: var(--grad-2);
  color: #0c1222;
  font-weight: 700;
}

.table-wrapper{
  overflow: hidden; /* JS toggles scrollable class */
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}
.table-wrapper.scrollable{
  max-height: 360px;
  overflow-y: auto;
}
.data-table{
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  backdrop-filter: blur(6px);
  text-align: left;
  padding: .75rem .8rem;
  font-weight: 700;
}
.data-table tbody td{
  padding: .65rem .8rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.data-table tbody tr:nth-child(odd){
  background: rgba(255,255,255,.02);
}
.actions-cell{
  display: flex; gap: .4rem; align-items: center;
}
.icon-btn{
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
  transition: transform .12s ease, background .2s ease;
}
.icon-btn:hover{ transform: translateY(-1px); }
.icon{ width: 18px; height: 18px; fill: currentColor; }
.icon.edit{ color: #9dd6ff; }
.icon.delete{ color: var(--danger); }

/* Footer */
.site-footer{
  text-align: center;
  padding: 40px 0 70px;
  color: var(--muted);
}
.site-footer .tiny{ font-size: .9rem; color: #8aa0c6; }

/* Footer links styling */
.site-footer a {
  color: var(--primary); /* same soft blue as primary buttons */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 2px 8px;
  border-radius: 8px;
}

.site-footer a:hover {
  background: var(--grad-1); /* shiny gradient hover */
  color: var(--primary-ink); /* dark text for contrast */
}

/* Optional: side-by-side link layout */
.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}


/* Responsiveness — three major breakpoints */
@media (max-width: 640px){ /* mobile */
  .form-card form{ grid-template-columns: 1fr; }
  .nav-links{ display: none; }
  .hero{ text-align: left; }
}
@media (min-width: 641px) and (max-width: 1024px){ /* tablet */
  .form-card form{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1025px){ /* desktop */
  /* already covered by defaults; keep placeholder for rubric */
}
