/* ==========================================================================
   SISTEM ARSIP DIGITAL DESA SUNGAI RAYA UTARA
   Component Styles
   Directly reflecting the modern card-first SaaS reference UI
   Strictly ui-ux-pro-max guidelines (no emojis, semantic SVG icons only)
   ========================================================================== */

/* ==========================================================================
   CATEGORY TABS (Reference UI: Todays / This Week / This Month)
   ========================================================================== */
.tab-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  padding: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.03);
}

.tab-btn.active {
  color: var(--text-main);
  font-weight: 700;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2.5px;
  background: var(--primary);
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   PASTEL FOLDER CARDS (Reference UI: Recent Folders)
   ========================================================================== */
.folder-card {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.folder-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.folder-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.folder-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.folder-btn-more {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 3px;
  border-radius: 5px;
  transition: opacity var(--transition-fast);
}

.folder-btn-more:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.folder-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.folder-card-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.folder-card-meta {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
}

/* Pastel Variants */
.folder-blue {
  background-color: var(--pastel-blue-bg);
  color: var(--pastel-blue-text);
  border-color: var(--pastel-blue-border);
}

.folder-blue .folder-icon-badge {
  background-color: var(--pastel-blue-accent);
}

.folder-coral {
  background-color: var(--pastel-coral-bg);
  color: var(--pastel-coral-text);
  border-color: var(--pastel-coral-border);
}

.folder-coral .folder-icon-badge {
  background-color: var(--pastel-coral-accent);
}

.folder-yellow {
  background-color: var(--pastel-yellow-bg);
  color: var(--pastel-yellow-text);
  border-color: var(--pastel-yellow-border);
}

.folder-yellow .folder-icon-badge {
  background-color: var(--pastel-yellow-accent);
}

.folder-emerald {
  background-color: var(--pastel-emerald-bg);
  color: var(--pastel-emerald-text);
  border-color: var(--pastel-emerald-border);
}

.folder-emerald .folder-icon-badge {
  background-color: var(--pastel-emerald-accent);
}

.folder-purple {
  background-color: var(--pastel-purple-bg);
  color: var(--pastel-purple-text);
  border-color: var(--pastel-purple-border);
}

.folder-purple .folder-icon-badge {
  background-color: var(--pastel-purple-accent);
}

/* Dotted Add New Card (Reference UI: New folder / New Note) */
.dashed-action-card {
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-dashed);
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 140px;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-muted);
}

.dashed-action-card:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.dashed-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.dashed-action-card:hover .dashed-card-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.dashed-card-label {
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   PASTEL NOTE/ARCHIVE CARDS (Reference UI: My Notes Cards)
   ========================================================================== */
.note-card {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.note-card-date {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

.note-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.note-btn-action {
  background: rgba(255, 255, 255, 0.4);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.note-btn-action:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.note-card-title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin-bottom: 8px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.note-card-excerpt {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.55em * 3);
  margin-bottom: 12px;
  flex: 1;
}

.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 11.5px;
  font-weight: 600;
  gap: 8px;
  margin-top: auto;
}

.note-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
  max-width: calc(100% - 60px);
  overflow: hidden;
}

.note-time-badge span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.note-id-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

/* Note Card Color Themes (Directly reflecting the bottom row of reference UI) */
.note-yellow {
  background-color: #FEF08A;
  color: #854D0E;
  border-color: #FDE047;
}

.note-coral {
  background-color: #FECDD3;
  color: #9F1239;
  border-color: #FDA4AF;
}

.note-blue {
  background-color: #BAE6FD;
  color: #0369A1;
  border-color: #7DD3FC;
}

.note-emerald {
  background-color: #A7F3D0;
  color: #065F46;
  border-color: #6EE7B7;
}

.note-purple {
  background-color: #DDD6FE;
  color: #5B21B6;
  border-color: #C4B5FD;
}

.note-surface {
  background-color: #FFFFFF;
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.note-surface .note-card-excerpt {
  color: var(--text-muted);
}

.note-surface .note-card-date {
  color: var(--text-light);
}

/* ==========================================================================
   STATISTIC CARDS (Executive Bento KPI - Option 1)
/* ==========================================================================
   STAT CARDS (UI/UX PRO MAX & TASTE SKILL DOUBLE-BEZEL ARCHITECTURE)
   ========================================================================== */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-bezel-outer);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* Double-Bezel Nested Architecture (Taste Skill) */
.stat-card:has(.stat-card-shell) {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.stat-card-shell {
  background: #F8FAFC;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-bezel-outer);
  padding: 5px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-spring);
  box-shadow: var(--shadow-xs);
  position: relative;
}

.stat-card-core {
  background: #FFFFFF;
  border-radius: var(--radius-bezel-inner);
  border: 1px solid rgba(241, 245, 249, 0.95);
  padding: 12px 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-specular);
  position: relative;
  z-index: 1;
}

.stat-card:hover .stat-card-shell {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-bezel-hover);
  border-color: rgba(148, 163, 184, 0.5);
}

/* Hero Bento Executive Card */
.stat-card-hero .stat-card-shell {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-color: #C7D2FE;
}

.stat-card-hero .stat-card-core {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-color: #BFDBFE;
  padding: 14px 18px;
  gap: 12px;
}

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

.stat-eyebrow-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-eyebrow-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3730A3;
}

.stat-hero-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #1E40AF;
  border-radius: var(--radius-pill);
  border: 1px solid #BFDBFE;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.08);
}

.stat-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0;
}

.stat-hero-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.stat-value-hero {
  font-size: 34px !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  color: #1E40AF !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
}

.stat-hero-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-label-hero {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.stat-hero-sub {
  font-size: 11px;
  font-weight: 500;
  color: #64748B;
  white-space: nowrap;
}

.stat-hero-visual-pill {
  flex-shrink: 0;
}

.stat-icon-hero {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #DBEAFE !important;
  color: #1D4ED8 !important;
}

.stat-icon-hero .icon {
  width: 20px !important;
  height: 20px !important;
}

.stat-hero-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed #C7D2FE;
  margin-top: auto;
}

.stat-hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.hero-strip-tag {
  font-weight: 700;
  color: #1E40AF;
  letter-spacing: 0.02em;
}

.hero-strip-meta {
  font-weight: 600;
  color: #64748B;
  font-size: 10.5px;
}

.stat-hero-spark-track {
  width: 100%;
  height: 5px;
  background: #E0E7FF;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.stat-hero-spark-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #10B981);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* Backward compatibility for banner style stat cards */
#view-ai-assistant .stat-card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

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

.stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap .icon {
  width: 16px;
  height: 16px;
}

.stat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Semantically Tailored Color Themes */
.stat-card-blue .stat-icon-wrap {
  background: #EFF6FF;
  color: #2563EB;
}

.stat-card-blue .stat-badge {
  background: #EFF6FF;
  color: #1D4ED8;
}

.stat-card-blue .stat-dot {
  background: #2563EB;
}

.stat-card-blue:hover {
  border-color: #BFDBFE;
}

.stat-card-indigo .stat-icon-wrap {
  background: #EEF2FF;
  color: #4F46E5;
}

.stat-card-indigo .stat-badge {
  background: #EEF2FF;
  color: #4338CA;
}

.stat-card-indigo .stat-dot {
  background: #4F46E5;
}

.stat-card-indigo:hover {
  border-color: #C7D2FE;
}

.stat-card-amber .stat-icon-wrap {
  background: #FFFBEB;
  color: #D97706;
}

.stat-card-amber .stat-badge {
  background: #FFFBEB;
  color: #B45309;
}

.stat-card-amber .stat-dot {
  background: #D97706;
}

.stat-card-amber:hover {
  border-color: #FDE68A;
}

.stat-card-purple .stat-icon-wrap {
  background: #FAF5FF;
  color: #9333EA;
}

.stat-card-purple .stat-badge {
  background: #FAF5FF;
  color: #7E22CE;
}

.stat-card-purple .stat-dot {
  background: #9333EA;
}

.stat-card-purple:hover {
  border-color: #DDD6FE;
}

.stat-card-rose .stat-icon-wrap {
  background: #FFF1F2;
  color: #E11D48;
}

.stat-card-rose .stat-badge {
  background: #FFF1F2;
  color: #BE123C;
}

.stat-card-rose .stat-dot {
  background: #E11D48;
}

.stat-card-rose:hover {
  border-color: #FECACA;
}

.stat-card-emerald .stat-icon-wrap {
  background: #ECFDF5;
  color: #059669;
}

.stat-card-emerald .stat-badge {
  background: #ECFDF5;
  color: #047857;
}

.stat-card-emerald .stat-dot {
  background: #059669;
}

.stat-card-emerald:hover {
  border-color: #A7F3D0;
}

/* ==========================================================================
   CONTEXTUAL MINI METRICS STRIP (UI/UX Pro Max Workspace Metrics)
   ========================================================================== */
.mini-metric-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-fast);
}

.mini-metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.mini-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-metric-icon .icon {
  width: 20px;
  height: 20px;
}

.mini-metric-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-metric-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.mini-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   ERGONOMIC TABLES (ui-ux-pro-max standard)
   ========================================================================== */
.table-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  /* Use overflow: visible so dropdown popovers and tooltips are not clipped */
  overflow: visible;
}

.table-card>*:first-child,
.archive-pill-nav {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.table-card>*:last-child,
.pagination-bar {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* ==========================================================================
   ARCHIVE EXECUTIVE HAIRLINE STRIP (Taste Skill App Screen Standard)
   ========================================================================== */
.archive-executive-strip {
  display: flex;
  align-items: stretch;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: var(--radius-lg, 12px);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.archive-stat-cell {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--border-subtle, #E2E8F0);
}

.archive-stat-cell:last-child {
  border-right: none;
}

.archive-stat-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted, #64748B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: normal;
}

.archive-stat-val-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.archive-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main, #0F172A);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.archive-stat-value.text-accent-emerald {
  color: #059669;
}

.archive-stat-unit {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted, #94A3B8);
}

@media (max-width: 768px) {
  .archive-executive-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .archive-stat-cell:nth-child(2) {
    border-right: none;
  }

  .archive-stat-cell:nth-child(1),
  .archive-stat-cell:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  }

  .archive-stat-cell {
    padding: 10px 14px;
  }

  .archive-stat-value {
    font-size: 18px;
  }
}

/* Dokumen Lainnya Executive Strip Adaptation */
.doclain-executive-strip {
  display: flex;
  align-items: stretch;
}

.doclain-executive-strip .archive-stat-cell {
  flex: 1;
}

@media (max-width: 768px) {
  .doclain-executive-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .doclain-executive-strip .archive-stat-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  }

  .doclain-executive-strip .archive-stat-cell:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   ARCHIVE CATEGORY PILLS (UI/UX Pro Max Segmented Tabs)
   ========================================================================== */
.archive-pill-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.archive-pill-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.archive-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.archive-pill-item:hover {
  color: var(--text-main);
  background: #F1F5F9;
  border-color: var(--border-strong);
}

