:root {
  color-scheme: dark;
  --notion-bg: #191919;
  --notion-card-bg: #202020;
  --notion-card-hover: #252525;
  --notion-border: rgba(255, 255, 255, 0.08);
  --notion-border-strong: rgba(255, 255, 255, 0.15);
  --notion-text: #e6e6e6;
  --notion-text-muted: #8c8c8c;
  --notion-text-faint: #5a5a5a;
  --notion-blue: #2383e2;
  --notion-blue-hover: #1d72c6;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 'Plus Jakarta Sans', Inter, sans-serif;
}

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

body.notion-theme {
  font-family: var(--font-family);
  background-color: var(--notion-bg);
  color: var(--notion-text);
  line-height: 1.5;
  min-height: 100vh;
  padding: max(24px, env(safe-area-inset-top, 24px)) max(32px, env(safe-area-inset-right, 32px)) max(60px, env(safe-area-inset-bottom, 60px)) max(32px, env(safe-area-inset-left, 32px));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  body.notion-theme {
    padding: max(12px, env(safe-area-inset-top, 12px)) max(12px, env(safe-area-inset-right, 12px)) max(50px, env(safe-area-inset-bottom, 50px)) max(12px, env(safe-area-inset-left, 12px));
  }
}

.workspace-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Workspace Title Header */
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.brand-badge-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.division-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.workspace-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
}

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

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.live-realtime-badge {
  transition: all 0.25s ease;
  user-select: none;
}

.live-pulse-dot {
  animation: liveGlow 2s ease-in-out infinite;
}

@keyframes liveGlow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 8px currentColor; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Notion Buttons */
.notion-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.notion-btn-primary {
  background: var(--notion-blue);
  color: #ffffff;
}

.notion-btn-primary:hover {
  background: var(--notion-blue-hover);
}

.notion-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--notion-text);
  border: 1px solid var(--notion-border);
}

.notion-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Tabs Bar */
.notion-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--notion-border);
  margin-bottom: 20px;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 4px;
}

.tabs-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--notion-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--notion-text);
}

.tab-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

.tab-icon {
  font-size: 0.95rem;
}

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

.icon-btn {
  background: none;
  border: none;
  color: var(--notion-text-muted);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover,
.icon-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-wrapper input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--notion-border);
  border-radius: 4px;
  color: var(--notion-text);
  padding: 4px 8px;
  font-size: 0.82rem;
  width: 140px;
}

.filter-dropdown-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--notion-border);
  border-radius: 6px;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--notion-text-muted);
}

.filter-chip select {
  color-scheme: dark;
  background: #252525;
  border: 1px solid var(--notion-border);
  border-radius: 4px;
  color: #f3f4f6;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Views Content */
.notion-view-pane {
  display: none;
  animation: fadeIn 0.15s ease-out;
}

.notion-view-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------------------------------------------- */
/* 1. TABLE VIEW (EXACT NOTION MATCH)                   */
/* ---------------------------------------------------- */
.notion-table-container {
  width: 100%;
  overflow-x: auto;
}

.notion-table-group {
  margin-bottom: 24px;
}

.notion-table-group.collapsed .notion-table,
.notion-table-group.collapsed .mobile-order-cards {
  display: none !important;
}

.group-toggle-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--notion-text-muted);
  cursor: pointer;
  user-select: none;
}

.group-toggle-header:hover {
  color: var(--notion-text);
}

.group-chevron {
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.group-chevron.collapsed {
  transform: rotate(-90deg);
}

.group-count {
  font-size: 0.75rem;
  color: var(--notion-text-faint);
  font-weight: 400;
  margin-left: 4px;
}

.notion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.notion-table th {
  border-bottom: 1px solid var(--notion-border);
  border-right: 1px solid var(--notion-border);
  padding: 7px 10px;
  font-weight: 500;
  color: var(--notion-text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.notion-table th:last-child {
  border-right: none;
}

.notion-table td {
  border-bottom: 1px solid var(--notion-border);
  border-right: 1px solid var(--notion-border);
  padding: 8px 10px;
  vertical-align: middle;
  color: var(--notion-text);
}

.notion-table td:last-child {
  border-right: none;
}

.notion-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.table-row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
}

.table-row-title:hover {
  text-decoration: underline;
}

.row-icon {
  font-size: 0.9rem;
  color: var(--notion-text-muted);
}

.table-thumb-mini {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--notion-border);
  vertical-align: middle;
  margin-right: 4px;
}

/* ---------------------------------------------------- */
/* 2. BOARD VIEW (KANBAN)                               */
/* ---------------------------------------------------- */
.notion-board-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 20px;
}

.board-column {
  flex: 0 0 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 8px;
  transition: background 0.15s ease, outline 0.15s ease;
  padding: 6px;
}

.board-column.board-drop-hover {
  background: rgba(59, 130, 246, 0.1) !important;
  outline: 2px dashed #3b82f6;
  outline-offset: -2px;
}

.board-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.board-group-toggle {
  display: inline-flex;
  background: var(--notion-hover);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--notion-border);
  gap: 2px;
}

