/* styles.css — Light Blue UI (tables, shadows, buttons) + optional dark mode */

/* ----------------------------
   Theme Tokens
-----------------------------*/
:root{
  /* Layout */
  --max: 860px;
  --pad: 18px;
  --radius: 16px;

  /* Base */
  --bg: #ffffff;
  --fg: #0f172a;          /* slate-900 */
  --muted: #64748b;       /* slate-500 */
  --border: #dbeafe;      /* blue-100 */

  /* Light blue accents */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-600: #2563eb;

  /* Surfaces */
  --card: #ffffff;
  --table: var(--blue-50);
  --table-head: #e0efff;

  /* Shadows (light blue) */
  --shadow-sm: 0 6px 16px rgba(37, 99, 235, 0.14);
  --shadow-md: 0 10px 26px rgba(37, 99, 235, 0.18);

  /* Buttons (light blue) */
  --btn-bg: var(--blue-50);
  --btn-border: var(--blue-200);
  --btn-fg: #1e3a8a;      /* blue-900-ish */
  --btn-hover: #dbeafe;

  /* Links */
  --link: #1d4ed8;
  --link-hover: #1e40af;
}

/* Optional: Dark mode (works if your HTML uses data-theme="dark") */
[data-theme="dark"]{
  --bg: #0b1220;
  --fg: #f1f5f9;
  --muted: #9aa7bf;
  --border: #1f3b6b;

  --card: #0f1a33;

  --table: rgba(147, 197, 253, 0.08);
  --table-head: rgba(147, 197, 253, 0.14);

  --shadow-sm: 0 8px 18px rgba(59, 130, 246, 0.22);
  --shadow-md: 0 14px 32px rgba(59, 130, 246, 0.26);

  --btn-bg: rgba(147, 197, 253, 0.10);
  --btn-border: rgba(147, 197, 253, 0.22);
  --btn-fg: #e0efff;
  --btn-hover: rgba(147, 197, 253, 0.16);

  --link: #93c5fd;
  --link-hover: #bfdbfe;
}

/* ----------------------------
   Reset / Base
-----------------------------*/
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
}

img{ max-width:100%; height:auto; }
hr{ border:0; border-top:1px solid var(--border); margin:18px 0; }

a{
  color: var(--link);
  text-decoration: none;
}
a:hover{
  color: var(--link-hover);
  text-decoration: underline;
}

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

/* ----------------------------
   Layout Helpers
-----------------------------*/
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--pad) 64px;
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}
@media (min-width: 900px){
  .grid{ grid-template-columns: 1.15fr .85fr; }
}

/* ----------------------------
   Top Bar / Brand
-----------------------------*/
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 16px 0 8px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap: 2px;
}
.brand .kicker{ font-size:12px; color: var(--muted); }
.brand .title{ font-size:14px; font-weight:800; letter-spacing:.2px; }

/* ----------------------------
   Dark Mode Toggle (optional)
-----------------------------*/
.toggle{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color: var(--muted);
}
.switch{
  appearance:none;
  width:44px;
  height:26px;
  border-radius:999px;
  border: 1px solid var(--border);
  background: var(--card);
  position:relative;
  cursor:pointer;
  box-shadow: var(--shadow-sm);
}
.switch::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:20px;
  height:20px;
  border-radius:999px;
  background: var(--blue-600);
  opacity: .9;
  transition: transform .18s ease;
}
.switch:checked::after{ transform: translateX(18px); }

/* ----------------------------
   Typography
-----------------------------*/
h1{
  font-size: 38px;
  line-height: 1.15;
  margin: 18px 0 10px;
  letter-spacing: -0.02em;
}
h2{
  font-size: 18px;
  margin: 0 0 8px;
}
p.lead{
  color: var(--muted);
  margin: 0 0 18px;
}

/* ----------------------------
   Badge
-----------------------------*/
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border: 1px solid var(--border);
  background: var(--blue-50);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

/* ----------------------------
   Navigation + Buttons (Light Blue)
-----------------------------*/
.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:14px 0 0;
}

.btn, a.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover, a.cta:hover{
  background: var(--btn-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn:active, a.cta:active{
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ----------------------------
   Cards (Light Blue shadow)
-----------------------------*/
.card{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.card ul{
  margin: 10px 0 0;
  padding-left: 18px;
}
.card li{ margin: 6px 0; }

/* ----------------------------
   Tables (Light Blue + shadow)
-----------------------------*/
table{
  width: 100%;
  border-collapse: collapse;
  background: var(--table);
  border: 1px solid var(--blue-200);
  border-radius: 14px;
  overflow: hidden; /* keeps rounded corners */
  box-shadow: var(--shadow-md);
  margin: 14px 0;
}

thead th{
  background: var(--table-head);
  color: #1e3a8a;
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--blue-200);
}

tbody td{
  padding: 10px;
  border-bottom: 1px solid var(--blue-100);
  vertical-align: top;
}

tbody tr:last-child td{ border-bottom: 0; }

tbody tr:hover td{
  background: rgba(37, 99, 235, 0.06);
}

/* Make tables scrollable on small screens */
.table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table{ min-width: 640px; }

/* ----------------------------
   Forms / Inputs (optional)
-----------------------------*/
input, select, textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  outline: none;
}
input:focus, select:focus, textarea:focus{
  border-color: var(--blue-300);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* ----------------------------
   Code Blocks (optional)
-----------------------------*/
code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
pre{
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--blue-50);
  overflow:auto;
  box-shadow: var(--shadow-sm);
}

/* ----------------------------
   Footer
-----------------------------*/
footer{
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