.archive-pill-item.active {
  color: #FFFFFF;
  background: var(--primary, #2563EB);
  border-color: var(--primary, #2563EB);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
}

.archive-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  min-width: 16px;
  transition: all var(--transition-fast);
}

.archive-pill-item:hover .archive-pill-count {
  background: #E2E8F0;
  color: var(--text-main);
}

.archive-pill-item.active .archive-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.table-toolbar {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 200px;
}

.toolbar-search-wrap .search-icon-inside,
.toolbar-search-wrap .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toolbar-search-wrap input {
  padding-left: 32px;
  padding-right: 32px;
  font-size: 12.5px;
  height: 34px;
  border-radius: var(--radius-md);
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.search-kbd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  background: #F1F5F9;
  border: 1px solid var(--border-strong, #CBD5E1);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.toolbar-filters-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-filters-wrap select {
  height: 34px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.toolbar-filters-wrap button {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
}

.data-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table th {
  background: #F8FAFC;
  color: var(--text-muted, #64748B);
  font-weight: 500;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
}

.data-table .col-checkbox {
  width: 44px;
  text-align: center;
}

.data-table .col-id {
  width: 110px;
  white-space: nowrap;
}

.data-table .col-title {
  min-width: 220px;
}

.data-table .col-nomor {
  width: 165px;
  max-width: 200px;
  white-space: nowrap;
}

.data-table .col-kategori {
  width: 135px;
  white-space: nowrap;
}

.data-table .col-tanggal {
  width: 110px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.data-table th.col-tanggal {
  text-align: right;
}

.data-table .col-file {
  width: 85px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.data-table th.col-file {
  text-align: right;
}

.data-table .col-visibilitas {
  width: 95px;
  text-align: center;
  white-space: nowrap;
}

.data-table .col-status {
  width: 85px;
  text-align: center;
  white-space: nowrap;
}

.data-table .col-action {
  width: 48px;
  text-align: center;
  white-space: nowrap;
  position: sticky;
  right: 0;
  background: #FFFFFF;
  z-index: 4;
  box-shadow: -3px 0 6px rgba(0, 0, 0, 0.02);
}

.data-table th.col-action {
  background: #F8FAFC;
  z-index: 11;
}

.data-table tbody tr:hover td.col-action {
  background-color: #F1F5F9;
}

.data-table tbody tr.row-selected td.col-action {
  background-color: #EFF6FF !important;
}

/* Category Pill (UI/UX Pro Max - Ponytail Native Attribute Selectors) */
.table-cat-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 8.5px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
  letter-spacing: 0.01em;
}

.table-cat-pill[data-cat*="Surat"] {
  background: var(--pastel-blue-bg);
  color: var(--pastel-blue-text);
  border-color: var(--pastel-blue-border);
}

.table-cat-pill[data-cat*="Perdes"],
.table-cat-pill[data-cat*="SK"] {
  background: var(--pastel-coral-bg);
  color: var(--pastel-coral-text);
  border-color: var(--pastel-coral-border);
}

.table-cat-pill[data-cat*="APBDes"],
.table-cat-pill[data-cat*="RKP"] {
  background: var(--pastel-emerald-bg);
  color: var(--pastel-emerald-text);
  border-color: var(--pastel-emerald-border);
}

.table-cat-pill[data-cat*="Foto"],
.table-cat-pill[data-cat*="Kegiatan"] {
  background: #EDE9FE;
  color: #6D28D9;
  border-color: #DDD6FE;
}

/* Document Number Monospace Pill */
.table-doc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-body);
  display: inline-block;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Date with Tabular Nums */
.table-date-text {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* File Badge */
.table-file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover td {
  background-color: #F8FAFC;
}

.data-table tbody tr.clickable-row {
  cursor: pointer;
}

.data-table tbody tr.clickable-row:hover td {
  background-color: #F1F5F9;
}

.data-table tbody tr.clickable-row:hover .col-title strong {
  color: var(--primary, #1E40AF);
  transition: color 0.15s ease;
}

.data-table tbody tr.clickable-row:focus-visible {
  outline: 2px solid var(--primary, #1E40AF);
  outline-offset: -2px;
}

.data-table tbody tr.clickable-row .col-checkbox,
.data-table tbody tr.clickable-row .col-action {
  cursor: default;
}

.data-table tbody tr.row-selected td {
  background-color: #EFF6FF !important;
}

/* Table Density Modes (UI/UX Pro Max) */
.data-table.compact th,
.data-table.compact td {
  padding: 6px 10px;
  font-size: 12.5px;
}

.data-table.compact .table-id-badge {
  padding: 1.5px 6px;
  font-size: 10.5px;
}

.data-table.compact .table-cat-pill {
  padding: 1.5px 6.5px;
  font-size: 10px;
}

.data-table.compact .table-doc-num {
  font-size: 11px;
}

.data-table.compact .badge {
  padding: 2px 7px;
  font-size: 11px;
}

.data-table.compact .btn-action-trigger {
  width: 26px;
  height: 26px;
}

/* Density Switcher Button Group */
.density-group {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: var(--radius-pill);
  padding: 2.5px;
  gap: 2px;
}

.density-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.density-btn .icon {
  width: 14px;
  height: 14px;
}

.density-btn:hover {
  color: var(--text-main);
}

.density-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.table-id-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2.5px 7.5px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.02em;
}

/* Compact Dropdown Action (No wide horizontal scroll) */
.action-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.btn-action-trigger {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-trigger:hover {
  background: #F1F5F9;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  width: 160px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.action-menu.show {
  display: flex;
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.action-menu-item:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.action-menu-item.danger {
  color: var(--accent-rose);
}

.action-menu-item.danger:hover {
  background: #FFE4E6;
}

/* Floating Contextual Action Menu (UI/UX Pro Max - Escapes table overflow) */
.action-floating-menu {
  position: fixed;
  width: 175px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.16), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 6px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: floatingMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatingMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   BUTTONS & INPUT CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
  gap: 5px;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: var(--border-strong);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-danger {
  background: var(--accent-rose);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: #BE123C;
}

.btn-outline-danger {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
}

.btn-outline-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.28);
  transform: translateY(-1px);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  margin-bottom: 0;
}

.form-control {
  width: 100%;
  padding: 7px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 12.5px;
  outline: none;
  transition: all var(--transition-fast);
}

/* ==========================================================================
   FLATPICKR ERGONOMIC DATEPICKER THEME (Ponytail & UI/UX Pro Max)
   Unified aesthetics: Plus Jakarta Sans, Deep Navy & Soft Pastel Accents
   ========================================================================== */

/* The visible altInput element generated by Flatpickr */
.custom-datepicker-styled,
input[type="date"].form-control,
input.form-control.custom-datepicker-input {
  font-family: 'Plus Jakarta Sans', var(--font-sans);
  cursor: pointer;
  position: relative;
  font-weight: 500;
  letter-spacing: -0.01em;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231E40AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' x2='16' y1='2' y2='6'%3E%3C/line%3E%3Cline x1='8' x2='8' y1='2' y2='6'%3E%3C/line%3E%3Cline x1='3' x2='21' y1='10' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  padding-right: 42px;
  transition: all var(--transition-fast, 0.2s ease);
}

.custom-datepicker-styled:hover,
input.form-control.custom-datepicker-input:hover {
  border-color: #93C5FD;
  background-color: #F8FAFC;
}

.custom-datepicker-styled:focus,
input.form-control.custom-datepicker-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(30, 64, 175, 0.16);
  background-color: #FFFFFF;
}

/* Flatpickr Calendar Popup Customization */
.flatpickr-calendar {
  font-family: 'Plus Jakarta Sans', var(--font-sans) !important;
  background: var(--bg-surface, #FFFFFF) !important;
  border: 1px solid var(--border-subtle, #E8EEF5) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.16), 0 4px 14px -2px rgba(15, 23, 42, 0.08) !important;
  width: 320px !important;
  padding: 10px 10px 0 10px !important;
  overflow: hidden !important;
  z-index: 10050 !important;
  margin-top: 4px !important;
}

.flatpickr-calendar::before,
.flatpickr-calendar::after {
  display: none !important;
}

.flatpickr-months {
  display: flex !important;
  align-items: center !important;
  padding: 4px 6px 10px 6px !important;
  border-bottom: 1px solid var(--border-subtle, #E8EEF5) !important;
}

.flatpickr-months .flatpickr-month {
  height: 38px !important;
  color: var(--text-main, #0F172A) !important;
  fill: var(--text-main, #0F172A) !important;
}

.flatpickr-current-month {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding-top: 4px !important;
  color: var(--text-main, #0F172A) !important;
}

.flatpickr-current-month .cur-month {
  font-weight: 700 !important;
  color: var(--text-main, #0F172A) !important;
}

.flatpickr-current-month .cur-year {
  font-weight: 700 !important;
  color: var(--primary, #1E40AF) !important;
}

.flatpickr-current-month input.cur-year {
  font-weight: 700 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  width: 32px !important;
  height: 32px !important;
  padding: 6px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  color: var(--text-muted, #64748B) !important;
  fill: var(--text-muted, #64748B) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: var(--primary-light, #EFF6FF) !important;
  color: var(--primary, #1E40AF) !important;
  fill: var(--primary, #1E40AF) !important;
}

.flatpickr-weekdays {
  height: 32px !important;
  margin-top: 4px !important;
}

span.flatpickr-weekday {
  color: var(--text-muted, #64748B) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

.flatpickr-rContainer {
  width: 100% !important;
}

.flatpickr-days {
  width: 100% !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  padding: 4px 0 !important;
  justify-content: space-around !important;
}

.flatpickr-day {
  max-width: 38px !important;
  height: 36px !important;
  line-height: 36px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: var(--text-body, #334155) !important;
  border: 1px solid transparent !important;
  margin: 2px 1px !important;
  transition: all 0.15s ease !important;
}

.flatpickr-day:hover {
  background: var(--primary-light, #EFF6FF) !important;
  border-color: var(--primary-border, #BFDBFE) !important;
  color: var(--primary, #1E40AF) !important;
  font-weight: 600 !important;
}

.flatpickr-day.today {
  border-color: var(--primary, #1E40AF) !important;
  background: transparent !important;
  color: var(--primary, #1E40AF) !important;
  font-weight: 700 !important;
}

.flatpickr-day.today:hover {
  background: var(--primary-light, #EFF6FF) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: var(--primary, #1E40AF) !important;
  border-color: var(--primary, #1E40AF) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.35) !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--text-light, #CBD5E1) !important;
}

/* Quick Action Presets Bar (UI/UX Pro Max) */
.fp-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  margin: 8px -10px 0 -10px;
  border-top: 1px solid var(--border-subtle, #E8EEF5);
  background: var(--bg-surface-subtle, #F8FAFC);
}

.fp-btn-quick {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E8EEF5);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-body, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fp-btn-quick:hover {
  background: var(--primary-light, #EFF6FF);
  border-color: var(--primary-border, #BFDBFE);
  color: var(--primary, #1E40AF);
}

.fp-btn-quick.fp-btn-today {
  color: var(--primary, #1E40AF);
  font-weight: 700;
}

.fp-btn-quick.fp-btn-clear {
  color: var(--text-muted, #64748B);
  margin-left: auto;
}

.fp-btn-quick.fp-btn-clear:hover {
  color: var(--accent-rose, #E11D48);
  background: #FFE4E6;
  border-color: #FECDD3;
}

.date-helper-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* ==========================================================================
   CUSTOM ERGONOMIC SELECT DROPDOWN (UI/UX Pro Max & GSAP)
   Transforms all native HTML5 <select> into sleek floating popovers
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  font-family: 'Plus Jakarta Sans', var(--font-sans);
}

.form-group .custom-select-wrapper,
.custom-select-wrapper.w-100 {
  display: block;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong, #CBD5E1);
  border-radius: var(--radius-md, 10px);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #0F172A);
  cursor: pointer;
  width: 100%;
  min-height: 38px;
  transition: all var(--transition-fast, 0.2s ease);
  user-select: none;
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: #93C5FD;
  background: #F8FAFC;
}

.custom-select-trigger.is-open {
  border-color: var(--primary, #1E40AF);
  box-shadow: 0 0 0 3.5px rgba(30, 64, 175, 0.14);
  background: #FFFFFF;
}

.custom-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.custom-select-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-muted, #64748B);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-select-trigger.is-open .custom-select-arrow {
  color: var(--primary, #1E40AF);
}

/* Floating Dropdown Menu Panel */
.custom-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-subtle, #E8EEF5);
  border-radius: 14px;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  padding: 6px;
  z-index: 10070;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

/* Optgroup Header */
.custom-select-group-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94A3B8);
  padding: 6px 10px 4px;
  user-select: none;
}

/* Options */
.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.custom-select-option:hover {
  background: var(--primary-light, #EFF6FF);
  color: var(--primary, #1E40AF);
  font-weight: 600;
}

.custom-select-option.selected {
  background: var(--primary-light, #EFF6FF);
  color: var(--primary, #1E40AF);
  font-weight: 700;
}

.custom-select-check {
  width: 14px;
  height: 14px;
  color: var(--primary, #1E40AF);
  flex-shrink: 0;
}

/* Style for toolbar filter pills */
.toolbar-actions .custom-select-trigger,
.toolbar-filters-wrap .custom-select-trigger {
  min-height: 36px;
  height: 36px;
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 9px;
  background: #FFFFFF;
}

.pagination-info .custom-select-trigger {
  min-height: 28px;
  height: 28px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  background: var(--bg-surface, #FFFFFF);
}

/* Pagination drop-up menu: opens cleanly upwards above pagination bar */
.pagination-info .custom-select-menu,
.custom-select-menu.drop-up {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom center;
  box-shadow: 0 -14px 32px -4px rgba(15, 23, 42, 0.14), 0 -4px 10px -2px rgba(15, 23, 42, 0.06);
}

/* Hide native select visually but keep in DOM for form serialization */
select.custom-select-hidden {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* ==========================================================================
   PONYTAIL SEARCHABLE ACTIVITY COMBOBOX & SMART SUGGESTION STYLES
   ========================================================================== */

.custom-select-menu.custom-select-searchable-menu {
  padding-top: 0;
  max-height: 320px;
  display: flex;
  flex-direction: column;
}

/* Sticky Search Header */
.custom-select-search-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg-surface, #FFFFFF);
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
}

.custom-select-search-icon {
  color: var(--text-muted, #94A3B8);
  flex-shrink: 0;
}

.custom-select-search-input {
  width: 100%;
  border: 1px solid var(--border-subtle, #E2E8F0);
  background: var(--bg-subtle, #F8FAFC);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-main, #1E293B);
  outline: none;
  transition: all 0.15s ease;
}

.custom-select-search-input:focus {
  background: #FFFFFF;
  border-color: var(--primary, #3B82F6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.custom-select-search-clear {
  background: none;
  border: none;
  color: var(--text-muted, #94A3B8);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.custom-select-search-clear:hover {
  background: var(--bg-subtle, #F1F5F9);
  color: var(--accent-rose, #E11D48);
}

.custom-select-options-list {
  padding: 4px 0;
  overflow-y: auto;
  max-height: 250px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

/* 2-Line Activity Option Layout */
.custom-select-act-item {
  padding: 8px 12px;
  align-items: center;
  gap: 10px;
}

.custom-select-act-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.custom-select-act-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}

.custom-select-act-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted, #64748B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-meta-sep {
  opacity: 0.5;
}

.custom-select-empty {
  font-size: 12px;
  color: var(--text-muted, #94A3B8);
  text-align: center;
  padding: 16px 8px;
  font-style: italic;
}

/* Activity Trigger Label formatting */
.trigger-act-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.trigger-act-name {
  font-weight: 600;
  color: var(--text-main, #1E293B);
  overflow: hidden;
  text-overflow: ellipsis;
}

.trigger-act-date {
  font-size: 11.5px;
  color: var(--text-muted, #64748B);
  flex-shrink: 0;
}

/* Prioritas 4: Smart Date Suggestion Banner */
.activity-suggest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  margin-bottom: 8px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
}

.suggest-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.suggest-banner-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4F46E5;
  background: #E0E7FF;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.suggest-banner-text {
  font-size: 12px;
  color: #3730A3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-banner-text strong {
  font-weight: 600;
}

.btn-apply-suggest {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  background: #4F46E5;
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-apply-suggest:hover {
  background: #4338CA;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* Prioritas 1: Actionable Checklist Tags */
.agenda-check-tag.pending {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.agenda-check-tag.pending:hover {
  background: #EEF2FF;
  color: #4F46E5;
  border-color: #C7D2FE;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
}


/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overscroll-behavior: contain !important;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-dialog.wide {
  max-width: 880px;
}

.modal-dialog.preview-wide {
  max-width: 1140px;
  width: 94vw;
}

.modal-header {
  padding: 22px 26px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.btn-modal-close {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-modal-close:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

.modal-body {
  padding: 24px 26px;
  flex: 1;
}

.modal-footer {
  padding: 16px 26px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  background: #F8FAFC;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

/* Wizard Category Cards (Tambah Arsip Step 1) */
.wizard-selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wizard-choice-card {
  position: relative;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
  background: #FFFFFF;
}

.wizard-choice-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--primary-light);
}

.wizard-shortcut-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.wizard-choice-card:hover .wizard-shortcut-badge {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.wizard-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.wizard-choice-card:hover .wizard-icon-box {
  background: var(--primary);
  color: #FFFFFF;
}

.wizard-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.wizard-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* OCR & AI Extraction Scanner Box */
.ocr-scan-box {
  border: 2px dashed #93C5FD;
  background: #F8FAFC;
  border-radius: var(--radius-lg, 12px);
  padding: 22px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.ocr-scan-box:hover,
.ocr-scan-box.drag-active,
.ocr-scan-box.dragover {
  border-color: #6366F1;
  background: #EEF2FF;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.12);
}

.ocr-scan-icon-main {
  width: 32px;
  height: 32px;
  color: var(--primary);
  margin-bottom: 6px;
  transition: transform 0.25s ease;
}

.ocr-scan-box:hover .ocr-scan-icon-main {
  transform: translateY(-2px) scale(1.08);
}

.ocr-scan-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ocr-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #2563EB, transparent);
  box-shadow: 0 0 8px #3B82F6;
  opacity: 0;
}

.ai-confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Clean Visibilitas & Status Badges (Ponytail) */
.badge-vis-clean {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
}

.badge-vis-clean .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-vis-clean.pub {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.badge-vis-clean.priv {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.badge-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.badge-status-dot .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: #94A3B8;
  flex-shrink: 0;
}

.badge-status-dot.active .status-dot {
  background: #10B981;
  box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   HIGH-VELOCITY ADMIN FILING: SPLIT LAYOUT & QUICK CONTROLS (UI/UX Pro Max)
   ========================================================================== */
.wizard-split-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.wizard-split-form .form-control {
  min-width: 0;
  max-width: 100%;
}

.wizard-split-form select.form-control {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

@media (max-width: 860px) {
  .wizard-split-layout {
    grid-template-columns: 1fr;
  }
}

.wizard-split-preview {
  position: sticky;
  top: 0;
}

.docked-preview-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-top: 10px;
}

.docked-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.docked-preview-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-remove-docked {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-remove-docked:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.docked-preview-body {
  display: flex;
  align-items: center;
  gap: 10px;
}

.docked-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.docked-file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docked-file-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Quick Chips for frequent senders */
.quick-chips-container {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-chips-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-chips-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-chip {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-pill);
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.quick-chip:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: var(--primary);
  transform: translateY(-1px);
}

.quick-chip:active {
  transform: scale(0.97);
}

/* Hotkey Pills & Badges */
.wizard-hotkey-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  color: #475569;
  font-weight: 600;
}

.wizard-hotkey-badge kbd,
.hotkey-pill kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
  color: #1E293B;
}

.hotkey-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  background: #FFFFFF;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.wizard-footer-hints {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   DOCUMENT PREVIEW MODAL SPECIFIC (Taste Skill & UI/UX Pro Max)
   Apple/Linear-inspired document workstation with stable canvas & quiet chrome
   ========================================================================== */
.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: #FFFFFF;
}

.preview-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.preview-title-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
}

.preview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.preview-header-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #F1F5F9;
  padding: 3px 4px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-subtle);
}

.preview-zoom-indicator {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
  padding: 0 4px;
  user-select: none;
}

.preview-modal-body {
  padding: 18px 20px;
  background: #FAFAFC;
}

.preview-container {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 18px;
  min-height: 580px;
}

.preview-canvas-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.preview-canvas {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 580px;
  height: 72vh;
  justify-content: center;
  align-items: center;
}

.preview-pdf-frame {
  width: 100%;
  height: 100%;
  min-height: 580px;
  flex: 1;
  border: none;
  background: #FFFFFF;
}

.preview-image-wrap {
  width: 100%;
  height: 100%;
  min-height: 520px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 24px;
  position: relative;
  background: #F1F5F9;
}

.preview-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

.preview-nofile-card {
  background: #FFFFFF;
  width: 100%;
  height: 100%;
  min-height: 520px;
  padding: 40px 32px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-main);
  box-sizing: border-box;
}

.preview-nofile-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: #EFF6FF;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.12);
}

/* Sidebar: Clean, grouped & scrollable */
.preview-sidebar {
  background: #F8FAFC;
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--border-subtle);
  overflow-y: auto;
  max-height: 72vh;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.preview-sidebar-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Grouped metadata box */
.preview-meta-group {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.preview-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-meta-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.preview-meta-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.preview-meta-val.mono {
  font-family: monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--text-muted);
}

/* AI Document Summary Card (Inside Sidebar) */
.preview-ai-summary-card {
  margin-top: 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, #EEF2FF 0%, #FFFFFF 100%);
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-sm, 8px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
}

.preview-ai-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.preview-ai-summary-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
}

/* Footer: Quiet destructive, clean secondary, single dominant primary */
.preview-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: #FFFFFF;
}

.preview-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-subtle-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm, 8px);
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #C7D2FE;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-subtle-ai:hover {
  background: #E0E7FF;
  border-color: #818CF8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.16);
}

.btn-ghost-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-ghost-danger:hover {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FEE2E2;
}

@media (max-width: 900px) {
  .preview-modal-header {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .preview-modal-body {
    padding: 12px 14px;
  }

  .preview-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .preview-canvas {
    min-height: 380px;
    max-height: 52vh;
  }

  .preview-sidebar {
    max-height: none;
    overflow-y: visible;
  }

  .preview-modal-footer {
    padding: 12px 14px;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  .preview-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .btn-ghost-danger {
    justify-content: center;
    width: 100%;
  }
}

/* ==========================================================================
   TOAST PILL NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

.toast-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  max-width: 480px;
  word-break: break-word;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563EB, #38BDF8);
  width: 100%;
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
}

.toast-action-btn {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
}

.toast-action-btn:hover {
  background: #DBEAFE;
  color: #1D4ED8;
}

.toast-icon {
  color: #059669;
}

/* ==========================================================================
   PAGINATION CONTROLS (PRD V3.0 Bagian 24)
   ========================================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-size-select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 12px;
  color: var(--text-main);
}

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

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.pagination-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   PASSWORD WITH SHOW/HIDE TOGGLE (PRD V3.0 Bagian 10)
   ========================================================================== */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 42px;
}

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

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

/* ==========================================================================
   DROPZONE & MULTI-FILE ATTACHMENT (PRD V3.0 Bagian 14)
   ========================================================================== */
.upload-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: #FAFAFC;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  margin-bottom: 4px;
}

.dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

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

.staged-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.staged-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.staged-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.staged-file-name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.staged-file-size {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-remove-staged {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.btn-remove-staged:hover {
  background: #FEE2E2;
}

/* ==========================================================================
   UPLOAD PROGRESS SUITE (UI/UX Pro Max 3-Tier Architecture)
   Tier 1: In-Modal & Dropzone Progress
   Tier 2: Floating Dock Upload Manager (Google Drive / macOS Style)
   Tier 3: Optimistic Gallery Shimmer Card
   ========================================================================== */

/* --- TIER 1: IN-MODAL & DROPZONE PROGRESS --- */
.upload-progress-wrap {
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.08);
}

.upload-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.upload-progress-status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.upload-status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563EB;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
  animation: pulseDot 1.5s infinite;
  flex-shrink: 0;
}

.upload-progress-pct {
  font-size: 13px;
  font-weight: 800;
  color: #1D4ED8;
  font-variant-numeric: tabular-nums;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.upload-progress-bar {
  width: 100%;
  height: 7px;
  background: #E2E8F0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB 0%, #3B82F6 60%, #10B981 100%);
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.upload-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.8s infinite;
}

.upload-progress-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Staged items status pills */
.staged-status-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 6px;
  white-space: nowrap;
}

.staged-status-tag.queued {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.staged-status-tag.uploading {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.staged-status-tag.done {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.staged-status-tag.error {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.staged-status-spinner {
  width: 11px;
  height: 11px;
  border: 2px solid rgba(29, 78, 216, 0.25);
  border-top-color: #1D4ED8;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: inline-block;
}

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

/* --- TIER 2: FLOATING DOCK UPLOAD MANAGER (Apple Sonoma Frosted Glass Light) --- */
.floating-upload-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

@media (max-width: 640px) {
  .floating-upload-dock {
    right: 14px;
    left: 14px;
    bottom: 74px;
    /* Clear mobile navigation bar */
  }
}

/* Collapsed Pill Capsule */
.dock-pill {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  padding: 8px 14px 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 14px 34px -4px rgba(30, 64, 175, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.85);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.dock-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -4px rgba(30, 64, 175, 0.18), 0 6px 16px rgba(15, 23, 42, 0.06), 0 0 0 1px #BFDBFE;
}

.dock-pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dock-pill-spinner-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-circular-chart {
  width: 32px;
  height: 32px;
  transform: rotate(-90deg);
}

.dock-circle-bg {
  fill: none;
  stroke: #E2E8F0;
  stroke-width: 3.2;
}

.dock-circle-fill {
  fill: none;
  stroke: #2563EB;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease, stroke 0.3s ease;
}

.dock-pill-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  color: #2563EB;
  pointer-events: none;
  transition: color 0.3s ease;
}

.dock-pill-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dock-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.dock-pill-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.dock-pill-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dock-btn-action {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(241, 245, 249, 0.85);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dock-btn-action:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--primary);
  transform: scale(1.08);
}

/* Expanded Window Card (Apple Frosted Glass Light) */
.dock-expanded-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 56px -12px rgba(30, 64, 175, 0.16), 0 6px 18px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.85);
  width: 380px;
  max-width: 100%;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dockPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dockPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dock-card-header {
  background: linear-gradient(135deg, #FFFFFF 0%, #F0F7FF 100%);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dock-header-title-box {
  min-width: 0;
}

.dock-header-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.dock-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-card-album {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dock-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dock-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.dock-btn-icon:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--primary);
  transform: scale(1.05);
}

.dock-progress-section {
  padding: 14px 16px 10px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
}

.dock-progress-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dock-progress-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-progress-percent {
  font-size: 13px;
  font-weight: 800;
  color: #1D4ED8;
  font-variant-numeric: tabular-nums;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.dock-progress-track {
  width: 100%;
  height: 7px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.dock-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB 0%, #3B82F6 50%, #10B981 100%);
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dock-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.8s infinite;
}

.dock-progress-submetrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Files List Inside Expanded Window */
.dock-files-list {
  padding: 6px 12px;
  overflow-y: auto;
  max-height: 220px;
}

.dock-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.dock-file-row:hover {
  background: #F8FAFC;
}

.dock-file-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.dock-file-meta {
  flex: 1;
  min-width: 0;
}

.dock-file-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dock-file-size {
  font-size: 10.5px;
  color: var(--text-muted);
}

.dock-file-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.dock-file-status.done {
  color: #15803D;
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
}

.dock-file-status.uploading {
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
}

.dock-file-status.queued {
  color: #64748B;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
}

.dock-file-status.error {
  color: #B91C1C;
  background: #FEE2E2;
  border: 1px solid #FECACA;
}

.dock-card-footer {
  padding: 12px 16px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dock-footer-success-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #15803D;
}

/* --- TIER 3: OPTIMISTIC GALLERY SHIMMER CARD --- */
.album-card.is-uploading {
  position: relative;
  border: 1px solid #BFDBFE;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2), var(--shadow-sm);
  cursor: pointer;
}

.album-uploading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  border-radius: inherit;
}

.album-uploading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.12);
  margin-bottom: 10px;
}

.album-uploading-bar {
  width: 140px;
  height: 6px;
  background: #E2E8F0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 8px;
}

.album-uploading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #10B981);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.album-uploading-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   IMAGE LIGHTBOX & MULTI-PHOTO GALLERY (PRD V3.0 Bagian 16)
   ========================================================================== */
/* ==========================================================================
   APPLE CINEMA LIGHTBOX (UI/UX Pro Max)
   ========================================================================== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 18, 0.95);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: background 0.3s ease;
}

.lightbox-backdrop.show {
  display: flex;
}

/* Tasteskill v2: Idle Auto-Dim HUD (Subtle Cinema Focus) */
.lightbox-backdrop.is-idle .lightbox-top-bar,
.lightbox-backdrop.is-idle .lightbox-nav-btn,
.lightbox-backdrop.is-idle .lightbox-filmstrip-bar {
  opacity: 0.12;
  pointer-events: none;
}

.lightbox-backdrop.is-idle {
  cursor: none;
}

.lightbox-backdrop.is-idle .lightbox-top-bar:hover,
.lightbox-backdrop.is-idle .lightbox-nav-btn:hover {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: min(94vw, 1500px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Lightbox Top Controls Bar */
.lightbox-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  z-index: 50;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.lightbox-counter-pill {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.lightbox-caption-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #F8FAFC;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lightbox-action-btn {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-action-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.lightbox-action-btn:active {
  transform: translateY(0);
}

.lightbox-action-btn.danger {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.45);
  color: #FCA5A5;
}

.lightbox-action-btn.danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45);
  transform: translateY(-1px);
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Lightbox Image Container - Fluid Cinema Stage */
.lightbox-img-wrap {
  width: 100%;
  max-width: 100%;
  height: calc(88vh - 80px);
  min-height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060912;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  transition: opacity 0.2s ease;
}

/* Nav Buttons (Left & Right Arrows with Semantic SVG) */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-nav-btn .icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav-btn .icon svg {
  width: 100%;
  height: 100%;
  stroke: #FFFFFF;
  stroke-width: 2.2px;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) scale(1.08);
  color: #FFFFFF;
}

.lightbox-nav-prev {
  left: -20px;
}

.lightbox-nav-next {
  right: -20px;
}

@media (max-width: 900px) {
  .lightbox-nav-prev {
    left: 8px;
  }

  .lightbox-nav-next {
    right: 8px;
  }

  .lightbox-top-bar {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
  }

  .lightbox-img-wrap {
    height: 65vh;
  }
}

/* Filmstrip Bar */
.lightbox-filmstrip-bar {
  margin-top: 10px;
  width: 100%;
  max-width: min(90vw, 1100px);
  display: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-filmstrip {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.lightbox-filmstrip::-webkit-scrollbar {
  display: none;
}

.filmstrip-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  flex-shrink: 0;
  scroll-snap-align: center;
  transition: all 0.2s ease;
}

.filmstrip-thumb:hover {
  opacity: 0.9;
  transform: scale(1.06);
}

.filmstrip-thumb.active {
  opacity: 1;
  border-color: #38BDF8;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
}

.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   DOCUMENT PREVIEW FOCUS MODE & CINEMA BADGE (UI/UX Pro Max & Tasteskill)
   ========================================================================== */
#modal-preview.preview-focus-mode #modal-preview-dialog {
  max-width: min(96vw, 1600px);
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-preview.preview-focus-mode .preview-sidebar {
  display: none !important;
}

#modal-preview.preview-focus-mode .preview-canvas-col {
  flex: 1 1 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

#modal-preview.preview-focus-mode .preview-canvas {
  height: calc(88vh - 90px) !important;
}

#modal-preview #btn-preview-toggle-sidebar.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.preview-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.preview-image-cinema-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.9;
}

.preview-image-cinema-badge:hover {
  opacity: 1;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 102, 218, 0.45);
}

/* Confirmation & Alert Modals Priority (Always on top of previews/managers) */
#modal-confirm-delete,
#modal-confirm-duplicate,
#modal-zip-progress {
  z-index: 1200 !important;
}

/* ==========================================================================
   PUBLIC BREADCRUMB & PUBLIC DETAIL MODAL (PRD V3.0 Bagian 9)
   ========================================================================== */
.portal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.portal-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.portal-breadcrumb a:hover {
  text-decoration: underline;
}

.public-detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.public-detail-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.public-activity-card {
  background: var(--pastel-purple-bg);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION (HEALTH APP & APPLE IOS STANDARD)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  z-index: 100;
  padding: 0 12px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }

  .lightbox-nav-prev {
    left: 8px;
  }

  .lightbox-nav-next {
    right: 8px;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-light);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  min-height: 48px;
  min-width: 52px;
  touch-action: manipulation;
  position: relative;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

.mobile-nav-item .icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-item.active .icon {
  transform: scale(1.08);
}

.mobile-nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   CUSTOM CHECKBOX & BULK ACTIONS BAR (ui-ux-pro-max standard)
   ========================================================================== */
.custom-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--primary);
  vertical-align: middle;
}

.bulk-actions-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  opacity: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid #CBD5E1;
  box-shadow: 0 16px 36px -6px rgba(30, 64, 175, 0.16);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 100;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bulk-actions-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bulk-count {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  padding-right: 12px;
  border-right: 1px solid #E2E8F0;
  white-space: nowrap;
}

.bulk-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bulk-btn:hover {
  background: #E2E8F0;
  color: var(--text-main);
  transform: translateY(-1px);
}

.bulk-btn#bulk-btn-publish {
  background: #059669;
  color: #FFFFFF;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.bulk-btn#bulk-btn-publish:hover {
  background: #047857;
  border-color: #047857;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

.bulk-btn#bulk-btn-internal {
  background: #D97706;
  color: #FFFFFF;
  border-color: #D97706;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.bulk-btn#bulk-btn-internal:hover {
  background: #B45309;
  border-color: #B45309;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}

.bulk-btn.danger,
.bulk-btn#bulk-btn-trash {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.bulk-btn.danger:hover,
.bulk-btn#bulk-btn-trash:hover {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

.bulk-btn#bulk-btn-cancel {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #64748B;
}

.bulk-btn#bulk-btn-cancel:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

/* ==========================================================================
   WIZARD STEPPER PROGRESS TRACKER (Segmented Steps)
   ========================================================================== */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.wizard-step-node {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.wizard-step-node.active {
  color: var(--primary);
  font-weight: 700;
}

.wizard-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #E2E8F0;
  color: var(--text-body);
}

.wizard-step-node.active .wizard-step-badge {
  background: var(--primary);
  color: #FFFFFF;
}

.wizard-step-line {
  width: 36px;
  height: 2px;
  background: #E2E8F0;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.wizard-step-line.active {
  background: var(--primary);
}

/* ==========================================================================
   TABLE EMPTY STATE
   ========================================================================== */
.table-empty-state {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.table-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #F1F5F9;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.table-empty-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 320px;
}

/* ==========================================================================
   INTERACTIVE CITATION CHIPS (AI Chat) & QUICK FILTER CHIPS (Portal)
   ========================================================================== */
.ai-citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin: 3px 2px;
}

.ai-citation-chip:hover {
  background: #DBEAFE;
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.portal-quick-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.portal-chip-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.portal-chip-btn:hover,
.portal-chip-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Mobile responsive table card mode (UI/UX Pro Max + Ponytail) */
@media (max-width: 640px) {
  .table-responsive {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .data-table {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  .data-table thead {
    display: none !important;
  }

  .data-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .data-table tr {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg, 14px);
    margin-bottom: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
    position: relative;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }

  .data-table tr:active {
    transform: scale(0.99);
    background: #F8FAFC;
  }

  .data-table td {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    border: none !important;
    font-size: 12.5px;
  }

  .data-table td::before {
    display: none !important;
  }

  .data-table td.col-checkbox {
    display: none !important;
  }

  .data-table td.col-id {
    order: 1 !important;
    flex: 0 0 auto !important;
  }

  .data-table td.col-kategori {
    order: 2 !important;
    flex: 0 0 auto !important;
  }

  .data-table td.col-visibilitas {
    order: 3 !important;
    flex: 0 0 auto !important;
  }

  .data-table td.col-status {
    order: 4 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  .data-table td.col-title {
    order: 5 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    padding: 4px 0 2px !important;
    gap: 2px !important;
  }

  .data-table td.col-title strong {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    line-height: 1.35 !important;
  }

  .data-table td.col-nomor {
    order: 6 !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    padding: 0 0 6px !important;
    border-bottom: 1px dashed #E2E8F0 !important;
    margin-bottom: 2px !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
  }

  .data-table td.col-nomor::before {
    display: inline !important;
    content: "No: " !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--text-light) !important;
    margin-right: 4px !important;
  }

  .data-table td.col-tanggal {
    order: 7 !important;
    flex: 0 0 auto !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
  }

  .data-table td.col-file {
    order: 8 !important;
    flex: 0 0 auto !important;
    margin-left: 4px !important;
  }

  .data-table td.col-action {
    order: 9 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
  }

  .data-table td.col-action .btn-action-trigger {
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--radius-sm, 8px) !important;
    background: #F8FAFC !important;
    border: 1px solid var(--border-subtle) !important;
  }
}

/* ==========================================================================
   ALBUM CARDS (Foto Kegiatan Visual Gallery)
   ========================================================================== */
.album-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  will-change: transform, box-shadow;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.album-card:hover {
  transform: translateY(-3px) translateZ(0);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
  border-color: var(--primary-border);
}

.album-cover {
  height: 180px;
  background: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  isolation: isolate;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.album-cover.album-cover-empty {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #94A3B8;
}

.album-cover.album-cover-empty .album-cover-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
}

/* Multi-photo smart mosaic preview (2-3+ photos) */
.album-cover-mosaic {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 2px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #0F172A;
}

.album-mosaic-main {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.album-mosaic-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  height: 100%;
  overflow: hidden;
}

.album-mosaic-sub {
  height: 100%;
  overflow: hidden;
  position: relative;
  background: #1E293B;
}

.album-mosaic-sub img,
.album-mosaic-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.album-card:hover .album-mosaic-sub img,
.album-card:hover .album-mosaic-main img {
  transform: scale(1.05);
}

.album-cover-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.album-cover-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  color: #FFFFFF;
}

.album-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.album-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.album-desc {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Album Card Meta Box & Monospace ID Badge (Taste Skill & Anti-Slop) */
.album-meta-box {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.album-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.album-date-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.album-id-pill {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.3;
  letter-spacing: 0.25px;
}

.album-loc-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.album-loc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transform: translateZ(0);
}

.album-card:hover .album-cover-img {
  transform: scale(1.03) translateZ(0);
}

.album-card-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.album-card-actions .btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.album-card-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* Public Photo Gallery Grid inside Detail Modal */
.public-photo-thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  position: relative;
  background: #F1F5F9;
  transition: all var(--transition-fast);
}

.public-photo-thumb:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

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

.public-photo-thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 600;
  padding: 8px 6px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   UNIVERSAL SPOTLIGHT / COMMAND PALETTE (Ctrl + K)
   Aesthetics: Apple Raycast / Linear Frosted Glass
   ========================================================================== */
.spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px 20px;
}

.spotlight-dialog {
  width: 100%;
  max-width: 640px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.spotlight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: #FFFFFF;
}

.spotlight-search-icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.spotlight-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-main);
  background: transparent;
}

.spotlight-input::placeholder {
  color: var(--text-light);
}

.spotlight-esc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-muted);
  background: #F1F5F9;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
}

.spotlight-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  overscroll-behavior: contain;
}

.spotlight-body::-webkit-scrollbar {
  width: 6px;
}

.spotlight-body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}

.spotlight-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  margin-bottom: 2px;
}

.spotlight-item:hover,
.spotlight-item.active {
  background: #EFF6FF;
}

.spotlight-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.spotlight-item.active .spotlight-item-icon,
.spotlight-item:hover .spotlight-item-icon {
  background: #DBEAFE;
  color: var(--primary);
}

.spotlight-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.spotlight-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item.active .spotlight-item-title {
  color: var(--primary);
}

.spotlight-item-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.spotlight-item-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.spotlight-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

.spotlight-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border-subtle);
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.spotlight-footer-hints {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kbd-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10.5px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   INLINE QUICK ACTIVITY CREATOR (UI/UX Pro Max & Ponytail)
   ========================================================================== */
.field-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  margin-bottom: 0;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.field-header-row .form-label {
  margin-bottom: 0;
}

.btn-quick-act-toggle {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(30, 64, 175, 0.08);
}

.btn-quick-act-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
  transform: translateY(-1px);
}

.inline-quick-act-card {
  margin-top: 10px;
  background: #F8FAFC;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
  position: relative;
  overflow: hidden;
}

.inline-quick-act-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #60A5FA);
}

.inline-quick-act-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inline-quick-act-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.btn-quick-act-close {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.btn-quick-act-close:hover {
  color: #DC2626;
  background: #FEE2E2;
  border-color: #FECACA;
}

/* Quick Link Category Badges in Activity Modal */
.btn-quick-link-doc {
  transition: all var(--transition-fast);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-quick-link-doc[data-type="surat-masuk"] {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.btn-quick-link-doc[data-type="surat-masuk"]:hover {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-quick-link-doc[data-type="dokumen-desa"] {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #B91C1C;
}

.btn-quick-link-doc[data-type="dokumen-desa"]:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.btn-quick-link-doc[data-type="dokumen-lain"] {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}

.btn-quick-link-doc[data-type="dokumen-lain"]:hover {
  background: #D97706;
  border-color: #D97706;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  transform: translateY(-1px);
}

.btn-quick-link-doc[data-type="foto-kegiatan"] {
  background: #EDE9FE;
  border-color: #DDD6FE;
  color: #5B21B6;
}

.btn-quick-link-doc[data-type="foto-kegiatan"]:hover {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
  transform: translateY(-1px);
}

.inline-quick-act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.inline-quick-act-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.select-highlight-pulse {
  animation: pulseSelectGlow 1.2s ease;
}

@keyframes pulseSelectGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    border-color: var(--primary);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
    border-color: var(--primary);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ==========================================================================
   APPLE-STYLE PHOTO ALBUM EXPERIENCE (UI/UX Pro Max)
   ========================================================================== */

/* 1. 3D Photo Stack Card (for 5+ Photos in Overview Grid) */
.photo-stack-card {
  position: relative;
  border-radius: var(--radius-lg);
  cursor: pointer;
  perspective: 1000px;
  background: transparent;
  padding-bottom: 8px;
}

.photo-stack-pile {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
}

.stack-layer {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stack-layer-back {
  transform: rotate(-4deg) translateY(-2px);
  opacity: 0.75;
  filter: brightness(0.92);
}

.stack-layer-mid {
  transform: rotate(3deg) translateY(-1px);
  opacity: 0.88;
  filter: brightness(0.96);
}

.stack-layer-front {
  transform: rotate(0deg);
  z-index: 2;
  overflow: hidden;
}

.photo-stack-card:hover .stack-layer-back {
  transform: rotate(-8deg) translateX(-10px) translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.photo-stack-card:hover .stack-layer-mid {
  transform: rotate(7deg) translateX(10px) translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.photo-stack-card:hover .stack-layer-front {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.photo-stack-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #FFFFFF;
}

.apple-pill-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
}

/* 2. Dedicated Album Showcase Header */
.album-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.album-breadcrumb-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.album-hero-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.05);
  position: relative;
  overflow: hidden;
}

.album-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 70%);
  pointer-events: none;
}

.album-hero-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.album-hero-date {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.album-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 8px;
}

.album-hero-desc {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.6;
  max-width: 820px;
  margin-bottom: 18px;
}

.album-hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(37, 99, 235, 0.12);
  flex-wrap: wrap;
  gap: 14px;
}

.album-hero-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.album-tag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.album-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 3. Adaptive Layout Showcase (1 Photo, 2-4 Photos, 5+ Bento) */
.album-showcase-container {
  margin-top: 12px;
}

/* Case 1: Single Photo Hero Spotlight */
.album-single-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  align-items: center;
}

@media (max-width: 860px) {
  .album-single-hero {
    grid-template-columns: 1fr;
  }
}

.album-single-img-wrap {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.album-single-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.album-single-img-wrap:hover img {
  transform: scale(1.03);
}

.album-single-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.album-single-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.single-details-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.single-details-card {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12.5px;
}

/* Case 2: Balanced 2 - 4 Photos Grid */
.album-balanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.album-balanced-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-subtle);
}

.album-balanced-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-balanced-item:hover img {
  transform: scale(1.03);
}

.album-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.8));
  color: #FFFFFF;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.album-balanced-item:hover .album-item-overlay,
.bento-photo-cell:hover .album-item-overlay {
  opacity: 1;
}

/* --- Granular Photo Cell Actions & Selection (Ponytail Standard) --- */
.album-balanced-item,
.bento-photo-cell,
.album-single-img-wrap {
  position: relative;
}

.photo-cell-btn-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(254, 202, 202, 0.9);
  color: #DC2626;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.album-balanced-item:hover .photo-cell-btn-delete,
.bento-photo-cell:hover .photo-cell-btn-delete,
.album-single-img-wrap:hover .photo-cell-btn-delete {
  opacity: 1;
  transform: scale(1);
}

.photo-cell-btn-delete:hover {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #F87171;
  transform: scale(1.1) !important;
}

/* Checkbox Circle for Batch Select Mode (Only appears in select mode) */
.photo-cell-select-circle {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: transparent;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-cell-select-circle .icon,
.photo-cell-select-circle svg {
  width: 15px;
  height: 15px;
  stroke: #FFFFFF;
  stroke-width: 2.8;
}

/* ONLY APPEAR WHEN USER CLICKS PILIH FOTO */
.is-select-mode .photo-cell-select-circle {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.is-select-mode .photo-cell-select-circle:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: #FFFFFF;
  transform: scale(1.12);
}

.is-select-mode .photo-cell-select-circle.selected {
  background: #2563EB;
  border-color: #FFFFFF;
  color: #FFFFFF;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}

.is-select-mode .album-item-selected {
  outline: 3px solid #2563EB !important;
  outline-offset: -2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), var(--shadow-md) !important;
}

/* In select mode, hide individual hover delete and photo overlay to avoid clash */
.is-select-mode .photo-cell-btn-delete,
.is-select-mode .album-item-overlay,
.is-select-mode .album-single-badge {
  display: none !important;
}

/* Batch Action Bar (Frosted Glass Capsule) */
.album-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  box-shadow: 0 12px 32px -4px rgba(30, 64, 175, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
  animation: dockPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.batch-bar-left,
.batch-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-bar-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.btn-batch-action {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-batch-action:hover:not(:disabled) {
  background: #E2E8F0;
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-batch-action#btn-batch-select-all {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.btn-batch-action#btn-batch-select-all:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.35);
}

.btn-batch-action.danger {
  color: #FFFFFF;
  border-color: #DC2626;
  background: #DC2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-batch-action.danger:hover:not(:disabled) {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

.btn-batch-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Case 3: 5+ Photos Apple Bento Grid */
.album-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
  gap: 14px;
}

@media (max-width: 900px) {
  .album-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
}

.bento-photo-cell {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-subtle);
}

.bento-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.bento-photo-cell:hover img {
  transform: scale(1.035);
}

/* Hero cell spans 2 cols and 2 rows */
.bento-cell-hero {
  grid-column: span 2;
  grid-row: span 2;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.bento-hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* 4. Apple Cinema Lightbox Filmstrip */
.lightbox-filmstrip-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 680px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  z-index: 10;
  overflow: hidden;
}

.lightbox-filmstrip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.lightbox-filmstrip::-webkit-scrollbar {
  display: none;
}

.filmstrip-thumb {
  width: 44px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filmstrip-thumb:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.filmstrip-thumb.active {
  opacity: 1;
  border-color: #60A5FA;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
  transform: scale(1.08);
}

/* Quick Account Selector - Modern Select & Avatar Indicator (UI/UX Pro Max) */
.login-user-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-user-select-avatar {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary, #2563EB);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.login-user-select-avatar.admin {
  background: #1E40AF;
}

.login-user-select-avatar.viewer {
  background: #059669;
}

.login-user-select-avatar.manual {
  background: #475569;
}

/* Ensure Custom Select Trigger in Login Modal has left padding for avatar */
.login-user-select-wrap .custom-select-trigger {
  padding-left: 48px !important;
  min-height: 44px !important;
  border-radius: var(--radius-md, 10px) !important;
  background-color: #F8FAFC !important;
  border: 1.5px solid var(--border-subtle, #E2E8F0) !important;
}

.login-user-select-wrap .custom-select-trigger:hover,
.login-user-select-wrap .custom-select-trigger.is-open {
  background-color: #FFFFFF !important;
  border-color: var(--primary, #2563EB) !important;
}

.login-user-select-wrap .custom-select-label {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text-main, #0F172A) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: left !important;
}

.login-user-select {
  padding-left: 48px !important;
  padding-right: 36px !important;
  height: 44px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text-main, #0F172A) !important;
  background-color: #F8FAFC !important;
  border: 1.5px solid var(--border-subtle, #E2E8F0) !important;
  border-radius: var(--radius-md, 10px) !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s ease;
  width: 100%;
}

.login-user-select:focus {
  background-color: #FFFFFF !important;
  border-color: var(--primary, #2563EB) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none;
}

.sheet-drag-handle {
  display: none;
}

/* Mobile Bottom Sheet for Login Modal (Docked cleanly above bottom nav bar) */
@media (max-width: 768px) {
  #modal-login.modal-backdrop {
    align-items: flex-end !important;
    padding: 0 0 calc(60px + env(safe-area-inset-bottom, 0px)) 0 !important;
  }

  #modal-login #modal-login-dialog {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    margin: 0 !important;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.18) !important;
    border-bottom: 1px solid var(--border-subtle, #E2E8F0) !important;
    max-height: calc(85vh - 60px) !important;
    padding-bottom: 14px !important;
  }

  #modal-login .sheet-drag-handle {
    display: block !important;
    width: 38px;
    height: 4.5px;
    border-radius: 3px;
    background: #CBD5E1;
    margin: 10px auto 4px auto;
  }

  #modal-login .modal-header {
    padding: 8px 20px 8px 20px !important;
    border-bottom: none !important;
  }

  #modal-login .modal-body {
    padding: 4px 20px 14px 20px !important;
  }
}

/* ==========================================================================
   APPLE CLEAN ARCHIVE CARDS (Portal Publik)
   ========================================================================== */
.portal-archives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* Portal Year Select Stacking Context & Popover Geometry */
.section-header.portal-content-header {
  position: relative;
  z-index: 40;
}

.portal-filter-controls .custom-select-wrapper {
  position: relative;
  z-index: 60;
  flex-shrink: 0;
}

.portal-filter-controls .custom-select-trigger {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid var(--border-strong, #CBD5E1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-filter-controls .custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 150px;
  width: max-content;
  max-width: 240px;
  z-index: 10080;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
}

.portal-archive-card.note-card {
  position: relative !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  color: var(--text-body) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  padding: 20px 20px 16px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  min-height: 280px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Ponytail Semantic Category Stripe on Top Edge */
.portal-archive-card.note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: #94A3B8;
  transition: height 0.2s ease;
}

.portal-archive-card.note-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03) !important;
}

.portal-archive-card.note-card:hover::before {
  height: 5px;
}

/* Category Semantic Top Stripes & Border Tints */
.portal-archive-card.note-card[data-category*="APBDes"]::before,
.portal-archive-card.note-card[data-category*="RKP"]::before,
.portal-archive-card.note-card[data-category*="Keuangan"]::before {
  background: #10B981;
}

.portal-archive-card.note-card[data-category*="APBDes"]:hover,
.portal-archive-card.note-card[data-category*="RKP"]:hover {
  border-color: rgba(16, 185, 129, 0.35) !important;
}

.portal-archive-card.note-card[data-category*="Perdes"]::before,
.portal-archive-card.note-card[data-category*="Hukum"]::before,
.portal-archive-card.note-card[data-category*="Peraturan"]::before {
  background: #2563EB;
}

.portal-archive-card.note-card[data-category*="Perdes"]:hover,
.portal-archive-card.note-card[data-category*="Hukum"]:hover {
  border-color: rgba(37, 99, 235, 0.35) !important;
}

.portal-archive-card.note-card[data-category*="SK"]::before {
  background: #F59E0B;
}

.portal-archive-card.note-card[data-category*="SK"]:hover {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.portal-archive-card.note-card[data-category*="Surat"]::before {
  background: #6366F1;
}

.portal-archive-card.note-card[data-category*="Surat"]:hover {
  border-color: rgba(99, 102, 241, 0.35) !important;
}

.portal-archive-card.note-card[data-category*="Foto"]::before,
.portal-archive-card.note-card[data-category*="Kegiatan"]::before {
  background: #F43F5E;
}

.portal-archive-card.note-card[data-category*="Foto"]:hover,
.portal-archive-card.note-card[data-category*="Kegiatan"]:hover {
  border-color: rgba(244, 63, 94, 0.35) !important;
}

.portal-archive-card.note-card[data-category*="Dokumen Lain"]::before {
  background: #0284C7;
}

.portal-archive-card.note-card[data-category*="Dokumen Lain"]:hover {
  border-color: rgba(2, 132, 199, 0.35) !important;
}

.portal-archive-card .note-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
  min-width: 0 !important;
}

.portal-archive-card .note-card-date {
  color: #64748B !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
  flex: 1 !important;
  opacity: 1 !important;
}

.portal-archive-card .note-card-title {
  color: var(--text-main) !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.022em !important;
  line-height: 1.38 !important;
  margin: 0 0 10px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
  height: 43px !important;
}

.portal-archive-card .note-card-excerpt {
  color: #475569 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  margin: 0 0 16px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  height: 60px !important;
  max-height: 60px !important;
  flex: none !important;
  opacity: 1 !important;
}

.portal-archive-card .note-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  margin-top: auto !important;
  min-height: 42px !important;
}

/* Category Semantic Pills (High Legibility & WCAG 4.5:1 Compliant) */
.portal-archive-card .note-id-pill,
#public-detail-category {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  padding: 3px 10px !important;
  border-radius: var(--radius-pill) !important;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.35 !important;
  transition: all 0.2s ease;
}

.portal-archive-card .note-id-pill[data-category*="APBDes"],
.portal-archive-card .note-id-pill[data-category*="RKP"],
.portal-archive-card .note-id-pill[data-category*="Keuangan"],
#public-detail-category[data-category*="APBDes"],
#public-detail-category[data-category*="RKP"],
#public-detail-category[data-category*="Keuangan"] {
  background: #ECFDF5 !important;
  color: #065F46 !important;
  border-color: #A7F3D0 !important;
}

.portal-archive-card .note-id-pill[data-category*="Perdes"],
.portal-archive-card .note-id-pill[data-category*="Hukum"],
.portal-archive-card .note-id-pill[data-category*="Peraturan"],
#public-detail-category[data-category*="Perdes"],
#public-detail-category[data-category*="Hukum"],
#public-detail-category[data-category*="Peraturan"] {
  background: #EFF6FF !important;
  color: #1E40AF !important;
  border-color: #BFDBFE !important;
}

.portal-archive-card .note-id-pill[data-category*="SK"],
#public-detail-category[data-category*="SK"] {
  background: #FFFBEB !important;
  color: #92400E !important;
  border-color: #FDE68A !important;
}

.portal-archive-card .note-id-pill[data-category*="Surat"],
#public-detail-category[data-category*="Surat"] {
  background: #EEF2FF !important;
  color: #3730A3 !important;
  border-color: #C7D2FE !important;
}

.portal-archive-card .note-id-pill[data-category*="Foto"],
.portal-archive-card .note-id-pill[data-category*="Kegiatan"],
#public-detail-category[data-category*="Foto"],
#public-detail-category[data-category*="Kegiatan"] {
  background: #FFF1F2 !important;
  color: #9F1239 !important;
  border-color: #FECDD3 !important;
}

.portal-archive-card .note-id-pill[data-category*="Dokumen Lain"],
#public-detail-category[data-category*="Dokumen Lain"] {
  background: #E0F2FE !important;
  color: #0369A1 !important;
  border-color: #BAE6FD !important;
}

/* Footer Document Number & Icon Tinting (Single-Line Monospace Truncated) */
.portal-archive-card .note-time-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 11px !important;
  letter-spacing: -0.02em !important;
  font-weight: 600 !important;
  color: #64748B !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.portal-archive-card .note-time-badge span:last-child,
.portal-archive-card .note-doc-num {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
  min-width: 0 !important;
}

.portal-archive-card[data-category*="APBDes"] .note-time-badge .icon {
  color: #059669 !important;
}

.portal-archive-card[data-category*="Perdes"] .note-time-badge .icon {
  color: #2563EB !important;
}

.portal-archive-card[data-category*="SK"] .note-time-badge .icon {
  color: #D97706 !important;
}

.portal-archive-card[data-category*="Surat"] .note-time-badge .icon {
  color: #6366F1 !important;
}

.portal-archive-card[data-category*="Dokumen Lain"] .note-time-badge .icon {
  color: #0284C7 !important;
}

/* Interactive Hover on Action Button */
.portal-archive-card .btn-pill {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  padding: 4.5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  border-radius: var(--radius-pill) !important;
  background: #F8FAFC !important;
  color: #334155 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s ease !important;
}

.portal-archive-card:hover .btn-pill {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border-color: #BFDBFE !important;
}

/* Public Detail Modal Metadata Grid (UI/UX Pro Max) */
.public-detail-meta-grid {
  transition: all 0.2s ease;
}

@media (max-width: 580px) {
  .public-detail-meta-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

.portal-archive-card:hover .btn-pill {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border-color: #BFDBFE !important;
}

/* Portal Category Filter Tabs: Segmented Vibrant Pills */
#portal-filter-tabs {
  background: #F1F5F9;
  padding: 3px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

#portal-filter-tabs .tab-btn {
  border-radius: var(--radius-pill);
  padding: 5.5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#portal-filter-tabs .tab-btn::after {
  display: none !important;
}

#portal-filter-tabs .tab-btn:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.7);
}

#portal-filter-tabs .tab-btn.active {
  font-weight: 700;
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
}

#portal-filter-tabs .tab-btn[data-filter="Semua"].active {
  background: #1E40AF !important;
  color: #FFFFFF !important;
}

#portal-filter-tabs .tab-btn[data-filter*="Kabar"].active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
}

#portal-filter-tabs .tab-btn[data-filter*="Perdes"].active {
  background: #2563EB !important;
  color: #FFFFFF !important;
}

#portal-filter-tabs .tab-btn[data-filter*="SK"].active {
  background: #D97706 !important;
  color: #FFFFFF !important;
}

#portal-filter-tabs .tab-btn[data-filter*="APBDes"].active {
  background: #059669 !important;
  color: #FFFFFF !important;
}

#portal-filter-tabs .tab-btn[data-filter*="Surat"].active {
  background: #6366F1 !important;
  color: #FFFFFF !important;
}

#portal-filter-tabs .tab-btn[data-filter*="Foto"].active {
  background: #E11D48 !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   PUBLIC PORTAL: EDITORIAL SHOWCASE & CIVIC LUXURY (Ponytail Standard)
   - Bento Showcase Gallery (Featured Hero 16:9 + Supporting Mosaic)
   - Apple Clean Photo Album Cards (Large 205px Cover, Rich Metadata)
   - Civic Trust Footer
   ========================================================================== */

/* 1. Header & Section Containers */
.portal-showcase-section {
  margin-top: 28px;
  margin-bottom: 36px;
}

.portal-section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.portal-header-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #065F46;
  text-transform: uppercase;
}

.portal-eyebrow-badge.blue {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  color: #1E40AF;
}

.portal-header-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-section-heading {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0F172A;
  margin: 0;
  line-height: 1.25;
}

.portal-section-sub {
  font-size: 13.5px;
  color: #64748B;
  margin: 4px 0 0;
  line-height: 1.5;
}

.btn-portal-view-all-photos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: #1E40AF;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-portal-view-all-photos:hover {
  background: #F8FAFC;
  border-color: #2563EB;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

/* 2. Bento Showcase Grid */
.portal-bento-gallery {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

.portal-bento-gallery.is-single-col {
  grid-template-columns: 1fr !important;
}

@media (max-width: 900px) {
  .portal-bento-gallery {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SMARTSTACK 3D DECK - Awwwards & iOS-Inspired Dynamic News Deck
   ========================================================================== */
.portal-smartstack-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-smartstack-deck {
  position: relative;
  width: 100%;
  min-height: 410px;
  perspective: 1200px;
  -webkit-perspective: 1200px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.smartstack-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  background: #0B132B;
  box-shadow: 0 10px 32px -4px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  will-change: transform, opacity;
  transform-origin: center bottom;
  -webkit-transform-origin: center bottom;
  user-select: none;
}

/* Layered 3D Stack Depth */
.smartstack-card[data-stack-pos="0"] {
  z-index: 5;
  transform: translateY(0) scale(1) translateZ(0);
  opacity: 1;
  pointer-events: auto;
}

.smartstack-card[data-stack-pos="1"] {
  z-index: 4;
  transform: translateY(-10px) scale(0.96) translateZ(-40px);
  opacity: 0.55;
  pointer-events: none;
  filter: blur(0.4px);
}

.smartstack-card[data-stack-pos="2"] {
  z-index: 3;
  transform: translateY(-20px) scale(0.92) translateZ(-80px);
  opacity: 0.22;
  pointer-events: none;
  filter: blur(0.9px);
}

.smartstack-card[data-stack-pos="hidden"] {
  z-index: 1;
  transform: translateY(-30px) scale(0.88) translateZ(-120px);
  opacity: 0;
  pointer-events: none;
}

.smartstack-card:hover[data-stack-pos="0"] {
  transform: translateY(-4px) scale(1) translateZ(0);
  box-shadow: 0 20px 44px -8px rgba(15, 23, 42, 0.26);
  border-color: rgba(147, 197, 253, 0.4);
}

.smartstack-card:hover[data-stack-pos="0"] .bento-hero-img {
  transform: scale(1.035);
}

.smartstack-card:hover[data-stack-pos="0"] .bento-hero-btn {
  background: #F8FAFC;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* SmartStack Minimalist Controls Bar */
.portal-smartstack-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.smartstack-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0F172A;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.smartstack-current {
  color: #2563EB;
}

.smartstack-divider {
  color: #CBD5E1;
  font-weight: 400;
}

.smartstack-total {
  color: #64748B;
}

.smartstack-progress-track {
  flex: 1;
  height: 3px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.smartstack-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563EB, #0284C7);
  border-radius: 3px;
  transition: width 0.05s linear;
}

.smartstack-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.smartstack-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.smartstack-nav-btn:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #2563EB;
  transform: scale(1.08);
}

.smartstack-nav-btn:active {
  transform: scale(0.94);
}

/* Bento Hero Featured Card (Besar 16:9, Sinematik) */
.portal-bento-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  background: #0B132B;
  box-shadow: 0 8px 30px -4px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.portal-bento-hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.22);
}

.bento-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.portal-bento-hero:hover .bento-hero-img {
  transform: scale(1.035);
}

.bento-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.35) 40%, rgba(15, 23, 42, 0.94) 100%);
  pointer-events: none;
}

.bento-hero-content {
  position: relative;
  z-index: 2;
  padding: 28px 28px 24px;
  color: #FFFFFF;
}

.bento-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.bento-tag-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bento-tag-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  color: #E2E8F0;
}

.bento-hero-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: #FFFFFF;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.bento-hero-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(241, 245, 249, 0.9);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.bento-hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.bento-hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #CBD5E1;
}

