/* ===== BASE & CLINICAL GLASSMORPHISM THEME ===== */
*, *::before, *::after { box-sizing: border-box; }

/* Zero-lag theme transition lock: suppresses heavy blur & repaint recalculations */
.theme-transition-lock,
.theme-transition-lock *,
.theme-transition-lock *::before,
.theme-transition-lock *::after {
  transition: none !important;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, #e0f2fe 0%, #f0f9ff 35%, #f8fafc 100%);
  min-height: 100vh;
  color: #0f172a;
}

/* ===== APP CARD (Frosted Glassmorphism, Soft Azure Borders & Glow) ===== */
.app-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(186, 230, 253, 0.55);
  border-radius: 0.85rem;
  box-shadow: 0 4px 16px -2px rgba(2, 132, 199, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.8rem 0.95rem;
  position: relative;
}
.app-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px -4px rgba(2, 132, 199, 0.14), 0 4px 10px rgba(15, 23, 42, 0.04);
  border-color: #38bdf8;
}
.app-card:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.22), 0 4px 12px rgba(2, 132, 199, 0.08);
}
.app-card.card-hidden-it {
  border-color: #bae6fd;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.45) 0%, rgba(255, 255, 255, 0.88) 100%);
}

/* Card Internal Layout Blocks */
.card-primary-col {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.card-title-desc {
  flex: 1;
  min-width: 0;
  padding-right: 32px; /* Mencegah judul panjang tumpang tindih dengan icon star favorit */
}
.card-hidden-it .card-title-desc {
  padding-right: 0;
}
.card-title-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.card-title-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
  display: block;
  word-break: break-word;
  overflow-wrap: break-word;
}
.card-desc-text {
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Dashed separator between card description and centered action button */
.card-divider {
  border: none;
  border-top: 1.5px dashed #cbd5e1;
  margin: 0.5rem 0 0.5rem 0;
  width: 100%;
}

/* Card bottom action column */
.card-action-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Centered CTA container at the bottom of the card */
.card-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ===== ADMIN TOOLBAR: Dedicated Action Toolbar Above "Buka Aplikasi" (PRD) ===== */
.card-admin-toolbar {
  display: none;
}
.admin-mode .app-card .card-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 12px 0;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  position: static;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: border-color 0.18s ease;
}

/* Icon Circle (Soft Azure Gradient) */
.app-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.22);
  transition: transform 0.2s ease;
}
.admin-mode .app-card:hover .app-icon-circle {
  transform: scale(1.05);
}
.admin-mode .app-card:focus-within .app-icon-circle {
  transform: scale(1.05);
}

/* CTA text responsive full/short toggle */
.btn-open .btn-open-text-short { display: none; }
.btn-open .btn-open-text-full { display: inline; }

/* Pin favorite button (absolute in grid card, static in list view) */
.app-card .btn-pin {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.app-card .btn-pin:hover {
  color: #f59e0b;
  background: #fef3c7;
}
.app-card .btn-pin.pinned {
  color: #f59e0b;
  background: #fffbeb;
  border-color: #fde68a;
}

/* ===== SIDEBAR PANEL ===== */
.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(186, 230, 253, 0.5);
  border-radius: 0.85rem;
  box-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
}

/* ===== HEADER (COMPACT ENTERPRISE: Logo | Centered Search | Notifications, Clock, Theme, Auth) ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.88) 0%, rgba(14, 165, 233, 0.82) 55%, rgba(56, 189, 248, 0.76) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.15), 0 2px 6px -1px rgba(15, 23, 42, 0.05);
  padding: 0.5rem 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  min-width: 0;
  flex-shrink: 0;
}

.header-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

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

.header-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

.brand-text-full {
  display: inline;
}

.brand-text-short {
  display: none;
}

.admin-pill-tag {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-left: 6px;
  vertical-align: middle;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-pill-tag i {
  font-size: 0.6rem;
  color: #bae6fd;
}

body.dark-mode .admin-pill-tag {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
}

body.dark-mode .admin-pill-tag i {
  color: #38bdf8;
}

.header-subtitle {
  display: none;
}

/* ===== HEADER SEARCH INPUT (Mathematically Centered) ===== */
.header-search {
  width: 100%;
  max-width: 460px;
  justify-self: center;
  min-width: 0;
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  pointer-events: none;
  line-height: 1;
}

.search-input {
  width: 100%;
  height: 34px;
  padding: 0.45rem 2rem 0.45rem 2.2rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0.65rem;
  color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) inset;
}
.search-input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}
.search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.04) inset;
  background: rgba(255, 255, 255, 0.28);
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  line-height: 1;
  transition: background 0.15s ease;
}
.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.36);
}

/* ===== HEADER RIGHT ZONE (Clock, Notification, Avatar, Theme, Auth) ===== */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  justify-self: end;
  flex-shrink: 0;
}

.header-clock-wrap {
  text-align: right;
  line-height: 1.15;
  padding: 0 2px;
  flex-shrink: 0;
}

#digital-clock {
  font-size: 0.82rem;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#digital-date {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
}

/* Notification Bell & Theme Toggle */
.notification-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-notification-bell {
  position: relative;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  transition: all 0.2s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-notification-bell:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}
.btn-notification-bell:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

#theme-icon {
  font-size: 0.92rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}
#btn-theme-toggle:hover #theme-icon {
  transform: rotate(15deg);
}
body.dark-mode #btn-theme-toggle:hover #theme-icon {
  transform: rotate(30deg);
}
body.dark-mode #theme-icon {
  color: #fbbf24;
}