.board-mode-btn {
  background: transparent;
  border: none;
  color: var(--notion-text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.board-mode-btn:hover {
  color: var(--notion-text);
}

.board-mode-btn.active {
  background: var(--notion-bg);
  color: var(--notion-text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.board-category-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 4px;
  width: fit-content;
}

.board-category-tag.cat-todo {
  background: rgba(156, 163, 175, 0.18);
  color: #9ca3af;
}

.board-category-tag.cat-inprogress {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.board-category-tag.cat-complete {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.board-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.board-header-badge.badge-gray { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }
.board-header-badge.badge-default { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }
.board-header-badge.badge-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.board-header-badge.badge-orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.board-header-badge.badge-yellow { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.board-header-badge.badge-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.board-header-badge.badge-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.board-header-badge.badge-pink { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.board-header-badge.badge-red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.board-header-badge.badge-brown { background: rgba(180, 83, 9, 0.15); color: #fbbf24; }

.board-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 50px;
}

.board-card {
  background: var(--notion-card-bg);
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board-card:active {
  cursor: grabbing;
}

.board-card.board-card-dragging {
  opacity: 0.35;
  transform: scale(0.96);
  border-style: dashed;
}

.board-card:hover {
  background: var(--notion-card-hover);
  border-color: var(--notion-border-strong);
  transform: translateY(-2px);
}

.board-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

/* ---------------------------------------------------- */
/* 3. GALLERY VIEW                                      */
/* ---------------------------------------------------- */
.notion-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-card {
  background: var(--notion-card-bg);
  border: 1px solid var(--notion-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  border-color: var(--notion-border-strong);
  transform: translateY(-3px);
}

.gallery-cover {
  width: 100%;
  height: 140px;
  background-color: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--notion-border);
}

.gallery-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1e1e1e;
}

.gallery-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.gallery-card-props {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------------------------------------------------- */
/* 4. BULANAN VIEW (MONTHLY CALENDAR)                   */
/* ---------------------------------------------------- */
.calendar-view-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.calendar-month-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.calendar-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--notion-border);
  border-left: 1px solid var(--notion-border);
}

.calendar-day-header {
  border-right: 1px solid var(--notion-border);
  border-bottom: 1px solid var(--notion-border);
  padding: 8px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--notion-text-muted);
  font-weight: 500;
}

.calendar-cell {
  border-right: 1px solid var(--notion-border);
  border-bottom: 1px solid var(--notion-border);
  min-height: 110px;
  max-height: 185px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s ease;
}

.calendar-cell::-webkit-scrollbar {
  width: 4px;
}

.calendar-cell::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-cell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.calendar-cell::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.calendar-cell:hover {
  background: rgba(255, 255, 255, 0.02);
}

.calendar-cell.other-month {
  opacity: 0.35;
}

.calendar-date-number {
  font-size: 0.8rem;
  color: var(--notion-text-muted);
  align-self: flex-end;
  margin-bottom: 2px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: transparent;
}

.calendar-date-number.is-today {
  background: #eb5757;
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.calendar-event-pill {
  background: #252525;
  border: 1px solid var(--notion-border);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-event-pill:hover {
  background: #2f2f2f;
}

.calendar-event-pill.pill-green { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.3); }
.calendar-event-pill.pill-blue { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.3); }
.calendar-event-pill.pill-yellow { background: rgba(234, 179, 8, 0.2); border-color: rgba(234, 179, 8, 0.3); }
.calendar-event-pill.pill-orange { background: rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.3); }

.calendar-event-pill .card-comment-pill {
  padding: 1px 4px;
  font-size: 0.65rem;
  line-height: 1;
  border-radius: 3px;
}

.cal-cdr-icon {
  font-size: 0.72rem;
  text-decoration: none;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.cal-cdr-icon:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* ---------------------------------------------------- */
/* 5. MINGGUAN VIEW (WEEKLY CALENDAR)                   */
/* ---------------------------------------------------- */
.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--notion-border);
  border-left: 1px solid var(--notion-border);
  min-height: 480px;
}

.weekly-col {
  border-right: 1px solid var(--notion-border);
  border-bottom: 1px solid var(--notion-border);
  display: flex;
  flex-direction: column;
}

.weekly-col-header {
  padding: 8px;
  border-bottom: 1px solid var(--notion-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--notion-text-muted);
}

.weekly-col-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.weekly-card {
  background: var(--notion-card-bg);
  border: 1px solid var(--notion-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weekly-card:hover {
  background: var(--notion-card-hover);
  border-color: var(--notion-border-strong);
}

/* Calendar Drag & Drop Styling */
.calendar-event-pill[draggable="true"],
.weekly-card[draggable="true"] {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.calendar-event-pill[draggable="true"]:active,
.weekly-card[draggable="true"]:active {
  cursor: grabbing;
}

.calendar-event-pill.is-dragging,
.weekly-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.96);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  border: 1px dashed var(--notion-blue) !important;
}

.calendar-cell.cal-drop-hover {
  background: rgba(35, 131, 226, 0.18) !important;
  outline: 2px dashed var(--notion-blue);
  outline-offset: -2px;
  box-shadow: inset 0 0 14px rgba(35, 131, 226, 0.25);
}

.weekly-col.cal-drop-hover,
.weekly-col-body.cal-drop-hover {
  background: rgba(35, 131, 226, 0.12) !important;
  outline: 2px dashed var(--notion-blue);
  outline-offset: -2px;
}

.mmg-day-cell.cal-drop-hover {
  background: rgba(35, 131, 226, 0.28) !important;
  outline: 2px dashed var(--notion-blue);
}

/* ---------------------------------------------------- */
/* 6. LIST VIEW                                         */
/* ---------------------------------------------------- */
.notion-list-view {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--notion-border);
}

.notion-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--notion-border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.notion-list-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notion-list-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notion-list-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pills & Badges */
.notion-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.notion-pill.pill-pink { background: #5b2f3e; color: #f4a7c1; }
.notion-pill.pill-blue { background: #28456c; color: #92bfea; }
.notion-pill.pill-green { background: #2b593f; color: #8fd4ad; }
.notion-pill.pill-yellow { background: #635028; color: #f0cf78; }
.notion-pill.pill-orange { background: #6c3f25; color: #f0a778; }
.notion-pill.pill-brown { background: #493b33; color: #c9b4a6; }
.notion-pill.pill-purple { background: #492f64; color: #cca4e3; }
.notion-pill.pill-gray { background: #37352f; color: #9b9a97; }
.notion-pill.pill-default { background: #37352f; color: #e5e5e5; }

/* Status Pills for Checkbox Lists */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.status-pill.status-pink { background: #5b2f3e; color: #f4a7c1; }
.status-pill.status-blue { background: #28456c; color: #92bfea; }
.status-pill.status-green { background: #2b593f; color: #8fd4ad; }
.status-pill.status-yellow { background: #635028; color: #f0cf78; }
.status-pill.status-orange { background: #6c3f25; color: #f0a778; }
.status-pill.status-brown { background: #493b33; color: #c9b4a6; }
.status-pill.status-purple { background: #492f64; color: #cca4e3; }
.status-pill.status-gray { background: #37352f; color: #9b9a97; }
.status-pill.status-default { background: #37352f; color: #e5e5e5; }

/* Modal & Form Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 20px;
}

.modal-dialog {
  background: #202020;
  border: 1px solid var(--notion-border-strong);
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-form-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--notion-border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-header p {
  font-size: 0.78rem;
  color: var(--notion-text-muted);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--notion-text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--notion-border);
  background: #191919;
  flex-shrink: 0;
  z-index: 10;
}

.styled-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--notion-text-muted);
}

.required { color: #ef4444; }

input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--notion-border);
  border-radius: 6px;
  color: var(--notion-text);
  font-family: inherit;
  font-size: 0.85rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--notion-blue);
  background: rgba(255, 255, 255, 0.08);
}

select {
  color-scheme: dark;
  background-color: #242424;
  color: #f3f4f6;
  cursor: pointer;
}

select option {
  background-color: #202020 !important;
  color: #f3f4f6 !important;
  padding: 10px 14px;
}

select option:checked {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

select option:hover,
select option:focus {
  background-color: #2e2e2e !important;
  color: #ffffff !important;
}

/* Combobox */
.notion-combobox { position: relative; width: 100%; }
.notion-input-wrapper { position: relative; display: flex; align-items: center; }
.notion-input-wrapper input { padding-right: 30px; }
.combobox-arrow { position: absolute; right: 10px; color: var(--notion-text-muted); font-size: 0.75rem; pointer-events: none; }
.notion-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #252525;
  border: 1px solid var(--notion-border-strong);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
  overflow: hidden;
}
.notion-dropdown-header { font-size: 0.72rem; color: #8c8c8c; padding: 6px 10px; }
.notion-dropdown-list { max-height: 160px; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.notion-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.notion-dropdown-item:hover { background: rgba(255,255,255,0.08); }
.item-handle { color: #555; font-size: 0.75rem; letter-spacing: -2px; }
.notion-create-option { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 4px; border-radius: 4px; cursor: pointer; background: rgba(255,255,255,0.04); }
.notion-create-option:hover { background: rgba(255,255,255,0.1); }
#pelangganCreateBadge, #typeCreateBadge { background: #733c3c; color: #fca5a5; }
#tagCreateBadge { background: #2b593f; color: #8fd4ad; }

/* Multi-Select Combobox (Tag) */
.notion-multi-input-wrapper {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--notion-border);
  border-radius: 6px;
  padding: 4px 28px 4px 6px;
  min-height: 38px;
  cursor: text;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.notion-multi-input-wrapper:focus-within {
  outline: none;
  border-color: var(--notion-blue);
  background: rgba(255, 255, 255, 0.08);
}

.notion-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.notion-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.notion-tag-chip .btn-remove-tag {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 2px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.notion-tag-chip .btn-remove-tag:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
}

.notion-multi-input-wrapper input {
  flex: 1 1 60px;
  min-width: 50px;
  border: none !important;
  background: transparent !important;
  padding: 2px 4px !important;
  font-size: 0.85rem;
  color: var(--notion-text);
  outline: none !important;
  box-shadow: none !important;
}

.notion-dropdown-item.selected {
  background: rgba(255, 255, 255, 0.06);
}

.notion-dropdown-item .item-check {
  margin-left: auto;
  color: #34d399;
  font-size: 0.85rem;
  font-weight: bold;
}

/* Existing Files Preview in Modal */
.existing-files-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.existing-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--notion-text-muted);
}

.existing-files-count {
  font-size: 0.72rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

.existing-files-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.existing-files-grid::-webkit-scrollbar {
  height: 4px;
}

.existing-files-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.existing-file-card {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 6px;
  border: 1px solid var(--notion-border);
  background: #252525;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.existing-file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.existing-file-card:hover .existing-file-thumb {
  transform: scale(1.08);
}

.existing-file-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.existing-file-card:hover .existing-file-overlay {
  opacity: 1;
}

.btn-file-action {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-file-action:hover {
  background: rgba(255, 255, 255, 0.35);
}

.existing-file-card.is-cover {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.cover-badge-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(0, 0, 0, 0.82);
  color: #fbbf24;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-file-action.btn-set-cover {
  color: #fbbf24;
}

.btn-file-action.btn-set-cover:hover {
  background: #f59e0b;
  color: #000;
}

.btn-file-action.btn-nav-order {
  font-size: 0.65rem;
}

.badge-cover-sm {
  font-size: 0.65rem;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 600;
}

.btn-set-cover-selected {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-set-cover-selected:hover {
  background: #f59e0b;
  color: #000;
}

.multi-file-item.is-cover-upload {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.04);
}

/* ==========================================
   NOTION COMMENTS & DISCUSSION
   ========================================== */
.comments-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--notion-border);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comments-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.comments-count-badge {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 0.72rem;
  color: var(--notion-text-muted);
}

.btn-refresh-comments {
  background: none;
  border: 1px solid transparent;
  color: var(--notion-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-refresh-comments:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: var(--notion-border);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}

.comments-empty {
  font-size: 0.82rem;
  color: var(--notion-text-faint);
  font-style: italic;
  padding: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border: 1px dashed var(--notion-border);
}

.comment-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  padding: 8px 12px;
  transition: background 0.15s ease;
}

.comment-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.75rem;
}

.comment-user {
  font-weight: 600;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-user-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.comment-time {
  color: var(--notion-text-faint);
  font-size: 0.7rem;
}

.comment-text {
  font-size: 0.85rem;
  color: var(--notion-text);
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-input-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  padding: 8px 12px;
}

.comment-author-badge {
  font-size: 0.72rem;
  color: var(--notion-text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-author-badge .author-dot {
  color: #22c55e;
  font-size: 0.8rem;
}

.comment-form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  resize: vertical;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  padding: 0;
}

.btn-send-comment {
  align-self: flex-end;
  padding: 5px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
  font-weight: 600;
}

.btn-file-action.btn-remove-existing:hover {
  background: #ef4444;
}

/* Dropzone */
.label-with-count { display: flex; justify-content: space-between; align-items: center; }
.file-count-badge { font-size: 0.72rem; color: var(--notion-blue); background: rgba(35, 131, 226, 0.15); padding: 1px 6px; border-radius: 4px; }
.file-upload-container { display: flex; flex-direction: column; gap: 6px; }
.dropzone {
  border: 1px dashed var(--notion-border-strong);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
}
.dropzone:hover { border-color: var(--notion-blue); background: rgba(35, 131, 226, 0.05); }
.dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--notion-text-muted); }
.dropzone-content svg { color: var(--notion-blue); }
.dropzone-content p { font-size: 0.8rem; color: var(--notion-text); }
.dropzone-content span { font-size: 0.72rem; color: var(--notion-text-muted); }
.multi-file-preview { display: flex; flex-direction: column; gap: 4px; max-height: 140px; overflow-y: auto; }
.multi-file-item { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); padding: 4px 8px; border-radius: 4px; }
.multi-file-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.multi-file-info { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.multi-file-name { font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-file-size { font-size: 0.68rem; color: var(--notion-text-muted); }
.btn-remove-item { background: none; border: none; color: var(--notion-text-muted); font-size: 1.1rem; cursor: pointer; padding: 2px 6px; }
.btn-remove-item:hover { color: #ef4444; }
.url-input-toggle input { font-size: 0.78rem; padding: 6px 10px; }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 2000; }
.toast { padding: 10px 14px; border-radius: 6px; font-size: 0.82rem; font-weight: 500; background: #252525; color: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 8px; border-left: 3px solid var(--notion-blue); }
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }

.spinner { animation: rotate 1.5s linear infinite; width: 14px; height: 14px; }
.spinner .path { stroke: white; stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.modal-dialog-lg { max-width: 760px; }
.settings-modal-body {
  padding: 18px 24px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.settings-modal-body::-webkit-scrollbar {
  width: 6px;
}
.settings-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.settings-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
.settings-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--notion-border); margin-bottom: 20px; }
.settings-tab-btn { background: none; border: none; padding: 10px 16px; font-size: 0.85rem; font-weight: 500; color: var(--notion-text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s ease; border-radius: 4px 4px 0 0; }
.settings-tab-btn:hover { color: var(--notion-text); background: rgba(255,255,255,0.02); }
.settings-tab-btn.active { color: var(--notion-blue); border-bottom-color: var(--notion-blue); font-weight: 600; }
.settings-tab-content { display: none; animation: fadeIn 0.2s ease; }
.settings-tab-content.active { display: block; }

.wa-status-card { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--notion-border); border-radius: 8px; padding: 18px; }
.wa-status-header { display: flex; justify-content: space-between; align-items: center; }
.wa-status-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; }
.wa-actions { display: flex; gap: 8px; }
.wa-status-alert { margin-top: 14px; padding: 10px 14px; border-radius: 6px; font-size: 0.8rem; line-height: 1.5; display: flex; align-items: flex-start; gap: 10px; }
.wa-status-alert.info { background: rgba(35, 131, 226, 0.1); border: 1px solid rgba(35, 131, 226, 0.25); color: #93c5fd; }
.wa-status-alert.warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.25); color: #fcd34d; }
.wa-status-alert.error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }

.wa-qr-box { display: flex; gap: 24px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--notion-border); }
.qr-image-wrapper { background: #ffffff; padding: 12px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.qr-image-wrapper img { width: 180px; height: 180px; display: block; }
.qr-instructions { flex: 1; }
.qr-instructions h4 { font-size: 0.88rem; margin-bottom: 10px; color: #ffffff; }
.qr-instructions ol { margin-left: 18px; font-size: 0.8rem; color: var(--notion-text-muted); line-height: 1.6; }
.qr-instructions ol li { margin-bottom: 4px; }
.qr-note { font-size: 0.74rem; color: #f59e0b; margin-top: 10px; font-style: italic; }

.wa-connected-box { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--notion-border); }
.connected-icon { font-size: 2.2rem; }
.connected-info h4 { font-size: 0.92rem; color: #10b981; margin-bottom: 4px; font-weight: 600; }
.connected-info p { font-size: 0.82rem; color: var(--notion-text); margin-bottom: 2px; }
.connected-info small { font-size: 0.75rem; color: var(--notion-text-muted); }

.input-with-button { display: flex; gap: 8px; margin-top: 6px; }
.input-with-button input { flex: 1; }
.field-hint { font-size: 0.75rem; color: var(--notion-text-muted); margin-top: 6px; display: block; line-height: 1.4; }

.test-message-box { display: flex; justify-content: space-between; align-items: center; background: rgba(35, 131, 226, 0.05); border: 1px solid rgba(35, 131, 226, 0.2); border-radius: 8px; padding: 14px 18px; margin-top: 20px; }
.test-message-info strong { font-size: 0.85rem; color: #ffffff; display: block; margin-bottom: 2px; }
.test-message-info p { font-size: 0.78rem; color: var(--notion-text-muted); margin: 0; }

.section-desc { font-size: 0.82rem; color: var(--notion-text-muted); margin-bottom: 16px; }
.filter-options-group { margin-bottom: 20px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.85rem; color: var(--notion-text); user-select: none; }
.checkbox-label.highlight { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--notion-border); border-radius: 6px; padding: 12px 14px; }
.checkbox-label.highlight strong { display: block; font-size: 0.85rem; color: #ffffff; margin-bottom: 2px; }
.checkbox-label.highlight span { font-size: 0.78rem; color: var(--notion-text-muted); }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--notion-blue); cursor: pointer; }

.filter-section-title { display: block; font-size: 0.82rem; font-weight: 600; color: #ffffff; margin-bottom: 12px; }
.status-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

.instructions-card { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--notion-border); border-radius: 8px; padding: 16px; margin-top: 16px; }
.instructions-card h4 { font-size: 0.88rem; color: #ffffff; margin-bottom: 10px; }
.step-list { margin-left: 20px; font-size: 0.8rem; color: var(--notion-text-muted); line-height: 1.7; }
.step-list ul { margin-left: 16px; margin-top: 4px; margin-bottom: 4px; }

.webhook-logs-section { margin-top: 24px; }
.logs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.logs-header h4 { font-size: 0.85rem; color: #ffffff; }
.logs-container { background: #141414; border: 1px solid var(--notion-border); border-radius: 6px; max-height: 200px; overflow-y: auto; padding: 8px; font-size: 0.78rem; }
.empty-logs { color: var(--notion-text-faint); text-align: center; padding: 16px; font-style: italic; }
.log-entry { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); display: flex; justify-content: space-between; align-items: center; }
.log-entry:last-child { border-bottom: none; }
.log-main { display: flex; flex-direction: column; gap: 2px; }
.log-title { font-weight: 500; color: #ffffff; }
.log-desc { font-size: 0.72rem; color: var(--notion-text-muted); }
.log-meta { display: flex; align-items: center; gap: 8px; }
.log-tag { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }
.log-tag.success { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.log-tag.skipped { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }
.log-tag.failed { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.log-time { font-size: 0.7rem; color: var(--notion-text-faint); }

.notion-btn-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.notion-btn-danger:hover { background: #ef4444; color: #ffffff; }

.notion-btn-wa {
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
.notion-btn-wa:hover {
  background: #25D366;
  color: #ffffff;
}
.notion-btn-wa.hidden {
  display: none !important;
}

.btn-delete-item {
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-delete-item.hidden {
  display: none !important;
}

.moc-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-card-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25D366;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-card-wa:active {
  transform: scale(0.92);
  background: #25D366;
  color: #ffffff;
}

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

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes slideUpDrawer {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* PWA Offline Banner */
.offline-banner {
  background: #b45309;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 1500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease;
}
.offline-icon { font-size: 1rem; }

/* PWA Install Button */
.notion-btn-install {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.notion-btn-install:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000000;
}

/* ==========================================
   RESPONSIVE DESIGN: TABLET & MOBILE
   ========================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .workspace-title {
    font-size: 1.6rem;
  }
  .modal-dialog {
    max-width: 90vw;
  }
  .modal-dialog-lg {
    max-width: 92vw;
  }
  .notion-tabs-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .notion-tabs-bar::-webkit-scrollbar {
    display: none;
  }
}

/* Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
  }
  .header-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }
  .header-right .status-indicator {
    order: 3;
    font-size: 0.72rem;
  }
  .header-right #btnInstallPwa {
    order: 1;
  }
  .header-right #btnOpenSettingsModal {
    order: 2;
  }
  .header-right #btnOpenCreateModal {
    order: 0;
    margin-left: auto;
  }

  .notion-tabs-bar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 6px;
  }
  .tabs-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
  }
  .tab-item {
    padding: 6px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .toolbar-controls {
    flex-shrink: 0;
  }

  /* Form & Modals in Mobile */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
}

/* Mobile Phone Specialization: Bottom Sheet Drawer (max-width: 640px) */
@media (max-width: 640px) {
  .workspace-title {
    font-size: 1.4rem;
  }
  .header-app-logo {
    height: 40px !important;
  }

  /* Modal becomes Bottom Sheet Drawer */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-dialog,
  .modal-dialog-lg {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    margin: 0;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    animation: slideUpDrawer 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 16px 18px 12px;
    position: sticky;
    top: 0;
    background: var(--notion-card-bg);
    z-index: 10;
    border-bottom: 1px solid var(--notion-border);
  }
  .modal-header h2 {
    font-size: 1.1rem;
  }

  .modal-body,
  .settings-modal-body {
    padding: 14px 18px 24px;
    max-height: calc(92vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--notion-card-bg);
    padding: 12px 18px max(14px, env(safe-area-inset-bottom, 14px));
    border-top: 1px solid var(--notion-border);
    z-index: 10;
  }

  /* Touch-Friendly Inputs */
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  select,
  textarea,
  .notion-btn {
    min-height: 42px;
    font-size: 0.9rem;
  }

  /* Settings Sub-Tabs in Mobile */
  .settings-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
  }
  .settings-tabs::-webkit-scrollbar {
    display: none;
  }
  .settings-tab-btn {
    padding: 8px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  /* QR Box in Mobile */
  .wa-qr-box {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .qr-image-wrapper img {
    width: 160px;
    height: 160px;
  }
  .qr-instructions {
    text-align: left;
  }

  /* Status Checklist Grid in Mobile */
  .status-checkbox-grid {
    grid-template-columns: 1fr;
  }

  /* Test Message Box in Mobile */
  .test-message-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .test-message-box button {
    width: 100%;
    justify-content: center;
  }

  /* Input with button in Mobile */
  .input-with-button {
    flex-direction: column;
    gap: 6px;
  }
  .input-with-button button {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   MOBILE-FIRST DEDICATED COMPONENTS
   ========================================== */

/* Floating Action Button (FAB) */
.mobile-fab {
  display: none;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

/* Mobile Order Cards */
.mobile-order-cards {
  display: none;
}

.mobile-calendar-view {
  display: none;
}

/* Mobile Styling Rules (max-width: 640px) */
@media (max-width: 640px) {
  body.notion-theme {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 12px));
  }

  /* Mobile Modal Enhancements (Bottom Sheet Style & Sticky Footer) */
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
    z-index: 1500 !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 92vh !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85) !important;
    animation: slideUpMobile 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .modal-header {
    padding: 14px 18px !important;
  }

  .modal-body {
    padding: 16px 18px 24px !important;
  }

  .modal-footer {
    padding: 12px 16px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 12px)) !important;
    background: #181818 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    gap: 10px !important;
  }

  .modal-footer .notion-btn {
    flex: 1 !important;
    min-height: 44px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    justify-content: center !important;
  }

  .modal-footer .btn-delete-item {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin-right: 0 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 8px !important;
  }

  .modal-footer .btn-delete-item.hidden {
    display: none !important;
  }

  .modal-footer .btn-delete-item .delete-label {
    display: none !important;
  }

  .modal-footer .btn-delete-item svg {
    width: 20px;
    height: 20px;
  }

  .modal-footer .notion-btn-wa {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin-right: 0 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 8px !important;
  }

  .modal-footer .notion-btn-wa.hidden {
    display: none !important;
  }

  .modal-footer .notion-btn-wa .wa-label {
    display: none !important;
  }

  .modal-footer .notion-btn-wa svg {
    width: 20px;
    height: 20px;
  }

  .workspace-container {
    padding: 10px 14px;
  }

  /* Compact Mobile Header */
  .workspace-header {
    margin-bottom: 10px;
    gap: 8px;
  }
  .header-left {
    gap: 10px;
  }
  .workspace-icon {
    font-size: 1.8rem;
  }
  .workspace-title {
    font-size: 1.3rem;
  }
  .workspace-desc {
    display: none; /* Sembunyikan subjudul di mobile agar header ringkas */
  }

  .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
  .header-right #btnOpenCreateModal {
    display: none; /* Digantikan oleh Mobile FAB */
  }
  .header-right .status-indicator {
    display: none; /* Hemat ruang di top bar */
  }
  .header-right #btnInstallPwa {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .header-right #btnOpenSettingsModal {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  /* Sembunyikan Tabs Desktop di Mobile (Digantikan Bottom Nav) */
  .notion-tabs-bar {
    display: none !important;
  }

  /* Mobile Floating Action Button (FAB) */
  .mobile-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: calc(68px + env(safe-area-inset-bottom, 10px));
    right: 18px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #111827;
    border: none;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
    z-index: 999;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .mobile-fab:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: rgba(22, 22, 22, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #888888;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item.active {
    color: #f59e0b;
  }

  .mobile-nav-icon {
    font-size: 1.15rem;
    line-height: 1.2;
    transition: transform 0.15s ease;
  }

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

  .mobile-nav-label {
    font-size: 0.68rem;
    font-weight: 500;
    margin-top: 2px;
  }

  /* Mobile Order Cards (Pengganti Tabel) */
  .notion-table,
  .notion-table-wrapper table {
    display: none !important;
  }

  .mobile-order-cards {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .mobile-order-card {
    background: var(--notion-card-bg);
    border: 1px solid var(--notion-border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-order-card:active {
    background: var(--notion-card-hover);
    border-color: var(--notion-border-strong);
    transform: scale(0.99);
  }

  .moc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .moc-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.35;
    flex: 1;
  }

  .moc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .moc-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--notion-text-muted);
    border: 1px solid var(--notion-border);
  }

  .moc-tag.date {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
  }

  .moc-tag.qty {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
  }

  .moc-tag.pic {
    color: #c084fc;
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.25);
  }

  .moc-thumb {
    margin-top: 6px;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #141414;
    border: 1px solid var(--notion-border);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .moc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  /* Mobile Calendar: Sembunyikan Grid Desktop 7 Kolom */
  .desktop-calendar-grid,
  .desktop-weekly-grid {
    display: none !important;
  }

  /* Mobile Calendar: Tampilkan Agenda View */
  .mobile-calendar-view {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  /* Mobile Calendar Mode Switcher (Bulanan vs Mingguan) */
  .mobile-cal-toggle {
    display: flex;
    background: #1e1e1e;
    border: 1px solid var(--notion-border);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
    margin-bottom: 4px;
  }
  .mobile-cal-toggle-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.78rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--notion-text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .mobile-cal-toggle-btn.active {
    background: #2a2a2a;
    color: #f59e0b;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  }

  /* Compact 7-Column Month Grid for Mobile */
  .mobile-month-grid {
    background: var(--notion-card-bg);
    border: 1px solid var(--notion-border);
    border-radius: 14px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mmg-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--notion-text-muted);
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .mmg-day-header {
    padding: 2px 0;
  }
  .mmg-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .mmg-day-cell {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mmg-day-cell:active {
    background: rgba(255, 255, 255, 0.08);
  }
  .mmg-day-cell.other-month .mmg-num {
    color: #4b5563;
  }
  .mmg-num {
    font-size: 0.82rem;
    font-weight: 500;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mmg-day-cell.selected .mmg-num {
    background: #f59e0b;
    color: #111827;
    font-weight: 700;
  }
  .mmg-day-cell.is-today:not(.selected) .mmg-num {
    border: 1.5px solid #eb5757;
    color: #eb5757;
  }
  .mmg-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #f59e0b;
  }
  .mmg-dot.empty {
    background: transparent;
  }
  .mmg-day-cell.selected .mmg-dot {
    background: #f59e0b;
  }

  .mobile-date-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-date-strip::-webkit-scrollbar {
    display: none;
  }

  .mobile-date-pill {
    flex: 1;
    min-width: 44px;
    padding: 8px 4px;
    border-radius: 12px;
    background: var(--notion-card-bg);
    border: 1px solid var(--notion-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-date-pill.selected {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
  }

  .mobile-date-pill.selected .mdp-num {
    color: #f59e0b;
    font-weight: 700;
  }

  .mobile-date-pill.is-today .mdp-num {
    background: #eb5757;
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mdp-day {
    font-size: 0.65rem;
    color: var(--notion-text-muted);
    font-weight: 500;
    text-transform: uppercase;
  }

  .mdp-num {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
  }

  .mdp-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f59e0b;
  }
  .mdp-dot.empty {
    background: transparent;
  }

  .mobile-agenda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--notion-text-muted);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--notion-border);
    margin-top: 4px;
  }
  .agenda-count-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    color: #e5e7eb;
  }

  .mobile-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-agenda-empty-compact {
    padding: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--notion-border);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--notion-text-muted);
  }
  .mobile-agenda-empty-compact p {
    margin: 0;
  }

  .mobile-month-all-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f59e0b;
    margin-top: 8px;
    margin-bottom: 2px;
  }

  /* Mobile Swipeable Kanban */
  .kanban-board {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding-bottom: 16px;
  }

  .kanban-column {
    min-width: 82vw !important;
    max-width: 85vw !important;
    scroll-snap-align: center;
    flex-shrink: 0;
    border-radius: 12px;
  }

  /* Mobile Gallery 2 columns */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .header-right #btnUserProfile {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   AUTH & TEAM MANAGEMENT STYLES (LOGIN WHATSAPP OTP)
   ========================================================================== */

.notion-btn-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notion-btn-user:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.notion-btn-icon-round {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.notion-btn-icon-round:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.notion-btn-icon-round:active {
  transform: scale(0.96);
}

.notif-badge-dot {
  pointer-events: none;
  transition: all 0.2s ease;
}

.user-avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-size: 0.75rem;
}

/* Auth Modal Specifics */
.auth-modal-dialog {
  max-width: 440px !important;
  width: 100% !important;
  border-radius: 14px !important;
  background: #202020 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
  color: #e5e5e5 !important;
  display: flex !important;
  flex-direction: column !important;
  margin: auto !important;
  z-index: 1600 !important;
}

.auth-modal-body {
  padding: 20px 24px 28px;
  background: #202020 !important;
}

.auth-required-box {
  background: #202020 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e5e5e5 !important;
}

.auth-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 16px;
}

.auth-banner.highlight {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.auth-banner-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.auth-banner strong {
  display: block;
  font-size: 0.85rem;
  color: #f3f4f6;
  margin-bottom: 2px;
}

.auth-banner p {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.35;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.9rem;
}

/* OTP Input */
.otp-input-container {
  display: flex;
  justify-content: center;
  margin: 20px 0 14px;
}

#otpInput {
  font-family: 'JetBrains Mono', 'Plus Jakarta Sans', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 12px;
  text-align: center;
  padding: 12px 16px;
  width: 100%;
  max-width: 320px;
  background: #111827;
  border: 2px solid #374151;
  border-radius: 10px;
  color: #f59e0b;
  transition: all 0.2s ease;
}

#otpInput:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.otp-timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #9ca3af;
  padding: 0 4px;
}

.otp-timer-row strong {
  color: #f59e0b;
  font-variant-numeric: tabular-nums;
}

.link-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.15s;
}

.link-btn:hover:not(:disabled) {
  color: #60a5fa;
}

.link-btn:disabled {
  color: #4b5563;
  cursor: not-allowed;
  text-decoration: none;
}

/* Team Profile Card in Settings */
.team-profile-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px;
}

.team-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.team-profile-info {
  flex: 1;
  min-width: 0;
}

.team-profile-info h4 {
  margin: 0 0 2px 0;
  font-size: 0.98rem;
  color: #f9fafb;
}

.team-profile-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.team-table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.team-table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.team-table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.team-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.team-table th {
  padding: 10px 14px;
  background: #232326;
  position: sticky;
  top: 0;
  z-index: 2;
  color: #9ca3af;
  font-weight: 600;
  border-bottom: 1px solid var(--notion-border);
}

.team-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

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

.team-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

.team-badge-inactive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(107, 114, 128, 0.15);
  border: 1px solid rgba(107, 114, 128, 0.3);
  color: #9ca3af;
  border-radius: 12px;
  font-size: 0.72rem;
}

/* ==========================================
   FULLSCREEN IN-APP IMAGE LIGHTBOX / CAROUSEL
   ========================================== */
.image-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 13, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  touch-action: pan-y;
  animation: fadeInLightbox 0.2s ease;
}

@keyframes fadeInLightbox {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 20;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lightbox-item-icon {
  font-size: 1.1rem;
}

.lightbox-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
}

.lightbox-counter {
  font-size: 0.72rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

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

.btn-lightbox-action {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn-lightbox-cover {
  color: #fbbf24;
}

.btn-lightbox-cover:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.btn-lightbox-cover.is-active-cover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.btn-lightbox-cover.is-active-cover svg {
  fill: #f59e0b;
  stroke: #f59e0b;
}

.lightbox-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.lightbox-slide-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px 16px;
  cursor: grab;
}

.lightbox-slide-container:active {
  cursor: grabbing;
}

.lightbox-main-img {
  max-width: 95vw;
  max-height: calc(85vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(25, 25, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.lightbox-nav-btn:hover {
  background: rgba(35, 131, 226, 0.85);
  border-color: rgba(35, 131, 226, 0.95);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn.prev {
  left: 14px;
}

.lightbox-nav-btn.next {
  right: 14px;
}

.lightbox-thumbnails-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  overflow-x: auto;
  max-width: 100vw;
  z-index: 20;
}

.lightbox-thumb-item {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.55;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
  background: #181818;
}

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

.lightbox-thumb-item:hover {
  opacity: 0.9;
}

.lightbox-thumb-item.active {
  border-color: #3b82f6;
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

/* Thumbnail wrap badges in table, card, and gallery */
.table-thumb-mini-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.table-thumb-count {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.moc-thumb {
  position: relative;
  cursor: pointer;
}

.moc-thumb-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.gallery-cover {
  position: relative;
  cursor: pointer;
}

.gallery-thumb-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ==========================================================================
   DASHBOARD VIEW (NOTION ANALYTICS & CHARTS)
   ========================================================================== */
.dashboard-container {
  padding: 20px 24px 40px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 14px 12px 90px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.dashboard-card {
  background-color: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

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

.dashboard-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3f4f6;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-card-badge {
  font-size: 0.72rem;
  font-weight: 500;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-chart-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 240px;
}

/* Donut Center Badge */
.donut-center-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.donut-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

.donut-sublabel {
  font-size: 0.78rem;
  color: #9ca3af;
  font-weight: 500;
  margin-top: 4px;
  text-transform: capitalize;
}

/* Feed Card */
.dashboard-card.feed-card {
  padding-bottom: 12px;
}

.dashboard-feed-body {
  flex: 1;
  overflow-y: auto;
  max-height: 230px;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-feed-body::-webkit-scrollbar {
  width: 5px;
}

.dashboard-feed-body::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-feed-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.dashboard-feed-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.feed-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.feed-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.feed-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.feed-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #374151;
  color: #f3f4f6;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feed-author {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e5e7eb;
}

.feed-time {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-left: auto;
}

.feed-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-sub {
  font-size: 0.74rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-item-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
}

.feed-item-comment-hint {
  color: #6b7280;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.feed-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  font-size: 0.82rem;
  text-align: center;
  padding: 20px;
}

/* Team Member Management Styling (CRUD Admin) */
.team-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.88rem;
  transition: background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.1);
}

.team-action-btn.btn-edit {
  color: #60a5fa;
}

.team-action-btn.btn-delete {
  color: #ef4444;
}

/* Edit Member Modal Specifics (Responsive Desktop & Mobile Drawer) */
.edit-member-modal-backdrop {
  z-index: 2500 !important;
}

.edit-member-modal-dialog {
  max-width: 500px !important;
  width: 95% !important;
  max-height: 88vh !important;
  background: #202020 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 14px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
  color: #e5e5e5 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: auto;
}

@media (max-width: 768px) {
  .edit-member-modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .edit-member-modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 92vh !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    margin: 0 !important;
    animation: slideUpMobile 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

/* ====================================================
   MASTER CDR (GOOGLE DRIVE) UI / UX STYLING
   ==================================================== */
.cdr-form-group {
  margin-top: 14px;
  background: rgba(35, 131, 226, 0.05);
  border: 1px solid rgba(35, 131, 226, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
}

.cdr-form-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #93c5fd !important;
  font-size: 0.85rem;
}

.cdr-label-icon {
  font-size: 1.05rem;
}

.cdr-label-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(35, 131, 226, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(35, 131, 226, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cdr-input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cdr-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--notion-bg);
  border: 1px solid var(--notion-border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cdr-input-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.cdr-input-icon {
  padding: 0 10px;
  font-size: 0.9rem;
  color: var(--notion-text-muted);
  user-select: none;
}

.cdr-input-field {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 8px 10px 8px 0 !important;
  font-size: 0.84rem;
  color: var(--notion-text) !important;
  outline: none;
  font-family: inherit;
}

.btn-paste-cdr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-left: 1px solid var(--notion-border);
  color: #e5e7eb;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-paste-cdr:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cdr-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-test-cdr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(35, 131, 226, 0.15);
  color: #60a5fa;
  text-decoration: none;
  border: 1px solid rgba(35, 131, 226, 0.3);
  transition: all 0.15s ease;
}

.btn-test-cdr:hover:not(.disabled) {
  background: rgba(35, 131, 226, 0.3);
  color: #93c5fd;
  border-color: rgba(35, 131, 226, 0.5);
}

.btn-test-cdr.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
  filter: grayscale(1);
}

.cdr-hint-text {
  font-size: 0.72rem;
  color: var(--notion-text-muted);
  flex: 1;
  min-width: 180px;
}

/* Card & Table Badges for CDR */
.card-cdr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
  text-decoration: none;
  transition: all 0.15s ease;
  width: fit-content;
}

.card-cdr-pill:hover {
  background: rgba(37, 99, 235, 0.28);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.55);
}

.card-cdr-pill .cdr-pill-icon {
  font-size: 0.8rem;
}

.table-cdr-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.table-cdr-pill:hover {
  background: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
}

/* Lightbox Action Button for CDR */
.btn-lightbox-cdr {
  background: rgba(37, 99, 235, 0.25) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(37, 99, 235, 0.4) !important;
  text-decoration: none;
  gap: 5px;
  padding: 0 10px !important;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
}

.btn-lightbox-cdr:hover {
  background: rgba(37, 99, 235, 0.45) !important;
  color: #fff !important;
}

.lightbox-cdr-text {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ====================================================
   COMMENT BADGE & QUICK COMMENTS / REPLY MODAL
   ==================================================== */
.card-comment-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  cursor: pointer;
  outline: none;
  transition: all 0.18s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.card-comment-pill:hover {
  background: rgba(245, 158, 11, 0.28);
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.card-comment-pill.has-comments {
  animation: subtleCommentGlow 3s infinite ease-in-out;
}

@keyframes subtleCommentGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
  }
}

.comment-pill-icon {
  font-size: 0.78rem;
}

.comment-pill-count {
  font-size: 0.72rem;
  font-weight: 700;
}

/* Quick Comments Modal Dialog */
.quick-comments-backdrop {
  z-index: 2600 !important;
}

.quick-comments-dialog {
  max-width: 520px !important;
  width: 95% !important;
  max-height: 85vh !important;
  background: #1c1c1c !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85) !important;
  color: #e5e5e5 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: auto;
}

.quick-comments-header {
  padding: 16px 20px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
  background: #202020;
}

.quick-comments-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  padding-right: 12px;
}

.quick-comments-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.quick-comments-item-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-comments-item-subtitle {
  margin: 0;
  font-size: 0.75rem;
  color: var(--notion-text-muted);
}

.quick-comments-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-comments-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  background: #171717;
  -webkit-overflow-scrolling: touch;
}

.quick-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-comment-item {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 14px;
}

.quick-comment-item .comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.quick-comment-item .comment-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-comment-item .comment-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.quick-comment-item .comment-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f3f4f6;
}

.quick-comment-item .comment-time {
  font-size: 0.7rem;
  color: var(--notion-text-muted);
}

.quick-comment-item .comment-text {
  font-size: 0.83rem;
  color: #d1d5db;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.quick-comments-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #1f1f1f;
  flex-shrink: 0;
}

.quick-comment-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-comment-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--notion-text-muted);
}

.quick-comment-author .author-dot {
  color: #10b981;
  font-size: 0.65rem;
}

.quick-comment-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.quick-comment-textarea {
  flex: 1;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.84rem;
  color: #f3f4f6;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-comment-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-send-quick-comment {
  padding: 8px 16px !important;
  font-size: 0.82rem !important;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
}

@media (max-width: 768px) {
  .quick-comments-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .quick-comments-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90vh !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    margin: 0 !important;
    animation: slideUpMobile 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

/* ============================================================
   NOTIFICATION CONFIGURATION (APLIKASI & WHATSAPP)
   ============================================================ */
.notif-config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.notif-config-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notif-config-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.notif-app-card {
  border-left: 3px solid #3b82f6;
}

.notif-wa-card {
  border-left: 3px solid #10b981;
}

.notif-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.notif-config-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 1.1rem;
}

.notif-icon-badge.app-badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.notif-icon-badge.wa-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.notif-config-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f3f4f6;
  margin: 0 0 2px 0;
}

.notif-config-subtitle {
  font-size: 0.72rem;
  color: #9ca3af;
  margin: 0;
}

.system-permission-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.permission-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.permission-label {
  font-size: 0.78rem;
  color: #d1d5db;
  font-weight: 500;
}

.permission-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.permission-badge.granted {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.permission-badge.denied {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.permission-badge.default {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.permission-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .notif-config-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .permission-actions-row {
    flex-direction: column;
  }
  
  .permission-actions-row button {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   NOTIFICATION FLYOUT / DROPDOWN
   ============================================================ */
.header-notif-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.5);
  border: 1.5px solid #191919;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notif-count-badge.badge-pulse {
  animation: badgePulse 1.2s ease-in-out infinite;
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); box-shadow: 0 0 12px rgba(239, 68, 68, 0.9); }
  100% { transform: scale(1); }
}

@keyframes bellRing {
  0% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-14deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-8deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}

.bell-ring svg {
  animation: bellRing 0.8s ease-in-out 3;
  transform-origin: top center;
}

.notif-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifFlyoutIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifFlyoutIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-flyout-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-flyout-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-unread-count-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 1px 7px;
  border-radius: 10px;
}

.notif-flyout-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text-action {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-text-action:hover {
  text-decoration: underline;
  color: #60a5fa;
}

.btn-icon-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.notif-flyout-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.notif-item {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
  background: rgba(59, 130, 246, 0.05);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 16px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f3f4f6;
  margin: 0 0 3px 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.notif-item-time {
  font-size: 0.68rem;
  color: #6b7280;
  font-weight: 400;
  white-space: nowrap;
}

.notif-item-desc {
  font-size: 0.74rem;
  color: #9ca3af;
  margin: 0 0 6px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-empty-state {
  padding: 36px 20px;
  text-align: center;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.notif-empty-state p {
  margin: 0;
  font-size: 0.84rem;
  color: #9ca3af;
  font-weight: 500;
}

.notif-empty-state small {
  font-size: 0.72rem;
  color: #6b7280;
}

.notif-flyout-footer {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.btn-notif-footer {
  width: 100%;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-notif-footer:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f3f4f6;
}

@media (max-width: 640px) {
  .notif-flyout {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    max-height: 80vh;
  }
}

/* ===================================================
   NOTION-STYLE DATE PICKER POPOVER & COMPONENT
   =================================================== */
.notion-date-form-group {
  position: relative;
}

.notion-date-picker-container {
  position: relative;
  width: 100%;
}

.notion-date-display-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #f3f4f6;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  font-family: inherit;
}

.notion-date-display-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
}

.notion-date-display-btn:focus,
.notion-date-display-btn.active {
  border-color: #2383e2;
  box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.25);
  background: rgba(35, 131, 226, 0.08);
}

.notion-date-display-btn .date-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.notion-date-display-btn .date-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notion-date-display-btn .date-text.empty {
  color: var(--notion-text-muted);
}

.notion-date-display-btn .date-clear-icon {
  font-size: 1.15rem;
  line-height: 1;
  color: #9ca3af;
  padding: 0 4px;
  border-radius: 4px;
  transition: all 0.15s;
}

.notion-date-display-btn .date-clear-icon:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* Floating Popover */
.notion-date-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1050;
  width: 310px;
  max-width: calc(100vw - 32px);
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.35);
  padding: 12px;
  box-sizing: border-box;
  animation: ndpFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ndp-inputs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ndp-end-row {
  margin-top: -2px;
  margin-bottom: 10px;
}

.ndp-range-arrow {
  color: #9ca3af;
  font-size: 0.75rem;
  padding: 0 2px;
  flex-shrink: 0;
}

.ndp-input-box {
  flex: 1;
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 8px;
  transition: border-color 0.15s;
}

.ndp-input-box:focus-within {
  border-color: #2383e2;
  box-shadow: 0 0 0 1px #2383e2;
}

.ndp-time-box {
  flex: 0 0 76px;
}

.ndp-field {
  width: 100%;
  background: transparent;
  border: none;
  color: #f3f4f6;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  padding: 0;
}

.ndp-field::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

/* Calendar Section */
.ndp-calendar-section {
  margin: 6px 0 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ndp-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.ndp-month-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f3f4f6;
}

.ndp-nav-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.ndp-btn-text {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all 0.15s;
}

.ndp-btn-text:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ndp-btn-nav {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.84rem;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
}

.ndp-btn-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ndp-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 4px;
}

.ndp-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
}

.ndp-day-cell {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: #d1d5db;
  cursor: pointer;
  border-radius: 5px;
  user-select: none;
  transition: all 0.1s ease;
}

.ndp-day-cell:hover:not(.empty-cell) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ndp-day-cell.other-month {
  color: rgba(255, 255, 255, 0.22);
}

.ndp-day-cell.today {
  color: #fb923c;
  font-weight: 600;
}

.ndp-day-cell.today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ea580c;
}

.ndp-day-cell.selected {
  background: #2383e2 !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 5px;
}

.ndp-day-cell.in-range {
  background: rgba(35, 131, 226, 0.2) !important;
  color: #93c5fd !important;
  border-radius: 0;
}

.ndp-day-cell.range-start {
  background: #2383e2 !important;
  color: #ffffff !important;
  border-top-left-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.ndp-day-cell.range-end {
  background: #2383e2 !important;
  color: #ffffff !important;
  border-top-right-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* Footer Controls */
.ndp-footer-controls {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ndp-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #d1d5db;
  padding: 1px 2px;
}

.ndp-control-label {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.ndp-switch {
  transform: scale(0.82);
  transform-origin: right center;
  margin: 0;
}

.ndp-time-zone-badge {
  font-size: 0.72rem;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
}

.ndp-actions-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 2px 0 4px;
}

.ndp-clear-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ndp-btn-clear {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.ndp-btn-clear:hover {
  background: rgba(239, 68, 68, 0.12);
}

.ndp-btn-apply {
  background: #2383e2;
  border: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 14px;
  border-radius: 5px;
  transition: all 0.15s;
}

.ndp-btn-apply:hover {
  background: #1d4ed8;
}

#refreshBtn.loading svg {
  animation: spinRefresh 0.8s linear infinite;
}

#refreshBtn.loading {
  opacity: 0.6;
  pointer-events: none;
}

@keyframes spinRefresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Status Management UI */
.status-mgmt-group-card {
  background: var(--notion-card-bg, #202020);
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  overflow: hidden;
}

.status-mgmt-group-header {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--notion-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-mgmt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.status-mgmt-item:last-child {
  border-bottom: none;
}

.status-mgmt-item:hover {
  background: var(--notion-hover);
}

.status-mgmt-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.btn-icon-action {
  background: transparent;
  border: none;
  color: var(--notion-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.btn-icon-action:hover {
  color: var(--notion-text);
  background: rgba(255, 255, 255, 0.08);
}

.btn-icon-action.btn-action-delete:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

.color-palette-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--notion-border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 0.76rem;
  color: var(--notion-text);
  transition: all 0.15s ease;
}

.color-palette-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.color-palette-btn.selected {
  border-color: #3b82f6 !important;
  outline: 2px solid #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

/* ========================================================== */
/* ANDROID TV / 10-FOOT DISPLAY MODE                          */
/* Hanya aktif jika class .tv-mode terpasang di <body>        */
/* Tidak mempengaruhi tampilan PC atau Mobile sama sekali     */
/* ========================================================== */
body.tv-mode {
  padding: 14px 28px 16px 28px !important;
  overflow-x: hidden !important;
  user-select: none;
}

body.tv-mode .workspace-container {
  max-width: 100% !important;
  width: 100% !important;
}

/* Header TV: Lebih rapi dan pas proporsi */
body.tv-mode .workspace-header {
  margin-bottom: 6px !important;
}

body.tv-mode .workspace-title {
  font-size: 1.35rem !important;
}

body.tv-mode .header-app-logo {
  height: 40px !important;
}

/* Navigation Tabs Bar */
body.tv-mode .notion-tabs-bar {
  margin-bottom: 8px !important;
}

body.tv-mode .tab-item {
  padding: 6px 14px !important;
  font-size: 0.92rem !important;
}

/* Calendar View on TV: Muat utuh 1 layar tanpa terpotong bawah / kanan */
body.tv-mode .calendar-view-wrapper {
  gap: 6px !important;
}

body.tv-mode .calendar-top-bar {
  padding: 0 0 4px 0 !important;
}

body.tv-mode .calendar-month-name {
  font-size: 1.15rem !important;
}

body.tv-mode .calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  width: 100% !important;
  box-sizing: border-box;
}

body.tv-mode .calendar-day-header {
  padding: 4px 6px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

body.tv-mode .calendar-cell {
  min-height: clamp(52px, calc((100vh - 190px) / 5.2), 95px) !important;
  max-height: clamp(55px, calc((100vh - 190px) / 5.2), 98px) !important;
  padding: 3px 5px !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

body.tv-mode .calendar-date-number {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  margin-bottom: 2px !important;
}

body.tv-mode .calendar-event-pill {
  font-size: 0.76rem !important;
  padding: 2px 5px !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  line-height: 1.2 !important;
}

/* Board (Kanban) View on TV */
body.tv-mode .notion-board-container {
  gap: 12px !important;
  padding-bottom: 8px !important;
}

body.tv-mode .board-column-header {
  font-size: 0.92rem !important;
  padding: 6px 10px !important;
}

body.tv-mode .board-card {
  padding: 10px !important;
  font-size: 0.88rem !important;
}

/* TV Remote D-Pad Navigation Indicator */
body.tv-mode *:focus {
  outline: 3px solid #3b82f6 !important;
  outline-offset: 1px !important;
}