.bento-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.portal-bento-hero:hover .bento-hero-btn {
  background: #F8FAFC;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Bento Side Supporting Stack */
.portal-bento-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-bento-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  box-shadow: 0 2px 12px -2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-bento-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
}

.bento-item-thumb {
  width: 135px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #F1F5F9;
}

.bento-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portal-bento-item:hover .bento-item-img {
  transform: scale(1.05);
}

.bento-item-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.bento-item-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.bento-item-date {
  font-size: 11px;
  font-weight: 600;
  color: #2563EB;
  margin-bottom: 4px;
}

.bento-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748B;
  margin-top: auto;
}

/* Bento Side Column Header & Photo Showcase Cards */
.bento-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  padding: 0 4px;
}

.bento-side-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #1E3A8A;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-side-see-all-photos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #2563EB;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.btn-side-see-all-photos:hover {
  background: #EFF6FF;
  transform: translateX(2px);
}

.portal-bento-photo-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px -2px rgba(15, 23, 42, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.portal-bento-photo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.1);
}

.bento-photo-thumb {
  height: 125px;
  position: relative;
  overflow: hidden;
  background: #0F172A;
}

.bento-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-bento-photo-card:hover .bento-photo-img {
  transform: scale(1.05);
}

.bento-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.6) 100%);
  pointer-events: none;
}

