/* ============================================================
   SchoolUtility.com — Tool Polish Layer
   Safe overrides layered on top of Bootstrap / Tailwind tool
   pages. Touches presentation only — never logic or IDs.
   ============================================================ */

:root {
  --su-primary: #1e3a8a;
  --su-secondary: #3b82f6;
  --su-accent: #ec4899;
  --su-grad: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 60%, #6366f1 100%);
}

body { font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; }
.odia-font, [lang="or"], .receipt-content { font-family: 'Noto Sans Oriya', 'Poppins', sans-serif; }

img { max-width: 100%; height: auto; }

/* ---- Brand bar replacement for broken logo ---- */
.su-brandtext {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 1.18rem; color: var(--su-primary); letter-spacing: -.02em;
  text-decoration: none;
}
.su-brandtext .dot { color: var(--su-accent); }
.su-brandtext .emoji { font-size: 1.4rem; }
.navbar .su-brandtext { color: #fff; }
.footer .su-brandtext, .su-footer .su-brandtext { color: #fff; }

/* ---- Navbar: consistent brand gradient ---- */
.navbar.fixed-top, .navbar.navbar-expand-lg {
  background: var(--su-grad) !important;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .18);
}
.navbar .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: #fff !important; }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler i { color: #fff; }

/* ---- Buttons: brand gradients ---- */
.btn-primary, .btn-success {
  background: var(--su-grad) !important;
  border: none !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 20px rgba(59,130,246,.3);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover, .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(59,130,246,.42);
  filter: brightness(1.03);
}
.btn-success { background: linear-gradient(135deg,#0f766e,#10b981) !important; box-shadow: 0 8px 20px rgba(16,185,129,.3); }

/* ---- Form controls: friendlier focus + touch targets ---- */
.form-control, .form-select, input[type="text"], input[type="number"],
input[type="date"], input[type="email"], select, textarea {
  border-radius: 10px !important;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--su-secondary) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.18) !important;
}

/* ---- Cards / containers: soften ---- */
.card, .glass-card { border-radius: 16px !important; }

/* ---- Tables: never overflow the screen on mobile ---- */
@media (max-width: 760px) {
  .table-responsive, .overflow-x-auto { -webkit-overflow-scrolling: touch; }
  table:not(.receipt-table) {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---- Mobile padding / sizing niceties ---- */
@media (max-width: 576px) {
  body.p-4 { padding: 12px !important; }
  h1 { font-size: 1.6rem !important; }
  .navbar-brand img { width: 120px !important; height: auto !important; }
  .btn { font-size: .95rem; }
}

/* ---- Accessible keyboard focus ---- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid #93c5fd; outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