/* ===== NOTIFICATION CENTER (Standar Visual 4.3.X — Font Awesome, tanpa emoji) ===== */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0ea5e9;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Dropdown/popover: 400–420px, max-height 600px, internal scrolling */
.notification-popover {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  width: 400px;
  max-width: min(420px, 90vw);
  max-height: 600px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(186, 230, 253, 0.65);
  border-radius: 0.85rem;
  box-shadow: 0 14px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(2, 132, 199, 0.1);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notif-pop-in 200ms ease-out;
}
@keyframes notif-pop-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notification-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.notification-popover-header div {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.btn-close-popover {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.btn-close-popover:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Filter tabs: chip kecil, scroll horizontal, scrollbar disembunyikan */
.notification-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.notification-tabs::-webkit-scrollbar {
  display: none;
}
.notification-tabs .tab-btn {
  min-height: 28px;
  padding: 0.32rem 0.7rem;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* List: internal scroll + custom scrollbar 4px rounded */
.notification-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.notification-list::-webkit-scrollbar {
  width: 4px;
}
.notification-list::-webkit-scrollbar-track {
  background: transparent;
}
.notification-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.notification-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Item: ikon | judul | preview 2 baris | badge prioritas | timestamp | status + expand */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: max-height 250ms ease, padding 250ms ease, background 200ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.notification-item:hover {
  background: #f0f9ff;
  border-left-color: #0284c7;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.12);
}
.notification-item.is-expanded {
  background: #f0f9ff;
  border-left-color: #0284c7;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.12);
}
@keyframes notif-expand-fade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}
.notification-item.is-expanded .notif-preview {
  animation: notif-expand-fade 250ms ease;
}
.notif-title-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}
.notif-chevron {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 200ms ease, color 200ms ease;
}
.notification-item:hover .notif-chevron {
  color: #0284c7;
}
.notification-item.is-expanded .notif-chevron {
  transform: rotate(180deg);
  color: #0284c7;
}
.notification-item:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: -2px;
}
.notification-item.is-read {
  opacity: 0.72;
}
.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.notif-icon.is-critical { background: #fee2e2; color: #dc2626; }
.notif-icon.is-high { background: #fef3c7; color: #b45309; }
.notif-icon.is-normal { background: #e0f2fe; color: #0284c7; }
.notif-icon.is-info { background: #f1f5f9; color: #64748b; }
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.notif-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #0284c7;
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-preview {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.45;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 3.2em;
  transition: max-height 250ms ease;
}
/* Mode expand: tampilkan seluruh isi, tinggi otomatis */
.notification-item.is-expanded .notif-preview {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-height: 1200px;
}
.notification-item.is-expanded .notif-title {
  -webkit-line-clamp: unset;
  display: block;
}
.notif-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.notif-priority {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  line-height: 1.4;
}
.notif-priority.is-critical { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.notif-priority.is-high { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.notif-priority.is-normal { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.notif-priority.is-info { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.notif-time {
  font-size: 0.66rem;
  color: #94a3b8;
  font-weight: 500;
  margin-left: auto;
  white-space: nowrap;
}

/* Empty state */
.notification-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.notification-empty i {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.6;
}
.notification-empty-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}
.notification-empty-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Mobile: popover tidak boleh overflow viewport */
@media (max-width: 480px) {
  .notification-popover {
    width: calc(100vw - 2rem);
    position: fixed;
    top: 60px;
    right: 1rem;
  }
  .notif-meta-row {
    flex-wrap: wrap;
  }
}

/* Footer sticky */
.notification-popover-footer {
  border-top: 1px solid #e2e8f0;
  padding: 0.7rem;
  text-align: center;
  background: #f8fafc;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
}
.notification-popover-footer button {
  font-size: 0.76rem;
  color: #0284c7;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.notification-popover-footer button:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* User Avatar */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.user-avatar:hover {
  border-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

#avatar-initials {
  display: inline-block;
  line-height: 1;
}

/* Admin Badge */
.badge-admin {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  min-height: 28px;
  height: 28px;
  padding: 0 0.48rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge-admin i {
  font-size: 0.65rem;
  color: #bae6fd;
}

/* Header Auth Buttons */
.btn-login {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1;
  min-height: 32px;
  height: 32px;
  padding: 0 0.68rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-login:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}
.btn-login:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
.btn-login i {
  font-size: 0.68rem;
}
.btn-login span {
  display: inline;
}

.btn-logout {
  background: rgba(254, 226, 226, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1;
  min-height: 32px;
  height: 32px;
  padding: 0 0.68rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(254, 202, 202, 0.85);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 1px 3px rgba(185, 28, 28, 0.08);
}
.btn-logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* ===== ADMIN WORKSPACE SWITCHER (Segmented Control — PRD §4) ===== */
.workspace-switcher {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1.5px solid rgba(186, 230, 253, 0.6);
  border-radius: 0.85rem;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 16px -2px rgba(14, 165, 233, 0.08);
}

.workspace-segmented-control {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f0f9ff;
  padding: 3px;
  border-radius: 0.7rem;
}

.ws-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
}
.ws-segment:hover {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.1);
}
.ws-segment.active {
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}
.ws-segment i {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.ws-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}
.ws-segment.active .ws-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-ws-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  height: 32px;
  padding: 0 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
}
.btn-ws-action:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}
.btn-ws-action.btn-ws-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}
.btn-ws-action.btn-ws-primary:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #0284c7 100%);
  color: #ffffff;
}

/* ===== CATEGORY FILTER CHIPS (PRD §5 — Smaller) ===== */
.category-chips {
  display: flex;
  gap: 6px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.category-chips::-webkit-scrollbar {
  display: none;
}
@media (min-width: 768px) {
  .category-chips {
    justify-content: center;
  }
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  color: #475569;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(186, 230, 253, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
  flex-shrink: 0;
}
.tab-btn:hover {
  color: #0ea5e9;
  background: #e0f2fe;
  border-color: #7dd3fc;
}
.tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.28);
}
.tab-btn i {
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* ===== QUICK STATISTICS (PRD §6) + real-time flash ===== */
.stat-flash {
  animation: stat-pop 200ms ease;
}
@keyframes stat-pop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
#quick-stats,
.quick-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 110px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.55rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.stat-label {
  font-size: 0.6rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stat-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  flex-shrink: 0;
}
.stat-icon.is-total { background: #e0f2fe; color: #0ea5e9; }
.stat-icon.is-online { background: #dcfce7; color: #10b981; }
.stat-icon.is-maint { background: #fef3c7; color: #f59e0b; }
.stat-icon.is-fav { background: #fef9c3; color: #eab308; }
.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 2px;
  line-height: 1.2;
}
#stat-total-count { color: #0f172a; }
#stat-online-count { color: #16a34a; }
#stat-maint-count { color: #ca8a04; }
#stat-fav-count { color: #d97706; }

/* ===== SIDEBAR ADMIN CONTROL PANEL ===== */
.badge-data-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 9999px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}
.badge-data-source.is-offline {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.sidebar-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.sidebar-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0.48rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.sidebar-action-btn i {
  color: #0284c7;
  font-size: 0.75rem;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-action-btn:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
  color: #0369a1;
}

.infra-notice-banner {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}


/* ===== PROPORTIONAL ICON-TO-TEXT ALIGNMENT FOR ALL BADGES & BUTTONS ===== */
.badge-online,
.badge-maintenance,
.badge-category,
.badge-hidden-it,
.badge-admin,
.badge-priority-info,
.badge-priority-warning,
.badge-priority-urgent,
.badge-audience,
.triage-status-badge,
.triage-title-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  line-height: 1;
  vertical-align: middle;
}

.badge-online i,
.badge-maintenance i,
.badge-category i,
.badge-hidden-it i,
.badge-admin i,
.badge-priority-info i,
.badge-priority-warning i,
.badge-priority-urgent i,
.badge-audience i,
.triage-status-badge i,
.triage-title-badge i,
.btn-open i,
.btn-login i,
.btn-logout i,
.btn-add i,
.btn-ws-action i,
.ws-tab-btn i,
.tab-btn i,
.btn-promote-secondary i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.badge-online span,
.badge-maintenance span,
.badge-hidden-it span,
.badge-admin span,
.badge-audience span,
.triage-status-badge span,
.triage-title-badge span,
.btn-open span,
.btn-login span,
.btn-logout span,
.btn-ws-action span,
.ws-tab-btn span,
.tab-btn span,
.btn-promote-secondary span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* ===== BADGES ===== */
.badge-online {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 9999px;
}
.badge-maintenance {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 9999px;
}
.badge-category {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-size: 0.63rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 9999px;
}
.badge-hidden-it {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 9999px;
}
.badge-audience {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* ===== CARD BADGES ROW ===== */
.card-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ===== ICON CIRCLE ===== */
.app-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.22);
}

/* ===== BUTTONS ===== */
.btn-open {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  min-height: 34px;
  padding: 0.45rem 1.25rem;
  border-radius: 0.65rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-width: 150px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.24);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-open:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.32);
}
.modal-body .btn-login {
  background: #0ea5e9;
  border-color: #0ea5e9;
  height: auto;
  min-height: 38px;
}
.modal-body .btn-login:hover {
  background: #38bdf8;
}
.btn-logout:hover { background: #fecaca; }
.btn-add {
  background: #ffffff;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  min-height: 34px;
  padding: 0.46rem 0.95rem;
  border-radius: 0.65rem;
  border: 1px solid #bae6fd;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-add:hover {
  background: #f0f9ff;
}

/* ===== ADMIN CARD ACTION BUTTONS (PRD: 32-36px, hover scale 1.05) ===== */
.btn-icon-sm {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: transform 160ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
  flex-shrink: 0;
}
.btn-icon-sm:hover {
  transform: scale(1.05);
}
.btn-icon-sm:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 1px;
}
.btn-edit {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}
.btn-edit:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}
.btn-toggle-status {
  background: #fefce8;
  color: #ca8a04;
  border-color: #fef08a;
}
.btn-toggle-status:hover {
  background: #fef9c3;
  border-color: #fde047;
  color: #a16207;
}
.btn-toggle-vis {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}
.btn-toggle-vis:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}
.btn-delete {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ===== ENDPOINT EVALUATION & AUDIT (TRIAGE) STYLES ===== */
.triage-header-box {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(186, 230, 253, 0.55);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  box-shadow: 0 4px 16px -2px rgba(2, 132, 199, 0.05);
}
.triage-title-badge {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 9999px;
}
.triage-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(186, 230, 253, 0.55);
  border-radius: 1rem;
  padding: 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 16px -2px rgba(2, 132, 199, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.triage-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.94);
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -2px rgba(2, 132, 199, 0.12), 0 4px 10px rgba(15, 23, 42, 0.04);
}
.triage-status-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 9999px;
}
.triage-needs_review { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.triage-verified_ok { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.triage-dead_link { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.triage-security_alert { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.triage-archived { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* Two side-by-side buttons on Triage Card: Dominant "Buka Tautan" + Secondary "Publikasikan" */
.triage-primary-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.btn-triage-open {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  height: 36px;
  padding: 0 0.75rem;
  font-size: 0.76rem;
  line-height: 1;
}

.btn-promote-secondary {
  width: 100%;
  min-height: 36px;
  height: 36px;
  background: #f8fafc;
  color: #0284c7;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 0.75rem;
  border-radius: 0.65rem;
  border: 1.5px solid #bae6fd;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
}
.btn-promote-secondary:hover:not(:disabled) {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
}
.btn-promote-secondary.is-published {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
  cursor: default;
}

.triage-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid #f1f5f9;
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(186, 230, 253, 0.6);
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px -8px rgba(15, 23, 42, 0.25), 0 8px 24px -4px rgba(2, 132, 199, 0.12);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.modal-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  padding: 1.15rem 1.4rem;
  color: white;
}
.modal-body { padding: 1.4rem; }
.form-error-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 0.6rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: #dc2626;
  font-weight: 600;
  align-items: center;
  gap: 0.5rem;
}
.form-error-alert[style*="display: block"],
.form-error-alert[style*="display:block"] {
  display: flex !important;
}
.form-error-alert i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}
.form-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.6rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  color: #0f172a;
  transition: border-color 0.2s;
  background: #f8fafc;
}
.form-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
  background: white;
}
select.form-input { cursor: pointer; }
.btn-modal-cancel {
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-modal-cancel:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

/* ===== ANNOUNCEMENT & INTERNAL DETAILS BOX (VERTICALLY CENTERED ICON) ===== */
.announcement-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.announcement-item:last-child { border-bottom: none; }

.announcement-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}
.announcement-icon-box i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.78rem;
  margin: 0;
}

