/* Shared public identity. Scoped away from admin and printed documents.
   Palette: Biru (Royal Blue), Navy (Deep Midnight), Emas (Warm Gold), Ungu (Royal Purple) */
@media screen {
  body.fkm-public {
    --fkm-navy: #091e3a;
    --fkm-navy-dark: #061221;
    --fkm-navy-deep: #040d18;
    --fkm-navy-card: #0c233c;

    --fkm-blue: #2563eb;
    --fkm-blue-dark: #1d4ed8;
    --fkm-blue-deep: #1e40af;
    --fkm-blue-light: #60a5fa;
    --fkm-blue-soft: #eff6ff;
    --fkm-blue-subtle: #dbeafe;

    --fkm-gold: #f59e0b;
    --fkm-gold-dark: #d97706;
    --fkm-gold-light: #fcd34d;
    --fkm-gold-soft: #fffbeb;
    --fkm-gold-subtle: #fef3c7;
    --fkm-gold-border: #fde68a;

    --fkm-purple: #7c3aed;
    --fkm-purple-dark: #5b21b6;
    --fkm-purple-deep: #4c1d95;
    --fkm-purple-light: #a78bfa;
    --fkm-purple-soft: #faf5ff;
    --fkm-purple-subtle: #f3e8ff;
    --fkm-purple-border: #ddd6fe;

    --fkm-primary: #1d4ed8;
    --fkm-primary-dark: #091e3a;
    --fkm-primary-deep: #061221;
    --fkm-primary-light: #60a5fa;
    --fkm-primary-soft: #eff6ff;
    --fkm-primary-subtle: #dbeafe;

    --fkm-bg: #f8fafc;
    --fkm-border: #e2e8f0;
    --fkm-slate-text: #0f172a;

    --bs-primary: #1d4ed8;
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: #1d4ed8;
    --bs-link-hover-color: #7c3aed;
    --bs-primary-bg-subtle: #eff6ff;
    --bs-primary-text-emphasis: #1d4ed8;
    --bs-primary-border-subtle: #bfdbfe;

    --grad-primary: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
    --grad-hero: linear-gradient(135deg, #061221 0%, #091e3a 40%, #2e1065 80%, #4c1d95 100%);
    --grad-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-purple: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    --grad-accent-text: linear-gradient(135deg, #fcd34d 0%, #a78bfa 50%, #60a5fa 100%);

    background: #f8fafc !important;
    color: #0f172a;
  }

  .fkm-public a:focus-visible,
  .fkm-public button:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 4px;
  }

  /* NAVBAR */
  .fkm-public .navbar-custom {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(9, 30, 58, 0.05);
  }

  .fkm-public .brand-logo-mark {
    background: linear-gradient(135deg, #061221 0%, #091e3a 100%) !important;
    color: #fcd34d !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
    border-radius: 10px;
  }

  .fkm-public .brand-name-main {
    color: #091e3a !important;
  }

  .fkm-public .brand-name-accent {
    color: #1d4ed8 !important;
  }

  .fkm-public .brand-name-main .badge {
    background: #f3e8ff !important;
    color: #7c3aed !important;
    border-color: #ddd6fe !important;
  }

  .fkm-public .nav-item-link {
    color: #334155 !important;
    transition: all 0.2s ease;
  }

  .fkm-public .nav-item-link:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
  }

  .fkm-public .nav-item-link.active {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #bfdbfe;
  }

  .fkm-public .nav-item-link.active i {
    color: #1d4ed8 !important;
  }

  .fkm-public .btn-portal-login {
    background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 700;
    transition: all 0.25s ease;
  }

  .fkm-public .btn-portal-login:hover {
    background: linear-gradient(135deg, #1e40af 0%, #6d28d9 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5) !important;
    color: #ffffff !important;
  }

  /* HERO BANNERS (SUBPAGES: DIREKTORI, JADWAL, KATALOG, PERPUSTAKAAN, VERIFIKASI, PMB, DLL.) */
  .fkm-public :is(.directory-hero-banner, .detail-hero-banner, .student-hero, .student-jenjang-hero, .agenda-hero-banner, .agenda-hero-modern, .ujian-hero, .jadwal-hero, .katalog-hero, .library-hero, .hero-panel, .verif-header, .form-header-banner, .header-gradient, .pmb-hero, .inventory-hero, .semester-hero, .student-profile-hero, .visit-header) {
    background: linear-gradient(135deg, #061221 0%, #091e3a 40%, #2e1065 80%, #4c1d95 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(167, 139, 250, 0.25) !important;
    box-shadow: 0 14px 35px rgba(6, 18, 33, 0.35) !important;
  }

  .fkm-public :is(.directory-hero-banner, .detail-hero-banner, .student-hero, .student-jenjang-hero, .agenda-hero-banner, .ujian-hero, .jadwal-hero, .katalog-hero, .library-hero) :is(h1, h2, h3) {
    color: #ffffff !important;
  }

  .fkm-public :is(.directory-hero-banner, .detail-hero-banner, .student-hero, .student-jenjang-hero, .agenda-hero-banner, .ujian-hero, .jadwal-hero) .text-primary {
    color: #fcd34d !important;
  }

  .fkm-public :is(.detail-hero-icon-box, .section-title-icon, .card-icon-wrapper, .student-hero-icon) {
    background: linear-gradient(135deg, #eff6ff 0%, #f3e8ff 100%) !important;
    border-color: #ddd6fe !important;
    color: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12) !important;
  }

  .fkm-public :is(.dir-orb, .agenda-orb, .hero-orb) {
    background: radial-gradient(circle, #a78bfa 0%, #f59e0b 80%) !important;
    opacity: 0.18 !important;
    filter: blur(40px);
  }

  /* CARDS & MODULES */
  .fkm-public :is(.card, .dashboard-card, .public-data-card, .chart-card-modern, .verif-card, .agenda-card, .kpi-metric-card, .student-card, .table-card) {
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 18px rgba(9, 30, 58, 0.05) !important;
    transition: all 0.25s ease;
  }

  .fkm-public :is(.public-data-card, .dashboard-card, .dir-module-card) {
    border-top: 3px solid #f59e0b !important;
  }

  .fkm-public :is(.public-data-card, .dashboard-card, .dir-module-card):hover {
    border-color: #a78bfa !important;
    border-top: 3px solid #7c3aed !important;
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.12) !important;
    transform: translateY(-3px);
  }

  /* BUTTONS */
  .fkm-public .btn-primary,
  .fkm-public .btn-login-submit {
    --bs-btn-bg: #1d4ed8;
    --bs-btn-border-color: #1d4ed8;
    --bs-btn-hover-bg: #1e40af;
    --bs-btn-hover-border-color: #1e40af;
    --bs-btn-active-bg: #1e40af;
    --bs-btn-active-border-color: #1e40af;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3) !important;
  }

  .fkm-public .btn-primary:hover,
  .fkm-public .btn-login-submit:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.45) !important;
    transform: translateY(-1px);
  }

  .fkm-public .btn-outline-primary {
    --bs-btn-color: #1d4ed8;
    --bs-btn-border-color: #93c5fd;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1d4ed8;
    color: #1d4ed8;
    border-color: #93c5fd;
  }

  .fkm-public .btn-outline-primary:hover,
  .fkm-public .btn-outline-primary.active {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
  }

  /* GOLD BUTTON & PURPLE BUTTON UTILITIES */
  .fkm-public .btn-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #061221 !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
  }

  .fkm-public .btn-gold:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #061221 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.45) !important;
  }

  .fkm-public .btn-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
  }

  .fkm-public .btn-purple:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45) !important;
  }

  /* BADGES & SUBTLES */
  .fkm-public .bg-primary {
    background-color: #1d4ed8 !important;
  }

  .fkm-public .badge.bg-primary {
    color: #ffffff !important;
  }

  .fkm-public .bg-primary-subtle {
    background-color: #eff6ff !important;
  }

  .fkm-public .badge.bg-primary-subtle {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
  }

  .fkm-public .border-primary,
  .fkm-public .border-primary-subtle {
    border-color: #bfdbfe !important;
  }

  .fkm-public .text-primary {
    color: #1d4ed8 !important;
  }

  .fkm-public .nav-pills .nav-link.active,
  .fkm-public .page-item.active .page-link {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
  }

  .fkm-public .page-link {
    color: #1d4ed8;
  }

  .fkm-public .nav-tabs .nav-link.active {
    color: #1d4ed8 !important;
    border-bottom: 2px solid #f59e0b !important;
  }

  /* FORMS */
  .fkm-public :is(.form-control, .form-select, .form-input-control) {
    border-color: #cbd5e1;
    border-radius: 8px;
  }

  .fkm-public :is(.form-control, .form-select, .form-input-control):focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.2) !important;
  }

  .fkm-public .form-check-input:checked {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
  }

  /* TABLES */
  .fkm-public .table {
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #eff6ff;
    --bs-table-border-color: #e2e8f0;
  }

  .fkm-public .table thead th {
    background: #091e3a !important;
    color: #ffffff !important;
    border-bottom: 2px solid #f59e0b !important;
    font-weight: 700;
  }

  .fkm-public .progress-bar {
    background: linear-gradient(90deg, #1d4ed8 0%, #7c3aed 100%) !important;
  }

  .fkm-public .breadcrumb {
    font-size: 0.82rem;
  }

  .fkm-public .dropdown-item:active {
    background: #1d4ed8;
  }

  .fkm-public .dropdown-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .fkm-public .ui-scroll-progress {
    background: linear-gradient(90deg, #f59e0b 0%, #7c3aed 100%) !important;
  }

  .fkm-public .ui-top-button {
    background: #091e3a !important;
    border-color: #f59e0b !important;
    color: #fcd34d !important;
  }

  .fkm-public #footer-contact {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  .fkm-public .gradient-text {
    background: linear-gradient(135deg, #fcd34d 0%, #a78bfa 50%, #60a5fa 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    color: transparent !important;
  }

  .fkm-public .ambient-canvas {
    background: #f8fafc !important;
  }

  .fkm-public .ambient-orb {
    background: radial-gradient(circle, #7c3aed 0%, #f59e0b 100%) !important;
    opacity: 0.12 !important;
  }

  .fkm-public .pill-role.active,
  .fkm-public .tab-btn-mini.active {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
  }

  .fkm-public :is(.dir-icon-box, .dir-count-badge, .header-verified-badge) {
    background: linear-gradient(135deg, #eff6ff 0%, #f3e8ff 100%) !important;
    color: #7c3aed !important;
    border-color: #ddd6fe !important;
    box-shadow: none !important;
  }

  .fkm-public :is(.btn-dir-action, .btn-view-data) {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
  }

  .fkm-public :is(.btn-dir-action, .btn-view-data):hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
  }

  .fkm-public .dir-tab-btn.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%) !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
  }

  .fkm-public .breadcrumb-item.active {
    color: #091e3a !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
  }

  .fkm-public .header-glass-badge {
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #fde68a !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px);
  }

  .fkm-public :is(.directory-hero-banner, .detail-hero-banner) h1 span[style] {
    background: none !important;
    -webkit-text-fill-color: #fcd34d !important;
    color: #fcd34d !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  body.fkm-public *,
  body.fkm-public *:before,
  body.fkm-public *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* =========================================================
   ADMIN DASHBOARD THEME HARMONIZATION (FKM SATUDATA)
   Aligns Admin Dashboard with Public Beranda Bootstrap Theme
   ========================================================= */
body.fkm-admin {
  background-color: #f8fafc !important;
  color: #0f172a;
}

/* Sidebar Brand Squircle matching Public Navbar Logo */
body.fkm-admin .sidebar-brand-logo-squircle {
  background: linear-gradient(135deg, #061221 0%, #091e3a 100%) !important;
  color: #fcd34d !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
  font-weight: 800;
}

body.fkm-admin .sidebar-brand-title-text {
  color: #091e3a !important;
  font-weight: 800;
}

body.fkm-admin .sidebar-brand-badge-tag::before {
  background-color: #f59e0b !important;
}

/* Sidebar Menu Links */
body.fkm-admin .sidebar-link:hover {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

body.fkm-admin .sidebar-link:hover .sidebar-icon-box {
  color: #1d4ed8 !important;
}

body.fkm-admin .sidebar-link.active {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  box-shadow: inset 0 0 0 1px #bfdbfe !important;
  font-weight: 700;
}

body.fkm-admin .sidebar-link.active::before {
  background: linear-gradient(180deg, #1d4ed8 0%, #7c3aed 100%) !important;
}

body.fkm-admin .sidebar-link.active .sidebar-icon-box {
  color: #1d4ed8 !important;
}

/* Admin Top Navbar */
body.fkm-admin .admin-navbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(9, 30, 58, 0.05) !important;
}

body.fkm-admin .navbar-search-pill:focus-within,
body.fkm-admin .navbar-search-box:focus-within {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

/* Admin Hero Banner & Cards */
body.fkm-admin .card-edunova {
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(9, 30, 58, 0.05) !important;
}

body.fkm-admin :is(.card, .dashboard-card, .table-card, .stat-card) {
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(9, 30, 58, 0.04) !important;
  transition: all 0.25s ease;
}

/* Buttons in Admin */
body.fkm-admin .btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3) !important;
}

body.fkm-admin .btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.45) !important;
  transform: translateY(-1px);
}

/* Tables in Admin */
body.fkm-admin .table-admin th,
body.fkm-admin .table th {
  background: #f8fafc;
  color: #091e3a;
  border-bottom: 1.5px solid #e2e8f0;
}

body.fkm-admin .table-admin tbody tr:hover td,
body.fkm-admin .table tbody tr:hover td {
  background-color: #eff6ff !important;
}