/* static/css/style.css */
/* Sticky footer layout */
html, body { height: 100%; }
body {
  min-height: 100dvh;          /* support mobile viewport units */
  display: flex;
  flex-direction: column;
}
.container {                   /* your main page wrapper */
  flex: 1 0 auto;              /* take remaining height */
}
.site-footer {
  flex: 0 0 auto;
  margin-top: auto;            /* push to bottom */
}

/* 1. ROOT VARIABLES (OUR NEW DESIGN SYSTEM) */
:root {
    /* Font */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Colors - A modern dark theme inspired by your request */
    --color-primary: #8ab4f8;          /* A friendly, accessible blue for accents */
    --color-primary-hover: #a5c5f9;
    --color-background: #1f2023;       /* Main background - dark gray, not pure black */
    --color-surface-1: #282a2d;        /* Cards, tables, inputs background */
    --color-surface-2: #323539;        /* Hovered surfaces, secondary elements */
    --color-border: #43474e;           /* Borders for elements */
    --color-text-primary: #e8eaed;     /* Main text color */
    --color-text-secondary: #bdc1c6;   /* Sub-headings, labels */
    --color-green: #34a853;
    --color-red: #ea4335;

    /* Sizing & Spacing */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-pill: 9999px;

    /* Shadows for elevation */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.15);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
}

/* 2. GLOBAL RESET & BASE STYLES */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-sans);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    padding-bottom: 50px; /* Add some space at the bottom */
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--color-text-primary);
    margin-bottom: 1em;
    font-weight: 600;
}

h1 { font-size: 2.25em; margin-bottom: 0.5em; }
h2 { font-size: 1.5em; margin-top: 2.5em; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5em;}
h3 { font-size: 1.1em; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* 3. REDESIGNED NAVIGATION */
nav {
    margin-bottom: 30px;
}

.main-nav {
    display: flex;
    list-style-type: none;
    padding: 8px;
    background-color: var(--color-surface-1);
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--color-border);
    width: fit-content;
}

.main-nav li {
    margin: 0 5px;
}

.nav-link {
    display: block;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--color-text-secondary);
    border-radius: var(--border-radius-pill);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-text-primary);
    background-color: var(--color-surface-2);
}

.nav-link.active {
    color: #fff;
    background-color: var(--color-primary);
}

/* 4. GENERAL STYLING FOR FORM ELEMENTS */
label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--color-text-secondary);
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface-1);
    color: var(--color-text-primary);
    border-radius: var(--border-radius-sm);
    font-size: 1em;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.4);
}


/* 5. HELPER CLASSES */
.hidden { display: none !important; }
.text-green { color: var(--color-green) !important; }
.text-red { color: var(--color-red) !important; }

/* --- Discreet footer --- */
.site-footer{
  margin-top: 24px;
  padding: 10px 0;
  border-top: 1px solid var(--border, #23324d);
  color: var(--muted, #9fb0cc);
  opacity: .9;
}
.site-footer:hover{ opacity: 1; }

.site-footer__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer__brand img{
  height: 28px; /* subtle; raise to 32 if you prefer */
  width: auto;
  display: block;
}

.site-footer__legal{
  font-size: 12px;
  letter-spacing: .2px;
  white-space: nowrap;
  color: var(--muted, #9fb0cc);
}

/* If you want it to sit tighter to the page content */
.container + .site-footer { margin-top: 16px; }

/* Optional: sticky-at-bottom only when page is short */
html, body { min-height: 100%; }
body { display: flex; flex-direction: column; }
.container { flex: 1 0 auto; }
.site-footer { flex: 0 0 auto; }
