/* ============================================================
   UVAS Option B — Core Theme (uvas-core.css)
   ============================================================ */

/* 1. Global Reset & Base Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #222222;
  background-color: #f5f7fa;
}

/* 2. Option B Palette & Tokens */
:root {
  --uvas-deep-blue: #003366;
  --uvas-olive: #6E7B6E;
  --uvas-sand: #BE8D26;
  --uvas-gold-strong: #CC9900;
  --uvas-white: #FFFFFF;
  --uvas-charcoal: #222222;

  --uvas-radius-card: 12px;
  --uvas-radius-pill: 999px;

  --uvas-spacing-xs: 4px;
  --uvas-spacing-sm: 8px;
  --uvas-spacing-md: 16px;
  --uvas-spacing-lg: 24px;
  --uvas-spacing-xl: 32px;

  --uvas-font-size-sm: 14px;
  --uvas-font-size-base: 16px;
  --uvas-font-size-lg: 18px;
  --uvas-font-size-xl: 22px;

  --uvas-shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.08);
  --uvas-shadow-strong: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 3. App Layout */
.uvas-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f7fa;
}

/* 4. Header — Clean, Compact, Inline, Left-Aligned */
.uvas-header--resident {
  background: linear-gradient(135deg, var(--uvas-deep-blue), var(--uvas-sand));
  color: var(--uvas-white);
  padding: 0;
  box-shadow: var(--uvas-shadow-soft);
}

.uvas-header-inner.uvas-header-horizontal {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--uvas-spacing-sm);
  padding: 8px 16px;
  text-align: left;
}

/* Logo */
#uvasLogo.uvas-logo-inline {
  height: 52px;
  width: auto;
  display: inline-block;
}
.uvas-v-highlight {
  color: var(--uvas-gold);   /* Option‑B gold */
  font-weight: 700;
}
.uvas-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Welcome line */
.uvas-header-title-inline {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--uvas-white);
  white-space: nowrap;
}

/* 5. Main Content / Card Hub */
.uvas-main {
  flex: 1;
  padding: 24px 16px;
}

.uvas-main-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 6. Cards */
.uvas-card {
  background-color: var(--uvas-white);
  border-radius: var(--uvas-radius-card);
  box-shadow: var(--uvas-shadow-soft);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.uvas-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--uvas-deep-blue);
}

/* 7. Buttons / Quick Actions */
.uvas-button-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.uvas-button {
  min-width: 120px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--uvas-radius-pill);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Primary (Deep Blue) */
.uvas-button--primary {
  background-color: var(--uvas-deep-blue);
  color: var(--uvas-white);
}

.uvas-button--primary:hover {
  background-color: #00264d;
  box-shadow: var(--uvas-shadow-soft);
}

/* Secondary (Olive / Sand mix) */
.uvas-button--secondary {
  background-color: var(--uvas-olive);
  color: var(--uvas-white);
}

.uvas-button--secondary:hover {
  background-color: #5b685b;
  box-shadow: var(--uvas-shadow-soft);
}

/* 8. Footer */
.uvas-footer {
  background-color: var(--uvas-white);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
}

.uvas-footer-link {
  flex: 1 1 25%;            /* 4 items per row by default */
  min-height: 40px;
  padding: 6px 10px;
  border-radius: var(--uvas-radius-pill);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--uvas-deep-blue);
  background-color: rgba(0, 51, 102, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.uvas-footer-link--active {
  background-color: rgba(0, 51, 102, 0.8);
  color: var(--uvas-white);
}

/* 9. Icons (placeholder sizing) */
.uvas-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
}

/* 10. Responsive */
@media (max-width: 640px) {
  .uvas-main {
    padding: 16px 12px;
  }

  .uvas-main-inner {
    gap: 24px;
  }

  .uvas-header-inner.uvas-header-horizontal {
    padding: 8px 12px;
    gap: var(--uvas-spacing-xs);
  }

  .uvas-header-title-inline {
    font-size: 1.1rem;
  }
}
/* ============================================================
   Resident Home — 2‑Column Layout for All Groups
   ============================================================ */

/* Apply to all card groups */
.uvas-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* always two columns */
  gap: 12px;
}

/* Buttons inside grids — compact for mobile */
.uvas-card-grid .uvas-button {
  padding: 12px 10px;
  font-size: 0.9rem;
  min-height: 44px;
}

/* Optional: tighter spacing on very small screens */
@media (max-width: 400px) {
  .uvas-card-grid {
    gap: 10px;
  }

  .uvas-card-grid .uvas-button {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
}
/* 2‑column layout for all button groups on Resident Home */
.uvas-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.uvas-button-row .uvas-button {
  width: 100%;
  justify-content: center;
}
.uvas-footer-nav {
  display: flex;
  flex-wrap: wrap;          /* allow wrapping if very narrow */
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* On very narrow screens, allow 2 per row */
@media (max-width: 480px) {
  .uvas-footer-link {
    flex: 1 1 50%;
  }
}
.uvas-login-screen .uvas-btn-primary {
  width: 100%;
}
/* Force logout to behave exactly like other footer links */
.uvas-footer-link.logout {
  flex: 1 1 25%;
  display: flex;
  justify-content: center;
  width: auto !important;
  text-align: center;
}
/* Kill-switch: neutralise old button styles */
.btn-action,
.button,
.aveo-button {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* Kill-switch: neutralise old input styles */
.text-input,
.aveo-input {
  all: unset;
  box-sizing: border-box;
  width: 100%;
}
/* Kill-switch: stop legacy logout rules from breaking the footer */
.logout {
  all: unset;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
}
/* Footer protection layer */
.uvas-footer-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 1 1 25% !important;
  width: auto !important;
}
/* Force the new homepage grid to win */
.uvas-button-row {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
/* Login screen: full-width Continue button */
.uvas-login-screen .uvas-btn-primary {
  width: 100% !important;
}
