@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Electric Blue Accent */
  --electric-blue: #0052FF;
  --electric-blue-hover: #0043D4;
  --electric-blue-active: #0038B3;
  --electric-blue-light: #EFF4FF;
  --electric-blue-glow: 0 4px 16px rgba(0, 82, 255, 0.32);

  /* Modern Theme Colors (Light Mode) */
  --bg-page: #E9EEF5;
  --bg-surface: #FFFFFF;
  --border-light: #E5E7EB;
  --border-subtle: #F0F2F5;

  /* Typography */
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;

  /* Specific Surface Tokens */
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  --sidebar-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);

  --nav-hover-bg: #F8FAFC;
  --nav-active-bg: #FFFFFF;
  --nav-active-border: #E5E7EB;
  --nav-active-color: #111827;
  --nav-active-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);

  --table-th-bg: #FAFCFF;
  --table-hover-bg: #F8FAFD;

  /* Dimensions */
  --sidebar-expanded-width: 260px;
  --sidebar-collapsed-width: 68px;
  --sidebar-margin: 0px;
  
  --transition-default: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   DARK MODE SYSTEM
   ======================================================== */
html.dark-mode,
body.dark-mode {
  --bg-page: #0B0F17;
  --bg-surface: #141C28;
  --border-light: #232E40;
  --border-subtle: #1B2533;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --card-bg: #141C28;
  --card-border: #232E40;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --sidebar-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  --header-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);

  --nav-hover-bg: #182232;
  --nav-active-bg: #1B2535;
  --nav-active-border: #2E3D52;
  --nav-active-color: #FFFFFF;
  --nav-active-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

  --table-th-bg: #0F1622;
  --table-hover-bg: #1A2434;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: clip;
  transition: background-color var(--transition-default), color var(--transition-default);
}

/* App Layout */
.app-layout {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  position: relative;
  display: flex;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Unified Sidebar (Untitled UI / Modern Enterprise Dashboard) */
.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-expanded-width);
  background: var(--bg-surface);
  border: none;
  border-right: 1px solid var(--border-light);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition-default),
              transform var(--transition-default),
              background-color var(--transition-default),
              border-color var(--transition-default);
  overflow: hidden;
}

/* Sidebar Header */
.sidebar-header {
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  transition: padding var(--transition-default);
  flex-shrink: 0;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.brand-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-wrapper:hover .brand-logo-img {
  transform: scale(1.08);
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.brand-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-transform: uppercase;
}

/* Sidebar Room Switcher (Clean simple regular dropdown) */
.sidebar-room-area {
  padding: 10px 12px 4px 12px;
  flex-shrink: 0;
}

.sidebar-room-wrap {
  position: relative;
  width: 100%;
}

.sidebar-room-btn,
.sidebar-room-static {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--nav-hover-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-align: left;
}

html.dark-mode .sidebar-room-btn,
html.dark-mode .sidebar-room-static {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-room-btn:hover {
  background-color: var(--bg-surface);
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px var(--electric-blue-light);
}

html.dark-mode .sidebar-room-btn:hover {
  background-color: rgba(0, 82, 255, 0.12);
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.2);
}

.sidebar-room-current-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  flex: 1;
}

.sidebar-room-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
  margin-left: 6px;
}

.sidebar-room-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: dropdownSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark-mode .sidebar-room-dropdown {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.sidebar-room-dropdown.show {
  display: flex;
}

.sidebar-room-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}

.sidebar-room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.sidebar-room-item:hover {
  background-color: var(--nav-hover-bg);
  color: var(--text-primary);
}

.sidebar-room-item.active {
  background-color: var(--electric-blue-light);
  color: var(--electric-blue);
  font-weight: 600;
}

html.dark-mode .sidebar-room-item.active {
  background-color: rgba(0, 82, 255, 0.16);
  color: #60A5FA;
}

.sidebar-room-item-name {
  font-size: 13px;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-room-check {
  width: 14px;
  height: 14px;
  color: var(--electric-blue);
  flex-shrink: 0;
}

html.dark-mode .sidebar-room-check {
  color: #60A5FA;
}

/* Top Right Collapse Button matching the image icon */
.sidebar-collapse-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-collapse-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--electric-blue);
}

.sidebar-collapse-btn svg {
  width: 18px;
  height: 18px;
}

.sidebar-icon-desktop {
  display: block;
}

.sidebar-icon-mobile {
  display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 16px 12px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

html.dark-mode .sidebar-nav {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

html.dark-mode .sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

html.dark-mode .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.sidebar-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 12px 10px 12px;
  letter-spacing: 0.02em;
}

/* Nav Item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--nav-hover-bg);
  color: var(--text-primary);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item-icon svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-item:hover .nav-item-icon svg {
  color: var(--text-primary);
}

/* Active State matching "Dashboard" in the image */
.nav-item.active {
  background-color: var(--nav-active-bg);
  border: 1px solid var(--nav-active-border);
  box-shadow: var(--nav-active-shadow);
  color: var(--nav-active-color);
  font-weight: 700;
}

.nav-item.active .nav-item-icon svg {
  color: var(--nav-active-color);
}

/* ========================================================
   SUBNAV GROUP SYSTEM (PERIZINAN)
   ======================================================== */
.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-item-has-sub {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.nav-item-arrow {
  margin-left: auto;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.nav-item-arrow svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.nav-group.open .nav-item-arrow svg {
  transform: rotate(180deg);
}

/* Untitled UI Subnav with vertical guide tree line */
.sidebar-subnav {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 6px 20px;
  padding-left: 14px;
  border-left: 2px solid var(--border-light);
}

.nav-group.open .sidebar-subnav {
  display: flex;
}

.subnav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.subnav-dot {
  position: absolute;
  left: -19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--text-muted);
  transition: all 0.15s ease;
}

.subnav-item:hover {
  color: var(--text-primary);
  background-color: var(--nav-hover-bg);
}

.subnav-item:hover .subnav-dot {
  border-color: var(--electric-blue);
  background-color: var(--electric-blue);
}

.subnav-item.active {
  color: var(--electric-blue);
  font-weight: 700;
  background-color: var(--electric-blue-light);
}

html.dark-mode .subnav-item.active {
  background-color: rgba(0, 82, 255, 0.16);
  color: #60A5FA;
}

.subnav-item.active .subnav-dot {
  border-color: var(--electric-blue);
  background-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.25);
}

body.sidebar-collapsed .nav-item-arrow,
body.sidebar-collapsed .sidebar-subnav {
  display: none !important;
}

/* ========================================================
   SIDEBAR FOOTER - PROFILE CARD (UNTITLED UI BOTTOM)
   ======================================================== */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-profile-card:hover {
  background-color: var(--nav-hover-bg);
  border-color: var(--border-light);
}

.sidebar-profile-card.active {
  background-color: var(--electric-blue-light);
  border-color: rgba(0, 82, 255, 0.25);
}

html.dark-mode .sidebar-profile-card.active {
  background-color: rgba(0, 82, 255, 0.16);
  border-color: rgba(96, 165, 250, 0.3);
}

.sidebar-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052FF 0%, #1D4ED8 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 82, 255, 0.28);
}

.sidebar-profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-profile-email {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-profile-card:hover .sidebar-profile-name {
  color: var(--electric-blue);
}

html.dark-mode .sidebar-profile-card:hover .sidebar-profile-name {
  color: #60A5FA;
}

.sidebar-profile-action {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-profile-chevron {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.sidebar-profile-card:hover .sidebar-profile-chevron {
  color: var(--electric-blue);
}

/* ========================================================
   COLLAPSED STATE (matching the right column in the image)
   ======================================================== */
body.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-header {
  padding: 0;
  justify-content: center;
}

body.sidebar-collapsed .brand-wrapper {
  justify-content: center;
  cursor: pointer;
}

body.sidebar-collapsed .brand-logo-wrap {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.sidebar-collapsed .brand-wrapper:hover .brand-logo-wrap {
  transform: scale(1.08);
  border-color: var(--electric-blue);
  box-shadow: 0 2px 10px rgba(0, 82, 255, 0.25);
}

body.sidebar-collapsed .brand-info {
  display: none;
}

body.sidebar-collapsed .brand-title {
  display: none;
}

body.sidebar-collapsed .brand-subtitle {
  display: none;
}

body.sidebar-collapsed .sidebar-collapse-btn {
  display: none;
}

body.sidebar-collapsed .sidebar-room-area {
  display: none !important;
}

body.sidebar-collapsed .sidebar-nav {
  padding: 16px 8px;
  align-items: center;
}

body.sidebar-collapsed .sidebar-section-label {
  display: none;
}

body.sidebar-collapsed .nav-item {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

body.sidebar-collapsed .nav-item-text {
  display: none;
}

/* Active state in collapsed mode: rounded box container */
body.sidebar-collapsed .nav-item.active {
  background: var(--nav-active-bg);
  border: 1px solid var(--nav-active-border);
  box-shadow: var(--nav-active-shadow);
}

body.sidebar-collapsed .nav-item.active .nav-item-icon svg {
  color: var(--nav-active-color);
}

body.sidebar-collapsed .sidebar-footer {
  padding: 12px 8px;
  display: flex;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-profile-card {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

body.sidebar-collapsed .sidebar-profile-info,
body.sidebar-collapsed .sidebar-profile-action {
  display: none;
}

body.sidebar-collapsed .sidebar-profile-avatar {
  width: 36px;
  height: 36px;
}

/* Main Content Area */
.main-wrapper {
  flex: 1 1 0%;
  min-width: 0;
  width: calc(100% - var(--sidebar-expanded-width));
  max-width: calc(100% - var(--sidebar-expanded-width));
  margin-left: var(--sidebar-expanded-width);
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-default), width var(--transition-default), max-width var(--transition-default);
  background-color: var(--bg-page);
  box-sizing: border-box;
}

body.sidebar-collapsed .main-wrapper {
  width: calc(100% - var(--sidebar-collapsed-width));
  max-width: calc(100% - var(--sidebar-collapsed-width));
  margin-left: var(--sidebar-collapsed-width);
}

/* ========================================================
   TOPBAR & UTILITY HEADER (MATCHING IMAGE 2)
   Flush minimalist topbar spanning full width, no floating card
   ======================================================== */
.app-header {
  height: 60px;
  background: var(--bg-surface);
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: background-color var(--transition-default), border-color var(--transition-default);
}

.header-left {
  display: none;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Minimalist Hamburger Button (Mobile only - hidden on desktop where logo opens sidebar) */
.topbar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  transition: all 0.15s ease;
}

.topbar-toggle-btn:hover {
  color: var(--text-primary);
  background-color: var(--nav-hover-bg);
}

.topbar-toggle-btn svg {
  width: 22px;
  height: 22px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Topbar Search Box (Matching Image 2) */
.topbar-search-wrap {
  position: relative;
}

.topbar-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #9CA3AF;
  pointer-events: none;
  transition: color 0.15s ease;
}

.topbar-search-input {
  width: 260px;
  height: 38px;
  padding: 8px 36px 8px 36px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
}

.topbar-search-input::placeholder {
  color: #9CA3AF;
}

.topbar-search-input:focus {
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
  width: 320px;
}

.topbar-search-spinner {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-light);
  border-top-color: var(--electric-blue);
  border-radius: 50%;
  animation: topbarSpin 0.7s linear infinite;
}

@keyframes topbarSpin {
  to { transform: rotate(360deg); }
}

/* Interactive Search Results Dropdown */
.topbar-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  z-index: 1000;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar-search-category {
  padding: 8px 14px 4px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--nav-hover-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.topbar-search-item:last-child {
  border-bottom: none;
}

.topbar-search-item:hover,
.topbar-search-item.active {
  background-color: var(--nav-hover-bg);
}

.topbar-search-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--electric-blue-light);
  color: var(--electric-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

html.dark-mode .topbar-search-item-icon {
  background: rgba(0, 82, 255, 0.18);
  color: #60A5FA;
}

.topbar-search-item-icon svg {
  width: 15px;
  height: 15px;
}

.topbar-search-item-content {
  flex: 1;
  min-width: 0;
}

.topbar-search-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search-item-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-page);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.topbar-search-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Notification Bell Button */
.topbar-notif-wrap {
  position: relative;
}

.topbar-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  transition: all 0.15s ease;
}

.topbar-icon-btn:hover {
  color: var(--text-primary);
  background-color: var(--nav-hover-bg);
}

.topbar-icon-btn svg {
  width: 20px;
  height: 20px;
}

.topbar-notif-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #EF4444;
  border: 1.5px solid var(--bg-surface);
}

.topbar-notif-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: fadeInDown 0.15s ease-out;
}

.topbar-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.topbar-notif-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  padding: 2px 8px;
  border-radius: 10px;
}

.topbar-notif-body {
  max-height: 300px;
  overflow-y: auto;
}

.topbar-notif-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.topbar-notif-link:hover {
  background-color: var(--nav-hover-bg);
}

.topbar-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--electric-blue);
  margin-top: 5px;
  flex-shrink: 0;
}