.bento-photo-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.bento-photo-content {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.bento-photo-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748B;
}

.bento-photo-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-photo-action {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #2563EB;
}

/* 3. Catalog Grid Photo Album Cards (Upgraded Large 205px Aspect Ratio) */
.portal-archive-card.album-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 3px 14px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  will-change: transform, box-shadow;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  min-height: 360px !important;
}

.portal-archive-card.album-card:hover {
  transform: translateY(-4px) translateZ(0) !important;
  box-shadow: 0 18px 36px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}

.portal-archive-card.album-card .album-cover {
  height: 205px !important;
  aspect-ratio: 16 / 10 !important;
  position: relative !important;
  overflow: hidden !important;
  background: #F1F5F9 !important;
  isolation: isolate !important;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
}

.portal-archive-card.album-card .album-cover-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
  transform: translateZ(0) !important;
}

.portal-archive-card.album-card:hover .album-cover-img {
  transform: scale(1.04) translateZ(0) !important;
}

.portal-archive-card.album-card .album-cover-badge {
  position: absolute !important;
  bottom: 10px !important;
  right: 12px !important;
  top: auto !important;
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  padding: 3.5px 11px !important;
  border-radius: var(--radius-pill) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.portal-archive-card.album-card .album-cover-tag {
  position: absolute !important;
  top: 10px !important;
  left: 12px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  color: #0F172A !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  padding: 3px 10px !important;
  border-radius: var(--radius-pill) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.portal-archive-card.album-card .album-body {
  padding: 16px 18px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
}

.portal-archive-card.album-card .album-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #0F172A !important;
  margin-bottom: 8px !important;
  line-height: 1.36 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.portal-archive-card.album-card .album-desc {
  font-size: 13px !important;
  color: #475569 !important;
  line-height: 1.55 !important;
  margin-bottom: 14px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.portal-archive-card.album-card .album-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  margin-top: auto !important;
  font-size: 12px !important;
  color: #64748B !important;
}

.portal-archive-card.album-card .album-footer span:first-child {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: calc(100% - 110px) !important;
}

/* 4. Civic Trust Footer */
.portal-civic-footer {
  margin-top: 48px;
  margin-bottom: 24px;
}

.civic-footer-card {
  padding: 24px 28px;
  background: #F8FAFC;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.civic-badge-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.civic-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.civic-badge-item .icon {
  width: 15px;
  height: 15px;
  color: #2563EB;
}

.civic-footer-text {
  font-size: 12px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.5;
}

/* 5. Scroll Reveal Base Animation Helpers */
.portal-scroll-reveal {
  will-change: transform, opacity;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 6. Mobile Responsiveness Refinements (Taste Skill Standard) */
@media (max-width: 640px) {
  .portal-section-heading {
    font-size: 20px !important;
  }

  .portal-bento-hero {
    min-height: 330px !important;
  }

  .bento-hero-content {
    padding: 18px 16px 16px !important;
  }

  .bento-hero-title {
    font-size: 19px !important;
  }

  .bento-hero-footer {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .bento-hero-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .portal-bento-item {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .bento-item-thumb {
    width: 100% !important;
    height: 150px !important;
  }
}

/* ==========================================================================
/* ==========================================================================
   PRODUK HUKUM & SK KEPALA DESA (Taste Skill & App Screens Standard)
   ========================================================================== */
.badge-seq-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--radius-sm, 6px);
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  box-shadow: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.badge-seq-num:hover {
  border-color: #CBD5E1;
  background: #E2E8F0;
}

.badge-seq-sub {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  margin-top: 3px;
}

.badge-hint-auto {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  letter-spacing: 0.02em;
}

.btn-text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-text-action:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.missing-seq-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #FFFDF0;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md, 8px);
  color: #92400E;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 16px;
  box-shadow: none;
}

.missing-seq-banner .missing-seq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill, 9999px);
  background: #FEF3C7;
  color: #B45309;
  flex-shrink: 0;
}

.missing-seq-banner .missing-seq-tags {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-left: 6px;
}

.missing-seq-banner .missing-tag-btn {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  background: #FFFFFF;
  border: 1px solid #FCD34D;
  color: #B45309;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.missing-seq-banner .missing-tag-btn:hover {
  background: #FEF3C7;
  border-color: #F59E0B;
}

.tab-pill-group {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  padding: 3.5px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #E2E8F0);
  gap: 3px;
}

.tab-pill-group .tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted, #64748B);
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  white-space: nowrap;
  position: relative;
}