.announcement-body {
  flex: 1;
  min-width: 0;
}

.announcement-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.internal-note-box {
  margin-top: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3px solid #d97706;
  border-radius: 0.5rem;
  padding: 6px 9px;
  font-size: 0.68rem;
  color: #78350f;
  line-height: 1.4;
}

/* Priority badges */
.badge-priority-info {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}
.badge-priority-warning {
  background: #fef3c7;
  color: #ca8a04;
  border: 1px solid #fde68a;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}
.badge-priority-urgent {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

.btn-add-announce {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #bae6fd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: #e0f2fe;
  color: #0284c7;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-add-announce:hover {
  background: #0ea5e9;
  color: white;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px dashed #cbd5e1;
  border-radius: 1rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== PULSE DOT ===== */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.pulse-dot.online {
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22,163,74,0.5);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

/* ===== FADE IN ANIMATION ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.28s ease forwards; }

/* ===== MAIN LAYOUT & COLLAPSIBLE SIDEBAR ===== */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
  transition: grid-template-columns 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.content-col { min-width: 0; }
.main-grid.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr) !important;
}
.main-grid.sidebar-collapsed .sidebar-col {
  display: none !important;
}
/* Expanding apps-grid layout when sidebar is hidden */
.main-grid.sidebar-collapsed .apps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (min-width: 1700px) {
  .main-grid.sidebar-collapsed .apps-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1024px) {
  .main-grid.sidebar-collapsed .apps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .main-grid.sidebar-collapsed .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  .main-grid.sidebar-collapsed .apps-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SIDEBAR SINKRON (normal document flow — ikut scroll bersama konten, tanpa sticky/fixed) ===== */
.sidebar-col {
  position: static;
  width: auto;
  max-height: none;
  overflow: visible;
  min-width: 0;
}

/* ===== CATALOG CONTROLS (sortir + view toggle) ===== */
.catalog-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sort-select {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.sort-select:hover { border-color: #bae6fd; color: #0ea5e9; }
.sort-select:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }
.view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f1f5f9;
  border-radius: 0.6rem;
  padding: 2px;
}
.view-btn {
  width: 30px;
  height: 28px;
  border: none;
  border-radius: 0.45rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.18s ease;
}
.view-btn:hover { color: #0ea5e9; }
.view-btn.active { background: #ffffff; color: #0ea5e9; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12); }
.view-btn:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }
.btn-toggle-sidebar {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.btn-toggle-sidebar:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
  background: #f0f9ff;
}
.btn-toggle-sidebar.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.28);
}
.btn-toggle-sidebar:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }

/* ===== LIST VIEW (Tampilan List Sleek Enterprise Row Layout) ===== */
#apps-grid.list-view,
#pinned-grid.list-view {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
}
#apps-grid.list-view .app-card,
#pinned-grid.list-view .app-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  height: 48px;
  padding: 0 0.85rem;
  border-radius: 0.65rem;
}
#apps-grid.list-view .app-card:hover,
#pinned-grid.list-view .app-card:hover {
  transform: translateY(-1px);
}
#apps-grid.list-view .card-primary-col,
#pinned-grid.list-view .card-primary-col {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
#apps-grid.list-view .app-icon-circle,
#pinned-grid.list-view .app-icon-circle {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  border-radius: 7px;
  flex-shrink: 0;
}
#apps-grid.list-view .card-title-desc,
#pinned-grid.list-view .card-title-desc {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding-right: 0;
}
#apps-grid.list-view .card-title-bar,
#pinned-grid.list-view .card-title-bar {
  display: block;
  flex-shrink: 0;
  min-width: 140px;
  max-width: 210px;
}
#apps-grid.list-view .card-title-text,
#pinned-grid.list-view .card-title-text {
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0;
  display: block;
}
#apps-grid.list-view .card-desc-text,
#pinned-grid.list-view .card-desc-text {
  font-size: 0.73rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 100px;
  display: block;
  -webkit-line-clamp: unset;
  margin: 0;
}
#apps-grid.list-view .card-badges-row,
#pinned-grid.list-view .card-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
#apps-grid.list-view .card-divider,
#pinned-grid.list-view .card-divider {
  display: none;
}
#apps-grid.list-view .card-action-col,
#pinned-grid.list-view .card-action-col {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: auto;
  flex-shrink: 0;
}
#apps-grid.list-view .card-action-row,
#pinned-grid.list-view .card-action-row {
  width: auto;
}
#apps-grid.list-view .btn-open,
#pinned-grid.list-view .btn-open {
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  border-radius: 6px;
}
#apps-grid.list-view .btn-open .btn-open-text-full,
#pinned-grid.list-view .btn-open .btn-open-text-full {
  display: none;
}
#apps-grid.list-view .btn-open .btn-open-text-short,
#pinned-grid.list-view .btn-open .btn-open-text-short {
  display: inline;
}
#apps-grid.list-view .btn-pin,
#pinned-grid.list-view .btn-pin {
  position: static;
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
  border-radius: 6px;
  flex-shrink: 0;
}
#apps-grid.list-view .card-admin-toolbar,
#pinned-grid.list-view .card-admin-toolbar {
  display: none;
}
.admin-mode #apps-grid.list-view .card-admin-toolbar,
.admin-mode #pinned-grid.list-view .card-admin-toolbar {
  position: static;
  display: flex;
  align-items: center;
  gap: 4px;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  left: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.admin-mode #apps-grid.list-view .card-admin-toolbar .btn-icon-sm,
.admin-mode #pinned-grid.list-view .card-admin-toolbar .btn-icon-sm {
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
  border-radius: 6px;
}
/* Keep pin button visible in list view even in admin mode */
.admin-mode #apps-grid.list-view .app-card:hover .btn-pin,
.admin-mode #pinned-grid.list-view .app-card:hover .btn-pin,
.admin-mode #apps-grid.list-view .app-card:focus-within .btn-pin,
.admin-mode #pinned-grid.list-view .app-card:focus-within .btn-pin {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 960px) {
  #apps-grid.list-view .card-desc-text,
  #pinned-grid.list-view .card-desc-text {
    display: none;
  }
}
@media (max-width: 640px) {
  #apps-grid.list-view .app-card,
  #pinned-grid.list-view .app-card {
    height: auto;
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
    gap: 8px;
  }
  #apps-grid.list-view .card-primary-col,
  #pinned-grid.list-view .card-primary-col {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
  #apps-grid.list-view .card-badges-row,
  #pinned-grid.list-view .card-badges-row {
    flex-wrap: wrap;
  }
}

/* ===== DARK MODE ===== */
body.dark-mode {
  background: radial-gradient(120% 80% at 50% 0%, #0f2744 0%, #0b1322 35%, #080d18 100%);
  color: #e2e8f0;
}
body.dark-mode .site-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
body.dark-mode .app-card,
body.dark-mode .glass-panel,
body.dark-mode .side-card,
body.dark-mode .workspace-switcher,
body.dark-mode .triage-header-box,
body.dark-mode .triage-card,
body.dark-mode .modal-box,
body.dark-mode .empty-state,
body.dark-mode .infra-notice-banner,
body.dark-mode .notif-modal-tabs {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-color: rgba(51, 65, 85, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

/* De-neonified App Card Hover: Institutional Slate/Azure Lift */
body.dark-mode .app-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(56, 189, 248, 0.15);
}
body.dark-mode .app-card.card-hidden-it {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #3b4a63;
}

/* Dark Mode Badges (Translucent Chips, No Harsh Light-Theme Pastels) */
body.dark-mode .badge-category {
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}
body.dark-mode .badge-online {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
}
body.dark-mode .badge-maintenance {
  background: rgba(234, 179, 8, 0.14);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.28);
}
body.dark-mode .badge-hidden-it {
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.28);
}
body.dark-mode .badge-audience {
  background: rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.6);
}
body.dark-mode .badge-admin {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
body.dark-mode .side-count-badge {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
  border: 1px solid #334155;
}

/* Dark Mode App Icon Circle (Soft Azure Gradient) */
body.dark-mode .app-icon-circle {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Dark Mode Action Buttons */
body.dark-mode .btn-open {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}
body.dark-mode .btn-open:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}
body.dark-mode .btn-login {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-color: #0ea5e9;
  color: #ffffff;
}
body.dark-mode .btn-login:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #38bdf8;
}

