html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

.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: 16px;
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  min-height: 100vh; /* fill viewport */
}

/* App content fills remaining space; let row define height for sidebar */
.app-content { flex: 1 1 auto; }
.app-content > .row.h-100 { height: 100%; }

/* Footer stays visible and compact */
footer { flex-shrink: 0; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }

:root {
  --blue: #3498DB;
  --blue-light: #5DADE2;
  --text-dark: #2C3E50;
  --bg-light: #F9FAFB;
  --white: #FFFFFF;
  --navy-1: #0F2027;
  --navy-2: #203A43;
  --navy-3: #2C5364;
  --cobalt: #0047AB;           /* cobalt for hero */
  --cobalt-600: #003B8E;       /* darker cobalt */

  --pm-primary: var(--blue);
  --pm-primary-600: #2d7fb8;
  --pm-accent: #10b981;
  --pm-warning: #f59e0b;
  --pm-danger: #ef4444;
  --pm-surface: var(--bg-light);
  --pm-muted: #64748b;
  --pm-border: #e5e7eb;

  --bs-primary: var(--pm-primary);
  --bs-primary-rgb: 52, 152, 219;
  --bs-link-color: var(--pm-primary);
  --bs-link-hover-color: var(--pm-primary-600);
}

/* Navbar */
.navbar { border-bottom: 1px solid var(--pm-border) !important; }
.navbar-brand img { display: block; height: 28px; width: auto; }

/* Stronger separation between menu (sidebar) and main content */
aside {
  background: var(--bg-light);
  border-right: 1px solid rgba(44,62,80,.12); /* stronger divider */
  box-shadow: 4px 0 16px -8px rgba(0,0,0,.12); /* subtle inner shadow for contrast */
}

/* Sidebar list group becomes a rounded, padded nav */
aside .list-group { padding: 8px; height: 100%; }
aside .list-group .list-group-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--text-dark);
  padding: 10px 12px;
  background: transparent;
  border-radius: 10px; /* rounded corners on item */
  transition: background-color .18s ease, color .18s ease, border-left-color .18s ease, border-left-width .18s ease, transform .18s ease, box-shadow .18s ease;
}
aside .list-group .list-group-item .dot {
  width: 8px; height: 8px; border-radius: 50%; opacity: .9; background: var(--blue);
}
aside .list-group .list-group-item:hover,
aside .list-group .list-group-item:focus,
aside .list-group .list-group-item:focus-visible {
  background: rgba(52,152,219,.16);
  border-left-color: var(--blue);
  border-left-width: 4px;
  color: var(--text-dark);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
}
aside .list-group .list-group-item.active,
aside .list-group .list-group-item:active {
  background: var(--blue);
  color: var(--white);
  border-left-color: var(--blue);
  border-left-width: 4px;
}

/* Make main content sit on a distinct white surface for contrast */
.app-content main {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(16,24,40,.08), 0 2px 8px rgba(16,24,40,.06);
}

/* Cards */
.card-theme { border: 1px solid #d0d7de; border-top: 4px solid var(--pm-primary); background-color: #fff; }

.badge-free { background-color: var(--pm-accent); }
.badge-paid { background-color: var(--pm-warning); color: #111; }

.table thead th { border-bottom: 2px solid var(--pm-border); }
.table tbody tr:hover { background-color: #fafafa; }

.a-muted, .link-muted { color: var(--pm-muted); text-decoration: none; }
.link-muted:hover { color: var(--pm-primary); text-decoration: underline; }

.hr-soft { height: 1px; background: var(--pm-border); border: 0; margin: 1rem 0; }

figure > figcaption { font-style: italic; color: var(--pm-muted); margin-top: .5rem; }

img[alt="QR"] { border: 1px solid var(--pm-border); padding: 2px; background: #fff; }

/* Landing page hero: modern cobalt tone with better contrast */
.hero {
  background: linear-gradient(180deg, rgba(0,71,171,.95), rgba(0,71,171,.85));
  color: #fff;
  border: none;
  border-left: 0; border-right: 0;
}
.hero .display-5, .hero h1, .hero h2, .hero p { color: #fff !important; }
.hero .text-muted { color: rgba(255,255,255,.85) !important; }
.hero-logo { height: 72px; width: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }

/* Home cards: stronger contrast vs page background */
.container-3d {
  padding: 1rem 0 2rem;
  background: linear-gradient(180deg, #ffffff, #f3f6fa);
  border-top: 1px solid var(--pm-border);
  border-bottom: 1px solid var(--pm-border);
}
.tilt-card {
  background: #fff;
  border: 1px solid #d0d7de; /* slightly stronger border for contrast */
  border-radius: .75rem;
  box-shadow: 0 8px 18px rgba(16,24,40,.08), 0 2px 8px rgba(16,24,40,.06);
  transform-style: preserve-3d;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tilt-card:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(16,24,40,.12), 0 3px 10px rgba(16,24,40,.08); border-color: #c2cbd4; }
.tilt-card.accent { border-top: 4px solid var(--pm-accent); }
.tilt-card.info { border-top: 4px solid var(--pm-primary); }

/* Compact footer */
.footer-min { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.footer-min .container { gap: .25rem; }
.footer-min .nav .nav-link { padding-left: .5rem; padding-right: .5rem; }
.footer-min, .footer-min a { font-size: .875rem; }

@media (min-height: 1200px) {
  .footer-min .container { padding-top: .25rem; padding-bottom: .25rem; }
}