/* UI/UX Pro Max: Hapus pseudo-element underline agar tidak ada garis hitam di tab pill */
.tab-pill-group .tab-btn::after,
.tab-pill-group .tab-btn.active::after {
  display: none !important;
  content: none !important;
}

.tab-pill-group .tab-btn:hover {
  color: var(--text-main, #0F172A);
  background: rgba(255, 255, 255, 0.55);
}

.tab-pill-group .tab-btn.active {
  background: #FFFFFF;
  color: var(--primary, #1E40AF);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Kategori Produk Hukum (Taste Skill Palette) */
.ph-badge-cat {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.ph-badge-cat-sk {
  background: #FEF3C7;
  color: #78350F;
  border: 1px solid #FDE68A;
}

.ph-badge-cat-perdes {
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid #E2E8F0;
}

.ph-badge-cat-plan {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.ph-badge-cat-default {
  background: #F8FAFC;
  color: #334155;
  border: 1px solid #E2E8F0;
}

/* Lampiran Berkas Digital Produk Hukum */
.ph-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  white-space: nowrap;
}

.ph-file-empty {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
}

/* Toolbar Produk Hukum (Taste Skill Clean Alignment) */
.ph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
}

.ph-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}

.ph-search-wrap .form-control {
  padding-right: 64px;
  height: 36px;
  font-size: 13px;
  border-radius: 8px;
}

.ph-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ph-toolbar-actions #btn-tambah-produk-hukum {
  height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Dropdown Optgroup Styling */
select.form-control optgroup {
  font-weight: 700;
  color: var(--primary);
  background: #F8FAFC;
  padding: 6px 0;
}

select.form-control optgroup option {
  font-weight: 500;
  color: var(--text-main);
  background: #FFFFFF;
  padding: 6px 12px;
}

/* ==========================================================================
   AI ASSISTANT CHAT STUDIO (WhatsApp-Style Left-Right & UI/UX Pro Max)
   ========================================================================== */

/* AI View Active: Base Setup */
.main-wrapper.ai-view-active {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden !important;
}

.main-wrapper.ai-view-active .topbar {
  display: none !important;
}

.main-wrapper.ai-view-active #view-ai-assistant {
  height: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

#view-ai-assistant {
  height: 100vh;
  min-height: 540px;
}

/* ──────────────────────────────────────────────────────────────────────────
   1. PORTAL PUBLIK: True Fullscreen Edge-to-Edge Studio (Tanpa Sidebar)
   ────────────────────────────────────────────────────────────────────────── */
.main-wrapper.ai-portal-mode {
  margin-left: 0 !important;
}

.main-wrapper.ai-portal-mode #sidebar {
  display: none !important;
}

.main-wrapper.ai-portal-mode .content-body {
  padding: 0 !important;
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.main-wrapper.ai-portal-mode .ai-immersive-view {
  width: 100%;
  max-width: 100%;
  margin: 0;
  height: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden !important;
  background:
    radial-gradient(1100px circle at 50% 0%, rgba(224, 242, 254, 0.65) 0%, rgba(248, 250, 252, 0) 70%),
    radial-gradient(800px circle at 85% 25%, rgba(238, 242, 255, 0.5) 0%, rgba(248, 250, 252, 0) 60%),
    #F8FAFC;
}

.main-wrapper.ai-portal-mode .ai-view-topbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  border-top: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  margin-bottom: 0;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  z-index: 10;
}

.main-wrapper.ai-portal-mode .ai-chat-thread {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 24px 20px;
}

.main-wrapper.ai-portal-mode .ai-floating-input-container {
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  padding: 8px 24px 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.9) 32%, #F8FAFC 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.main-wrapper.ai-portal-mode .ai-input-bar {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.main-wrapper.ai-portal-mode .ai-input-disclaimer {
  display: none !important;
}


/* ──────────────────────────────────────────────────────────────────────────
   2. PORTAL ADMIN: Tampilan Semula (Lebar Sama Persis Seperti Halaman Lain)
   ────────────────────────────────────────────────────────────────────────── */
.main-wrapper.ai-admin-mode #sidebar {
  display: flex !important;
}

.main-wrapper.ai-admin-mode .content-body {
  padding: 16px 20px 14px !important;
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.main-wrapper.ai-admin-mode .ai-immersive-view {
  width: 100%;
  max-width: 100%;
  margin: 0;
  height: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden !important;
  background: transparent;
}

.main-wrapper.ai-admin-mode .ai-view-topbar {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  margin-bottom: 10px;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
}

.main-wrapper.ai-admin-mode .ai-chat-thread {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px 4px 16px;
}

.main-wrapper.ai-admin-mode .ai-floating-input-container {
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  padding: 6px 0 0;
  margin-top: auto;
}

.main-wrapper.ai-admin-mode .ai-input-bar {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.main-wrapper.ai-admin-mode .ai-input-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.main-wrapper.ai-admin-mode .ai-input-disclaimer {
  display: none !important;
}

/* Sembunyikan Tombol Kembali di Mode Admin karena admin punya Sidebar menu di sebelah kiri */
.main-wrapper.ai-admin-mode #btn-back-to-portal,
.main-wrapper.ai-admin-mode .ai-topbar-divider {
  display: none !important;
}

.ai-topbar-compact {
  padding: 6px 12px;
  min-height: 42px;
}

.ai-avatar-compact {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
}

.ai-topbar-title-compact {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.ai-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-ai-sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  margin-right: 4px;
}

.btn-ai-sidebar-toggle:hover {
  background: #F1F5F9;
}

@media (max-width: 992px) {
  .btn-ai-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.ai-avatar-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
  position: relative;
  flex-shrink: 0;
}

.ai-topbar-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.ai-topbar-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.ai-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: #ECFDF5;
  color: #065F46;
  transition: all var(--transition-fast);
}

.ai-status-pill.local {
  background: #EEF2FF;
  border-color: rgba(99, 102, 241, 0.25);
  color: #4338CA;
}

.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
}

.ai-status-dot.local {
  background: #6366F1;
}

/* ==========================================================================
   CHAT THREAD: Pinned Ergonomic Scrollable Viewport (UI/UX Pro Max)
   ========================================================================== */

.ai-chat-thread {
  background: transparent;
  padding: 10px 4px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(203, 213, 225, 0.6) transparent;
}

.ai-chat-thread::-webkit-scrollbar {
  width: 5px;
}

.ai-chat-thread::-webkit-scrollbar-track {
  background: transparent;
}

.ai-chat-thread::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.6);
  border-radius: 9999px;
}

.ai-chat-thread::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.85);
}

/* WhatsApp Message Rows */
.ai-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}

/* User Message (KANAN - WhatsApp Style with Royal Blue Bubble) */
.ai-chat-msg.user {
  justify-content: flex-end;
}

.ai-msg-bubble-user {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 18px 4px 18px 18px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 78%;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
  word-break: break-word;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-msg-user-content {
  font-size: 14px;
  line-height: 1.5;
  color: #FFFFFF;
}

.ai-msg-meta-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 2px;
}

.ai-msg-check {
  color: #93C5FD;
  font-weight: 700;
  letter-spacing: -1px;
}

.ai-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

/* Assistant Message (KIRI - Ergonomic Full Column with Avatar on Left) */
.ai-chat-msg.assistant {
  justify-content: flex-start;
  align-items: flex-start;
}

.ai-bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(30, 64, 175, 0.25);
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.ai-bot-status-ring {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
}

.ai-msg-bubble-assistant {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 16px 20px;
  border-radius: 4px 18px 18px 18px;
  flex: 1;
  max-width: calc(100% - 46px);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ai-msg-bubble-assistant:hover {
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ai-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-bot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
}

.ai-verified-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ECFDF5;
  color: #059669;
  font-size: 9.5px;
  font-weight: 800;
}

.ai-msg-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-main);
  word-break: break-word;
}

.ai-msg-body p {
  margin: 0 0 10px;
}

.ai-msg-body p:last-child {
  margin: 0;
}

.ai-stream-word {
  display: inline-block;
  will-change: transform, opacity, filter;
}

.ai-stream-p {
  margin: 0;
  display: inline;
}

.ai-stream-caret {
  display: inline-block;
  width: 5px;
  height: 14px;
  margin-left: 3px;
  background: var(--primary, #3B82F6);
  border-radius: 2px;
  vertical-align: middle;
  animation: aiCaretBlink 0.8s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}

@keyframes aiCaretBlink {

  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.15;
    transform: scaleY(0.75);
  }
}

.ai-citations-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 10px;
}

.ai-citations-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-citation-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all var(--transition-fast);
}

.ai-citation-card:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.ai-citation-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ai-citation-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-citation-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ai-msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid #F8FAFC;
  font-size: 11px;
  color: var(--text-light);
}

/* Typing Indicator (WhatsApp Bouncing Dots) */
.ai-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 4px 18px 18px 18px;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3B82F6;
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1.15);
    opacity: 1;
    background: #1D4ED8;
  }
}

.ai-thinking-text {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Bottom Floating Input Container */
.ai-floating-input-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0 10px;
  flex-shrink: 0;
  position: relative;
}

/* Jump to Latest Scroll Button */
.btn-scroll-bottom-ai {
  position: absolute;
  top: -38px;
  right: 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 30;
}

.btn-scroll-bottom-ai:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  transform: translateY(-2px);
}

.ai-input-bar {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 8px 10px 8px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(203, 213, 225, 0.9);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.1), 0 3px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.ai-input-bar:focus-within {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 14px 30px -4px rgba(37, 99, 235, 0.16), 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.ai-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.ai-input-field {
  width: 100%;
  padding: 8px 4px;
  border: none;
  background: transparent;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}

.ai-btn-send {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.ai-btn-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35);
}

.ai-btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-input-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: -0.01em;
  background: rgba(248, 250, 252, 0.9);
  padding: 2px 10px;
  max-width: 100%;
  width: 100%;
  margin: 0;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

/* 1-Click Document Summary Box in Modal Preview */
/* 1-Click Document Summary Box in Modal Preview */
.preview-ai-summary-card {
  margin-top: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-ai-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.preview-ai-summary-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
}

/* ==========================================================================
   SETTINGS VIEW: MODERN SEGMENTED TABS & PRO-MAX STYLES
   ========================================================================== */
.settings-tabs-nav {
  display: flex;
  gap: 4px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.settings-tabs-nav::-webkit-scrollbar {
  display: none;
}

.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.settings-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.settings-tab-btn.active {
  color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.settings-tab-btn .icon {
  width: 15px;
  height: 15px;
}

.settings-tab-pane {
  display: none;
  width: 100%;
}

.settings-tab-pane.active {
  display: block;
}

/* Password input with toggle button inside */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-control {
  padding-right: 48px;
}

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

.password-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

/* Tech Details Collapsible Accordion */
.tech-details-box {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 10px;
}

.tech-details-box summary {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  outline: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.tech-details-box summary:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.tech-details-content {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  background: #FFFFFF;
}

/* Danger Zone Card */
.danger-zone-card {
  border: 1.5px solid #FECACA;
  background: #FEF2F2;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.danger-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.danger-zone-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #991B1B;
  font-size: 15px;
  font-weight: 700;
}

/* Ensure Settings Cards Allow Floating Dropdown Popovers Without Clipping */
#view-settings {
  overflow: visible;
}

#view-settings .stat-card {
  overflow: visible !important;
}

#view-settings .settings-tab-pane {
  overflow: visible !important;
}

#view-settings .form-group {
  position: relative;
}

/* ==========================================================================
   TELEGRAM BOT INTEGRATION: UI/UX PRO MAX DESIGN SYSTEM
   ========================================================================== */
.tg-integration-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tg-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.08) 0%, rgba(34, 158, 217, 0.02) 100%);
  border: 1px solid rgba(0, 136, 204, 0.22);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.tg-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tg-hero-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #0088CC;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
  flex-shrink: 0;
}

.tg-hero-avatar .icon {
  width: 24px;
  height: 24px;
}

.tg-hero-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-hero-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.tg-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all var(--transition-fast);
}

