/* Base sizing */
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Focus outlines tuned for brand color */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  /* New: smoother font and pleasant background */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: #263238;
  background: linear-gradient(180deg, #f6fbff 0%, #eef6ff 50%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Design tokens */
:root {
  --brand: #1976d2; /* primary */
  --brand-600: #1565c0;
  --muted: #6b7276;
  --card-bg: rgba(255,255,255,0.9);
  --glass-border: rgba(34, 51, 68, 0.08);
}

/* Page container and main area */
.container {
  max-width: 1100px;
}

main[role="main"] {
  padding-top: 28px;
  padding-bottom: 48px;
}

/* Header / Navbar improvements */
.navbar {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(250,250,250,0.9));
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: saturate(120%) blur(4px);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--brand) !important;
}

.navbar .nav-link {
  color: #37474f !important;
  transition: color .18s ease, transform .12s ease;
}

.navbar .nav-link:hover {
  color: var(--brand-600) !important;
  transform: translateY(-1px);
}

/* Subtle card style for content blocks */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(19, 38, 63, 0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(19, 38, 63, 0.08);
}

/* Make forms look nicer */
.form-control {
  border-radius: 8px;
  border: 1px solid rgba(34,51,68,0.12);
  padding: 0.6rem 0.75rem;
  background: linear-gradient(180deg, #fff, #fbfdff);
  transition: box-shadow .12s ease, border-color .12s ease, transform .08s ease;
}

.form-control:focus {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.form-label {
  font-weight: 600;
  color: #263238;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-600));
  border: none;
  box-shadow: 0 6px 14px rgba(25,118,210,0.18);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.btn-primary:hover, .btn-primary:focus {
  filter: brightness(1.03);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(25,118,210,0.16);
}

.btn-secondary {
  border-radius: 8px;
}

/* Tables */
.table-responsive-card {
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  padding: 12px;
  border: 1px solid rgba(34,51,68,0.06);
  box-shadow: 0 8px 24px rgba(19,38,63,0.04);
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #263238;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: transparent;
}

.table thead th {
  border-bottom: none;
  color: #37474f;
  font-weight: 700;
  background: transparent;
  padding: 0.75rem 0.75rem;
}

/* Make table body rows look like cards so they stand out from the page bg */
.table tbody tr {
  background: #ffffff; /* stronger contrast against page gradient */
  border: 1px solid rgba(25,118,210,0.06); /* faint brand-tinted border */
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(19, 38, 63, 0.04);
}

.table tbody tr td {
  vertical-align: middle;
  border-top: none;
  border-bottom: none;
  padding: 0.65rem 0.75rem;
}

/* Striped rows: subtle contrast to improve readability */
.table.table-striped tbody tr:nth-of-type(odd) {
  background: #ffffff;
}

.table.table-striped tbody tr:nth-of-type(even) {
  background: #fbfdff;
}

/* Hover state for rows */
.table tbody tr:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(19, 38, 63, 0.06);
}

/* Header row visuals: floating header look */
.table thead th {
  background: rgba(255,255,255,0.95);
}

/* Make small tables and inline controls align nicely */
.table .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.88rem;
}

/* When embedding a table use .content-card to wrap it for consistent look */
.content-card .table {
  border-radius: 10px;
  overflow: hidden;
}

/* Responsive small screen adjustments */
@media (max-width: 575.98px) {
  .table thead {
    display: none;
  }

  .table tbody tr {
    display: block;
    margin-bottom: 12px;
  }

  .table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 10px;
  }
}

/* Utility spacing for pages */
.page-title {
  margin-bottom: 18px;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Small screens adjustments */
@media (max-width: 575.98px) {
  .content-card { padding: 14px; border-radius: 10px; }
  .navbar-brand { font-size: 1.02rem; }
}

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Preserve minimal existing overrides - keep at bottom to win specificity if needed */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}