/* User Profile Avatar (Matching Image 2 - Black circle with FS or photo) */
.user-menu-wrap {
  position: relative;
}

.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.user-avatar-btn:hover {
  transform: scale(1.05);
}

.topbar-avatar-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Solid Black Circle with White Bold Initials (like "FS" in Image 2) */
.topbar-avatar-initials {
  background-color: #000000;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  user-select: none;
}

html.dark-mode .topbar-avatar-initials {
  background-color: #0F172A;
  border: 1px solid #334155;
}

/* Uploaded Profile Photo */
.topbar-avatar-img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

/* User Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: fadeInDown 0.15s ease-out;
}

.user-dropdown-info {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--nav-hover-bg);
}

.user-dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.user-dropdown-item:hover {
  background-color: var(--nav-hover-bg);
}

.user-dropdown-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #DC2626;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-light);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.user-dropdown-logout-btn:hover {
  background-color: rgba(220, 38, 38, 0.08);
}

/* App Content Area */
.app-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 28px 36px 28px;
}

/* ========================================================
   STANDARDIZED PAGE HEADER COMPONENT (UNTITLED UI / MODERN)
   Clean, flush layout: NO floating card, NO thick borders, NO pill radius container
   Baris 1: Breadcrumb rapi dan kecil (text-sm text-gray-500)
   Baris 2: Judul halaman tebal (text-2xl font-bold text-gray-900) di kiri & tombol aksi di kanan
   ======================================================== */
.page-header,
.banner-header {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

/* Baris 1: Breadcrumbs (text-sm text-gray-500) */
.page-header-breadcrumbs,
.banner-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px; /* text-sm */
  font-weight: 500;
  color: #64748B; /* text-gray-500 */
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

.page-breadcrumbs-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.page-breadcrumb-item,
.banner-breadcrumb-item {
  color: #64748B;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

html.dark-mode .page-header-breadcrumbs,
body.dark-mode .page-header-breadcrumbs,
html.dark-mode .page-breadcrumb-item,
body.dark-mode .page-breadcrumb-item,
html.dark-mode .banner-breadcrumbs,
body.dark-mode .banner-breadcrumbs,
html.dark-mode .banner-breadcrumb-item,
body.dark-mode .banner-breadcrumb-item {
  color: #94A3B8;
}

.page-breadcrumb-link,
.banner-breadcrumb-link {
  color: #64748B;
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-breadcrumb-link:hover,
.banner-breadcrumb-link:hover {
  color: var(--electric-blue, #0052FF);
  text-decoration: underline;
}

html.dark-mode .page-breadcrumb-link:hover,
body.dark-mode .page-breadcrumb-link:hover {
  color: #38BDF8;
}

.page-breadcrumb-separator,
.banner-breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  opacity: 0.8;
  flex-shrink: 0;
  margin: 0 1px;
}

.page-breadcrumb-separator svg,
.banner-breadcrumb-separator svg {
  width: 12px;
  height: 12px;
  display: block;
}

.page-breadcrumb-current,
.banner-breadcrumb-item.active {
  color: #64748B;
  font-weight: 500;
}

html.dark-mode .page-breadcrumb-current,
body.dark-mode .page-breadcrumb-current,
html.dark-mode .banner-breadcrumb-item.active,
body.dark-mode .banner-breadcrumb-item.active {
  color: #94A3B8;
}

/* Baris 2: Judul halaman tebal di kiri & tombol aksi di kanan */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.page-header-left,
.banner-header-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

/* Judul Halaman Tebal (text-2xl font-bold text-gray-900) */
.page-header-title,
.banner-header-title {
  font-size: 24px; /* text-2xl */
  font-weight: 700; /* font-bold */
  color: #0F172A; /* text-gray-900 */
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0;
  padding: 0;
  word-break: break-word;
}

html.dark-mode .page-header-title,
body.dark-mode .page-header-title,
html.dark-mode .banner-header-title,
body.dark-mode .banner-header-title {
  color: #F8FAFC;
}

/* Tombol Aksi Utama di sebelah kanan */
.page-header-actions,
.banner-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  max-width: 100%;
  flex-wrap: wrap;
}

.page-header-actions .btn,
.page-header-actions button.btn,
.page-header-actions a.btn,
.banner-header-right .btn,
.banner-header-right button.btn,
.banner-header-right a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 9px;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.page-header-actions .btn-primary,
.banner-header-right .btn-primary {
  background-color: var(--electric-blue, #0052FF) !important;
  color: #FFFFFF !important;
  border: 1px solid transparent !important;
  box-shadow: 0 1px 3px 0 rgba(0, 82, 255, 0.28);
}

.page-header-actions .btn-primary:hover,
.banner-header-right .btn-primary:hover {
  background-color: #0045D8 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px 0 rgba(0, 82, 255, 0.38);
}

.page-header-actions .btn-secondary,
.banner-header-right .btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.page-header-actions .btn-secondary:hover,
.banner-header-right .btn-secondary:hover {
  background-color: var(--bg-page);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.page-header-actions .btn-outline,
.banner-header-right .btn-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.page-header-actions .btn-outline:hover,
.banner-header-right .btn-outline:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* ========================================================
   DAY / NIGHT MODE SWITCH (MATCHING IMAGE SPECIFICATION)
   Orange replaced by Electric Blue (#0052FF)
   ======================================================== */
.theme-toggle {
  position: relative;
  width: 76px;
  height: 36px;
  border-radius: 9999px;
  border: none;
  background-color: var(--electric-blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 82, 255, 0.28);
  transition: background-color var(--transition-default),
              box-shadow var(--transition-default);
  outline: none;
  user-select: none;
}

html.dark-mode .theme-toggle,
body.dark-mode .theme-toggle {
  background-color: #22262E;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.theme-toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-default);
  z-index: 2;
}

html.dark-mode .theme-toggle-knob,
body.dark-mode .theme-toggle-knob {
  transform: translateX(40px);
}

.theme-toggle-icon {
  position: absolute;
  width: 18px;
  height: 18px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1;
}

.theme-icon-moon {
  left: 9px;
  opacity: 0;
  transform: scale(0.75);
}

.theme-icon-sun {
  right: 9px;
  opacity: 1;
  transform: scale(1);
}

html.dark-mode .theme-icon-moon,
body.dark-mode .theme-icon-moon {
  opacity: 1;
  transform: scale(1);
}

html.dark-mode .theme-icon-sun,
body.dark-mode .theme-icon-sun {
  opacity: 0;
  transform: scale(0.75);
}

/* Content Area */
.app-content {
  min-width: 0;
  max-width: 100%;
}

/* ========================================================
   BERANDA / DASHBOARD HERO & QUICK ACTIONS
   ======================================================== */
.beranda-hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-default);
}

.beranda-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--electric-blue) 0%, #3B82F6 100%);
}

.beranda-hero-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.beranda-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--electric-blue);
  background: rgba(0, 82, 255, 0.08);
  padding: 3px 10px;
  border-radius: 9999px;
  width: fit-content;
  margin-bottom: 2px;
}

html.dark-mode .beranda-hero-badge {
  color: #60A5FA;
  background: rgba(0, 82, 255, 0.16);
}

.beranda-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  display: inline-block;
}

.beranda-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

/* Ticker & Pengumuman Jadwal/Agenda */
.beranda-ticker-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 14px;
  min-height: 42px;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