.tg-status-pill.active {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.tg-status-pill.unconfigured {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.tg-status-pill.pending {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.tg-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.tg-status-pill.active .tg-pulse-dot {
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: tgPulse 2s infinite;
}

.tg-status-pill.unconfigured .tg-pulse-dot {
  background: #94A3B8;
}

.tg-status-pill.pending .tg-pulse-dot {
  background: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  animation: tgPulse 2s infinite;
}

@keyframes tgPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.tg-bot-profile-card {
  display: none;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tg-bot-profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-bot-profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.tg-bot-profile-handle {
  font-size: 13px;
  color: #0088CC;
  font-weight: 600;
  font-family: monospace;
}

.tg-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-height: 28px;
}

.tg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-family: monospace;
  color: #334155;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tg-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: #E2E8F0;
  color: #475569;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.5px;
}

.tg-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.tg-btn-primary {
  background: #0088CC !important;
  color: #FFFFFF !important;
  border: none !important;
  font-weight: 600 !important;
}

.tg-btn-primary:hover {
  background: #0077B5 !important;
  color: #FFFFFF !important;
}

.tg-guide-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tg-guide-tabs {
  display: flex;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.tg-guide-tabs::-webkit-scrollbar {
  display: none;
}

.tg-guide-tab-btn {
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tg-guide-tab-btn:hover {
  color: var(--text-main);
}

.tg-guide-tab-btn.active {
  color: #0088CC;
  border-bottom-color: #0088CC;
  background: #FFFFFF;
  font-weight: 700;
}

.tg-guide-content {
  padding: 16px;
}

.tg-guide-pane {
  display: none;
}

.tg-guide-pane.active {
  display: block;
}

/* ==========================================================================
   APPLE / iOS HIG DESIGN SYSTEM FOR SURAT MASUK & AI OCR
   (Squircle, Frosted Glass, Apple Intelligence Aurora, Segmented Control)
   ========================================================================== */

/* Apple-style Toolbar */
.surat-ios-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.surat-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
  flex-wrap: wrap;
}

.surat-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* iOS Pill Search Bar (Surat Masuk - Taste Skill Spacious) */
.surat-ios-search-wrap {
  position: relative;
  min-width: 240px;
  flex: 1 1 340px;
  max-width: 480px;
}

.surat-ios-search-wrap .search-icon-inside {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #8E8E93;
  pointer-events: none;
}

.surat-ios-search-input {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 36px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 13px;
  font-family: inherit;
  color: #1D1D1F;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.surat-ios-search-input:hover {
  border-color: rgba(0, 0, 0, 0.24);
}

.surat-ios-search-input:focus {
  background: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.surat-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #C7C7CC;
  color: #FFFFFF;
  border: none;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}

.surat-search-clear:hover {
  background: #8E8E93;
}

/* iOS Filter Chips */
.surat-ios-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ios-chip-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: #636366;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.ios-chip-btn:hover {
  background: #F2F2F7;
  color: #1D1D1F;
}

.ios-chip-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}

/* Year Select Dropdown Component (Surat Masuk & Galeri Foto - UI/UX Pro Max) */
.surat-year-select-wrap,
.photos-year-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.surat-year-select-wrap .icon,
.photos-year-select-wrap .icon,
.surat-year-select-wrap .icon[data-icon="calendar"],
.photos-year-select-wrap .icon[data-icon="calendar"] {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #8E8E93;
  pointer-events: none;
  z-index: 3;
}

.surat-year-select-wrap .custom-select-wrapper,
.photos-year-select-wrap .custom-select-wrapper {
  position: relative;
  display: inline-flex;
}

.surat-year-select-wrap .custom-select-trigger,
.photos-year-select-wrap .custom-select-trigger {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 14px 0 34px !important;
  border-radius: 9999px !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #1D1D1F !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  gap: 8px;
}

.surat-year-select-wrap .custom-select-trigger:hover,
.photos-year-select-wrap .custom-select-trigger:hover {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.24) !important;
}

.surat-year-select-wrap .custom-select-trigger.is-open,
.photos-year-select-wrap .custom-select-trigger.is-open {
  border-color: var(--primary, #1E40AF) !important;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15) !important;
}

.surat-year-select-wrap .custom-select-menu,
.photos-year-select-wrap .custom-select-menu {
  min-width: 160px;
  width: max-content;
  border-radius: 12px;
}

/* iOS Segmented Control */
.ios-segmented-control {
  display: inline-flex;
  align-items: center;
  background: #E5E5EA;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.ios-segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: #636366;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-segmented-btn .icon {
  width: 13px;
  height: 13px;
}

.ios-segmented-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Primary Action Button (Harmonized Village Blue) */
.btn-apple-action {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  border-radius: 9999px !important;
  padding: 8px 20px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.25) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.btn-apple-action .icon {
  color: #FFFFFF;
}

.btn-apple-action:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35) !important;
  background: var(--primary-hover) !important;
}

/* Grid Layout for Apple Squircle Cards */
.surat-ios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Apple / iOS Squircle Card */
.surat-ios-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  overflow: hidden;
}

.surat-ios-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0071E3 0%, #5856D6 50%, #AF52DE 100%);
  opacity: 0;
  transition: opacity 0.25s;
}

.surat-ios-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 113, 227, 0.25);
  box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 113, 227, 0.12);
}

.surat-ios-card:hover::before {
  opacity: 1;
}

.surat-ios-card:active {
  transform: scale(0.985);
}

/* Media Squircle Card for Arsip Foto Desa (UI/UX Pro Max) */
.surat-ios-card.doclain-card-media {
  padding: 16px;
}

.doclain-cover-wrap {
  position: relative;
  width: 100%;
  height: 168px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  margin-bottom: 12px;
  isolation: isolate;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.doclain-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.surat-ios-card:hover .doclain-cover-img {
  transform: scale(1.05);
}

.doclain-cover-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #0284C7 0%, #075985 100%);
}

.doclain-cover-wrap.has-fallback-icon .doclain-cover-fallback {
  display: flex;
}

.doclain-cover-badge-left {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.doclain-cover-badge-right {
  position: absolute;
  top: 10px;
  right: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.doclain-cover-badge-right.tag-pub {
  background: rgba(22, 101, 52, 0.85);
  color: #DCFCE7;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.doclain-cover-badge-right.tag-priv {
  background: rgba(51, 65, 85, 0.85);
  color: #F1F5F9;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.doclain-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #0369A1;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 8px;
}

/* Header bar */
.surat-card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.surat-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  color: var(--primary);
  border: 1px solid #DBEAFE;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.surat-date-text {
  font-size: 12px;
  color: #8E8E93;
  font-weight: 500;
}

/* Apple Intelligence Pill */
.ai-apple-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(88, 86, 214, 0.1), rgba(175, 82, 222, 0.1));
  border: 1px solid rgba(175, 82, 222, 0.22);
  color: #6B21A8;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.01em;
}

.ai-apple-pill .icon {
  width: 12px;
  height: 12px;
  color: #9333EA;
}

/* Title */
.surat-ios-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #1D1D1F;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Apple Island Inset Box */
.surat-ios-island {
  background: #F5F5F7;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.surat-island-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.surat-island-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8E8E93;
  font-weight: 500;
  flex-shrink: 0;
}

.surat-island-label .icon {
  width: 13px;
  height: 13px;
  color: #8E8E93;
}

.surat-island-val {
  color: #1D1D1F;
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surat-copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  color: #8E8E93;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
}

.surat-copy-btn:hover {
  background: #E5E5EA;
  color: #1D1D1F;
}

.surat-copy-btn .icon {
  width: 12px;
  height: 12px;
}

/* Footer & Buttons */
.surat-ios-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.surat-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #636366;
  font-weight: 500;
}

.surat-file-badge .icon {
  width: 13px;
  height: 13px;
  color: #EF4444;
}

.btn-ios-quicklook {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1D1D1F;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ios-quicklook:hover {
  background: #F2F2F7;
  border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-ios-quicklook .icon {
  width: 13px;
  height: 13px;
  color: #0071E3;
}

/* macOS / Apple Style Table */
.surat-ios-table-card {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.surat-ios-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.surat-ios-table thead th {
  background: #F8FAFC;
  color: var(--text-muted, #64748B);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  white-space: nowrap;
}

.surat-ios-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}

.surat-ios-table tbody tr:hover {
  background: #F9FAFB;
}

.surat-ios-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 13px;
  color: #1D1D1F;
  vertical-align: middle;
}

.surat-ios-table tbody tr:active {
  background: #F2F2F7;
}

.surat-table-title {
  font-weight: 600;
  color: #1D1D1F;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surat-table-summary {
  font-size: 11.5px;
  color: #8E8E93;
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surat-table-sender {
  font-weight: 500;
  color: #48484A;
  font-size: 12.5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.surat-table-date {
  font-size: 12px;
  color: #636366;
  white-space: nowrap;
  font-weight: 500;
}

.surat-table-docno {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #1D1D1F;
  white-space: nowrap;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .surat-ios-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .surat-toolbar-left,
  .surat-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .surat-ios-search-wrap {
    max-width: 100%;
    width: 100%;
  }

  .surat-ios-grid {
    grid-template-columns: 1fr;
  }

  .btn-apple-action {
    justify-content: center;
    flex: 1;
  }
}

/* ==========================================================================
   PHOTOS IOS HIG TOOLBAR & ALBUM TAGS (UI/UX Pro Max & Ponytail)
   ========================================================================== */
.photos-ios-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.photos-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 540px;
  min-width: 0;
  flex-wrap: nowrap;
}

.photos-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.photos-toolbar-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.photos-ios-search-wrap {
  position: relative;
  min-width: 180px;
  flex: 1 1 240px;
  max-width: 440px;
}

.photos-ios-search-wrap .search-icon-inside {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #8E8E93;
  pointer-events: none;
}

.photos-ios-search-input {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 36px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 13px;
  font-family: inherit;
  color: #1D1D1F;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.photos-ios-search-input:hover {
  border-color: rgba(0, 0, 0, 0.24);
}

.photos-ios-search-input:focus {
  background: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.photos-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #C7C7CC;
  color: #FFFFFF;
  border: none;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}

.photos-search-clear:hover {
  background: #8E8E93;
}

/* Apple Segmented Control for Photo Visibilitas Filter */
.photos-access-segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: #F1F5F9;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  flex-shrink: 0;
  gap: 2px;
}

.photos-access-segmented .ios-chip-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #64748B;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  line-height: 1.2;
}

.photos-access-segmented .ios-chip-btn:hover {
  color: var(--text-main);
}

.photos-access-segmented .ios-chip-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.photos-meta-count {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.album-cover-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.album-cover-tag.tag-public {
  background: rgba(236, 253, 245, 0.92);
  color: #065F46;
  border-color: rgba(167, 243, 208, 0.8);
}

.album-cover-tag.tag-internal {
  background: rgba(241, 245, 249, 0.92);
  color: #475569;
  border-color: rgba(203, 213, 225, 0.8);
}

.album-activity-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photos-sort-wrap select {
  height: 38px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text-main);
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.photos-sort-wrap select:focus {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.photos-toolbar-right #photos-view-segmented {
  height: 38px;
  padding: 3px;
  box-sizing: border-box;
}

.photos-toolbar-right #photos-view-segmented .ios-segmented-btn {
  height: 100%;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.photos-toolbar-right #btn-upload-photo-pack {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
}

/* Responsive Anti-Stagger Clean Tiering */
@media (max-width: 1279px) {
  .photos-ios-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .photos-toolbar-left {
    width: 100%;
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .photos-toolbar-left .photos-ios-search-wrap {
    flex: 1;
    max-width: none;
  }

  .photos-toolbar-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
  }
}

@media (max-width: 640px) {
  .photos-toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }

  .photos-toolbar-left .surat-year-select-wrap {
    width: 100%;
  }

  .photos-access-segmented {
    width: 100%;
    display: flex;
  }

  .photos-access-segmented .ios-chip-btn {
    flex: 1;
    text-align: center;
  }

  .photos-toolbar-right {
    flex-direction: column;
    align-items: stretch;
  }

  .photos-toolbar-controls-group {
    width: 100%;
    justify-content: space-between;
  }

  .photos-toolbar-right #btn-upload-photo-pack {
    width: 100%;
    justify-content: center;
  }
}

.photos-table-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-top: 6px;
}

.album-hero-actions .album-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.album-collection-header {
  margin-top: 24px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .photos-ios-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .photos-toolbar-left,
  .photos-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .photos-ios-search-wrap {
    max-width: 100%;
    width: 100%;
  }

  .album-hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .album-hero-actions .album-actions-group {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Dokumen Lainnya / Umum (Apple iOS HIG Styles) */
.badge-no-num {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-style: italic;
  color: #8E8E93;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 7px;
  border-radius: 4px;
}

.doclain-desc-snippet {
  font-size: 12.5px;
  color: #48484A;
  line-height: 1.45;
  margin-top: 6px;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doclain-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   PONYTAIL UNIFIED COMPACT TOOLBAR FOR DOKUMEN LAINNYA (Apple iOS HIG)
   ========================================================================== */
.doclain-unified-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}

.doclain-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: nowrap;
  min-width: 0;
}

.doclain-search-wrap {
  position: relative;
  min-width: 180px;
  flex: 1 1 260px;
  max-width: 320px;
}

.doclain-search-wrap .surat-ios-search-input {
  height: 38px;
  border-radius: var(--radius-md, 10px);
  font-size: 12.5px;
  padding-left: 36px;
  padding-right: 32px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E2E8F0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  width: 100%;
}

.doclain-search-wrap .surat-ios-search-input:focus {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
  background: #FFFFFF;
}

/* Monogram Tag for Dossier Cards (Taste Skill Standard) */
.doclain-monogram-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1;
}

.doclain-unified-toolbar .surat-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.doclain-unified-toolbar .ios-segmented-control {
  height: 38px;
  border-radius: var(--radius-md, 10px);
}

.doclain-unified-toolbar .btn-apple-action {
  height: 38px;
  border-radius: var(--radius-md, 10px);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 16px;
  white-space: nowrap;
}

/* ==========================================================================
   UI/UX PRO MAX APPLE HIG FILTER POPOVER SYSTEM (Dokumen Lainnya)
   ========================================================================== */
.doclain-popover-anchor {
  position: relative;
  display: inline-flex;
}

.doclain-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

.doclain-filter-btn:hover {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.24);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.doclain-filter-btn.is-open {
  background: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.doclain-filter-btn.has-active-filter {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.doclain-filter-btn.has-active-filter .doclain-filter-btn-icon {
  color: #1D4ED8;
}

.doclain-filter-btn-icon {
  width: 14px;
  height: 14px;
  color: #8E8E93;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.doclain-filter-btn-text {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doclain-chevron-icon {
  width: 12px;
  height: 12px;
  color: #8E8E93;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  margin-left: 2px;
}

.doclain-filter-btn.is-open .doclain-chevron-icon {
  transform: rotate(180deg);
  color: #0071E3;
}

/* Floating Popover Card (Glassmorphism & Depth) */
.doclain-popover-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  min-width: 250px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 8px;
  z-index: 200;
  transform-origin: top left;
  user-select: none;
}

.doclain-popover-menu-compact {
  min-width: 180px;
}

/* Popover Mini Search */
.doclain-popover-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #F1F5F9;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.doclain-popover-search:focus-within {
  background: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 0 0 2.5px rgba(0, 113, 227, 0.12);
}

.doclain-popover-search input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: #1D1D1F;
  outline: none;
  width: 100%;
}

.doclain-popover-search input::placeholder {
  color: #94A3B8;
}

/* Popover Items List */
.doclain-popover-list {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doclain-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doclain-popover-item:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.doclain-popover-item.is-selected {
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 700;
}

.doclain-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.doclain-item-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.doclain-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doclain-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.doclain-item-count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.05);
  color: #64748B;
}

.doclain-popover-item.is-selected .doclain-item-count {
  background: #DBEAFE;
  color: #1E40AF;
}

.doclain-item-check {
  width: 14px;
  height: 14px;
  color: #1D4ED8;
  flex-shrink: 0;
}

/* Quick Toggle Pill Button (Ada Berkas) */
.doclain-hasfile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border-subtle, #E2E8F0);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body, #334155);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

.doclain-hasfile-btn:hover {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.24);
  color: #1D1D1F;
}

.doclain-hasfile-btn .icon {
  width: 13px;
  height: 13px;
  color: #8E8E93;
}

.doclain-hasfile-btn:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #1D1D1F;
}

.doclain-hasfile-btn.active {
  background: #0071E3;
  color: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
}

.doclain-hasfile-btn.active .icon {
  color: #FFFFFF;
}

/* Active Filters Micro Bar */
.doclain-active-filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  margin-bottom: 18px;
}

.doclain-active-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #8E8E93;
}

.doclain-active-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.doclain-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px 3px 10px;
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  border-radius: 9999px;
  line-height: 1;
}

.doclain-active-tag-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #1E40AF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.doclain-active-tag-remove:hover {
  opacity: 1;
}

.doclain-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 4px 10px;
  border-radius: var(--radius-pill, 9999px);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
}

.doclain-reset-btn:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

@media (max-width: 1120px) {
  .doclain-unified-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .doclain-unified-toolbar .doclain-toolbar-controls {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .doclain-unified-toolbar .doclain-toolbar-controls::-webkit-scrollbar {
    display: none;
  }

  .doclain-unified-toolbar .doclain-search-wrap {
    min-width: 180px;
    flex: 1;
    max-width: none;
  }

  .doclain-unified-toolbar .surat-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   UI/UX PRO MAX EMPTY STATE STYLES (Dokumen Lainnya)
   ========================================================================== */
.doclain-empty-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 24px;
  background: var(--bg-surface, #FFFFFF);
  border-radius: 20px;
  border: 1px solid var(--border-subtle, #E2E8F0);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  margin: 4px 0 24px;
}

.doclain-empty-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  color: #7C3AED;
  border: 1px solid #DDD6FE;
  box-shadow: 0 8px 18px -4px rgba(124, 58, 237, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.doclain-empty-icon-wrap .icon {
  width: 26px;
  height: 26px;
}

.doclain-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main, #1E293B);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.doclain-empty-desc {
  font-size: 13px;
  color: var(--text-muted, #64748B);
  max-width: 460px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.doclain-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.doclain-empty-shortcuts {
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle, #F1F5F9);
  max-width: 540px;
  margin: 0 auto;
}

.empty-shortcuts-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #94A3B8);
  margin-bottom: 10px;
}

.empty-shortcuts-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-doclain-shortcut {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body, #334155);
  background: var(--bg-subtle, #F8FAFC);
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-doclain-shortcut:hover {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.12);
}

/* ==========================================================================
   BENTO TILES & WIDGETS (UI/UX PRO MAX & TASTE SKILL DOUBLE-BEZEL)
   ========================================================================== */

.bento-tile {
  background: var(--bg-surface);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-bezel-outer);
  padding: 16px 20px;
  box-shadow: var(--shadow-specular), var(--shadow-sm);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.bento-tile:hover {
  box-shadow: var(--shadow-specular), var(--shadow-md);
  border-color: rgba(148, 163, 184, 0.45);
  transform: translateY(-2px);
}

.bento-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bento-tile-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bento-tile-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.bento-tile-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.bento-pill-counter {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  background: #F1F5F9;
  color: var(--text-body);
  border-radius: var(--radius-pill);
}

/* Taste Skill: Segmented Floating Island Tabs */
.tab-filter-group.tab-filter-island {
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(226, 232, 240, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tab-filter-group.tab-filter-island .tab-btn {
  border: none;
  background: transparent;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all var(--transition-spring);
  position: relative;
  z-index: 1;
}

.tab-filter-group.tab-filter-island .tab-btn:hover {
  color: #0F172A;
}

.tab-filter-group.tab-filter-island .tab-btn.active {
  background: #FFFFFF;
  color: #1E40AF;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   NATIVE SVG DONUT CHART (Zero-Bloat / Ponytail Standard)
   ========================================================================== */

.donut-chart-wrapper {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.donut-chart-visual {
  position: relative;
  width: 124px;
  height: 124px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  width: 100%;
}

.donut-center-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.donut-center-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.2;
}

.donut-legend-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  min-width: 180px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 11.5px;
  transition: all var(--transition-spring);
}

.donut-legend-item:hover {
  background: #FFFFFF;
  border-color: var(--border-strong);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-sm);
}

.donut-legend-label-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-name {
  font-weight: 600;
  color: var(--text-body);
}

.donut-legend-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.donut-legend-count {
  font-weight: 700;
  color: var(--text-main);
}

.donut-legend-pct {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   BENTO AI QUICK CARD (Taste Skill: Iridescent Depth & Eyebrow Tag)
   ========================================================================== */

.bento-ai-quick-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FAF8FF 100%);
  border-color: #DDD6FE;
  position: relative;
  overflow: hidden;
}

/* Ambient Iridescent Aura */
.bento-ai-iridescent-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.12) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
  z-index: 0;
}

.bento-eyebrow-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6366F1;
  display: inline-block;
  margin-bottom: 2px;
}

.bento-ai-input-wrap {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #DDD6FE;
  border-radius: var(--radius-pill);
  padding: 3px 5px 3px 12px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
  transition: border-color var(--transition-fast);
  position: relative;
  z-index: 1;
}

.bento-ai-input-wrap:focus-within {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.bento-ai-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-main);
}

.bento-ai-input::placeholder {
  color: #94A3B8;
}

.btn-bento-ai-send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-spring);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-bento-ai-send:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

