/* Make body a flex column to push footer down */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Main content grows, footer stays at bottom */
main {
  flex: 1;                 /* fills space between header and footer */
  display: flex;           /* enable flexbox */
  align-items: center;     /* vertical center */
  justify-content: center; /* horizontal center */
  padding: 20px;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

/* Footer styling */
footer {
  background-color: #a9c2e8;
  color: #1e293b;
  padding: 15px 20px;
  font-size: 0.85em;
  text-align: center;
  margin-top: auto;
  border-radius: 0;
}

/* Header styling */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #36485f;
  color: white;
  padding: 15px 40px;
}
.header-left { position: absolute; left: 100px; }
.header-right {
  position: absolute;
  right: 100px;
  font-size: 0.9em;
  font-weight: 400;
  white-space: nowrap;
  color: #cfd8e3;
}
.header-center { text-align: center; }
.logo { height: 75px; width: auto; }
.title { font-size: 1.65em; font-weight: bold; margin: 0; }
.slogan { font-size: 1.2em; font-weight: 300; margin-top: 2px; color: #a9c2e8; }

/* Landing page layout */
.landing-main {
  display: flex;
  flex-direction: column; /* stack vertically */
  align-items: center;    /* center horizontally */
  gap: 40px;              /* space between sections */
  padding: 30px 20px;
}

.landing-intro {
  max-width: 700px;
  text-align: center;
  background: transparent;
  box-shadow: none;
  padding: 10px 0;
}

.landing-intro h2 {
  font-size: 2em;   /* larger than the global h2 (1.65em) */
  font-weight: 600;
  margin-bottom: 15px;
  color: #0f172a;
}

.landing-intro p {
  font-size: 17px;  /* slightly larger than the 15px default */
  line-height: 1.7;
  margin: 10px 0;
}

.landing-intro a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
}

/* Return to Home link */
.return-home {
  margin-top: 20px;
  text-align: center;
}
.return-home a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
}
.return-home a:hover {
  color: #1d4ed8;
}

.landing-card {
  max-width: 700px;
  width: 100%;
}

.apikey {
  background: #f1f5f9;
  padding: 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 15px;
  overflow-x: auto;
}

.apibutton {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
}
.apibutton:hover {
  background-color: #1d4ed8;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  background-color: #f9fafb;
  color: #333;
}

footer p { margin: 6px 0; line-height: 1.4; }
footer a { color: #2563eb; text-decoration: underline; }
footer a:hover { color: #1d4ed8; }

/* Container */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

h2 { text-align: center; font-weight: 600; color: #0f172a; }

/* Stats Card */
.stats {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stats h3 { margin-top: 0; font-weight: 600; color: #1e293b; }
.stats table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.stats td span {
  display: inline-block;
  width: 100px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats th {
  color: #64748b;
  font-weight: 500;
  width: 70%;
  text-align: left;
  white-space: nowrap;
}

/* Panels */
.panel {
  border-radius: 8px;
  background: white;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.panel:hover { transform: translateY(-2px); }
.panel summary {
  background-color: #f1f5f9;
  padding: 12px 16px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  outline: none;
  list-style: none;
}
.panel-content { padding: 15px; }

/* Controls */
.controls { margin-bottom: 0.5em; }
.controls button {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
.controls button:hover { background-color: #1d4ed8; }
.controls input {
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
}

/* Table wrapper */
.table-wrapper {
  max-height: 250px;
  overflow-y: auto;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}
th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody tr:nth-child(even) { background-color: #f9fafb; }
tbody tr:hover { background-color: #f1f5f9; }

/* Status pills */
.status { padding: 4px 10px; border-radius: 12px; font-weight: 600; color: white; font-size: 12px; }
.fulfilled { background-color: #16a34a; }
.waiting { background-color: #f59e0b; }
.error { background-color: #dc2626; }

/* Detail button */
.details-btn { cursor: pointer; color: #2563eb; font-weight: 500; text-decoration: underline; }

/* Detail table */
.details-table { border-collapse: collapse; margin-top: 5px; width: 100%; font-size: 12px; }
.details-table th, .details-table td { border: 1px solid #e2e8f0; padding: 6px; text-align: left; vertical-align: top; }
.details-table th { background: #f8fafc; font-weight: 600; width: 150px; }

/* Mobile */
@media (max-width: 768px) {
  .container { padding: 0 10px; }
  table, th, td { font-size: 11px; }
  .stats, .panel { padding: 10px; }
  .stats h3 { font-size: 16px; }
  .controls { display: flex; flex-direction: column; gap: 10px; }
  .table-wrapper { overflow-x: auto; }
}