html.dark-mode .beranda-ticker-wrapper {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.beranda-ticker-carousel {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 24px;
  overflow: hidden;
}

.beranda-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beranda-ticker-item.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ticker-badge-col {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker-text-col {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ticker-badge-jadwal {
  background: rgba(0, 82, 255, 0.1);
  color: var(--electric-blue);
}

html.dark-mode .ticker-badge-jadwal {
  background: rgba(0, 82, 255, 0.22);
  color: #60A5FA;
}

.ticker-badge-agenda {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

html.dark-mode .ticker-badge-agenda {
  background: rgba(16, 185, 129, 0.22);
  color: #34D399;
}

.ticker-icon {
  width: 13px;
  height: 13px;
}

.ticker-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-link-arrow {
  opacity: 0.6;
  flex-shrink: 0;
}

.ticker-empty-link {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--electric-blue, #0052FF);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ticker-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ticker-counter {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.ticker-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  padding: 0;
}

.ticker-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--text-primary);
}

/* Empty state */
.beranda-ticker-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.ticker-empty-svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ticker-empty-text {
  color: var(--text-secondary);
  font-size: 13px;
}

.beranda-hero-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

.beranda-hero-role {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Quick Actions Shortcut Row */
.beranda-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.quick-action-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 8px;
  box-shadow: var(--card-shadow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-action-item:hover {
  transform: translateY(-2px);
  border-color: var(--electric-blue);
  box-shadow: 0 6px 16px rgba(0, 82, 255, 0.12);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.quick-action-item:hover .quick-action-icon {
  transform: scale(1.08);
}

.quick-action-icon svg {
  width: 22px;
  height: 22px;
}

.quick-icon-siswa {
  background-color: rgba(0, 82, 255, 0.1);
  color: var(--electric-blue);
}

.quick-icon-jadwal {
  background-color: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.quick-icon-presensi {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.quick-icon-pendaftaran {
  background-color: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}

html.dark-mode .quick-icon-siswa {
  background-color: rgba(0, 82, 255, 0.2);
  color: #60A5FA;
}

html.dark-mode .quick-icon-jadwal {
  background-color: rgba(139, 92, 246, 0.2);
  color: #A78BFA;
}

html.dark-mode .quick-icon-presensi {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

html.dark-mode .quick-icon-pendaftaran {
  background-color: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}

.quick-action-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

/* Lembaga Summary Grid */
.lembaga-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.lembaga-summary-item {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lembaga-summary-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
  letter-spacing: -0.02em;
}

.lembaga-summary-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--card-shadow);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #384A63;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-card-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
}

.stat-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper svg {
  width: 20px;
  height: 20px;
}

.stat-icon-total {
  background-color: rgba(0, 82, 255, 0.12);
  color: var(--electric-blue);
}

.stat-icon-aktif {
  background-color: rgba(5, 150, 105, 0.12);
  color: #10B981;
}

.stat-icon-pulang {
  background-color: rgba(217, 119, 6, 0.12);
  color: #F59E0B;
}

.stat-icon-sakit {
  background-color: rgba(220, 38, 38, 0.12);
  color: #EF4444;
}

.stat-card-body {
  display: flex;
  align-items: baseline;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Modern Table (Filament v4 Clean Card Style) */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light, #E5E7EB);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.table-card:hover {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border-color: #D1D5DB;
}

html.dark-mode .table-card:hover {
  border-color: #384A63;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
  box-sizing: border-box;
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-light, #E5E7EB);
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

html.dark-mode .table-wrapper::-webkit-scrollbar-thumb {
  background: #334155;
}

html.dark-mode .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

.table-card.fi-ta-enhanced > .table-wrapper {
  border-radius: 0;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table thead th {
  background-color: #FAFAFA;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.005em;
  color: #111827;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}

html.dark-mode .modern-table thead th {
  background-color: #1A2332;
  color: #F1F5F9;
  border-bottom-color: #263346;
}

.modern-table tbody tr {
  border-bottom: 1px solid #F3F4F6;
  transition: background-color 0.14s ease;
}

html.dark-mode .modern-table tbody tr {
  border-bottom-color: var(--border-light);
}

.modern-table tbody tr:last-child {
  border-bottom: none;
}

.modern-table tbody tr:hover {
  background-color: #F9FAFB;
}

html.dark-mode .modern-table tbody tr:hover {
  background-color: var(--table-hover-bg);
}

.modern-table tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}

.modern-table td.cell-nama {
  font-weight: 600;
  color: var(--text-primary);
}

.modern-table td.cell-kamar {
  font-weight: 500;
  color: var(--text-secondary);
}

.modern-table td.cell-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.status-badge.status-aktif {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.status-pulang {
  background-color: #FFFBEB;
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.status-sakit {
  background-color: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

html.dark-mode .status-badge.status-aktif {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

html.dark-mode .status-badge.status-pulang {
  background-color: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.3);
}

html.dark-mode .status-badge.status-sakit {
  background-color: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  transition: opacity var(--transition-default);
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-icon-desktop {
    display: none !important;
  }

  .sidebar-icon-mobile {
    display: block !important;
  }

  .app-sidebar {
    transform: translateX(calc(-100% - 20px));
    width: var(--sidebar-expanded-width);
    z-index: 1000;
  }

  body.sidebar-collapsed .app-sidebar {
    transform: translateX(calc(-100% - 20px));
  }

  body.sidebar-mobile-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }

  .sidebar-overlay {
    z-index: 999;
    cursor: pointer;
  }

  body.sidebar-mobile-open .sidebar-overlay {
    display: block;
    opacity: 1;
  }

  .app-header {
    padding: 0 16px;
    height: 56px;
    min-height: 56px;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
  }

  .header-left {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    gap: 8px;
  }

  .topbar-toggle-btn {
    display: inline-flex;
  }

  .header-right {
    margin-left: auto;
    flex-shrink: 0;
    gap: 10px;
  }

  .topbar-search-input {
    width: 150px;
    height: 36px;
    font-size: 13px;
    padding-left: 32px;
  }

  .topbar-search-icon {
    left: 9px;
    width: 14px;
    height: 14px;
  }

  .topbar-search-input:focus {
    width: 190px;
  }

  .topbar-search-dropdown {
    width: min(320px, calc(100vw - 32px));
    right: -50px;
  }

  .topbar-notif-menu {
    width: min(300px, calc(100vw - 32px));
    right: -30px;
  }

  /* Page Header Mobile Responsive */
  .page-header,
  .banner-header {
    margin-bottom: 18px;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .page-header-breadcrumbs,
  .banner-breadcrumbs {
    font-size: 12px;
    gap: 4px;
  }

  .page-breadcrumb-separator svg,
  .banner-breadcrumb-separator svg {
    width: 11px;
    height: 11px;
  }

  .page-header-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    width: 100%;
  }

  .page-header-left,
  .banner-header-left {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .page-header-title,
  .banner-header-title {
    font-size: 20px;
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: normal;
    white-space: normal;
    overflow-wrap: break-word;
  }

  /* Action button placed on top right alongside title (Matching Image 2) */
  .page-header-actions,
  .banner-header-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 1;
    max-width: 100%;
    margin-left: auto;
    width: auto;
  }

  .page-header-actions .btn,
  .page-header-actions button.btn,
  .page-header-actions a.btn,
  .banner-header-right .btn,
  .banner-header-right button.btn,
  .banner-header-right a.btn {
    width: auto;
    max-width: 100%;
    white-space: nowrap;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    justify-content: center;
    box-sizing: border-box;
  }

  .page-header-actions > div,
  .banner-header-right > div {
    width: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }

  @media (max-width: 640px) {
    .page-header-row {
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 10px !important;
    }

    .page-header-left,
    .banner-header-left {
      width: 100% !important;
      flex: none !important;
    }

    .page-header-actions,
    .banner-header-right {
      width: 100% !important;
      justify-content: flex-start !important;
      margin-left: 0 !important;
    }
  }

  .page-header-actions > div .btn,
  .banner-header-right > div .btn {
    width: auto;
    min-width: auto;
  }

  .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip;
    box-sizing: border-box;
  }

  .app-content {
    padding: 16px 14px 24px 14px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Beranda Mobile Responsive Enhancements - Opsi 1 (2-Tingkat / 2-Baris Elegan) */
  .beranda-hero-card {
    padding: 16px 14px 14px 14px !important;
    border-radius: 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .beranda-hero-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    width: 100% !important;
  }

  .beranda-hero-title {
    font-size: 18px !important;
    margin: 0 !important;
    line-height: 1.25 !important;
  }

  .beranda-hero-date {
    font-size: 12px !important;
    color: var(--text-muted, #64748b) !important;
  }

  /* Ticker Wrapper: 2-Tingkat di Mobile */
  .beranda-ticker-wrapper {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 14px 12px 14px !important;
    min-height: 74px !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
    border-radius: 12px !important;
    justify-content: flex-start !important;
  }

  .beranda-ticker-carousel {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    position: relative !important;
    width: 100% !important;
    min-height: 52px !important;
    height: auto !important;
    overflow: hidden !important;
  }

  .beranda-ticker-item {
    grid-area: 1 / 1 !important;
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(6px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    pointer-events: none !important;
  }

  .beranda-ticker-item.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  /* Baris 1: Badge di sebelah kiri (sejajar horizontal dengan tombol kontrol di kanan) */
  .ticker-badge-col {
    display: flex !important;
    align-items: center !important;
    height: 22px !important;
    min-height: 22px !important;
    padding-right: 85px !important; /* ruang agar tidak bertabrakan dengan tombol kontrol di kanan */
  }

  .ticker-badge {
    font-size: 10.5px !important;
    padding: 2px 7px !important;
    line-height: 1.2 !important;
  }

  /* Kontrol Navigasi (Counter + Tombol ‹ ›) di pojok kanan atas */
  .ticker-controls {
    position: absolute !important;
    top: 9px !important;
    right: 12px !important;
    z-index: 5 !important;
    margin: 0 !important;
    gap: 4px !important;
  }

  .ticker-counter {
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .ticker-btn {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
  }

  /* Baris 2: Teks kegiatan menempati 100% lebar penuh di bawah badge */
  .ticker-text-col {
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    overflow: visible !important;
    padding-bottom: 2px !important;
  }

  .ticker-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.45 !important;
  }

  .ticker-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
  }

  .ticker-link span,
  span.ticker-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.45 !important;
    padding-bottom: 2px !important;
  }

  .ticker-link svg.ticker-link-arrow {
    flex-shrink: 0 !important;
    margin-top: 1px !important;
  }

  .beranda-ticker-empty {
    font-size: 12px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .ticker-empty-text {
    font-size: 12px !important;
  }

  .quick-action-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }

  .quick-action-icon svg {
    width: 19px !important;
    height: 19px !important;
  }

  .quick-action-label {
    font-size: 11px !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stat-card {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    gap: 10px !important;
  }

  .stat-card-title {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
  }

  .stat-icon-wrapper {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .stat-icon-wrapper svg {
    width: 17px !important;
    height: 17px !important;
  }

  .stat-number {
    font-size: 24px !important;
    font-weight: 800 !important;
  }

  .lembaga-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .lembaga-summary-item {
    padding: 12px 14px !important;
  }

  .lembaga-summary-count {
    font-size: 18px !important;
  }
}

/* ========================================================
   FORM & REGISTRATION MODULE STYLES
   ======================================================== */
.form-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: var(--card-shadow);
  transition: border-color var(--transition-default), box-shadow var(--transition-default);
}

.form-section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
}

.form-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: var(--electric-blue-light);
  color: var(--electric-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

html.dark-mode .form-section-icon {
  background-color: rgba(0, 82, 255, 0.15);
  color: #60A5FA;
}

.form-section-icon svg {
  width: 22px;
  height: 22px;
}

.form-section-title-wrap {
  flex: 1;
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.form-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Grids */
.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid-1 { grid-template-columns: 1fr; }
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-full { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .form-grid-3, .form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .form-grid-2, .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr;
  }
  .col-span-2, .col-span-3 {
    grid-column: span 1;
  }
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-mark {
  color: #EF4444;
  font-weight: 700;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  transition: all 0.15s ease;
  outline: none;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: #EF4444;
  background-color: #FEF2F2;
}

html.dark-mode .form-control.is-invalid,
html.dark-mode .form-select.is-invalid,
html.dark-mode .form-textarea.is-invalid {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #F87171;
}

.invalid-feedback {
  font-size: 12px;
  color: #EF4444;
  font-weight: 500;
  margin-top: 2px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Radio Group & Checkbox */
.radio-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  min-height: 42px;
}

.custom-radio-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.custom-radio-card:hover {
  background-color: var(--nav-hover-bg);
}

.custom-radio-card input[type="radio"] {
  accent-color: var(--electric-blue);
  width: 16px;
  height: 16px;
}

/* Parents Sub-Grid */
.parents-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .parents-container {
    grid-template-columns: 1fr;
  }
}

.parent-subcard {
  background-color: var(--border-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.parent-subcard-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

/* Checkbox Card for Berkas */
.berkas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .berkas-grid {
    grid-template-columns: 1fr;
  }
}

.berkas-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.berkas-checkbox-card:hover {
  border-color: var(--electric-blue);
  background-color: var(--nav-hover-bg);
}

.berkas-checkbox-card input[type="checkbox"] {
  accent-color: var(--electric-blue);
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.berkas-info {
  display: flex;
  flex-direction: column;
}

.berkas-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.berkas-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ========================================================
   GOOGLE FORM STYLE UPLOAD BERKAS
   ======================================================== */
.gform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .gform-grid {
    grid-template-columns: 1fr;
  }
}

.gform-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  transition: all 0.2s ease;
}

.gform-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gform-card.has-file {
  border-color: #10B981;
  background-color: var(--bg-surface);
}

.gform-card-header {
  display: flex;
  align-items: center;
}

.gform-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.gform-checkbox {
  accent-color: var(--electric-blue);
  width: 17px;
  height: 17px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.gform-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.gform-upload-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Input file disembunyikan secara visual namun tetap bisa difokus */
.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-input:focus-visible + .gform-add-btn {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

/* Tombol Tambahkan File khas Google Form */
.gform-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  width: fit-content;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  color: var(--electric-blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.gform-add-btn:hover,
.gform-add-btn.is-dragover {
  background-color: var(--electric-blue-light);
  border-color: var(--electric-blue);
}

.gform-add-btn.is-dragover {
  transform: scale(1.02);
}

.gform-upload-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Chip File Terpilih khas Google Form */
.gform-file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background-color: var(--nav-hover-bg);
  transition: border-color 0.15s ease;
}

.gform-file-chip[hidden],
.gform-add-btn[hidden],
.upload-error[hidden] {
  display: none !important;
}

.gform-chip-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  flex-shrink: 0;
}

.gform-card.is-busy .gform-chip-thumb {
  opacity: 0.4;
}

.gform-chip-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.gform-chip-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gform-chip-size {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
}

.gform-card.is-busy .gform-chip-size {
  color: var(--text-secondary);
}

.gform-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background-color: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.gform-chip-remove svg {
  width: 15px;
  height: 15px;
}

.gform-chip-remove:hover {
  background-color: rgba(220, 38, 38, 0.12);
  color: #DC2626;
}

.upload-error {
  font-size: 12px;
  font-weight: 500;
  color: #DC2626;
  margin-top: 4px;
}

/* Galeri foto berkas (halaman detail) */
.berkas-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .berkas-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.berkas-photo-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.berkas-photo-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background-color: var(--nav-hover-bg);
  transition: all 0.15s ease;
}

.berkas-photo-thumb:hover {
  border-color: var(--electric-blue);
  transform: translateY(-2px);
}

.berkas-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.berkas-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1.5px dashed var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

/* Alerts */
.alert-banner {
  padding: 14px 18px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065F46;
}

.alert-error {
  background-color: #FEF2F2;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #991B1B;
}

html.dark-mode .alert-success {
  background-color: rgba(16, 185, 129, 0.12);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.25);
}

html.dark-mode .alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--electric-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25);
}

.btn-primary:hover {
  background-color: var(--electric-blue-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--nav-hover-bg);
  border-color: var(--text-muted);
}

.btn-success {
  background-color: #059669;
  color: #FFFFFF;
}

.btn-success:hover {
  background-color: #047857;
}

.btn-danger {
  background-color: #DC2626;
  color: #FFFFFF;
}

.btn-danger:hover {
  background-color: #B91C1C;
}

.form-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 0;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill.status-pending {
  background-color: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-pill.status-diterima {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.status-ditolak {
  background-color: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

html.dark-mode .status-pill.status-pending {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.3);
}

html.dark-mode .status-pill.status-diterima {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

html.dark-mode .status-pill.status-ditolak {
  background-color: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Status Perizinan (Sambang & Sakit) */
.status-pill.status-sambang {
  background-color: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-pill.status-sudah_kembali,
.status-pill.status-sembuh {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.status-melewati_batas,
.status-pill.status-sakit {
  background-color: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

html.dark-mode .status-pill.status-sambang {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.3);
}

html.dark-mode .status-pill.status-sudah_kembali,
html.dark-mode .status-pill.status-sembuh {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

html.dark-mode .status-pill.status-melewati_batas,
html.dark-mode .status-pill.status-sakit {
  background-color: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Detail View */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================================
   TABLE ACTION BUTTONS & MODAL SYSTEM (SISWA & UMUM)
   ======================================================== */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: nowrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background-color: transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-sizing: border-box;
  position: relative;
}

.action-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.action-btn:hover svg {
  transform: scale(1.1);
}

/* Lihat: Biru */
.action-btn-view {
  background-color: #EFF6FF;
  border-color: rgba(59, 130, 246, 0.25);
  color: #2563EB;
}

.action-btn-view:hover {
  background-color: #DBEAFE;
  border-color: #3B82F6;
  color: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
}

/* Edit: Amber / Jingga */
.action-btn-edit {
  background-color: #FFFBEB;
  border-color: rgba(245, 158, 11, 0.25);
  color: #D97706;
}

.action-btn-edit:hover {
  background-color: #FEF3C7;
  border-color: #F59E0B;
  color: #B45309;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.18);
}

/* Hapus: Merah */
.action-btn-delete {
  background-color: #FEF2F2;
  border-color: rgba(239, 68, 68, 0.25);
  color: #DC2626;
}

.action-btn-delete:hover {
  background-color: #FEE2E2;
  border-color: #EF4444;
  color: #B91C1C;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.18);
}

/* Print / Cetak: Emerald */
.action-btn-print {
  background-color: #ECFDF5;
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

.action-btn-print:hover {
  background-color: #D1FAE5;
  border-color: #10B981;
  color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.18);
}

/* Success Action (Tandai Kembali / Tandai Sembuh) */
.action-btn-success {
  background-color: #ECFDF5;
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}
.action-btn-success:hover {
  background-color: #D1FAE5;
  border-color: #10B981;
  color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.18);
}
html.dark-mode .action-btn-success {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34D399;
}
html.dark-mode .action-btn-success:hover {
  background-color: rgba(16, 185, 129, 0.25);
  border-color: #34D399;
  color: #6EE7B7;
}

/* Dark mode for action buttons */
html.dark-mode .action-btn-view {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60A5FA;
}
html.dark-mode .action-btn-view:hover {
  background-color: rgba(59, 130, 246, 0.25);
  border-color: #60A5FA;
  color: #93C5FD;
}

html.dark-mode .action-btn-edit {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #FBBF24;
}
html.dark-mode .action-btn-edit:hover {
  background-color: rgba(245, 158, 11, 0.25);
  border-color: #FBBF24;
  color: #FDE68A;
}

html.dark-mode .action-btn-delete {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}
html.dark-mode .action-btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.25);
  border-color: #F87171;
  color: #FCA5A5;
}

html.dark-mode .action-btn-print {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34D399;
}
html.dark-mode .action-btn-print:hover {
  background-color: rgba(16, 185, 129, 0.25);
  border-color: #34D399;
  color: #6EE7B7;
}

/* Modal System */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.app-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.app-modal.is-active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-badge svg {
  width: 20px;
  height: 20px;
}

.modal-icon-badge.view-badge {
  background-color: #EFF6FF;
  color: var(--electric-blue);
}

.modal-icon-badge.edit-badge {
  background-color: #FFFBEB;
  color: #D97706;
}

.modal-icon-badge.danger-badge {
  background-color: #FEF2F2;
  color: #DC2626;
}

html.dark-mode .modal-icon-badge.view-badge {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}
html.dark-mode .modal-icon-badge.edit-badge {
  background-color: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}
html.dark-mode .modal-icon-badge.danger-badge {
  background-color: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background-color: var(--nav-hover-bg);
  color: var(--text-primary);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-primary);
  font-size: 14px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background-color: var(--card-bg);
}

/* Detail info styling di dalam modal view */
.profile-detail-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background-color: var(--nav-hover-bg);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-light);
  font-size: 13.5px;
}

.profile-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-detail-value {
  color: var(--text-primary);
  font-weight: 700;
}

/* ========================================================
   PAGINATION SYSTEM (CUSTOM MODERN & SVG SAFEGUARD)
   ======================================================== */
.w-5, svg.w-5 {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
}
.h-5, svg.h-5 {
  height: 18px !important;
  width: 18px !important;
}

.custom-pagination-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  width: 100%;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pagination-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.pagination-item {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.pagination-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.pagination-link:hover:not(.dots) {
  color: var(--electric-blue, #0052FF);
  border-color: var(--electric-blue, #0052FF);
  background-color: rgba(0, 82, 255, 0.05);
  transform: translateY(-1px);
}

.pagination-item.active .pagination-link {
  background-color: var(--electric-blue, #0052FF);
  border-color: var(--electric-blue, #0052FF);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25);
  cursor: default;
}

.pagination-item.disabled .pagination-link {
  color: var(--text-muted, #94a3b8);
  border-color: var(--border-light, #e2e8f0);
  background-color: transparent;
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination-link.dots {
  border: none;
  background: transparent;
  cursor: default;
  color: var(--text-muted, #94a3b8);
}

/* Dark mode pagination */
html.dark-mode .pagination-link {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

html.dark-mode .pagination-link:hover:not(.dots) {
  background-color: rgba(0, 82, 255, 0.18);
  border-color: #3b82f6;
  color: #93c5fd;
}

html.dark-mode .pagination-item.active .pagination-link {
  background-color: #0052FF;
  border-color: #0052FF;
  color: #ffffff !important;
}

html.dark-mode .pagination-item.disabled .pagination-link {
  background-color: transparent;
  border-color: #334155;
  color: #64748b;
}

/* ========================================================
   UNIFIED AUTOCOMPLETE PREDICTION DROPDOWN
   ======================================================== */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
  padding: 4px;
}

html.dark-mode .autocomplete-dropdown {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.autocomplete-dropdown.is-open {
  display: block;
}

.autocomplete-item {
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.autocomplete-item:hover,
.autocomplete-item.is-selected {
  background-color: var(--nav-hover-bg);
  color: var(--electric-blue);
  font-weight: 600;
}

.autocomplete-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}


/* ========================================================
   SWEETALERT2 MODERN THEME & INTEGRATION
   ======================================================== */
.swal2-container {
  z-index: 10000 !important;
}

.swal2-popup.swal2-modern-popup {
  border-radius: 20px !important;
  padding: 26px 28px !important;
  font-family: var(--font-main) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16) !important;
  border: 1px solid var(--border-light) !important;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

html.dark-mode .swal2-popup.swal2-modern-popup {
  background: #141C28 !important;
  color: #F8FAFC !important;
  border-color: #232E40 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

.swal2-modern-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 12px 0 6px 0 !important;
}

html.dark-mode .swal2-modern-title {
  color: #F8FAFC !important;
}

.swal2-modern-html {
  font-size: 14px !important;
  color: var(--text-secondary) !important;
  line-height: 1.6 !important;
  margin: 8px 0 16px 0 !important;
}

html.dark-mode .swal2-modern-html {
  color: #94A3B8 !important;
}

.swal2-modern-btn {
  border-radius: 10px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: none !important;
}

.swal2-btn-confirm {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.swal2-btn-confirm:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.swal2-btn-cancel {
  border: 1px solid var(--border-light) !important;
  background-color: var(--nav-hover-bg) !important;
  color: var(--text-secondary) !important;
}

html.dark-mode .swal2-btn-cancel {
  border-color: #2E3D52 !important;
  background-color: #1B2535 !important;
  color: #94A3B8 !important;
}

.swal2-btn-cancel:hover {
  background-color: var(--border-light) !important;
  color: var(--text-primary) !important;
  transform: translateY(-1px);
}

/* ========================================================
   JENJANG PENDIDIKAN & KIP STYLES
   ======================================================== */
.jenjang-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 800px) {
  .jenjang-selector-grid {
    grid-template-columns: 1fr;
  }
}

.jenjang-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.jenjang-card:hover {
  border-color: #93C5FD;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 82, 255, 0.08);
}

.jenjang-card input[type="radio"] {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  accent-color: var(--electric-blue);
  cursor: pointer;
}

.jenjang-card.is-selected {
  border-color: var(--electric-blue);
  background-color: var(--electric-blue-light);
  box-shadow: 0 4px 18px rgba(0, 82, 255, 0.15);
}

html.dark-mode .jenjang-card.is-selected {
  background-color: rgba(0, 82, 255, 0.12);
  border-color: #60A5FA;
}

.jenjang-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background-color: rgba(0, 82, 255, 0.12);
  color: var(--electric-blue);
  width: fit-content;
  margin-bottom: 8px;
}

html.dark-mode .jenjang-badge {
  color: #93C5FD;
  background-color: rgba(0, 82, 255, 0.25);
}

.jenjang-badge.badge-reguler {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
}

html.dark-mode .jenjang-badge.badge-reguler {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.jenjang-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.jenjang-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Status Jenjang Pill on Table */
.jenjang-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.jenjang-pill-smp {
  background-color: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.jenjang-pill-sma {
  background-color: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.jenjang-pill-reguler {
  background-color: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

html.dark-mode .jenjang-pill-smp {
  background-color: rgba(29, 78, 216, 0.2);
  color: #93C5FD;
  border-color: rgba(147, 197, 253, 0.3);
}

html.dark-mode .jenjang-pill-sma {
  background-color: rgba(109, 40, 217, 0.2);
  color: #C4B5FD;
  border-color: rgba(196, 181, 253, 0.3);
}

html.dark-mode .jenjang-pill-reguler {
  background-color: rgba(4, 120, 87, 0.2);
  color: #6EE7B7;
  border-color: rgba(110, 231, 183, 0.3);
}

/* KIP / Bantuan Sosial Component Styles */
.kip-box-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 6px;
  transition: all 0.2s ease;
}

.kip-box-card.is-active {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}

html.dark-mode .kip-box-card.is-active {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-dapodik-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background-color: rgba(0, 82, 255, 0.1);
  color: var(--electric-blue);
  border: 1px solid rgba(0, 82, 255, 0.2);
}

html.dark-mode .badge-dapodik-tag {
  background-color: rgba(0, 82, 255, 0.2);
  color: #93C5FD;
  border-color: rgba(147, 197, 253, 0.25);
}

.badge-kip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

html.dark-mode .badge-kip {
  background-color: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.35);
}

/* ========================================================
   MINIMALIST STEPPER WIZARD (GENERUS STYLE)
   ======================================================== */
.wizard-card {
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 30px;
}

html.dark-mode .wizard-card {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow);
}

.wizard-stepper {
  display: flex;
  align-items: stretch;
  background-color: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  overflow-x: auto;
}

html.dark-mode .wizard-stepper {
  background-color: var(--card-bg);
  border-bottom-color: var(--border-light);
}

.wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 20px;
  background-color: #FFFFFF;
  cursor: pointer;
  user-select: none;
  min-width: 170px;
  transition: all 0.2s ease;
  position: relative;
}

html.dark-mode .wizard-step {
  background-color: var(--card-bg);
}

.wizard-step:hover {
  background-color: #F8FAFC;
}

html.dark-mode .wizard-step:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  border: 1.5px solid #D1D5DB;
  color: #9CA3AF;
  background-color: #FFFFFF;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

html.dark-mode .wizard-step-circle {
  background-color: transparent;
  border-color: #475569;
  color: #64748B;
}

.wizard-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #4B5563;
  white-space: nowrap;
  transition: all 0.2s ease;
}

html.dark-mode .wizard-step-title {
  color: #94A3B8;
}

/* Active State */
.wizard-step.is-active .wizard-step-circle {
  border-color: #0052FF;
  color: #0052FF;
  border-width: 2px;
}

.wizard-step.is-active .wizard-step-title {
  color: #0052FF;
  font-weight: 700;
}

html.dark-mode .wizard-step.is-active .wizard-step-circle {
  border-color: #60A5FA;
  color: #60A5FA;
}

html.dark-mode .wizard-step.is-active .wizard-step-title {
  color: #60A5FA;
}

/* Completed State */
.wizard-step.is-completed .wizard-step-circle {
  background-color: #0052FF;
  border-color: #0052FF;
  color: #FFFFFF;
}

.wizard-step.is-completed .wizard-step-title {
  color: #111827;
  font-weight: 600;
}

html.dark-mode .wizard-step.is-completed .wizard-step-circle {
  background-color: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
}

html.dark-mode .wizard-step.is-completed .wizard-step-title {
  color: #F8FAFC;
}

/* Chevron Divider */
.wizard-divider {
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #E5E7EB;
}

html.dark-mode .wizard-divider {
  color: #334155;
}

.wizard-divider svg {
  width: 100%;
  height: 100%;
}

/* Wizard Body */
.wizard-body {
  padding: 34px 38px;
  background-color: #FFFFFF;
}

html.dark-mode .wizard-body {
  background-color: var(--card-bg);
}

@media (max-width: 768px) {
  .wizard-body {
    padding: 22px 18px;
  }
  .wizard-step {
    padding: 12px 10px;
    gap: 8px;
    min-width: 135px;
  }
  .wizard-step-circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .wizard-step-title {
    font-size: 12.5px;
  }
}

.wizard-step-pane {
  display: none;
}

.wizard-step-pane.is-active {
  display: block;
  animation: wizardFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Minimalist Form Controls */
.wizard-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.wizard-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

html.dark-mode .wizard-label {
  color: #E2E8F0;
}

.wizard-label .required-mark {
  color: #EF4444;
  margin-left: 2px;
}

.wizard-input,
.wizard-select,
.wizard-textarea {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background-color: #FFFFFF;
  color: #111827;
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

html.dark-mode .wizard-input,
html.dark-mode .wizard-select,
html.dark-mode .wizard-textarea {
  background-color: #1B2535;
  border-color: #2E3D52;
  color: #F8FAFC;
}

.wizard-input:focus,
.wizard-select:focus,
.wizard-textarea:focus {
  outline: none;
  border-color: #0052FF;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

html.dark-mode .wizard-input:focus,
html.dark-mode .wizard-select:focus,
html.dark-mode .wizard-textarea:focus {
  border-color: #60A5FA;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.wizard-input.is-invalid,
.wizard-select.is-invalid,
.wizard-textarea.is-invalid {
  border-color: #EF4444;
}

.wizard-subcard {
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 22px;
}

html.dark-mode .wizard-subcard {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: var(--border-light);
}

.wizard-subcard-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  gap: 8px;
}

html.dark-mode .wizard-subcard-title {
  color: #F8FAFC;
  border-bottom-color: var(--border-light);
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #F3F4F6;
}

html.dark-mode .wizard-footer {
  border-top-color: var(--border-light);
}

.btn-wizard-next {
  background-color: #0052FF;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 26px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 82, 255, 0.22);
}

.btn-wizard-next:hover {
  background-color: #0045D8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.3);
}

.btn-wizard-prev {
  background-color: #FFFFFF;
  color: #4B5563;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid #D1D5DB;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

html.dark-mode .btn-wizard-prev {
  background-color: #1B2535;
  border-color: #334155;
  color: #CBD5E1;
}

.btn-wizard-prev:hover {
  background-color: #F9FAFB;
  border-color: #9CA3AF;
  color: #111827;
}

html.dark-mode .btn-wizard-prev:hover {
  background-color: #243044;
  color: #FFFFFF;
}

/* ========================================================
   ROOM SWITCHER & MULTI-TENANCY TOPBAR SYSTEM
   ======================================================== */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-switcher-wrap {
  position: relative;
}

.room-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--nav-hover-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.room-switcher-btn:hover {
  border-color: var(--electric-blue);
  color: var(--electric-blue);
  background-color: var(--electric-blue-light);
}

html.dark-mode .room-switcher-btn:hover {
  background-color: rgba(0, 82, 255, 0.15);
  color: #60A5FA;
  border-color: #3B82F6;
}

.room-switcher-icon {
  width: 16px;
  height: 16px;
  color: var(--electric-blue);
}

html.dark-mode .room-switcher-icon {
  color: #60A5FA;
}

.room-badge-static {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--nav-hover-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.room-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: dropdownSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark-mode .room-dropdown {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.room-dropdown.show {
  display: flex;
}

.room-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.room-dropdown-item:hover {
  background-color: var(--nav-hover-bg);
  color: var(--text-primary);
}

.room-dropdown-item.active {
  background-color: var(--electric-blue-light);
  color: var(--electric-blue);
  font-weight: 700;
}

html.dark-mode .room-dropdown-item.active {
  background-color: rgba(0, 82, 255, 0.15);
  color: #60A5FA;
}

/* User Profile Pill */
.user-menu-wrap {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

.user-profile-btn:hover {
  background-color: var(--nav-hover-bg);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: var(--electric-blue);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: capitalize;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  animation: dropdownSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-dropdown.show {
  display: flex;
}

.user-dropdown-info {
  padding: 8px 10px 10px 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
}

.user-dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.user-dropdown-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #DC2626;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.user-dropdown-logout-btn:hover {
  background-color: rgba(220, 38, 38, 0.08);
}

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

/* Lembaga Badges */
.badge-lembaga {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-lembaga-pondok {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.badge-lembaga-smp {
  background-color: rgba(0, 82, 255, 0.12);
  color: #0052FF;
}

.badge-lembaga-sma {
  background-color: rgba(139, 92, 246, 0.12);
  color: #7C3AED;
}

.badge-lembaga-yayasan {
  background-color: rgba(245, 158, 11, 0.14);
  color: #D97706;
}

html.dark-mode .badge-lembaga-pondok {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

html.dark-mode .badge-lembaga-smp {
  background-color: rgba(0, 82, 255, 0.2);
  color: #60A5FA;
}

html.dark-mode .badge-lembaga-sma {
  background-color: rgba(139, 92, 246, 0.2);
  color: #A78BFA;
}

html.dark-mode .badge-lembaga-yayasan {
  background-color: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}

/* Permission Matrix Table */
.permission-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.permission-table th,
.permission-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.permission-table th:first-child,
.permission-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

.permission-table th {
  background-color: var(--table-th-bg);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.permission-table tr:last-child td {
  border-bottom: none;
}

.permission-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--electric-blue);
  cursor: pointer;
}

/* ========================================================
   MODERN MINIMALIST PROFILE & SECURITY STYLES
   ======================================================== */

.profile-card-clean {
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-light, #E5E7EB);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  padding: 24px 28px;
  transition: all 0.2s ease;
}

html.dark-mode .profile-card-clean {
  background: var(--bg-surface, #141C28);
  border-color: var(--border-light, #232E40);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.profile-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-user-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar-box {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, #0052FF 0%, #3B82F6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
}

.profile-avatar-box.smp {
  background: linear-gradient(135deg, #0052FF 0%, #3B82F6 100%);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25);
}

.profile-avatar-box.sma {
  background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.profile-avatar-box.pondok,
.profile-avatar-box.yayasan {
  background: linear-gradient(135deg, #0284C7 0%, #38BDF8 100%);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.profile-name-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Gear Button (Keamanan & Password) */
.btn-gear-security {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-light, #E5E7EB);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-gear-security:hover {
  background: var(--bg-page, #F8FAFC);
  border-color: #CBD5E1;
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-gear-security svg.gear-icon {
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
  transition: transform 0.4s ease;
}

.btn-gear-security:hover svg.gear-icon {
  transform: rotate(60deg);
  color: var(--text-primary);
}

/* Logout Button */
.btn-clean-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #EF4444;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clean-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: #EF4444;
  color: #DC2626;
  transform: translateY(-1px);
}

/* Form Sections */
.profile-section-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle, #F1F5F9);
  padding-bottom: 8px;
}

.profile-section-heading svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.clean-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clean-input-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.clean-input-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-light, #E5E7EB);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.clean-input-control:focus {
  outline: none;
  border-color: var(--electric-blue, #0052FF);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
  background: #FFFFFF;
}

html.dark-mode .clean-input-control {
  background: #0F172A;
  border-color: #1E293B;
  color: #F8FAFC;
}

html.dark-mode .clean-input-control:focus {
  background: #141E33;
  border-color: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* DYNAMIC INSTITUTION BUTTONS */
/* 1. SMP: Biru Elektrik */
.btn-theme-smp {
  background: #0052FF !important;
  color: #FFFFFF !important;
  border: 1px solid #0052FF !important;
  box-shadow: 0 4px 14px rgba(0, 82, 255, 0.28) !important;
  font-weight: 600 !important;
}

.btn-theme-smp:hover {
  background: #0043D4 !important;
  border-color: #0043D4 !important;
  box-shadow: 0 6px 18px rgba(0, 82, 255, 0.38) !important;
  transform: translateY(-1px);
}

.btn-theme-smp:active {
  transform: translateY(0);
}

/* 2. SMA: Hijau Kelly */
.btn-theme-sma {
  background: #16A34A !important;
  color: #FFFFFF !important;
  border: 1px solid #16A34A !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28) !important;
  font-weight: 600 !important;
}

.btn-theme-sma:hover {
  background: #15803D !important;
  border-color: #15803D !important;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.38) !important;
  transform: translateY(-1px);
}

.btn-theme-sma:active {
  transform: translateY(0);
}

/* 3. Pondok & Yayasan: Baby Blue */
.btn-theme-pondok,
.btn-theme-yayasan {
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid #38BDF8 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35) !important;
  font-weight: 600 !important;
}

.btn-theme-pondok:hover,
.btn-theme-yayasan:hover {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%) !important;
  border-color: #0EA5E9 !important;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45) !important;
  transform: translateY(-1px);
}

.btn-theme-pondok:active,
.btn-theme-yayasan:active {
  transform: translateY(0);
}

/* Password Toggle Wrapper */
.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

/* ========================================================
   FULL SCREEN & ADAPTIVE RESPONSIVE LAYOUT
   ======================================================== */
.page-full-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card-clean {
  width: 100%;
  box-sizing: border-box;
}

/* Multi-column grids for full desktop screen */
.profile-biodata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.profile-kontak-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.security-password-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Tablet view adjustments */
@media (max-width: 1024px) {
  .profile-biodata-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .security-password-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Friendly adjustments */
@media (max-width: 768px) {
  .profile-card-clean {
    padding: 18px 16px;
    border-radius: 12px;
  }

  .profile-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .profile-user-left {
    width: 100%;
    gap: 14px;
  }

  .profile-name-text {
    font-size: 18px;
  }

  .profile-actions-right {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  .btn-gear-security,
  .btn-clean-logout {
    font-size: 12px;
    padding: 8px 12px;
  }

  .profile-biodata-grid,
  .profile-kontak-grid,
  .security-password-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .clean-input-control {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* ========================================================
   UNIFIED FILTER SYSTEM
   ======================================================== */
.filter-card {
  padding: 14px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.filter-group-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.filter-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-select-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  z-index: 2;
}

.filter-select-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  z-index: 2;
}

.filter-select {
  height: 38px;
  line-height: 38px;
  padding: 0 32px 0 34px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: auto;
  min-width: 140px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 10px;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  transition: border-color var(--transition-default), box-shadow var(--transition-default);
}

.filter-select:hover {
  border-color: var(--text-secondary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.filter-btn-reset {
  height: 38px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background-color: var(--nav-hover-bg);
  color: var(--text-secondary);
  transition: all var(--transition-default);
}

.filter-btn-reset:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #EF4444;
  color: #DC2626;
}

.filter-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  max-width: 380px;
  min-width: 220px;
  margin-left: auto;
  height: 38px;
}

.filter-search-input {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  width: 100%;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color var(--transition-default), box-shadow var(--transition-default);
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

.filter-search-btn {
  height: 38px;
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  background-color: var(--nav-hover-bg);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.filter-search-btn:hover,
.filter-search-btn:active {
  background-color: var(--electric-blue);
  border-color: var(--electric-blue);
  color: #FFFFFF;
}

.filter-search-btn svg {
  width: 16px;
  height: 16px;
}

/* Mobile Filter System Responsive (<= 768px) */
@media (max-width: 768px) {
  /* ========================================================
     UNIVERSAL MOBILE FILTER & SEARCH SYSTEM
     ======================================================== */
  .filter-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 6px !important;
  }

  .filter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    width: 100%;
  }

  /* Search bar full-width on top */
  .filter-search-wrap {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    flex: none !important;
    height: 42px !important;
    position: relative !important;
  }

  .filter-search-input {
    width: 100% !important;
    height: 42px !important;
    font-size: 13.5px !important;
    padding: 0 40px 0 14px !important;
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    background-color: #ffffff !important;
    color: var(--text-main) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  }

  .dark-mode .filter-search-input {
    background-color: var(--card-bg, #1e293b) !important;
    border-color: var(--border-light, #334155) !important;
    color: #f8fafc !important;
  }

  .filter-search-btn {
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  /* Horizontal scrollable pills filter row */
  .filter-group-left {
    order: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 4px !important;
  }

  .filter-group-left::-webkit-scrollbar {
    display: none !important;
  }

  .filter-select-wrap {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    position: relative !important;
  }

  .filter-select-icon-left {
    display: none !important;
  }

  .filter-select {
    height: 34px !important;
    line-height: 34px !important;
    padding: 0 26px 0 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  }

  .filter-select option {
    background-color: #ffffff;
    color: #1e293b;
  }
  .dark-mode .filter-select option {
    background-color: #1e293b;
    color: #f8fafc;
  }

  /* Pill 1: Slate/gray filled */
  .filter-select-wrap:nth-child(1) .filter-select {
    background-color: #64748b !important;
    color: #ffffff !important;
    border: 1px solid #64748b !important;
  }
  .filter-select-wrap:nth-child(1) .filter-select-icon-right {
    color: #ffffff !important;
  }

  /* Subsequent Pills: White with border */
  .filter-select-wrap:nth-child(2) .filter-select,
  .filter-select-wrap:nth-child(3) .filter-select,
  .filter-select-wrap:nth-child(4) .filter-select,
  .filter-select-wrap:nth-child(5) .filter-select {
    background-color: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
  }
  .filter-select-wrap:nth-child(2) .filter-select-icon-right,
  .filter-select-wrap:nth-child(3) .filter-select-icon-right,
  .filter-select-wrap:nth-child(4) .filter-select-icon-right,
  .filter-select-wrap:nth-child(5) .filter-select-icon-right {
    color: #64748b !important;
  }

  .dark-mode .filter-select-wrap:nth-child(2) .filter-select,
  .dark-mode .filter-select-wrap:nth-child(3) .filter-select,
  .dark-mode .filter-select-wrap:nth-child(4) .filter-select,
  .dark-mode .filter-select-wrap:nth-child(5) .filter-select {
    background-color: var(--card-bg, #1e293b) !important;
    color: #f1f5f9 !important;
    border-color: var(--border-light, #334155) !important;
  }

  .filter-select-icon-right {
    right: 9px !important;
    pointer-events: none !important;
  }
  .filter-select-icon-right svg {
    width: 12px !important;
    height: 12px !important;
  }

  .filter-btn-reset {
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 9999px !important;
    font-size: 11.5px !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }

  /* ========================================================
     UNIVERSAL MOBILE CARDS SYSTEM (MATCHING SCREENSHOT)
     ======================================================== */
  .table-card:has(+ .mobile-card-list),
  .table-card:has(~ .mobile-card-list),
  .form-section-card:has(+ .mobile-card-list),
  .form-section-card:has(~ .mobile-card-list),
  .pk-table-card:has(+ .mobile-card-list),
  .pk-table-card:has(~ .mobile-card-list),
  .mapel-table-responsive:has(+ .mobile-card-list),
  .table-responsive:has(+ .mobile-card-list),
  .table-container:has(+ .mobile-card-list) {
    display: none !important;
  }

  .mobile-card-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .mobile-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 13px 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .dark-mode .mobile-card-item {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-light, #334155);
    box-shadow: none;
  }

  .mobile-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mobile-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    word-break: break-word;
  }

  .dark-mode .mobile-card-title {
    color: #f8fafc;
  }

  .mobile-card-subtitle {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    line-height: 1.3;
  }

  .mobile-card-meta-grid {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 5px;
    flex-wrap: wrap;
  }

  .mobile-card-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-card-meta-label {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    line-height: 1;
  }

  .dark-mode .mobile-card-meta-label {
    color: #94a3b8;
  }

  .mobile-card-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    line-height: 1.25;
    white-space: nowrap;
  }

  .dark-mode .mobile-card-pill {
    background-color: #334155;
    color: #f1f5f9;
    border-color: #475569;
  }

  .mobile-card-pill.status-green,
  .mobile-card-pill.status-aktif,
  .mobile-card-pill.status-diterima,
  .mobile-card-pill.status-disetujui,
  .mobile-card-pill.status-sembuh,
  .mobile-card-pill.status-sudah_kembali {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
  }

  .mobile-card-pill.status-yellow,
  .mobile-card-pill.status-pulang,
  .mobile-card-pill.status-pending,
  .mobile-card-pill.status-menunggu,
  .mobile-card-pill.status-sambang {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
  }

  .mobile-card-pill.status-red,
  .mobile-card-pill.status-sakit,
  .mobile-card-pill.status-ditolak,
  .mobile-card-pill.status-nonaktif,
  .mobile-card-pill.status-melewati_batas {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
  }

  .dark-mode .mobile-card-pill.status-green,
  .dark-mode .mobile-card-pill.status-aktif,
  .dark-mode .mobile-card-pill.status-diterima,
  .dark-mode .mobile-card-pill.status-disetujui,
  .dark-mode .mobile-card-pill.status-sembuh,
  .dark-mode .mobile-card-pill.status-sudah_kembali {
    background-color: rgba(34, 197, 94, 0.18) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
  }

  .mobile-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
  }

  .mobile-card-action-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    line-height: 1;
    text-align: right;
    padding-right: 2px;
  }

  .dark-mode .mobile-card-action-title {
    color: #94a3b8;
  }

  .mobile-card-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-btn-pastel {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    transition: transform 0.1s ease, filter 0.15s ease;
  }

  .mobile-btn-pastel:active {
    transform: scale(0.92);
  }

  .mobile-btn-pastel svg {
    width: 15px;
    height: 15px;
  }

  /* Pastel View (Blue) */
  .mobile-btn-view {
    background-color: #dbeafe !important;
    color: #2563eb !important;
  }
  .dark-mode .mobile-btn-view {
    background-color: rgba(37, 99, 235, 0.22) !important;
    color: #60a5fa !important;
  }

  /* Pastel Edit (Yellow) */
  .mobile-btn-edit {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
  }
  .dark-mode .mobile-btn-edit {
    background-color: rgba(217, 119, 6, 0.22) !important;
    color: #fbbf24 !important;
  }

  /* Pastel Delete (Red) */
  .mobile-btn-delete {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
  }
  .dark-mode .mobile-btn-delete {
    background-color: rgba(239, 68, 68, 0.22) !important;
    color: #f87171 !important;
  }

  /* Pastel Print (Purple) */
  .mobile-btn-print {
    background-color: #ede9fe !important;
    color: #7c3aed !important;
  }
  .dark-mode .mobile-btn-print {
    background-color: rgba(124, 58, 237, 0.22) !important;
    color: #a78bfa !important;
  }

  /* Pastel Key / Reset (Indigo) */
  .mobile-btn-key {
    background-color: #e0e7ff !important;
    color: #4338ca !important;
  }
  .dark-mode .mobile-btn-key {
    background-color: rgba(67, 56, 202, 0.22) !important;
    color: #818cf8 !important;
  }

  /* Pastel Success (Green) */
  .mobile-btn-success {
    background-color: #dcfce7 !important;
    color: #16a34a !important;
  }
  .dark-mode .mobile-btn-success {
    background-color: rgba(22, 163, 74, 0.22) !important;
    color: #4ade80 !important;
  }

  .mobile-empty-card {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
  }
  .dark-mode .mobile-empty-card {
    background: var(--card-bg);
    border-color: var(--border-light);
  }
}

/* ========================================================
   ATTENDANCE BUTTON TOGGLE STYLES (JURNAL SEKOLAH)
   ======================================================== */
.btn-att-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 90px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 20px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.btn-att-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}
.btn-att-toggle.att-hadir {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
}
.btn-att-toggle.att-sakit {
  background-color: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.35);
}
.btn-att-toggle.att-izin {
  background-color: rgba(37, 99, 235, 0.12);
  color: #2563EB;
  border-color: rgba(37, 99, 235, 0.35);
}
.btn-att-toggle.att-alpa {
  background-color: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border-color: rgba(239, 68, 68, 0.35);
}
html.dark-mode .btn-att-toggle.att-hadir {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.4);
}
html.dark-mode .btn-att-toggle.att-sakit {
  background-color: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.4);
}
html.dark-mode .btn-att-toggle.att-izin {
  background-color: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
  border-color: rgba(37, 99, 235, 0.4);
}
html.dark-mode .btn-att-toggle.att-alpa {
  background-color: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   DESKTOP DEFAULT FOR MOBILE CARD LISTS (FIX GAMBAR 1 & GAMBAR 2 LEAK)
   ========================================================================== */
.mobile-card-list,
.mobile-siswa-list,
.fi-ta-mobile-list {
  display: none;
}

.mobile-btn-pastel svg,
.mobile-action-btn svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   FILAMENT V4 TABLE COMPONENT DESIGN SYSTEM (.fi-ta-*)
   Electric Blue (#0052FF) Primary + Red (#DC2626) Destructive
   ========================================================================== */
@keyframes fiPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fi-ta-ctn {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: visible;
}

html.dark-mode .fi-ta-ctn {
  background: var(--card-bg, #141C28);
  border-color: var(--border-light, #263346);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Top Toolbar: Bulk Action on Left | Search + Filter Funnel on Right */
.fi-ta-header-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
  border-radius: 12px 12px 0 0;
  flex-wrap: wrap;
}

html.dark-mode .fi-ta-header-toolbar {
  background: var(--card-bg, #141C28);
  border-bottom-color: var(--border-light, #263346);
}

.fi-ta-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fi-ta-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Bulk Actions Button ([ ⋮ Aksi ] - Gambar 5) */
.fi-ta-bulk-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fi-ta-bulk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  user-select: none;
  white-space: nowrap;
}

.fi-ta-bulk-btn svg {
  width: 15px;
  height: 15px;
  color: #6B7280;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.fi-ta-bulk-btn:not([disabled]):hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.fi-ta-bulk-btn:not([disabled]):hover svg {
  color: #111827;
}

.fi-ta-bulk-btn.is-active-selection:not([disabled]) {
  border-color: rgba(0, 82, 255, 0.35);
  box-shadow: 0 1px 2px rgba(0, 82, 255, 0.08);
}

.fi-ta-bulk-btn[disabled],
.fi-ta-bulk-btn.is-disabled {
  background: #F9FAFB;
  color: #9CA3AF;
  border-color: #E5E7EB;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
}

.fi-ta-bulk-btn[disabled] svg,
.fi-ta-bulk-btn.is-disabled svg {
  color: #CBD5E1;
}

html.dark-mode .fi-ta-bulk-btn {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}

html.dark-mode .fi-ta-bulk-btn[disabled],
html.dark-mode .fi-ta-bulk-btn.is-disabled {
  background: rgba(30, 41, 59, 0.45);
  color: #64748B;
  border-color: #263346;
}

.fi-ta-bulk-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 6px;
  background: #EFF4FF;
  color: #0052FF;
  border: 1px solid rgba(0, 82, 255, 0.2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

html.dark-mode .fi-ta-bulk-count {
  background: rgba(0, 82, 255, 0.22);
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.3);
}

/* Floating Bulk Actions Menu Dropdown */
.fi-ta-bulk-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 4px 10px -4px rgba(15, 23, 42, 0.06);
  padding: 5px;
  z-index: 90;
  display: none;
}

.fi-ta-bulk-menu.is-open {
  display: block;
  animation: fiPopoverIn 0.14s ease-out;
}

html.dark-mode .fi-ta-bulk-menu {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.fi-ta-bulk-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.fi-ta-bulk-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fi-ta-bulk-item:hover {
  background: #F3F4F6;
  color: #111827;
}

html.dark-mode .fi-ta-bulk-item {
  color: #E2E8F0;
}

html.dark-mode .fi-ta-bulk-item:hover {
  background: #283548;
  color: #FFFFFF;
}

.fi-ta-bulk-item.is-primary {
  color: #0052FF;
}

.fi-ta-bulk-item.is-primary:hover {
  background: #EFF4FF;
  color: #0043D4;
}

html.dark-mode .fi-ta-bulk-item.is-primary {
  color: #60A5FA;
}

html.dark-mode .fi-ta-bulk-item.is-primary:hover {
  background: rgba(0, 82, 255, 0.2);
}

.fi-ta-bulk-item.is-danger {
  color: #DC2626;
}

.fi-ta-bulk-item.is-danger:hover {
  background: #FEF2F2;
  color: #B91C1C;
}

html.dark-mode .fi-ta-bulk-item.is-danger {
  color: #F87171;
}

html.dark-mode .fi-ta-bulk-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.16);
}

.fi-ta-bulk-divider {
  height: 1px;
  background: #F3F4F6;
  margin: 4px 2px;
}

html.dark-mode .fi-ta-bulk-divider {
  background: #334155;
}

/* Search Input (Right Toolbar) */
.fi-ta-search-wrap {
  position: relative;
  width: 245px;
  max-width: 100%;
}

.fi-ta-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #9CA3AF;
  pointer-events: none;
}

.fi-ta-search-input {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 34px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  color: #111827;
  outline: none;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-ta-search-input::placeholder {
  color: #9CA3AF;
}

.fi-ta-search-input:focus {
  border-color: #0052FF;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

html.dark-mode .fi-ta-search-input {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}

.fi-ta-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 5px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.fi-ta-search-clear.is-visible {
  display: inline-flex;
}

.fi-ta-search-clear:hover {
  color: #374151;
  background: #F3F4F6;
}

/* Funnel Filter Button & Popover (Right Next to Search - Gambar 3 & 4) */
.fi-ta-filter-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.fi-ta-filter-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.fi-ta-filter-btn svg {
  width: 16px;
  height: 16px;
}

.fi-ta-filter-btn:hover,
.fi-ta-filter-btn.is-active {
  background: #F9FAFB;
  color: #111827;
  border-color: #D1D5DB;
}

.fi-ta-filter-btn.has-filters {
  border-color: rgba(0, 82, 255, 0.35);
  color: #0052FF;
  background: #F8FAFF;
}

html.dark-mode .fi-ta-filter-btn {
  background: #1E293B;
  border-color: #334155;
  color: #94A3B8;
}

html.dark-mode .fi-ta-filter-btn:hover,
html.dark-mode .fi-ta-filter-btn.is-active {
  color: #F8FAFC;
  border-color: #475569;
}

.fi-ta-filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFF4FF;
  color: #0052FF;
  border: 1px solid rgba(0, 82, 255, 0.2);
  line-height: 1;
}

.fi-ta-filter-badge.has-active {
  background: #0052FF;
  color: #FFFFFF;
  border-color: #0052FF;
}

html.dark-mode .fi-ta-filter-badge {
  background: #1E293B;
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.35);
}

html.dark-mode .fi-ta-filter-badge.has-active {
  background: #0052FF;
  color: #FFFFFF;
  border-color: #0052FF;
}

/* Floating Filter Popover (Gambar 4) */
.fi-ta-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-width: calc(100vw - 28px);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 14px 30px -6px rgba(15, 23, 42, 0.14), 0 4px 10px -3px rgba(15, 23, 42, 0.06);
  padding: 16px 18px;
  z-index: 95;
  display: none;
  box-sizing: border-box;
}

.fi-ta-filter-popover.is-open {
  display: block;
  animation: fiPopoverIn 0.14s ease-out;
}

html.dark-mode .fi-ta-filter-popover {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.fi-ta-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.fi-ta-filter-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

html.dark-mode .fi-ta-filter-title {
  color: #F8FAFC;
}

.fi-ta-filter-reset {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #DC2626;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.fi-ta-filter-reset:hover {
  text-decoration: underline;
  color: #B91C1C;
}

html.dark-mode .fi-ta-filter-reset {
  color: #F87171;
}

.fi-ta-filter-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fi-ta-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fi-ta-filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
}

html.dark-mode .fi-ta-filter-label {
  color: #CBD5E1;
}

.fi-ta-filter-select,
.fi-ta-filter-input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  color: #111827;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-ta-filter-select:focus,
.fi-ta-filter-input:focus {
  border-color: #0052FF;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}

html.dark-mode .fi-ta-filter-select,
html.dark-mode .fi-ta-filter-input {
  background: #0F172A;
  border-color: #334155;
  color: #F8FAFC;
}

.fi-ta-filter-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  user-select: none;
}

html.dark-mode .fi-ta-filter-check-row {
  color: #F1F5F9;
}

.fi-ta-filter-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.fi-ta-filter-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 8px;
  background: #0052FF;
  color: #FFFFFF;
  border: 1px solid #0052FF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 82, 255, 0.22);
  transition: background-color 0.15s ease;
}

.fi-ta-filter-apply:hover {
  background: #0043D4;
  border-color: #0043D4;
}

/* ==========================================================================
   FILAMENT V4 COLUMN TOGGLE BUTTON & POPOVER (.fi-ta-col-*)
   ========================================================================== */
.fi-ta-col-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.fi-ta-col-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.fi-ta-col-btn svg {
  width: 16px;
  height: 16px;
}

.fi-ta-col-btn:hover,
.fi-ta-col-btn.is-active {
  background: #F9FAFB;
  color: #111827;
  border-color: #D1D5DB;
}

.fi-ta-col-btn.has-hidden-cols {
  border-color: rgba(0, 82, 255, 0.35);
  color: #0052FF;
  background: #F8FAFF;
}

html.dark-mode .fi-ta-col-btn {
  background: #1E293B;
  border-color: #334155;
  color: #94A3B8;
}

html.dark-mode .fi-ta-col-btn:hover,
html.dark-mode .fi-ta-col-btn.is-active {
  color: #F8FAFC;
  border-color: #475569;
}

html.dark-mode .fi-ta-col-btn.has-hidden-cols {
  background: rgba(0, 82, 255, 0.15);
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.35);
}

.fi-ta-col-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  max-width: calc(100vw - 24px);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 14px 30px -6px rgba(15, 23, 42, 0.14), 0 4px 10px -3px rgba(15, 23, 42, 0.06);
  padding: 12px 14px;
  z-index: 96;
  display: none;
  box-sizing: border-box;
}

.fi-ta-col-popover.is-open {
  display: block;
  animation: fiPopoverIn 0.14s ease-out;
}

html.dark-mode .fi-ta-col-popover {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.fi-ta-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
}

html.dark-mode .fi-ta-col-head {
  border-bottom-color: #334155;
}

.fi-ta-col-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

html.dark-mode .fi-ta-col-title {
  color: #F8FAFC;
}

.fi-ta-col-reset {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: #0052FF;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.fi-ta-col-reset:hover {
  text-decoration: underline;
  color: #0043D4;
}

html.dark-mode .fi-ta-col-reset {
  color: #60A5FA;
}

.fi-ta-col-search-wrap {
  margin-bottom: 8px;
}

.fi-ta-col-search {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #F9FAFB;
  color: #111827;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fi-ta-col-search:focus {
  border-color: #0052FF;
  background: #FFFFFF;
}

html.dark-mode .fi-ta-col-search {
  background: #0F172A;
  border-color: #334155;
  color: #F8FAFC;
}

html.dark-mode .fi-ta-col-search:focus {
  border-color: #60A5FA;
  background: #1E293B;
}

.fi-ta-col-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.fi-ta-col-list::-webkit-scrollbar {
  width: 5px;
}
.fi-ta-col-list::-webkit-scrollbar-track {
  background: transparent;
}
.fi-ta-col-list::-webkit-scrollbar-thumb {
  background: #E5E7EB;
  border-radius: 4px;
}
html.dark-mode .fi-ta-col-list::-webkit-scrollbar-thumb {
  background: #334155;
}

.fi-ta-col-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease;
}

.fi-ta-col-item:hover {
  background-color: #F9FAFB;
}

html.dark-mode .fi-ta-col-item {
  color: #E2E8F0;
}

html.dark-mode .fi-ta-col-item:hover {
  background-color: #243247;
}

.fi-ta-col-item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selection Strip Below Toolbar (Gambar 5: Select all Z | Deselect all) */
.fi-ta-selection-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  flex-wrap: wrap;
}

.fi-ta-selection-bar.is-visible {
  display: flex;
}

html.dark-mode .fi-ta-selection-bar {
  background: #192334;
  border-bottom-color: #263346;
}

.fi-ta-selection-count {
  font-weight: 600;
  color: #374151;
}

html.dark-mode .fi-ta-selection-count {
  color: #E2E8F0;
}

.fi-ta-selection-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.fi-ta-link-select-all {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #0052FF;
  cursor: pointer;
}

.fi-ta-link-select-all:hover {
  text-decoration: underline;
}

html.dark-mode .fi-ta-link-select-all {
  color: #60A5FA;
}

.fi-ta-link-deselect {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #DC2626;
  cursor: pointer;
}

.fi-ta-link-deselect:hover {
  text-decoration: underline;
}

html.dark-mode .fi-ta-link-deselect {
  color: #F87171;
}

/* Filament v4 Table & Checkbox */
.fi-ta-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fi-ta-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.fi-ta-table thead th {
  background-color: #FAFAFA;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  user-select: none;
}

html.dark-mode .fi-ta-table thead th {
  background-color: #1A2332;
  color: #F1F5F9;
  border-bottom-color: #263346;
}

.fi-ta-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.fi-ta-th-sort svg {
  width: 14px;
  height: 14px;
  color: #9CA3AF;
  transition: transform 0.15s ease, color 0.15s ease;
}

.fi-ta-th-sort:hover svg,
.fi-ta-th-sort.is-sorted svg {
  color: #0052FF;
}

.fi-ta-table tbody tr {
  border-bottom: 1px solid #F3F4F6;
  transition: background-color 0.12s ease;
}

html.dark-mode .fi-ta-table tbody tr {
  border-bottom-color: #232E40;
}

.fi-ta-table tbody tr:last-child {
  border-bottom: none;
}

.fi-ta-table tbody tr:hover {
  background-color: #F9FAFB;
}

html.dark-mode .fi-ta-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.fi-ta-table tbody tr.is-selected,
.modern-table tbody tr.is-selected {
  background-color: rgba(0, 82, 255, 0.035) !important;
  box-shadow: inset 3px 0 0 #0052FF;
}

html.dark-mode .fi-ta-table tbody tr.is-selected,
html.dark-mode .modern-table tbody tr.is-selected {
  background-color: rgba(0, 82, 255, 0.12) !important;
  box-shadow: inset 3px 0 0 #3B82F6;
}

.fi-ta-table tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: #374151;
  vertical-align: middle;
}

html.dark-mode .fi-ta-table tbody td {
  color: #E2E8F0;
}

.fi-ta-th-check,
.fi-ta-td-check {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 16px !important;
  padding-right: 8px !important;
  text-align: left !important;
}

.fi-ta-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #D1D5DB;
  border-radius: 4.5px;
  background-color: #FFFFFF;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  margin: 0;
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.fi-ta-checkbox:hover {
  border-color: #9CA3AF;
}

.fi-ta-checkbox:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.18);
  outline: none;
}

.fi-ta-checkbox:checked {
  background-color: #0052FF;
  border-color: #0052FF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.5 11.2L12.5 4.8' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 13px 13px;
  background-position: center;
  background-repeat: no-repeat;
}

html.dark-mode .fi-ta-checkbox {
  background-color: #0F172A;
  border-color: #475569;
}

html.dark-mode .fi-ta-checkbox:checked {
  background-color: #0052FF;
  border-color: #0052FF;
}

/* Filament v4 Inline Row Action Links (Gambar 3: View | Edit | Delete) */
.fi-ta-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}

.fi-ta-act-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 3px 4px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.fi-ta-act-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.fi-ta-act-view {
  color: #4B5563;
}
.fi-ta-act-view:hover {
  color: #111827;
  background: #F3F4F6;
}
html.dark-mode .fi-ta-act-view {
  color: #94A3B8;
}
html.dark-mode .fi-ta-act-view:hover {
  color: #F8FAFC;
  background: #283548;
}

.fi-ta-act-edit {
  color: #0052FF;
}
.fi-ta-act-edit:hover {
  color: #003ECF;
  background: #EFF4FF;
}
html.dark-mode .fi-ta-act-edit {
  color: #60A5FA;
}
html.dark-mode .fi-ta-act-edit:hover {
  background: rgba(0, 82, 255, 0.2);
}

.fi-ta-act-delete {
  color: #DC2626;
}
.fi-ta-act-delete:hover {
  color: #B91C1C;
  background: #FEF2F2;
}
html.dark-mode .fi-ta-act-delete {
  color: #F87171;
}
html.dark-mode .fi-ta-act-delete:hover {
  background: rgba(239, 68, 68, 0.18);
}

/* Filament v4 Footer (Gambar 3 & 4: Showing X to Y of Z | Per page | Pagination) */
.fi-ta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  background: #FFFFFF;
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
}

html.dark-mode .fi-ta-footer {
  background: var(--card-bg, #141C28);
  border-top-color: var(--border-light, #263346);
}

.fi-ta-footer-info {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

html.dark-mode .fi-ta-footer-info {
  color: #94A3B8;
}

.fi-ta-perpage {
  display: inline-flex;
  align-items: center;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  overflow: hidden;
  height: 34px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

html.dark-mode .fi-ta-perpage {
  background: #1E293B;
  border-color: #334155;
}

.fi-ta-perpage-label {
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6B7280;
  border-right: 1px solid #E5E7EB;
  height: 100%;
  display: inline-flex;
  align-items: center;
  background: #FAFAFA;
  white-space: nowrap;
}

html.dark-mode .fi-ta-perpage-label {
  background: #162030;
  color: #94A3B8;
  border-right-color: #334155;
}

.fi-ta-perpage-select {
  border: none;
  background: transparent;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  height: 100%;
  cursor: pointer;
  outline: none;
}

html.dark-mode .fi-ta-perpage-select {
  color: #F8FAFC;
}

html.dark-mode .fi-ta-perpage-select option {
  background: #1E293B;
  color: #F8FAFC;
}

.fi-ta-pages {
  display: inline-flex;
  align-items: center;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

html.dark-mode .fi-ta-pages {
  background: #1E293B;
  border-color: #334155;
}

.fi-ta-page-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  border: none;
  border-right: 1px solid #E5E7EB;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.fi-ta-page-btn:last-child {
  border-right: none;
}

.fi-ta-page-btn:hover:not([disabled]):not(.is-active) {
  background: #F9FAFB;
  color: #111827;
}

.fi-ta-page-btn.is-active {
  color: #0052FF;
  background: #EFF4FF;
  font-weight: 700;
}

.fi-ta-page-btn[disabled] {
  color: #D1D5DB;
  cursor: not-allowed;
}

html.dark-mode .fi-ta-page-btn {
  border-right-color: #334155;
  color: #CBD5E1;
}

html.dark-mode .fi-ta-page-btn.is-active {
  background: rgba(0, 82, 255, 0.25);
  color: #60A5FA;
}

html.dark-mode .fi-ta-page-btn[disabled] {
  color: #475569;
}

/* ==========================================================================
   GAMBAR 5 CENTERED CONFIRMATION MODAL (.fi-confirm-*)
   ========================================================================== */
.fi-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fi-confirm-backdrop.is-open {
  display: flex;
  animation: fadeInDown 0.15s ease-out;
}

.fi-confirm-dialog {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.28);
}

html.dark-mode .fi-confirm-dialog {
  background: #141C28;
  border-color: #263346;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.fi-confirm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.fi-confirm-close:hover {
  background: #F3F4F6;
  color: #374151;
}

html.dark-mode .fi-confirm-close:hover {
  background: #1E293B;
  color: #F8FAFC;
}

.fi-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fi-confirm-icon svg {
  width: 22px;
  height: 22px;
}

.fi-confirm-icon.is-danger {
  background: #FEE2E2;
  color: #DC2626;
}

.fi-confirm-icon.is-primary {
  background: #EFF4FF;
  color: #0052FF;
}

html.dark-mode .fi-confirm-icon.is-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
}

html.dark-mode .fi-confirm-icon.is-primary {
  background: rgba(0, 82, 255, 0.22);
  color: #60A5FA;
}

.fi-confirm-title {
  margin: 0 0 6px 0;
  font-size: 16.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}

html.dark-mode .fi-confirm-title {
  color: #F8FAFC;
}

.fi-confirm-desc {
  margin: 0 0 22px 0;
  font-size: 13.5px;
  color: #6B7280;
  line-height: 1.5;
}

html.dark-mode .fi-confirm-desc {
  color: #94A3B8;
}

.fi-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fi-confirm-btn-cancel {
  height: 38px;
  border-radius: 8px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #111827;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.fi-confirm-btn-cancel:hover {
  background: #F9FAFB;
}

html.dark-mode .fi-confirm-btn-cancel {
  background: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

.fi-confirm-btn-submit {
  height: 38px;
  border-radius: 8px;
  border: 1px solid #DC2626;
  background: #DC2626;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.fi-confirm-btn-submit:hover {
  background: #B91C1C;
  border-color: #B91C1C;
}

.fi-confirm-btn-submit.is-primary {
  background: #0052FF;
  border-color: #0052FF;
}

.fi-confirm-btn-submit.is-primary:hover {
  background: #0043D4;
  border-color: #0043D4;
}

/* ==========================================================================
   ENHANCED TABLE CARD + MOBILE HARMONIZATION (<= 768px)
   ========================================================================== */
.fi-filter-docked {
  display: none !important;
}

@media (max-width: 768px) {
  body .table-card.fi-ta-enhanced {
    display: block !important;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
  }

  html.dark-mode body .table-card.fi-ta-enhanced {
    background: var(--card-bg, #141C28);
    border-color: var(--border-light, #263346);
  }

  /* Requirement 3: Mobile displays the real desktop table with smooth horizontal scroll & friendly touch styles */
  .mobile-card-list,
  .mobile-siswa-list,
  .fi-ta-mobile-list,
  body .table-card.fi-ta-enhanced > .mobile-card-list,
  body .table-card.fi-ta-enhanced > .mobile-siswa-list,
  .fi-ta-ctn > .fi-ta-mobile-list {
    display: none !important;
  }

  body .table-card.fi-ta-enhanced > .table-wrapper,
  .fi-ta-ctn > .fi-ta-table-wrap,
  .fi-ta-ctn > .fi-ta-table-wrap.has-mobile-cards {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative;
    border-radius: 0 0 12px 12px;
  }

  /* Make mobile table comfortable and prevent narrow crushed columns */
  .fi-ta-ctn .fi-ta-table,
  .table-card .modern-table,
  .fi-ta-table-wrap table {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .fi-ta-ctn .fi-ta-table th,
  .fi-ta-ctn .fi-ta-table td,
  .table-card .modern-table th,
  .table-card .modern-table td {
    padding: 10px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  /* Pin checkbox column sticky on mobile so user never loses their place while scrolling */
  .fi-ta-th-check,
  .fi-ta-td-check {
    position: sticky !important;
    left: 0 !important;
    z-index: 5 !important;
    background: #FFFFFF !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04) !important;
  }

  html.dark-mode .fi-ta-th-check,
  html.dark-mode .fi-ta-td-check {
    background: #141C28 !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.25) !important;
  }

  /* When row is hovered or selected, update sticky cell background too */
  .fi-ta-table tr.is-selected .fi-ta-td-check,
  .modern-table tr.is-selected .fi-ta-td-check {
    background: #F0F5FF !important;
  }
  html.dark-mode .fi-ta-table tr.is-selected .fi-ta-td-check,
  html.dark-mode .modern-table tr.is-selected .fi-ta-td-check {
    background: rgba(0, 82, 255, 0.15) !important;
  }

  .fi-ta-header-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .fi-ta-toolbar-right {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  .fi-ta-search-wrap {
    flex: 1 1 auto;
    width: auto;
    min-width: 120px;
  }

  .fi-ta-filter-popover {
    right: 0;
    width: min(295px, calc(100vw - 32px));
  }

  .fi-ta-bulk-menu {
    left: 0;
    min-width: 195px;
    max-width: calc(100vw - 32px);
  }

  .fi-ta-footer {
    padding: 10px 12px;
    gap: 10px;
  }

  .fi-ta-footer-info {
    width: 100%;
    text-align: center;
    font-size: 12px;
  }

  .fi-ta-mobile-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background-color 0.12s ease, border-color 0.12s ease;
  }

  .fi-ta-mobile-card.is-selected,
  .mobile-card-item.is-selected,
  .mobile-siswa-card.is-selected {
    border-color: rgba(0, 82, 255, 0.45) !important;
    background: rgba(0, 82, 255, 0.035) !important;
    box-shadow: inset 3px 0 0 #0052FF !important;
  }

  html.dark-mode .fi-ta-mobile-card {
    background: #1E293B;
    border-color: #334155;
  }

  .fi-mobile-check-wrap {
    padding-top: 2px;
    flex-shrink: 0;
  }
}

/* ========================================================
   FILAMENT 3.x STANDARDIZED SELECT DROPDOWN (NATIVE: FALSE)
   Custom searchable, preloaded, prefix-icon, and multiple-pill select
   ======================================================== */
.fi-select-wrap {
  position: relative;
  width: 100%;
  display: block;
  font-family: inherit;
  box-sizing: border-box;
}

.fi-select-trigger {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary, #0F172A);
  background-color: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

html.dark-mode .fi-select-trigger {
  background-color: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}

.fi-select-trigger:focus,
.fi-select-wrap.is-open .fi-select-trigger {
  border-color: var(--electric-blue, #0052FF);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.14);
  outline: none;
}

.fi-select-trigger.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--bg-page, #F8FAFC);
}

.fi-select-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.fi-select-prefix-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #64748B;
  flex-shrink: 0;
}

html.dark-mode .fi-select-prefix-icon {
  color: #94A3B8;
}

.fi-select-prefix-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.fi-select-label-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.fi-select-placeholder {
  color: #94A3B8;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fi-select-single-value {
  color: var(--text-primary, #0F172A);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark-mode .fi-select-single-value {
  color: #F8FAFC;
}

/* Multiple Pills (Filament 3 Badge Style) */
.fi-select-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.fi-select-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0052FF;
  background-color: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  line-height: 1.3;
}

html.dark-mode .fi-select-pill {
  color: #60A5FA;
  background-color: rgba(0, 82, 255, 0.2);
  border-color: rgba(96, 165, 250, 0.35);
}

.fi-select-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: background-color 0.15s ease;
}

.fi-select-pill-remove:hover {
  background-color: rgba(0, 82, 255, 0.2);
}

.fi-select-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.fi-select-clear {
  border: none;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  font-size: 14px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
}

.fi-select-clear:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

.fi-select-chevron {
  width: 16px;
  height: 16px;
  color: #94A3B8;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fi-select-chevron svg {
  width: 16px;
  height: 16px;
}

.fi-select-wrap.is-open .fi-select-chevron {
  transform: rotate(180deg);
}

/* Popover Dropdown */
.fi-select-popover {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1050;
  background-color: var(--card-bg, #FFFFFF);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.fi-select-wrap.is-open .fi-select-popover {
  display: flex;
  animation: fiPopoverIn 0.14s ease-out;
}

.fi-select-popover.is-dropup {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1), 0 -8px 10px -6px rgba(0, 0, 0, 0.05);
}

html.dark-mode .fi-select-popover {
  background-color: #1E293B;
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Search Box inside Popover */
.fi-select-search-box {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light, #E2E8F0);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-page, #F8FAFC);
}

html.dark-mode .fi-select-search-box {
  background: #0F172A;
  border-bottom-color: #334155;
}

.fi-select-search-icon {
  width: 15px;
  height: 15px;
  color: #94A3B8;
  flex-shrink: 0;
}

.fi-select-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-primary, #0F172A);
  padding: 0;
}

html.dark-mode .fi-select-search-input {
  color: #F8FAFC;
}

.fi-select-search-input::placeholder {
  color: #94A3B8;
}

/* Options Container */
.fi-select-options-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.fi-select-options-list::-webkit-scrollbar {
  width: 5px;
}

.fi-select-options-list::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

html.dark-mode .fi-select-options-list::-webkit-scrollbar-thumb {
  background: #475569;
}

.fi-select-option {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-primary, #0F172A);
  cursor: pointer;
  transition: background-color 0.12s ease;
  user-select: none;
}

html.dark-mode .fi-select-option {
  color: #E2E8F0;
}

.fi-select-option:hover {
  background-color: rgba(0, 82, 255, 0.06);
  color: #0052FF;
}

html.dark-mode .fi-select-option:hover {
  background-color: rgba(0, 82, 255, 0.15);
  color: #60A5FA;
}

.fi-select-option.is-selected {
  font-weight: 600;
  color: #0052FF;
  background-color: rgba(0, 82, 255, 0.08);
}

html.dark-mode .fi-select-option.is-selected {
  color: #60A5FA;
  background-color: rgba(0, 82, 255, 0.2);
}

.fi-select-option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.fi-select-option-check {
  width: 15px;
  height: 15px;
  display: none;
  color: #0052FF;
  flex-shrink: 0;
}

html.dark-mode .fi-select-option-check {
  color: #60A5FA;
}

.fi-select-option.is-selected .fi-select-option-check {
  display: inline-flex;
}

.fi-select-empty-msg {
  padding: 16px 12px;
  text-align: center;
  font-size: 12.5px;
  color: #94A3B8;
}

/* Compact Variant for Toolbars */
.fi-select-wrap.is-compact .fi-select-trigger {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12.5px;
}