.btn-bento-ai-icon-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.btn-bento-ai-send:hover .btn-bento-ai-icon-circle {
  transform: translateX(1px);
}

.btn-bento-ai-send .icon {
  width: 12px;
  height: 12px;
}

.bento-ai-prompts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.ai-chip-prompt {
  font-size: 10.5px;
  font-weight: 600;
  color: #4F46E5;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ai-chip-prompt:hover {
  background: #6366F1;
  color: #FFFFFF;
}

/* ==========================================================================
   BENTO AGENDA TIMELINE LIST (Side Column)
   ========================================================================== */

.dashboard-activities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-item-tile {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.agenda-item-tile:hover {
  border-color: #DDD6FE;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.agenda-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agenda-item-date {
  font-size: 11px;
  font-weight: 700;
  color: #5B21B6;
  background: #EDE9FE;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.agenda-item-location {
  font-size: 11px;
  color: var(--text-muted);
}

.agenda-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.agenda-checklist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.agenda-check-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.agenda-check-tag.ready {
  background: #DCFCE7;
  color: #15803D;
}

.agenda-check-tag.pending {
  background: #F1F5F9;
  color: #64748B;
}

/* ==========================================================================
   SMART GOOGLE DRIVE ASSISTANT FOR LARGE FILES (>50 MB)
   ========================================================================== */
.smart-drive-assistant {
  margin: 14px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.45) 0%, rgba(239, 246, 255, 0.65) 100%);
  border: 1.5px solid #FCD34D;
  border-radius: 14px;
  box-shadow: 0 4px 14px -2px rgba(217, 119, 6, 0.08);
  animation: slideDownFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.smart-drive-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.smart-drive-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FEF3C7;
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.12);
}

.smart-drive-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.smart-drive-badge-size {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  background: #F59E0B;
  color: #FFFFFF;
  padding: 1px 7px;
  border-radius: 20px;
}

.smart-drive-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #78350F;
  margin-bottom: 14px;
}

.smart-drive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.btn-open-category-drive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #FFFFFF;
  color: #1E293B;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-open-category-drive:hover {
  background: #F8FAFC;
  border-color: #0284C7;
  color: #0284C7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
  transform: translateY(-1px);
}

.btn-open-category-drive svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.smart-drive-input-box {
  background: #FFFFFF;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.smart-drive-input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 6px;
}

.smart-drive-input-row {
  display: flex;
  gap: 8px;
}

.smart-drive-input-row input {
  flex: 1;
  font-size: 12px;
  padding: 8px 12px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.smart-drive-input-row input:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.btn-verify-drive-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-verify-drive-link:hover {
  background: #0369A1;
}

.smart-drive-success-card {
  margin-top: 10px;
  padding: 10px 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #166534;
}

.smart-drive-success-card .success-badge {
  background: #15803D;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-drive-cloud {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
  padding: 2px 7px;
  border-radius: 6px;
}

/* ==========================================================================
   UI/UX PRO MAX: AI SCAN ON-DEMAND MAGIC BAR & BUTTON
   ========================================================================== */
.ai-scan-magic-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md, 10px);
  padding: 10px 14px;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-fast, 0.2s ease);
}

.ai-scan-magic-bar.is-active {
  border-color: #C7D2FE;
  background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.ai-scan-magic-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted, #64748B);
  flex: 1;
  min-width: 0;
}

.ai-scan-magic-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-ai-scan-magic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #2563EB 100%);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-pill, 9999px);
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-ai-scan-magic:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 5px 16px rgba(79, 70, 229, 0.42);
  filter: brightness(1.08);
}

.btn-ai-scan-magic:active {
  transform: scale(0.97);
}

.btn-ai-scan-magic .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.btn-ai-scan-magic:hover .icon {
  transform: rotate(15deg) scale(1.15);
}

.btn-ai-scan-magic.btn-morph-loading {
  background: #4F46E5 !important;
  cursor: wait;
  opacity: 0.92;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.btn-ai-scan-magic.btn-morph-success {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%) !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35) !important;
}

/* ==========================================================================
   UI/UX PRO MAX: AI ACTIVITY DESCRIPTION GENERATOR (PONYTAIL STANDARD)
   ========================================================================== */
.ai-activity-form-group {
  margin-top: 14px;
}

.ai-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-activity-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ai-activity-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #2563EB 100%);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-pill, 9999px);
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-ai-activity-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.42);
  filter: brightness(1.08);
}

.btn-ai-activity-generate:active {
  transform: scale(0.97);
}

.btn-ai-activity-generate .icon {
  width: 13px;
  height: 13px;
  transition: transform 0.3s ease;
}

.btn-ai-activity-generate:hover .icon {
  transform: rotate(15deg) scale(1.15);
}

.btn-ai-activity-generate.btn-morph-loading {
  background: #4F46E5 !important;
  cursor: wait;
  opacity: 0.92;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.btn-ai-activity-generate.btn-morph-success {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%) !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35) !important;
}

.btn-ai-activity-undo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F1F5F9;
  color: var(--text-muted, #64748B);
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: var(--radius-pill, 9999px);
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-ai-activity-undo:hover {
  background: #E2E8F0;
  color: var(--text-main, #0F172A);
  border-color: #CBD5E1;
}

.btn-ai-activity-undo .icon {
  width: 12px;
  height: 12px;
}

.ai-activity-tones {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ai-tone-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  margin-right: 2px;
}

.ai-tone-chip {
  display: inline-flex;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle, #E2E8F0);
  color: var(--text-secondary, #475569);
  padding: 4px 10px;
  border-radius: var(--radius-pill, 9999px);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.ai-tone-chip:hover {
  background: #F1F5F9;
  color: var(--text-main, #0F172A);
  border-color: #CBD5E1;
}

.ai-tone-chip.active {
  background: rgba(79, 70, 229, 0.08);
  border-color: #6366F1;
  color: #4F46E5;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.12);
}

.ai-activity-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  padding: 0 2px;
  font-size: 11px;
  color: var(--text-muted, #94A3B8);
}

.ai-activity-engine-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  font-size: 11px;
}

.ai-activity-char-count {
  font-size: 11px;
  color: var(--text-muted, #94A3B8);
  margin-left: auto;
}

/* ==========================================================================
   UI/UX PRO MAX & PONYTAIL: SMARTPHONE ADAPTATION (PORTAL ADMIN & ARSIP)
   Scoping strictly within @media (max-width: 640px).
   Does NOT alter desktop / laptop view (> 640px).
   ========================================================================== */

@media (max-width: 640px) {

  /* ── 1. MODAL & DIALOG ERGONOMICS (UI/UX Pro Max) ────────────────────────── */
  .modal-backdrop {
    padding: 10px 12px !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .modal-backdrop.show {
    display: flex !important;
  }

  .modal-dialog {
    max-height: 92vh !important;
    border-radius: var(--radius-xl, 18px) !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .modal-header {
    padding: 12px 16px !important;
    gap: 8px !important;
  }

  .modal-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    max-width: calc(100% - 36px) !important;
    word-break: break-word !important;
  }

  .btn-modal-close {
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
  }

  .modal-body {
    padding: 14px 14px 16px !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-footer {
    padding: 12px 14px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .modal-footer>div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
    margin-left: 0 !important;
  }

  .wizard-footer-hints,
  .desktop-shortcut-hint {
    display: none !important;
    /* Pintasan keyboard irrelevant di ponsel */
  }

  .wizard-step-hint {
    margin-bottom: 12px !important;
    font-size: 12.5px !important;
  }

  #btn-wizard-submit,
  #btn-submit-edit-archive,
  #btn-accept-confirm-delete,
  .modal-footer .btn-primary {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    justify-content: center !important;
  }

  #btn-wizard-submit-another,
  #btn-wizard-back,
  #btn-cancel-edit-archive,
  #btn-cancel-confirm-delete,
  .modal-footer .btn-secondary {
    width: 100% !important;
    min-height: 40px !important;
    font-size: 13px !important;
    justify-content: center !important;
  }

  /* ── 2. FORM INPUTS & SINGLE-COLUMN COLLAPSE ─────────────────────────────── */
  .modal-dialog form div[style*="display: grid"],
  .modal-dialog form div[style*="grid-template-columns"],
  .wizard-split-form form>div[style*="grid"],
  #form-foto-kegiatan>div[style*="grid"],
  #form-edit-archive>div[style*="grid"],
  #form-new-activity>div[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .form-control,
  select.form-control,
  textarea.form-control,
  .custom-datepicker-input {
    font-size: 16px !important;
    /* Mencegah auto-zoom pada iOS Safari */
    min-height: 42px;
  }

  /* ── 3. WIZARD STEPPER & STEP 1 (PILIH KATEGORI) ─────────────────────────── */
  .wizard-stepper {
    gap: 6px !important;
    padding: 0 0 10px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
  }

  .wizard-step-node {
    font-size: 11px !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  .wizard-step-line {
    width: 22px !important;
    flex-shrink: 0 !important;
  }

  .wizard-selection-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .wizard-choice-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    padding: 12px 14px !important;
    gap: 12px !important;
    min-height: 54px !important;
    border-radius: var(--radius-lg, 14px) !important;
    border: 1.5px solid var(--border-subtle) !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
    width: 100% !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all var(--transition-fast) !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .wizard-choice-card:active {
    transform: scale(0.98) !important;
    background: #F8FAFC !important;
  }

  .wizard-choice-card::after {
    content: '›';
    font-size: 22px;
    font-weight: 400;
    color: var(--text-light, #94A3B8);
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 6px;
    line-height: 1;
  }

  .wizard-icon-box {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .wizard-choice-card .wizard-card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin-bottom: 2px !important;
    line-height: 1.3 !important;
  }

  .wizard-choice-card .wizard-card-desc {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  .wizard-shortcut-badge {
    display: none !important;
    /* Tidak diperlukan pada layar sentuh */
  }

  /* ── 4. STEP 2 SPLIT LAYOUT, OCR DROPZONE & QUICK CHIPS ─────────────────── */
  .wizard-split-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 14px !important;
    box-sizing: border-box !important;
  }

  .wizard-split-preview,
  .wizard-split-form,
  .wizard-split-form form {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: static !important;
  }

  .form-group {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .ocr-scan-box {
    padding: 14px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .ocr-scan-box p {
    word-break: break-word !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
  }

  .ocr-scan-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .ocr-scan-actions .btn,
  .ocr-scan-actions .btn-ai-scan-magic {
    width: 100% !important;
    justify-content: center !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
  }

  .quick-chips-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .quick-chips-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
  }

  .quick-chip {
    flex-shrink: 0 !important;
    padding: 5px 11px !important;
    font-size: 11px !important;
    border-radius: var(--radius-pill) !important;
  }

  .inline-quick-act-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .inline-quick-act-actions,
  .inline-quick-act-actions button {
    width: 100% !important;
  }

  /* ── 5. HALAMAN ARSIP: MINI METRICS, TOOLBAR, & REGISTER BANNER ─────────── */
  .grid-mini-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .mini-metric-card {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-radius: var(--radius-md, 10px) !important;
  }

  .mini-metric-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .mini-metric-icon .icon {
    width: 16px !important;
    height: 16px !important;
  }

  .mini-metric-value {
    font-size: 16px !important;
  }

  .mini-metric-label {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .table-toolbar {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .toolbar-search-wrap {
    max-width: 100% !important;
    min-width: 100% !important;
    width: 100% !important;
  }

  .toolbar-filters-wrap {
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
  }

  .toolbar-filters-wrap::-webkit-scrollbar {
    display: none;
  }

  .toolbar-filters-wrap select {
    flex-shrink: 0 !important;
    height: 36px !important;
  }

  #table-density-group {
    display: none !important;
    /* Sembunyikan toggle kerapatan desktop */
  }

  #btn-toolbar-tambah {
    flex-shrink: 0 !important;
    height: 36px !important;
  }

  /* Register Produk Hukum Header Strip */
  .register-header-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  .register-header-info {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  #btn-tambah-produk-hukum {
    width: 100% !important;
    justify-content: center !important;
    height: 42px !important;
  }

  .tab-pill-group#ph-filter-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
  }

  .tab-pill-group#ph-filter-tabs::-webkit-scrollbar {
    display: none;
  }
}

/* ==========================================================================
   DUPLICATE PREVENTION SYSTEM (UI/UX Pro Max & Ponytail)
   Live Inline Alert & Pre-Submit Duplicate Confirmation
   ========================================================================== */
.input-warning-duplicate {
  border-color: #F59E0B !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18) !important;
  background-color: #FFFDF7 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.duplicate-inline-alert {
  margin-top: 8px;
  padding: 10px 13px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: #92400E;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: dupAlertSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dup-inline-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
  color: #B45309;
}

.dup-inline-header .icon {
  width: 15px;
  height: 15px;
  color: #D97706;
  flex-shrink: 0;
}

.dup-inline-body {
  font-size: 12px;
  line-height: 1.45;
  color: #78350F;
}

.dup-inline-existing-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: #92400E;
  margin-top: 2px;
}

.dup-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.btn-dup-inline-view {
  background: #D97706;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-dup-inline-view:hover {
  background: #B45309;
  transform: translateY(-1px);
}

.btn-dup-inline-dismiss {
  background: transparent;
  color: #92400E;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dup-inline-dismiss:hover {
  background: #FEF3C7;
}

/* Modal Konfirmasi Duplikat */
.duplicate-callout-box {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 16px;
}

.dup-alert-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FEF3C7;
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dup-alert-icon-wrap .icon {
  width: 18px;
  height: 18px;
}

.dup-existing-card {
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dup-existing-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #B45309;
  letter-spacing: 0.04em;
}

.dup-existing-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.35;
}

.dup-existing-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   MODAL EXPORT LAPORAN SURAT MASUK (F4 LANDSCAPE & QR CODE)
   ui-ux-pro-max: Realistic WYSIWYG paper preview with crisp typography
   ponytail: Zero-dependency CSS print rules with @page 330mm 215mm
   ========================================================================== */
.modal-dialog.modal-f4-export {
  max-width: 1360px;
  width: 95vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.25);
}

.f4-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface, #FFFFFF);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.f4-badge-f4 {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.f4-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.f4-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.f4-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748B);
}

.f4-select {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
  background: #FFFFFF;
  color: var(--text-main, #1E293B);
  outline: none;
  cursor: pointer;
}

.f4-select:focus {
  border-color: var(--primary, #2563EB);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.f4-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
}

.f4-toggle-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary, #2563EB);
}

.f4-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow: hidden;
  background: #E2E8F0;
  min-height: 0;
}

.f4-preview-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  font-size: 12px;
  color: #166534;
  flex-shrink: 0;
}

.f4-count-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #DCFCE7;
  color: #15803D;
}

/* Viewport: simulated canvas container */
.f4-sheet-viewport {
  flex: 1;
  overflow: auto;
  padding: 24px;
  background: #475569;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
}

/* Paper: F4 Landscape Paper (aspect ratio ~ 330 : 215 = 1.535) */
.f4-sheet-paper {
  width: 100%;
  max-width: 1180px;
  min-height: 720px;
  background: #FFFFFF;
  color: #111827;
  padding: 36px 40px;
  border-radius: 4px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  font-family: 'Bookman Old Style', 'Georgia', serif, system-ui, sans-serif;
  box-sizing: border-box;
}

/* Document Header (Clean, Formal, No Kop Surat) */
.f4-doc-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111827;
}

.f4-doc-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0 0 4px 0;
  color: #111827;
  text-transform: uppercase;
}

.f4-doc-sub {
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #374151;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.f4-doc-period {
  font-size: 12px;
  font-weight: 700;
  color: #1F2937;
}

.f4-editable {
  cursor: text;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.f4-editable:hover {
  background-color: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.35);
}

.f4-editable:focus {
  background-color: rgba(37, 99, 235, 0.12);
  box-shadow: 0 0 0 2px #2563EB;
}

/* 8-Column Table */
.f4-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.f4-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.35;
  table-layout: fixed;
  background: #FFFFFF;
}

.f4-table th {
  background: #F3F4F6;
  border: 1.5px solid #111827;
  padding: 8px 6px;
  font-weight: 800;
  font-size: 10px;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.f4-table td {
  border: 1px solid #111827;
  padding: 7px 6px;
  vertical-align: top;
  word-wrap: break-word;
  word-break: break-word;
  color: #111827;
}

.f4-table tbody tr:nth-child(even) {
  background: #FAFAFA;
}

.f4-td-num {
  text-align: center;
  font-weight: 700;
  font-family: monospace;
  font-size: 11px;
}

.f4-td-date {
  text-align: center;
  font-size: 10.5px;
  white-space: nowrap;
}

.f4-td-docno {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
}

.f4-td-sender {
  font-weight: 600;
}

.f4-td-regarding {
  font-size: 11px;
}

.f4-td-regarding .f4-reg-title {
  font-weight: 700;
  margin-bottom: 2px;
  color: #111827;
}

.f4-td-regarding .f4-reg-desc {
  font-size: 10px;
  color: #4B5563;
  line-height: 1.3;
}

.f4-td-type {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
}

.f4-td-qr {
  text-align: center;
  vertical-align: middle !important;
  padding: 4px !important;
}

.f4-qr-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: #111827;
}

