/**
 * Modern Stylesheet for the Forecasting Application
 * Version: 1.1.0 (2025-08-21)
 * - Added header and navigation styles from the original stylesheet.
 */

/* =========================
   CSS Custom Properties
   ========================= */
:root {
  /* Brand Colors */
  --color-primary: #002663;
  --color-secondary: #FFE600;

  /* Semantic Colors */
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-error: #DC2626;
  --color-info: #3B82F6;

  /* Neutral Colors */
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Text Colors */
  --text-primary: var(--color-gray-900);
  --text-secondary: var(--color-gray-700);
  --text-muted: var(--color-gray-500);

  /* Background Colors */
  --bg-primary: var(--color-gray-50);
  --bg-secondary: white;
  --bg-tertiary: var(--color-gray-200);

  /* Border Colors */
  --border-primary: var(--color-gray-300);
  --border-secondary: var(--color-gray-200);

  /* Badge Background Colors */
  --badge-success-bg: #BBF7D0;
  --badge-warning-bg: #FEF08A;
  --badge-error-bg: #FECACA;
  --badge-info-bg: #BFDBFE;

  /* Badge Text Colors */
  --badge-success-text: #065F46;
  --badge-warning-text: #92400E;
  --badge-error-text: #991B1B;
  --badge-info-text: #1E40AF;

  /* Focus */
  --focus-ring: #93C5FD; /* blue-300 */
}

/* =========================
   Base & Layout
   ========================= */
body {
  font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
}

main {
    padding: 20px;
}

/* =========================
   Header & Navigation
   ========================= */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.navbar-collapse {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-home .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-home img {
    height: 50px;
    width: auto;
}

.nav-mobile-toggle {
    display: none;
    margin-left: auto;
    z-index: 1060;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background-color: #f8f9fa;
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.hamburger-lines span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* =========================
   Buttons & Dropdowns
   ========================= */
.btn {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    color: white;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1050;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    top: 100%;
    left: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #212529;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
}

.dropdown-content hr {
    margin: 5px 0;
    border: none;
    border-top: 1px solid #dee2e6;
}

/* Submenu (e.g. Admin tools) – appears to the right on hover */
.menu-item-with-submenu:hover .dropdown-submenu {
    display: block !important;
}
.dropdown-submenu a {
    color: #212529;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    white-space: nowrap;
}
.dropdown-submenu a:hover {
    background-color: #f8f9fa;
}

/* =========================
   Forms & Tabs
   ========================= */
.tab-btn { border-bottom: 2px solid transparent; color: var(--text-muted); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.tab-content { display: block; }
.tab-content[hidden] { display: none !important; }

.form-input {
  margin-top: 0.25rem;
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 0; /* Sharp corners as per design */
  color: var(--text-primary);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 38, 99, 0.1);
}

/* a11y helpers */
.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; }

/* Focus ring for keyboard users */
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* =========================
   Helper Classes
   ========================= */
.no-scroll {
    overflow: hidden;
}