/* Dark Mode Card Admin Toolbar Container & Pin
   Catatan: `admin-mode` berada pada <body>, sehingga selector harus `body.dark-mode.admin-mode`
   (tanpa spasi) agar action bar admin menyatu dengan kartu gelap. */
body.dark-mode.admin-mode .app-card .card-admin-toolbar,
body.dark-mode .app-card .card-admin-toolbar {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(71, 85, 105, 0.55);
  box-shadow: none;
}
body.dark-mode .triage-admin-toolbar {
  border-top-color: #334155;
}
body.dark-mode .btn-pin {
  background: rgba(30, 41, 59, 0.8);
  border-color: #334155;
  color: #64748b;
}
body.dark-mode .btn-pin:hover {
  color: #f59e0b;
  border-color: #f59e0b;
}
body.dark-mode .btn-pin.pinned {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}

/* Dark Mode Tabs & Controls */
body.dark-mode .tab-btn,
body.dark-mode .sort-select {
  background: #1e293b;
  border-color: #2b3a52;
  color: #cbd5e1;
}
body.dark-mode .tab-btn:hover,
body.dark-mode .sort-select:hover {
  border-color: #0ea5e9;
  color: #7dd3fc;
  background: rgba(30, 41, 59, 0.9);
}
body.dark-mode .tab-btn.active {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}
body.dark-mode .view-toggle { background: #0f172a; }
body.dark-mode .view-btn { color: #64748b; }
body.dark-mode .view-btn.active { background: #1e293b; color: #38bdf8; }
body.dark-mode #btn-toggle-sidebar,
body.dark-mode .btn-toggle-sidebar {
  background: #1e293b;
  border-color: #2b3a52;
  color: #cbd5e1;
}
body.dark-mode #btn-toggle-sidebar:hover,
body.dark-mode .btn-toggle-sidebar:hover {
  border-color: #0ea5e9;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}
body.dark-mode #btn-toggle-sidebar.active,
body.dark-mode .btn-toggle-sidebar.active {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #38bdf8;
}
body.dark-mode .form-input { background: #0f172a; border-color: #2b3a52; color: #e2e8f0; }
body.dark-mode .workspace-segmented-control { background: #0f172a; }
body.dark-mode .ws-segment { color: #94a3b8; }
body.dark-mode .ws-segment.active {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
body.dark-mode .ws-segment.active .ws-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Dark Mode Notification Popover & Full Notification Center (Crystal-Clear Contrast) */
body.dark-mode .notification-popover {
  background: rgba(15, 23, 42, 0.96);
  border-color: #334155;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.4);
}
body.dark-mode .notification-popover-header {
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
body.dark-mode .notification-popover-header div {
  color: #f8fafc !important;
}
body.dark-mode #notif-unread-count {
  color: #94a3b8 !important;
}
body.dark-mode .notification-tabs {
  background: #0f172a;
  border-bottom: 1px solid #334155;
}
body.dark-mode .notification-tabs .tab-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
body.dark-mode .notification-tabs .tab-btn.active {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #38bdf8;
  color: #ffffff;
}
body.dark-mode .notification-item {
  background: transparent;
  border-bottom-color: #1e293b;
}
body.dark-mode .notification-item:hover,
body.dark-mode .notification-item.is-expanded {
  background: rgba(30, 41, 59, 0.75);
  border-left-color: #38bdf8;
  box-shadow: none;
}
body.dark-mode .notif-title {
  color: #f1f5f9 !important;
}
body.dark-mode .notif-preview {
  color: #cbd5e1 !important;
}
body.dark-mode .notif-time {
  color: #94a3b8 !important;
}
body.dark-mode .notif-icon {
  background: #1e293b;
  color: #38bdf8;
}
body.dark-mode .notif-icon.is-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
body.dark-mode .notif-icon.is-high {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
body.dark-mode .notif-icon.is-normal {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
}
body.dark-mode .notif-icon.is-info {
  background: #1e293b;
  color: #94a3b8;
}
body.dark-mode .notif-priority.is-critical {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}
body.dark-mode .notif-priority.is-high {
  background: rgba(245, 158, 11, 0.18);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.35);
}
body.dark-mode .notif-priority.is-normal {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border-color: rgba(14, 165, 233, 0.35);
}
body.dark-mode .notif-priority.is-info {
  background: rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.6);
}
body.dark-mode .notification-popover-footer {
  background: #1e293b;
  border-top-color: #334155;
}
body.dark-mode .notification-popover-footer button {
  color: #38bdf8;
}
body.dark-mode .btn-close-popover {
  color: #94a3b8;
}
body.dark-mode .btn-close-popover:hover {
  background: #334155;
  color: #f1f5f9;
}
body.dark-mode .notification-empty {
  background: #162032;
  border-color: #2b3a52;
}
body.dark-mode .notification-empty-title {
  color: #cbd5e1;
}
body.dark-mode .notification-empty-sub {
  color: #94a3b8;
}

/* Dark Mode Modal & Headers */
body.dark-mode .modal-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}
body.dark-mode .modal-body {
  background: #0f172a;
  color: #e2e8f0;
}
body.dark-mode .notif-modal-tabs {
  background: #0f172a;
  border-bottom-color: #334155;
}

/* Semantic Typography Helpers (Zero-latency Dark Mode) */
.notif-header-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
}
.notif-header-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}
.section-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.section-title-large {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}
.section-count {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}
.triage-header-desc {
  font-size: 0.76rem;
  color: #475569;
  margin-top: 4px;
}
body.dark-mode .notif-header-title,
body.dark-mode .section-title,
body.dark-mode .section-title-large {
  color: #f1f5f9;
}
body.dark-mode .notif-header-sub,
body.dark-mode .section-count {
  color: #94a3b8;
}
body.dark-mode .triage-header-desc {
  color: #cbd5e1;
}

/* Dark Mode Quick Stats Cards */
body.dark-mode .stat-card {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(51, 65, 85, 0.7) !important;
}
body.dark-mode .stat-label { color: #94a3b8; }
body.dark-mode #stat-total-count { color: #f8fafc; }
body.dark-mode #stat-online-count { color: #34d399; }
body.dark-mode #stat-maint-count { color: #fbbf24; }
body.dark-mode #stat-fav-count { color: #fde047; }
body.dark-mode .stat-icon.is-total { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
body.dark-mode .stat-icon.is-online { background: rgba(16, 185, 129, 0.2); color: #34d399; }
body.dark-mode .stat-icon.is-maint { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
body.dark-mode .stat-icon.is-fav { background: rgba(234, 179, 8, 0.2); color: #fde047; }

/* Dark Mode Card Semantic Text */
body.dark-mode .card-title-text { color: #f1f5f9; }
body.dark-mode .card-desc-text { color: #94a3b8; }

/* Dark Mode Side Headers & Rows */
body.dark-mode .side-head-icon {
  background: #1e293b;
  color: #38bdf8;
}
body.dark-mode .side-head-icon.is-amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

/* Teks inline terang → gelap */
body.dark-mode div[style*="#0f172a"],
body.dark-mode h2[style*="#0f172a"],
body.dark-mode span[style*="#0f172a"] { color: #f1f5f9 !important; }
body.dark-mode div[style*="#475569"],
body.dark-mode span[style*="#475569"] { color: #cbd5e1 !important; }
body.dark-mode div[style*="#64748b"],
body.dark-mode span[style*="#64748b"] { color: #94a3b8 !important; }
body.dark-mode div[style*="#f8fafc"] { background: #1e293b !important; border-color: #2b3a52 !important; }
body.dark-mode .side-title { color: #f1f5f9; }
body.dark-mode .side-subtitle { color: #94a3b8; }
body.dark-mode .sidebar-action-btn { color: #e2e8f0; border-color: #2b3a52; background: #1e293b; }
body.dark-mode .side-maint-row { color: #e2e8f0; border-color: #223047; }
body.dark-mode .side-announce-row { border-color: #223047; }
body.dark-mode .side-announce-title { color: #f1f5f9; }
body.dark-mode .side-announce-sub { color: #94a3b8; }

/* Dark Mode Form Elements & Labels */
body.dark-mode .form-label {
  color: #cbd5e1;
}
body.dark-mode .form-input:focus {
  background: #1e293b;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  color: #f8fafc;
}
body.dark-mode .btn-modal-cancel {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
body.dark-mode .btn-modal-cancel:hover {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}
body.dark-mode button[style*="background:white"],
body.dark-mode button[style*="background: white"],
body.dark-mode button[style*="background:#f1f5f9"],
body.dark-mode button[style*="background: #f1f5f9"] {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

/* Dark Mode Header Logout Button */
body.dark-mode .btn-logout {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
body.dark-mode .btn-logout:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

/* Dark Mode Action & Admin Buttons */
body.dark-mode .btn-ws-action {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}
body.dark-mode .btn-ws-action:hover {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}
body.dark-mode .btn-ws-action.btn-ws-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
body.dark-mode .btn-add-announce {
  background: #1e293b;
  border-color: #334155;
  color: #38bdf8;
}
body.dark-mode .btn-add-announce:hover {
  background: #334155;
  border-color: #0ea5e9;
  color: #7dd3fc;
}
body.dark-mode .btn-promote-secondary {
  background: #1e293b;
  color: #38bdf8;
  border-color: #334155;
}
body.dark-mode .btn-promote-secondary:hover:not(:disabled) {
  background: #334155;
  color: #7dd3fc;
  border-color: #475569;
}
body.dark-mode .btn-promote-secondary.is-published {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

/* Dark Mode Universal Action Toolbar Buttons (Modals, Triage, Categories, Cards) */
body.dark-mode .btn-edit {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
}
body.dark-mode .btn-edit:hover {
  background: rgba(14, 165, 233, 0.28) !important;
  color: #38bdf8 !important;
}
body.dark-mode .btn-toggle-status {
  background: rgba(234, 179, 8, 0.15) !important;
  color: #fde047 !important;
  border: 1px solid rgba(234, 179, 8, 0.25) !important;
}
body.dark-mode .btn-toggle-status:hover {
  background: rgba(234, 179, 8, 0.28) !important;
  color: #facc15 !important;
}
body.dark-mode .btn-toggle-vis {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(129, 140, 248, 0.25) !important;
}
body.dark-mode .btn-toggle-vis:hover {
  background: rgba(99, 102, 241, 0.28) !important;
  color: #818cf8 !important;
}
body.dark-mode .btn-delete {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}
body.dark-mode .btn-delete:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #f87171 !important;
}

/* Dark Mode Announcements */
body.dark-mode .announcement-item {
  border-bottom-color: #334155;
}
body.dark-mode .announcement-icon-box {
  background: #1e293b !important;
}
body.dark-mode .announcement-icon-box.priority-info,
body.dark-mode .announcement-icon-box:has(.fa-circle-info) {
  background: rgba(14, 165, 233, 0.2) !important;
  color: #38bdf8 !important;
}
body.dark-mode .announcement-icon-box.priority-warning,
body.dark-mode .announcement-icon-box:has(.fa-triangle-exclamation) {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
}
body.dark-mode .announcement-icon-box.priority-urgent,
body.dark-mode .announcement-icon-box:has(.fa-circle-exclamation) {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
}
body.dark-mode .badge-priority-info {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
body.dark-mode .badge-priority-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
body.dark-mode .badge-priority-urgent {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
body.dark-mode .announcement-item button[onclick*="toggleAnnContent"] {
  color: #38bdf8 !important;
}
body.dark-mode .internal-note-box {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  border-left: 3px solid #f59e0b;
  color: #fef3c7;
}
body.dark-mode .internal-note-box div[style*="color:#b45309"] {
  color: #fbbf24 !important;
}

/* Dark Mode Triage Status Badges */
body.dark-mode .triage-needs_review {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
body.dark-mode .triage-verified_ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
body.dark-mode .triage-dead_link {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
body.dark-mode .triage-security_alert {
  background: rgba(245, 158, 11, 0.16);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
body.dark-mode .triage-archived {
  background: rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.6);
}

/* Dark Mode Popover & Modal Buttons */
body.dark-mode .btn-mark-all-read,
body.dark-mode .notification-popover-header button[onclick*="markAllNotificationsRead"] {
  color: #38bdf8 !important;
}
body.dark-mode .btn-mark-all-read:hover,
body.dark-mode .notification-popover-header button[onclick*="markAllNotificationsRead"]:hover {
  color: #7dd3fc !important;
}
body.dark-mode #modal-notif-detail div[style*="border-top"] button[onclick*="markAllNotificationsRead"] {
  color: #38bdf8 !important;
}
body.dark-mode #modal-notif-detail div[style*="border-top"] button[onclick*="clearNotificationHistory"] {
  color: #f87171 !important;
}

/* ===== RESPONSIVE APP GRIDS (PRD §13: desktop 4–5, laptop 3, tablet 2, mobile 1) ===== */
.apps-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.triage-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Ultra wide: 5 kolom + shell melebar */
@media (min-width: 2000px) {
  .apps-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  header .max-w-screen-xl,
  main.max-w-screen-xl,
  #admin-workspace-bar.max-w-screen-xl,
  #category-tabs-wrap.max-w-screen-xl { max-width: 1680px; }
}
@media (min-width: 1600px) and (max-width: 1999px) {
  header .max-w-screen-xl,
  main.max-w-screen-xl,
  #admin-workspace-bar.max-w-screen-xl,
  #category-tabs-wrap.max-w-screen-xl { max-width: 1440px; }
}
/* Laptop: 3 kolom */
@media (max-width: 1440px) {
  .apps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* ===== RESPONSIVE BREAKPOINTS (Desktop-First Cascading) ===== */

/* 1. Large desktop / laptop: compact date */
@media (max-width: 1240px) {
  #digital-date { display: none; }
}

/* 2. Compact action bar & proportional search (<= 1200px) */
@media (max-width: 1200px) {
  .header-actions { gap: 0.35rem; }
  .badge-admin span { display: none; }
  .badge-admin { padding: 0 7px; width: 28px; justify-content: center; }
  .btn-login, .btn-logout { padding: 0 0.6rem; font-size: 0.72rem; }
  .header-search { max-width: 420px; }
  .search-box-wrap { max-width: 420px; }
}

/* 3. Small desktop / landscape tablet (<= 1080px) */
@media (max-width: 1080px) {
  .header-search { max-width: 370px; }
  .search-box-wrap { max-width: 370px; }
}

/* 4. Tablet: sidebar stacked, grid 2 columns (<= 1024px) */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .content-col { order: 1; min-width: 0; }
  .sidebar-col { order: 2; margin-top: 1.5rem; min-width: 0; }
  .apps-grid, .triage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-search { max-width: 330px; }
  .search-box-wrap { max-width: 330px; }
}

/* 5. Small desktop & tablet: search wraps to second full-width row */
@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
  }
  .header-search {
    grid-column: 1 / -1;
    order: 3;
    max-width: 100%;
  }
  .search-box-wrap {
    max-width: 100%;
  }
  .tab-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .workspace-actions { justify-content: flex-start; }
}

/* 5. Mobile: navbar 2 baris + touch target 44px */
@media (max-width: 640px) {
  .apps-grid, .triage-grid { grid-template-columns: 1fr; }
  .workspace-segmented-control { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .workspace-segmented-control::-webkit-scrollbar { display: none; }
  .workspace-switcher { width: 100%; flex-direction: column; align-items: stretch; }
  .workspace-actions { width: 100%; }
  .workspace-actions .btn-ws-action { flex: 1; }
  .catalog-controls { width: 100%; }
  .sort-select { flex: 1; min-width: 0; }
  #quick-stats .stat-card { flex: 1 1 40%; }
  .modal-overlay { padding: 0.5rem; }
  .modal-box { max-width: calc(100vw - 1rem) !important; }
  .triage-primary-actions { grid-template-columns: 1fr; }

  /* Navbar: 2 baris rapi, brand kiri, 3 action buttons kanan, search penuh baris 2 */
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .header-brand {
    order: 1;
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .header-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
  }
  .header-brand-text {
    min-width: 0;
    flex: 1;
  }
  .header-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
    display: inline-flex;
    align-items: center;
  }
  .brand-text-full { display: none; }
  .brand-text-short { display: inline-block; white-space: nowrap; font-weight: 800; }
  body.admin-mode .admin-pill-tag { display: inline-flex; }

  .header-actions {
    order: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
  }
  .header-clock-wrap { display: none; }
  .user-avatar { display: none !important; }
  .badge-admin { display: none !important; }

  /* Navbar action buttons: ukuran seragam 34x34px (hanya di header, bukan di modal) */
  .header-actions .btn-notification-bell,
  .header-actions .btn-login,
  .header-actions .btn-logout {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px;
    max-height: 34px;
    border-radius: 0.6rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
  }
  .header-actions .btn-login span,
  .header-actions .btn-logout span {
    display: none !important;
  }

  /* Proporsional icon navbar seragam & seimbang (0.92rem / ~14.7px) */
  .header-actions .btn-notification-bell i,
  .header-actions #theme-icon,
  .header-actions .btn-login i,
  .header-actions .btn-logout i {
    font-size: 0.92rem !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .notification-badge {
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid #0ea5e9;
    line-height: 1;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
    margin-top: 2px;
  }
  .search-box-wrap {
    max-width: 100%;
    width: 100%;
  }
  .search-input {
    height: 38px;
    font-size: 0.82rem;
    padding: 0.45rem 2rem 0.45rem 2.2rem;
  }
  .search-icon {
    font-size: 0.85rem;
    left: 11px;
  }
}

/* 6. Mobile display (<= 480px) */
@media (max-width: 480px) {
  img { max-width: 100%; }
  main.max-w-screen-xl { padding-left: 0.75rem; padding-right: 0.75rem; }
  .modal-body div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .view-btn { width: 36px; height: 34px; font-size: 0.85rem; }
  .tab-btn { min-height: 36px; }
  #quick-stats { gap: 6px; }
  .main-grid { gap: 1rem !important; }
  .side-card { padding: 16px; }
  .app-card { padding: 0.7rem 0.8rem; }
  .triage-card a { word-break: break-all; }

  /* Navbar ultra-compact */
  .header-inner { gap: 0.45rem; }
  .header-logo { width: 30px; height: 30px; }
  .header-title { font-size: 0.76rem; }
  .header-actions { gap: 0.35rem; }

  /* Compact admin toolbar on small screens */
  .admin-mode .app-card .card-admin-toolbar {
    gap: 8px;
    padding: 5px 8px;
    margin: 4px 0 10px 0;
  }
  .admin-mode .app-card .card-admin-toolbar .btn-icon-sm {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }
}

/* 7. Extra small phones (<= 400px) */
@media (max-width: 400px) {
  .sidebar-admin-grid { gap: 8px; }
  .sidebar-action-btn { font-size: 12px; min-height: 44px; }
  .btn-open { min-width: 0; width: 100%; }
}

/* ===== MINIMALIST SIDEBAR (PRD — Panel Tata Kelola IT | Pusat Notifikasi | Maintenance) ===== */
.side-card {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(186, 230, 253, 0.55);
  border-radius: 18px;
  box-shadow: 0 4px 16px -2px rgba(2, 132, 199, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
  padding: 20px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.side-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.94);
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -2px rgba(2, 132, 199, 0.12), 0 4px 10px rgba(15, 23, 42, 0.04);
}
.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.side-head-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f0f9ff;
  color: #0ea5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.side-head-icon.is-amber { background: #fef3c7; color: #b45309; }
.side-title {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}
.side-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}
.side-badge {
  font-size: 12px;
  padding: 3px 8px;
}
.side-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Quick actions: grid 2 kolom, tinggi seragam, radius 12px */
.sidebar-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sidebar-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #e8eef5;
  cursor: pointer;
  transition: all 200ms ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.sidebar-action-btn i {
  color: #64748b;
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: color 200ms ease;
}
.sidebar-action-btn:hover {
  background: #f0f9ff;
  border-color: #0ea5e9;
  color: #0369a1;
}
.sidebar-action-btn:hover i { color: #0ea5e9; }
.sidebar-action-btn:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* Maintenance: list sederhana, ikon kiri, divider tipis */
.side-list {
  display: flex;
  flex-direction: column;
}
.side-maint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  transition: background 200ms ease, padding-left 200ms ease;
  cursor: default;
}
.side-maint-row:last-child { border-bottom: none; }
.side-maint-row:hover { background: #f8fafc; padding-left: 8px; }
.side-maint-row i {
  font-size: 16px;
  color: #b45309;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.side-maint-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-empty {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  padding: 8px 4px;
}

/* Pengumuman sistem: bullet + judul + sub-waktu */
.side-announce-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
  transition: background 200ms ease, padding-left 200ms ease;
}
.side-announce-row:last-child { border-bottom: none; }
.side-announce-row:hover { background: #f8fafc; padding-left: 8px; }
.side-announce-row:focus-visible { outline: 2px solid #0ea5e9; outline-offset: -2px; }
.side-announce-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #0ea5e9;
  flex-shrink: 0;
  margin-top: 6px;
}
.side-announce-row.is-read .side-announce-dot { background: #cbd5e1; }
.side-announce-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}
.side-announce-sub {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}

/* Empty state maintenance */
.side-empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

body.dark-mode .side-maint-row {
  color: #f1f5f9;
  border-bottom-color: #334155;
}
body.dark-mode .side-maint-row:hover {
  background: rgba(30, 41, 59, 0.7);
}
body.dark-mode .side-empty-state {
  color: #94a3b8;
}
body.dark-mode #modal-maint-detail .modal-body div[style*="background:#fffbeb"] {
  background: rgba(180, 83, 9, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
body.dark-mode #modal-maint-detail #maint-modal-desc {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.dark-mode #modal-maint-detail div[style*="background:#f0f9ff"] {
  background: rgba(14, 165, 233, 0.12) !important;
  border-color: rgba(14, 165, 233, 0.25) !important;
}
body.dark-mode #modal-maint-detail #maint-modal-admin-actions {
  background: #0f172a !important;
  border-color: #0ea5e9 !important;
}

/* =====================================================
   FULL RESPONSIVE OVERRIDES (Ditambahkan di akhir cascade)
   Tidak mengubah rules desktop — hanya override di mobile.
   ===================================================== */

/* ---- Global: cegah horizontal overflow ---- */
@media (max-width: 1024px) {
  .site-header { overflow: visible; }
  .header-inner { overflow: visible; min-width: 0; }
}

/* ---- Navbar: 2 baris di ≤960px ---- */
@media (max-width: 960px) {
  .header-brand { min-width: 0; }
  .header-title {
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-actions { min-width: 0; }
}

/* ---- Navbar mobile ≤640px: flex 2 baris, search full-width ---- */
@media (max-width: 640px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .header-brand {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .header-brand-text {
    min-width: 0;
    flex: 1;
  }
  .header-title {
    max-width: none;
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
  }
  .brand-text-full { display: none; }
  .brand-text-short { display: inline-block; white-space: nowrap; font-weight: 800; }
  body.admin-mode .admin-pill-tag { display: inline-flex; }

  .header-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
  }
  .header-actions {
    order: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
  }
  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
    margin-top: 2px;
  }
  .search-box-wrap {
    max-width: 100%;
    width: 100%;
  }
  .search-input {
    height: 38px;
    font-size: 0.82rem;
    padding: 0.45rem 2rem 0.45rem 2.2rem;
  }
  .search-icon {
    font-size: 0.85rem;
    left: 11px;
  }
  .header-clock-wrap {
    display: none;
  }
  .user-avatar {
    display: none !important;
  }
  .badge-admin {
    display: none !important;
  }

  /* Action buttons: seragam 34x34px */
  .btn-notification-bell,
  .btn-login,
  .btn-logout {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px;
    max-height: 34px;
    border-radius: 0.6rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
  }
  .btn-login span,
  .btn-logout span {
    display: none !important;
  }

  /* Ukuran icon navbar seragam & proporsional (0.92rem / ~14.7px) */
  .btn-notification-bell i,
  #theme-icon,
  .btn-login i,
  .btn-logout i {
    font-size: 0.92rem !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .notification-badge {
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid #0ea5e9;
    line-height: 1;
  }

  /* Workspace switcher: full width, stacked */
  .workspace-switcher {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .workspace-segmented-control {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .workspace-segmented-control::-webkit-scrollbar {
    display: none;
  }
  .workspace-actions {
    width: 100%;
  }
  .workspace-actions .btn-ws-action {
    flex: 1;
  }
  .btn-ws-action {
    min-height: 40px;
  }

  /* Sidebar admin & statistik: di-override di blok ADMIN MOBILE RESPONSIVE di bawah */

  /* Catalog controls: wrap */
  .catalog-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  .sort-select {
    flex: 1;
    min-width: 0;
    min-height: 38px;
  }

  /* Category chips: touch */
  .tab-btn {
    min-height: 40px;
    padding: 0.5rem 0.9rem;
  }

  /* View toggle: touch */
  .view-btn {
    width: 40px;
    height: 38px;
  }
  .btn-toggle-sidebar {
    height: 38px;
  }

  /* Modal: fit viewport */
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-start;
    overflow-y: auto;
  }
  .modal-box {
    max-width: calc(100vw - 1rem) !important;
    margin: auto;
  }

  /* Tombol aksi di dalam modal: jangan pernah jadi icon-only */
  .modal-body { padding: 1.1rem; }
  .modal-body .btn-login,
  .modal-body .btn-logout {
    width: auto;
    max-width: none;
    min-height: 44px;
    padding: 0.65rem 1rem;
  }
  .modal-body .btn-modal-cancel {
    min-height: 44px;
    flex-shrink: 0;
  }

  /* Notification popover: fixed, no overflow */
  .notification-popover {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    position: fixed;
    top: 64px;
    right: 1rem;
    left: 1rem;
  }

  /* Triage primary actions: stack */
  .triage-primary-actions {
    grid-template-columns: 1fr;
  }

  /* Side card padding */
  .side-card {
    padding: 16px;
  }

  /* App card */
  .app-card {
    padding: 0.75rem 0.85rem;
  }
}

/* ---- ≤480px: ultra compact ---- */
@media (max-width: 480px) {
  .header-inner {
    gap: 0.45rem;
  }
  .header-logo {
    width: 30px;
    height: 30px;
  }
  .header-title {
    font-size: 0.76rem;
    max-width: none;
  }
  .header-actions {
    gap: 0.35rem;
  }
  .badge-admin {
    display: none !important;
  }
  .user-avatar {
    display: none !important;
  }

  /* Workspace segments: tetap tampil label (jangan icon-only) */
  .ws-segment {
    padding: 0 0.55rem;
    font-size: 0.7rem;
    min-height: 36px;
  }

  /* Side card compact */
  .side-card {
    padding: 14px;
  }
  .side-title {
    font-size: 15px;
  }
  .side-subtitle {
    font-size: 12px;
  }

  /* Maintenance: wrap 2 baris */
  .side-maint-row span {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
  }

  /* Announcement: wrap */
  .side-announce-title {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
  }

  /* Stat label */
  .stat-label {
    font-size: 0.62rem;
  }

  /* Catalog header: wrap */
  #catalog-section > div:first-child {
    flex-wrap: wrap;
  }

  /* Main padding */
  main.max-w-screen-xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* ---- ≤400px: extra small ---- */
@media (max-width: 400px) {
  .header-inner {
    gap: 0.35rem;
  }
  .header-title {
    max-width: none;
    font-size: 0.72rem;
  }
  .header-logo {
    width: 28px;
    height: 28px;
  }
  .header-actions {
    gap: 0.3rem;
  }
  .header-actions .btn-notification-bell,
  .header-actions .btn-login,
  .header-actions .btn-logout {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 8px;
  }
  .header-actions .btn-notification-bell i,
  .header-actions #theme-icon,
  .header-actions .btn-login i,
  .header-actions .btn-logout i {
    font-size: 0.88rem !important;
  }
  .badge-admin {
    display: none !important;
  }
  .user-avatar {
    display: none !important;
  }
  .search-input {
    height: 36px;
    font-size: 0.78rem;
  }
  .sidebar-action-btn {
    font-size: 13px;
  }
  .btn-open {
    min-width: 0;
    width: 100%;
  }
  .stat-value {
    font-size: 1.15rem;
  }
  .side-title {
    font-size: 14px;
  }
  .side-subtitle {
    font-size: 11px;
  }
  .admin-mode .app-card .card-admin-toolbar .btn-icon-sm {
    height: 40px;
    font-size: 0.8rem;
  }
}

/* =====================================================
   ADMIN MOBILE RESPONSIVE — fitur admin TETAP tampil,
   layout mengikuti pola responsif yang sama dengan publik.
   ===================================================== */
@media (max-width: 640px) {
  /* Workspace bar: tampil, segmented scroll horizontal, action full-width */
  .workspace-switcher {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0.5rem 0.6rem;
    box-sizing: border-box;
  }
  .workspace-segmented-control {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 2px 4px 4px 4px;
  }
  .workspace-segmented-control::-webkit-scrollbar { display: none; }
  .ws-segment {
    flex-shrink: 0;
    height: 36px;
    min-height: 36px;
    font-size: 0.72rem;
    padding: 0 0.65rem;
  }
  .workspace-actions { width: 100%; }
  .workspace-actions .btn-ws-action { flex: 1; min-height: 40px; }

  /* Statistik: 2 kolom (seperti publik, bukan 1 kolom penuh) */
  #quick-stats .stat-card { flex: 1 1 42%; min-width: 0; }
  .stat-card { padding: 0.65rem 0.8rem; }
  .stat-value { font-size: 1.15rem; }
  .stat-label { font-size: 0.62rem; }

  /* Admin toolbar di kartu: rapi, kompak, terpusat di atas Buka Aplikasi */
  .admin-mode .app-card .card-admin-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
    margin: 4px auto 10px auto;
    padding: 5px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
  }
  .admin-mode .app-card .card-admin-toolbar .btn-icon-sm {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.82rem;
    border-radius: 8px;
  }

  /* Sidebar admin grid: responsif tanpa teks terpotong */
  .sidebar-admin-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .sidebar-action-btn {
    min-height: 42px;
    font-size: 0.68rem;
    padding: 0.45rem 0.4rem;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    line-height: 1.2;
    word-break: normal;
  }

  /* Sidebar teks: wrap 2 baris, jangan terpotong (!important kalahkan inline JS) */
  .side-maint-row { align-items: flex-start; }
  .side-maint-row i { margin-top: 3px; flex-shrink: 0; }
  .side-maint-row > span:first-of-type {
    white-space: normal !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    word-break: break-word;
    flex: 1;
    min-width: 0;
  }
  .side-announce-row > div { flex: 1; min-width: 0; }
  .side-announce-title {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    word-break: break-word;
  }
  .side-announce-sub {
    white-space: normal;
    word-break: break-word;
  }

  /* Sidebar admin card: tampil, layout rapi */
  #admin-sidebar-card { display: block; }

  /* Panel toggle button: tampil di mobile */
  .btn-toggle-sidebar {
    height: 38px;
  }

  /* Header admin: pill tidak mendesak judul */
  .header-title { gap: 6px; min-width: 0; }
  .brand-text-short { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .admin-pill-tag { flex-shrink: 0; }
}

/* ===== PRD REFINEMENT: Pusat Notifikasi Panel Kanan & Audit Endpoint Metrics (v2.3) ===== */

/* Kartu Pusat Notifikasi di sidebar kanan */
.notif-center-card {
  overflow: hidden;
}
.notif-center-card .side-card-head {
  border-bottom: 1px solid #e2e8f0;
}
#notif-panel-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.notif-center-card .notification-tabs {
  padding: 8px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.notif-center-card .notification-list {
  max-height: 420px;
}
.notif-center-card .notification-item {
  border-radius: 0.6rem;
  border-bottom: none;
  margin: 2px 4px;
}
.notif-center-card .notification-item:hover {
  border-left-width: 3px;
}
.notif-chevron {
  transform: none !important;
}
.notification-item:hover .notif-chevron {
  transform: translateX(2px) !important;
}

/* Footer aksi notifikasi */
.notif-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px 2px;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.notif-footer-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0ea5e9;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.notif-footer-btn:hover {
  background: #f0f9ff;
}
.notif-footer-btn.is-danger {
  color: #ef4444;
}
.notif-footer-btn.is-danger:hover {
  background: #fef2f2;
}

/* Tombol kembali pada detail inline */
.notif-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0284c7;
  padding: 6px 8px;
  margin: 4px 4px 0;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.notif-back-btn:hover {
  background: #f0f9ff;
}

/* Sorotan saat panel dibuka dari lonceng */
@keyframes notif-panel-flash {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
  100% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
}
.notif-panel-highlight {
  animation: notif-panel-flash 1000ms ease-out;
}

/* Metric row pada kartu Audit Endpoint */
.triage-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.triage-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.triage-metric i {
  font-size: 0.66rem;
  color: #0284c7;
}
.triage-metric.is-up {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.triage-metric.is-up i { color: #059669; }
.triage-metric.is-down {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.triage-metric.is-down i { color: #dc2626; }

/* Tombol buka/tutup panel: chevron + label */
.btn-toggle-sidebar .btn-sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
}
.btn-toggle-sidebar i {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Dark Mode: komponen baru ===== */
body.dark-mode .notif-center-card .side-card-head {
  border-bottom-color: #374151;
}
body.dark-mode .notif-center-card .notification-tabs {
  border-bottom-color: #374151;
}
body.dark-mode .notification-list::-webkit-scrollbar-thumb {
  background: #4b5563;
}
body.dark-mode .notification-list {
  scrollbar-color: #4b5563 transparent;
}
body.dark-mode .notif-panel-footer {
  border-top-color: #374151;
}
body.dark-mode .notif-footer-btn:hover {
  background: #1f2937;
}
body.dark-mode .notif-footer-btn.is-danger:hover {
  background: #3f1d1d;
}
body.dark-mode .notif-back-btn {
  color: #38bdf8;
}
body.dark-mode .notif-back-btn:hover {
  background: #1f2937;
}
body.dark-mode .notif-center-card .notification-item {
  border-left-color: transparent;
}
body.dark-mode .triage-metric {
  background: #1f2937;
  border-color: #374151;
  color: #cbd5e1;
}
body.dark-mode .triage-metric i { color: #38bdf8; }
body.dark-mode .triage-metric.is-up {
  background: #052e2b;
  border-color: #065f46;
  color: #6ee7b7;
}
body.dark-mode .triage-metric.is-up i { color: #34d399; }
body.dark-mode .triage-metric.is-down {
  background: #2a1414;
  border-color: #7f1d1d;
  color: #fca5a5;
}
body.dark-mode .triage-metric.is-down i { color: #f87171; }

/* Detail notifikasi inline di dalam panel kanan */
.notif-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 6px 6px;
}
.notif-detail-title {
  font-weight: 800;
  font-size: 0.86rem;
  color: #0f172a;
  line-height: 1.35;
}
.notif-detail-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.notif-detail-cat {
  font-size: 0.66rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 9999px;
}
.notif-detail-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: #64748b;
  margin: 8px 6px;
}
.notif-detail-body {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  padding: 0 6px 10px;
}
.notif-detail-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  padding: 6px 10px;
  margin: 0 6px;
  border: 1px dashed #7dd3fc;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.notif-detail-attachment:hover {
  background: #f0f9ff;
}
body.dark-mode .notif-detail-title { color: #f1f5f9; }
body.dark-mode .notif-detail-cat {
  color: #94a3b8;
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .notif-detail-date { color: #94a3b8; }
body.dark-mode .notif-detail-body { color: #cbd5e1; }
body.dark-mode .notif-detail-attachment {
  color: #38bdf8;
  border-color: #0c4a6e;
}
body.dark-mode .notif-detail-attachment:hover { background: #0b2536; }

/* Dark Mode: permukaan terang via inline style (index.html) */
body.dark-mode [style*="background:#fffbeb"],
body.dark-mode [style*="background: #fffbeb"] { background: #2a2113 !important; border-color: #5b4a1a !important; }
body.dark-mode [style*="background:#fef3c7"] { background: #3a2e12 !important; }
body.dark-mode [style*="background:#f8fafc"],
body.dark-mode [style*="background: #f8fafc"] { background: #1e293b !important; border-color: #334155 !important; }
body.dark-mode [style*="background:#f0f9ff"],
body.dark-mode [style*="background: #f0f9ff"] { background: #0b2536 !important; border-color: #164e63 !important; }
body.dark-mode [style*="background:#e0e7ff"],
body.dark-mode [style*="background: #e0e7ff"] { background: #1e1b4b !important; border-color: #3730a3 !important; }
body.dark-mode [style*="background:#fee2e2"],
body.dark-mode [style*="background:#fef2f2"] { background: #3f1d1d !important; }
body.dark-mode [style*="background:#f1f5f9"],
body.dark-mode [style*="background: #f1f5f9"] { background: #1e293b !important; border-color: #334155 !important; }
body.dark-mode [style*="color:#0f172a"] { color: #f1f5f9 !important; }
body.dark-mode [style*="color:#312e81"] { color: #c7d2fe !important; }
body.dark-mode [style*="color:#4338ca"] { color: #a5b4fc !important; }
body.dark-mode [style*="color:#334155"] { color: #cbd5e1 !important; }
body.dark-mode [style*="color:#475569"] { color: #cbd5e1 !important; }
body.dark-mode [style*="color:#0369a1"] { color: #7dd3fc !important; }
body.dark-mode [style*="color:#92400e"] { color: #fcd34d !important; }
body.dark-mode [style*="border-top:1.5px solid #e2e8f0"],
body.dark-mode [style*="border:1px solid #e2e8f0"] { border-color: #334155 !important; }

/* =====================================================
   RESPONSIVE NORMALIZATION — Fluid layout untuk semua ukuran layar
   Menghilangkan lompatan kolom yang kaku & memastikan tidak ada
   overflow horizontal dari ponsel kecil hingga layar ultra-wide.
   ===================================================== */

/* 1. Shell adaptif: lebar dibatasi & padding mengalir (clamp) */
header .max-w-screen-xl,
main.max-w-screen-xl,
#admin-workspace-bar.max-w-screen-xl,
#category-tabs-wrap.max-w-screen-xl {
  width: 100%;
  max-width: min(1600px, 100%);
  padding-left: clamp(0.75rem, 2.5vw, 1.5rem);
  padding-right: clamp(0.75rem, 2.5vw, 1.5rem);
  box-sizing: border-box;
}
html, body { width: 100%; max-width: 100%; }

/* 2. Grid katalog & triage: kolom otomatis (fluid) di semua ukuran */
.apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}
.triage-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.main-grid.sidebar-collapsed .apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

/* 3. Panel notifikasi: tinggi adaptif terhadap viewport */
.notif-center-card .notification-list {
  max-height: min(58vh, 440px);
}

/* 4. Header: jangan pernah wrap tombol aksi, beri ruang aman */
.header-actions { flex-wrap: nowrap; }
.header-inner { min-width: 0; }
.header-search { min-width: 0; }

/* 5. Modal: selalu muat di layar pendek & izinkan overlay scroll */
.modal-overlay { overscroll-behavior: contain; }
@media (max-height: 620px) {
  .modal-overlay { align-items: flex-start; overflow-y: auto; padding-top: 0.75rem; }
}

/* 6. Tablet lansekap & ponsel mendatar: hemat ruang vertikal */
@media (max-height: 560px) and (orientation: landscape) {
  .site-header .header-inner { padding-top: 0.35rem; padding-bottom: 0.35rem; }
  .header-clock-wrap { display: none; }
  .notification-list { max-height: none !important; }
}

/* 7. Target sentuh lebih besar pada perangkat sentuh */
@media (pointer: coarse) {
  .tab-btn { min-height: 40px; }
  .ws-segment { min-height: 38px; height: 38px; }
  .view-btn { width: 38px; height: 36px; }
  .btn-toggle-sidebar { height: 38px; }
  .sidebar-action-btn { min-height: 46px; }
  .notification-item { padding: 12px; }
  .notif-footer-btn { padding: 8px 10px; }
}

/* 8. Safe-area (ponsel berponi / notch) */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .modal-overlay {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

/* 9. Ponsel: satu kolom, statistik 2-per-baris yang stabil */
@media (max-width: 640px) {
  .apps-grid,
  .triage-grid,
  .main-grid.sidebar-collapsed .apps-grid {
    grid-template-columns: 1fr;
  }
  #quick-stats,
  .quick-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .stat-card { min-width: 0; }
  .catalog-controls { gap: 6px; }
}

/* 10. Ponsel sangat kecil: kolom penuh & label tetap terbaca */
@media (max-width: 380px) {
  .apps-grid,
  .triage-grid,
  .main-grid.sidebar-collapsed .apps-grid {
    grid-template-columns: 1fr;
  }
  #quick-stats .stat-card { padding: 0.5rem 0.6rem; }
  .stat-value { font-size: 1.1rem; }
  .sidebar-admin-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 0.3rem; }
  .header-actions .btn-notification-bell,
  .header-actions .btn-login,
  .header-actions .btn-logout {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
  }
}

/* 11. Ultra-wide: pusatkan shell & manfaatkan ruang (kolom mengikuti auto-fill) */
@media (min-width: 1920px) {
  header .max-w-screen-xl,
  main.max-w-screen-xl,
  #admin-workspace-bar.max-w-screen-xl,
  #category-tabs-wrap.max-w-screen-xl {
    max-width: min(1760px, 100%);
  }
}