.f4-qr-img {
  width: 44px;
  height: 44px;
  display: block;
  image-rendering: pixelated;
  border: 1px solid #E5E7EB;
  border-radius: 3px;
  background: #FFFFFF;
}

.f4-qr-code-text {
  font-family: monospace;
  font-size: 8.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.f4-no-qr {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.f4-no-file-pill {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: #E5E7EB;
  color: #4B5563;
}

/* Document Footer (Titi Mangsa & Tanda Tangan) */
.f4-doc-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  page-break-inside: avoid;
}

.f4-sig-col {
  width: 320px;
  text-align: center;
  font-size: 11.5px;
}

.f4-sig-col.right {
  text-align: center;
}

.f4-sig-lead {
  margin: 0;
  color: #111827;
}

.f4-sig-title {
  font-weight: 700;
  margin: 2px 0 0 0;
  color: #111827;
  text-transform: uppercase;
}

.f4-sig-space {
  height: 60px;
}

.f4-sig-name {
  font-weight: 700;
  margin: 0;
  text-decoration: underline;
  color: #111827;
}

/* ==========================================================================
   @MEDIA PRINT: NATIVE F4 FOLIO LANDSCAPE EXPORT ENGINE
   ponytail: Stop at native browser print dialog, zero external bundle weight
   ========================================================================== */

/* F4 Month Divider Header Row in Agenda Table */
.f4-month-header-row {
  page-break-after: avoid !important;
  break-after: avoid !important;
}

.f4-td-month-divider {
  background: #F1F5F9 !important;
  border-top: 2px solid #111827 !important;
  border-bottom: 2px solid #111827 !important;
  border-left: 1.5px solid #111827 !important;
  border-right: 1.5px solid #111827 !important;
  padding: 6px 10px !important;
  vertical-align: middle !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.f4-month-divider-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.f4-month-badge {
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0F172A;
}

.f4-month-count {
  font-weight: 600;
  font-size: 10px;
  color: #475569;
}

@media print {
  @page {
    size: 330mm 215mm;
    /* Presisi Folio F4 Landscape */
    margin: 8mm 10mm 10mm 10mm;
  }

  html,
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    font-size: 10pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Sembunyikan SELURUH elemen aplikasi utama dan UI latar belakang */
  body>*:not(#modal-export-surat),
  #app-root,
  .app-container,
  #sidebar,
  .sidebar,
  #app-header,
  .app-header,
  #main-layout,
  .main-layout,
  #content-body,
  .content-body,
  .bottom-nav,
  #bottom-nav,
  .mobile-bottom-nav,
  #mobile-bottom-nav,
  .floating-upload-dock,
  #floating-upload-dock,
  .bulk-actions-bar,
  #bulk-actions-bar,
  .toast-container,
  .spotlight-backdrop,
  .preview-docked-card,
  #floating-action-menu,
  .modal-backdrop:not(#modal-export-surat) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
  }

  /* Sembunyikan kontrol dan notifikasi dalam modal */
  #modal-export-surat .f4-modal-header,
  #modal-export-surat .f4-preview-notice {
    display: none !important;
  }

  /* Tampilkan HANYA lembar printable kertas F4 dengan multi-page flow penuh */
  .modal-backdrop#modal-export-surat {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
  }

  .modal-dialog.modal-f4-export {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  .modal-body.f4-modal-body {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    background: transparent !important;
  }

  .f4-sheet-viewport {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .f4-sheet-paper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #FFFFFF !important;
    overflow: visible !important;
  }

  .f4-doc-header {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* KUNCI PAGINASI: f4-table-wrap WAJIB overflow: visible agar tabel bebas mengalir ke halaman 2, 3, dst */
  .f4-table-wrap {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  .f4-table {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .f4-table thead {
    display: table-header-group !important;
    /* Header kolom berulang di setiap lembar baru */
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .f4-table tbody {
    display: table-row-group !important;
  }

  .f4-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .f4-table th,
  .f4-table td {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .f4-doc-footer {
    display: flex !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 24px !important;
  }

  .f4-qr-img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .f4-editable {
    cursor: default !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
  }
}

/* Defensive fallback for active print session */
body.is-printing-f4 .mobile-bottom-nav,
body.is-printing-f4 #mobile-bottom-nav,
body.is-printing-f4 .floating-upload-dock,
body.is-printing-f4 .bulk-actions-bar,
body.is-printing-f4 .toast-container {
  display: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   FILE STACK NAVIGATOR & ATTACHMENT MANAGER (UI/UX Pro Max & Apple HIG)
   ========================================================================== */

/* 1. Dokumen Lainnya Table Enhancement */
#table-doclain tbody tr.clickable-row,
#table-produk-hukum tbody tr.clickable-row,
#table-surat-masuk tbody tr.clickable-row,
table.data-table tbody tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

#table-doclain tbody tr.clickable-row:hover,
#table-produk-hukum tbody tr.clickable-row:hover,
#table-surat-masuk tbody tr.clickable-row:hover,
table.data-table tbody tr.clickable-row:hover {
  background-color: #F8FAFC;
}

#table-doclain tbody tr.clickable-row:active,
#table-produk-hukum tbody tr.clickable-row:active,
#table-surat-masuk tbody tr.clickable-row:active,
table.data-table tbody tr.clickable-row:active {
  background-color: #F1F5F9;
}

/* 2. File Stack Navigator in Preview Sidebar */
.preview-attachments-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.preview-files-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.preview-file-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.preview-file-card-item:hover {
  background: #FFFFFF;
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.preview-file-card-item.is-active {
  background: #EFF6FF;
  border-color: #3B82F6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

.preview-file-card-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #2563EB;
  border-radius: 0 2px 2px 0;
}

.preview-file-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.preview-file-badge-ext {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.preview-file-badge-ext.ext-pdf {
  background: #FEE2E2;
  color: #DC2626;
}

.preview-file-badge-ext.ext-doc {
  background: #DBEAFE;
  color: #1D4ED8;
}

.preview-file-badge-ext.ext-xls {
  background: #DCFCE7;
  color: #166534;
}

.preview-file-badge-ext.ext-img {
  background: #F3E8FF;
  color: #7E22CE;
}

.preview-file-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.preview-file-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.preview-file-card-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-file-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.preview-file-btn-action {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  padding: 0;
}

.preview-file-btn-action:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.preview-file-btn-action.danger:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FCA5A5;
}

/* 3. Manage Files Modal Elements */
.manage-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.manage-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.manage-file-row:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.manage-file-row.is-deleting {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.5);
}

.manage-file-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.manage-staged-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.manage-staged-label-input {
  flex: 1;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  outline: none;
  background: #F8FAFC;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.manage-staged-label-input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
}

/* ==========================================================================
   BUNDEL KEGIATAN DESA & RELASI BERKAS (UI/UX Pro Max & Ponytail)
   Dossier & Linked Documents Showcase in Archive Preview Sidebar
   ========================================================================== */

.preview-dossier-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-dossier-act-card {
  background: linear-gradient(135deg, #FAF5FF 0%, #F5F3FF 100%);
  border: 1px solid #E9D5FF;
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.preview-dossier-act-card:hover {
  border-color: #C084FC;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.12);
}

.preview-dossier-act-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.preview-dossier-act-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #8B5CF6;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-dossier-act-icon .icon {
  width: 14px;
  height: 14px;
}

.preview-dossier-act-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.preview-dossier-act-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #7C3AED;
}

.preview-dossier-act-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.preview-dossier-act-date {
  font-size: 11px;
  color: var(--text-muted);
}

.preview-dossier-act-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(168, 85, 247, 0.25);
}

.btn-dossier-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 6px;
  color: #6B21A8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dossier-action:hover {
  background: #FFFFFF;
  border-color: #8B5CF6;
  color: #581C87;
  transform: translateY(-1px);
}

.btn-dossier-action.text-danger {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.25);
}

.btn-dossier-action.text-danger:hover {
  background: #FEF2F2;
  border-color: #DC2626;
  color: #991B1B;
}

.preview-dossier-rel-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-dossier-rel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 0;
}

.btn-dossier-add-rel {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  text-transform: none;
  letter-spacing: normal;
}

.btn-dossier-add-rel:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.preview-dossier-rel-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.preview-dossier-rel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: #F8FAFC;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.preview-dossier-rel-item:hover {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.preview-dossier-rel-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.dossier-item-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.preview-dossier-rel-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-dossier-rel-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.preview-dossier-empty-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.preview-dossier-unlinked-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm, 8px);
}

.preview-dossier-unlinked-info {
  display: flex;
  align-items: center;
  gap: 10px;
}





/* ==========================================================================
   KEGIATAN DESA & ARSIP UI/UX PRO MAX PONYTAIL REDESIGN
   ========================================================================== */

.activities-promax-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
  gap: 20px !important;
  margin-bottom: 30px !important;
}

@media (max-width: 768px) {
  .activities-promax-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* Bento Mini Metrics Enhancement */
.grid-mini-metrics .mini-metric-card {
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
}

.grid-mini-metrics .mini-metric-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.08);
}

.grid-mini-metrics .mini-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.grid-mini-metrics .mini-metric-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   VIEW 5: KEGIATAN DESA (TASTE SKILL & APPLE / iOS HIG STANDARD)
   ========================================================================== */

/* Quick Status Segmented Capsule (Aktif vs Terarsip) */
.activity-status-segmented {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: var(--radius-pill, 9999px);
  gap: 2px;
  height: 32px;
}

.activity-status-btn {
  border: none;
  background: transparent;
  padding: 3px 12px;
  border-radius: var(--radius-pill, 9999px);
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  height: 26px;
}

.activity-status-btn:hover {
  color: #0F172A;
}

.activity-status-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.activity-status-badge-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 6px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: #64748B;
}

.activity-status-btn.active .activity-status-badge-count {
  background: rgba(0, 113, 227, 0.12);
  color: #0071E3;
}

/* Apple Squircle Activity Card */
.activity-ios-card,
.act-promax-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.activity-ios-card:hover,
.act-promax-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.28);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

.activity-ios-card.is-archived,
.act-promax-card.is-archived {
  background: #FAFBFD;
  border-color: rgba(0, 0, 0, 0.06);
  opacity: 0.88;
}

.act-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.act-category-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.act-cat-purple {
  background: #F3E8FF;
  color: #7E22CE;
}

.act-cat-blue {
  background: #EFF6FF;
  color: #1D4ED8;
}

.act-cat-emerald {
  background: #ECFDF5;
  color: #047857;
}

.act-cat-amber {
  background: #FEF3C7;
  color: #B45309;
}

.act-status-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.act-status-live {
  background: #ECFDF5;
  color: #059669;
}

.act-status-archived {
  background: #F1F5F9;
  color: #64748B;
}

.act-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: actPulse 2s infinite;
}

@keyframes actPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.act-card-body {
  margin-bottom: 14px;
}

.act-card-title {
  font-size: 15px;
  font-weight: 750;
  color: #0F172A;
  line-height: 1.4;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.act-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748B;
}

.act-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Dossier Completeness Indicators (Signature Village Element) */
.act-completeness-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.act-comp-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.01em;
}

.act-comp-chip.is-complete {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid rgba(4, 120, 87, 0.16);
}

.act-comp-chip.is-missing {
  background: #F8FAFC;
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Attachments preview container */
.act-card-attachments {
  background: #F8FAFC;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.act-doc-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.act-doc-icon {
  width: 28px;
  height: 28px;
  background: #EFF6FF;
  color: #1D4ED8;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.act-doc-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.act-doc-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.act-doc-count {
  font-size: 10.5px;
  color: #94A3B8;
}

.act-photo-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.act-photo-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  margin-left: -8px;
  object-fit: cover;
  background: #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.act-photo-avatar:first-child {
  margin-left: 0;
}

.act-photo-counter {
  font-size: 10.5px;
  font-weight: 800;
  color: #475569;
  background: #E2E8F0;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Card Footer */
.act-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-act-open-detail {
  flex: 1;
  background: #F8FAFC;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1E293B;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-act-open-detail:hover {
  background: var(--primary, #0066CC);
  color: #FFFFFF;
  border-color: var(--primary, #0066CC);
}

.act-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-act-action-icon {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-act-action-icon:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
}

.btn-act-action-icon.text-danger:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FCA5A5;
}

/* Activity Table Typography & Alignment Refinements (Taste Skill Standard) */
#table-activities {
  table-layout: auto;
  width: 100%;
}

#table-activities thead th {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.01em;
  padding: 12px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#table-activities tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 13px;
}

#table-activities tbody tr {
  transition: background 0.15s ease;
}

#table-activities tbody tr:hover {
  background: #F8FAFC;
}

.act-id-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 650;
  color: #0071E3;
  background: #EFF6FF;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  white-space: nowrap;
  display: inline-block;
  letter-spacing: -0.01em;
}

.act-table-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-table-action-open {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #1D1D1F;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  height: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-table-action-open:hover {
  background: #0071E3;
  color: #FFFFFF;
  border-color: #0071E3;
}

/* ==========================================================================
   KABAR DESA (Evidence-Based Civic Journalism Cards - UI/UX Pro Max)
   ========================================================================== */
.kabar-desa-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kabar-desa-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.09);
}

.kabar-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0F172A;
  overflow: hidden;
}

.kabar-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kabar-desa-card:hover .kabar-card-img {
  transform: scale(1.04);
}

.kabar-topic-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 2;
}

.kabar-evidence-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  z-index: 2;
}

.kabar-card-body {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  flex: 1;
}

.kabar-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kabar-card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.kabar-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
}

.kabar-card-proofs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kabar-proof-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #EFF6FF;
  color: #1D4ED8;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.kabar-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--primary);
  transition: transform 0.15s ease;
}

.kabar-desa-card:hover .kabar-card-link {
  transform: translateX(3px);
}

/* ==========================================================================
   VIEW 1B: KABAR DESA DEDICATED EDITORIAL VIEW (Awwwards / Civic Prestige)
   ========================================================================== */
.kabar-reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}

.kabar-reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563EB 0%, #06B6D4 100%);
  transition: width 0.08s linear;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.65);
}

#view-kabar-detail {
  background: #FFFFFF;
  min-height: 100vh;
  padding-bottom: 80px;
}

.kabar-article-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.kabar-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.kabar-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.kabar-btn-back:hover {
  transform: translateX(-3px);
  border-color: rgba(37, 99, 235, 0.4);
  color: #2563EB;
  box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.12);
}

.kabar-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kabar-article-header {
  max-width: 820px;
  margin: 0 auto 36px;
}

.kabar-topic-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.kabar-pill-category {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: #1D4ED8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kabar-meta-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: #0369A1;
}

.kabar-editorial-title {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #0F172A;
  margin: 0 0 24px;
  text-wrap: balance;
}

.kabar-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.kabar-author-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kabar-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: #2563EB;
  border: 1px solid #BFDBFE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kabar-author-info {
  display: flex;
  flex-direction: column;
}

.kabar-author-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
}

.kabar-author-role {
  font-size: 11.5px;
  color: #64748B;
}

.kabar-meta-divider {
  display: none;
}

.kabar-meta-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kabar-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

/* Cinematic Hero Media */
.kabar-hero-media {
  position: relative;
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  margin-bottom: 48px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  background: #0F172A;
}

.kabar-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.kabar-hero-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #0369A1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.kabar-fallback-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
}

.kabar-hero-caption-bar {
  position: absolute;
  bottom: 14px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: #F8FAFC;
}

/* Central Reading Column (720px Golden Measure) */
.kabar-reading-column {
  max-width: 740px;
  margin: 0 auto;
}

.kabar-lead-paragraph {
  font-size: 16.5px;
  line-height: 1.82;
  font-weight: 500;
  color: #0F172A;
  margin-bottom: 28px;
  border-left: 3.5px solid #2563EB;
  padding: 12px 20px 12px 22px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 0 12px 12px 0;
  letter-spacing: -0.008em;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-wrap: pretty;
}

.kabar-article-prose {
  font-size: 15.5px;
  line-height: 1.85;
  color: #334155;
  margin-bottom: 36px;
  letter-spacing: -0.005em;
}

.kabar-article-prose p {
  margin-bottom: 24px;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-wrap: pretty;
}

/* Callout Quote Box */
.kabar-callout-card {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px 28px;
  margin: 36px 0;
  position: relative;
}

.kabar-callout-text {
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 600;
  color: #0F172A;
  font-style: italic;
  margin: 0 0 10px;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

.kabar-callout-author {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Photographic Chronicle */
.kabar-photo-section {
  margin: 40px 0;
}

.kabar-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  color: #1E3A8A;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  padding: 5px 14px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: var(--radius-pill);
}

.kabar-photo-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.kabar-photo-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #E2E8F0;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.kabar-photo-item:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 24px -4px rgba(15, 23, 42, 0.16);
}

.kabar-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kabar-photo-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  font-size: 11px;
  color: #FFFFFF;
}

/* The Evidence Vault (Akuntabilitas Dokumen) - Light, Luminous Civic Seal */
.kabar-evidence-vault {
  background: #F8FAFC;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 28px 26px;
  margin: 40px 0 32px;
  box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.05);
}

.kabar-vault-header {
  margin-bottom: 20px;
}

.kabar-vault-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: #1D4ED8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.kabar-vault-title {
  font-size: 19px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.kabar-vault-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: #64748B;
  margin: 0;
}

.kabar-vault-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kabar-vault-empty-state {
  padding: 16px 20px;
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  color: #475569;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.kabar-vault-empty-icon {
  width: 22px;
  height: 22px;
  color: #0284C7;
  flex-shrink: 0;
}

.kabar-vault-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kabar-vault-card:hover {
  background: #FFFFFF;
  border-color: #93C5FD;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.kabar-vault-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.kabar-vault-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kabar-vault-texts {
  min-width: 0;
}

.kabar-vault-doc-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kabar-vault-doc-meta {
  font-size: 12px;
  color: #64748B;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.kabar-vault-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.kabar-article-footer {
  display: flex;
  justify-content: center;
  padding-top: 32px;
  margin-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.kabar-footer-btn-back {
  padding: 10px 24px;
  font-size: 13.5px;
  font-weight: 700;
}

/* Responsif Layar Smartphone */
@media (max-width: 768px) {
  .kabar-article-container {
    padding: 20px 16px 60px;
  }

  .kabar-lead-paragraph {
    font-size: 16px;
    line-height: 1.8;
    padding: 8px 12px 8px 16px;
    margin-bottom: 22px;
  }

  .kabar-article-prose {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 28px;
  }

  .kabar-article-prose p {
    margin-bottom: 18px;
  }

  .kabar-hero-media {
    border-radius: 18px;
    margin-bottom: 28px;
  }

  .kabar-editorial-title {
    font-size: 24px;
    line-height: 1.25;
  }

  .kabar-vault-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .kabar-vault-actions {
    width: 100%;
    justify-content: flex-end;
  }
}