:root {
  --brand: #0b7a4b;         /* Oman green */
  --brand-600: #0a6a42;
  --brand-700: #085836;
  --gov-red: #c8102e;       /* Oman red */
  --gov-gold: #c9a227;      /* Accent gold */
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #fde68a;
  --elev-1: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.03);
  --elev-2: 0 2px 6px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --elev-3: 0 6px 18px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.08);
}

body { background: radial-gradient(1200px 600px at 100% -200px, rgba(11,122,75,.08), transparent 60%), var(--bg); color: var(--text); font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif; }
body.page-enter { animation: fadeSlideIn .4s ease both; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Government ribbon and navbar */
.gov-ribbon { height: 6px; background: linear-gradient(90deg, var(--gov-red), var(--gov-red) 25%, #fff 25%, #fff 50%, #007a3d 50%, #007a3d 100%); }
.gov-navbar { border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%); backdrop-filter: saturate(180%) blur(4px); }
.gov-navbar .navbar-brand { color: var(--brand) !important; font-weight: 800; letter-spacing: .2px; }
.gov-navbar .nav-link { transition: color .2s ease, background-color .2s ease; border-radius: .5rem; }
.gov-navbar .nav-link:hover { color: var(--brand) !important; background: rgba(11,122,75,.08); }
.brand-emblem { display:inline-flex; align-items:center; justify-content:center; border-radius:50%; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.brand-logo { height: 36px; width: auto; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.08)); }
.brand-text small { font-size: .68rem; }

/* Cards (Material-ish) */
.card { border: 1px solid var(--border); box-shadow: var(--elev-2); border-radius: 16px; background: var(--card); }
.card .card-body { animation: fadeSlideIn .35s ease both; }
.card-hover:hover { box-shadow: var(--elev-3); transition: box-shadow .2s ease; }
.card .card-title { border-inline-start: 4px solid var(--brand); padding-inline-start: .5rem; }

/* Tables */
.table { --bs-table-striped-bg: rgba(14,165,163,.05); }
.table thead th { color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.table tbody tr { transition: background-color .2s ease; }
.table tbody tr:hover { background: rgba(14,165,163,.04); }

/* Buttons */
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-secondary { background: #334155; border-color: #334155; }
.btn-secondary:hover { background: #1f2937; border-color: #1f2937; }
.btn-success { background: #0b7a4b; border-color: #0b7a4b; }
.btn-success:hover { background: #0a6a42; border-color: #0a6a42; }

/* Material ripple (basic) */
.ripple { position: relative; overflow: hidden; }
.ripple::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; }
.ripple:active::after { animation: ripple .5s ease-out; }
@keyframes ripple {
  0% { opacity: .35; background: rgba(255,255,255,.5); }
  100% { opacity: 0; background: transparent; }
}

/* Badges and labels */
.badge.bg-warning { background-color: var(--accent) !important; color: #7c5f00; }

/* Utilities */
.shadow-soft { box-shadow: 0 10px 30px rgba(2, 43, 61, 0.06); }
.rounded-xl { border-radius: 16px; }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* Links */
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
.gov-footer { margin-top: 2rem; padding: 1rem 0; color: var(--muted); border-top: 1px solid var(--border); font-size: .9rem; }
.gov-footer .credits { color: #64748b; }

/* Dark mode */
body.theme-dark {
  --bg: #0b1220;
  --card: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2a44;
}
body.theme-dark .navbar { border-color: var(--border); }
body.theme-dark .table tbody tr:hover { background: rgba(255,255,255,.04); }

/* Bottom navigation (mobile) */
.bottom-nav { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--border); box-shadow: var(--elev-1); }
.bottom-nav .nav { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; padding: .25rem .5rem; }
.bottom-nav .nav a { color: var(--muted); padding: .35rem 0; font-size: .85rem; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bottom-nav .nav a .material-symbols-outlined { font-size: 22px; line-height: 1; }
.bottom-nav .nav a.active { color: var(--brand); background: rgba(14,165,163,.08); }

@media (min-width: 992px) {
  .bottom-nav { display: none; }
}

/* Keep content above bottom nav */
@media (max-width: 991.98px) {
  main.container { padding-bottom: 76px; }
}

/* Print styles */
@media print {
  nav.navbar, .bottom-nav, .btn, .nav, .navbar-toggler { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
