/*
 * UI Soft v1: shared visual layer for index, report and admin.
 * Visual only. No IDs, handlers or layout structure are changed.
 * Loaded last so it wins over Bootstrap and older page styles.
 * Goal: one consistent, rounded, calm look. No sharp square frames.
 */

:root {
  /* Radius scale */
  --soft-r-xs: 8px;
  --soft-r-sm: 10px;
  --soft-r-md: 14px;
  --soft-r-lg: 18px;
  --soft-r-xl: 22px;
  --soft-r-pill: 999px;

  /* Surfaces and lines */
  --soft-ink: #172a4b;
  --soft-ink-muted: #5f6f87;
  --soft-line: #e3e9f1;
  --soft-line-strong: #d3dce8;
  --soft-canvas: #f5f7fb;
  --soft-surface: #ffffff;
  --soft-surface-sunken: #f8fafc;

  /* Brand */
  --soft-accent: #f15a24;
  --soft-accent-dark: #d94716;
  --soft-accent-ring: rgba(241, 90, 36, 0.2);

  /* Elevation: low-contrast, layered shadows */
  --soft-shadow-sm: 0 1px 2px rgba(23, 42, 75, 0.05), 0 2px 8px rgba(23, 42, 75, 0.04);
  --soft-shadow-md: 0 2px 6px rgba(23, 42, 75, 0.05), 0 10px 28px rgba(23, 42, 75, 0.07);
  --soft-shadow-lg: 0 8px 20px rgba(23, 42, 75, 0.08), 0 24px 56px rgba(23, 42, 75, 0.12);

  /* Bootstrap 5.3 tokens: every component reads these */
  --bs-border-radius: var(--soft-r-sm);
  --bs-border-radius-sm: var(--soft-r-xs);
  --bs-border-radius-lg: var(--soft-r-md);
  --bs-border-radius-xl: var(--soft-r-lg);
  --bs-border-radius-xxl: var(--soft-r-xl);
  --bs-border-radius-2xl: var(--soft-r-xl);
  --bs-border-radius-pill: var(--soft-r-pill);
  --bs-border-color: var(--soft-line);
  --bs-focus-ring-color: var(--soft-accent-ring);
}

/* ---------- Surfaces ---------- */

.card,
.card-custom,
.admin-settings-panel,
.list-group,
.accordion {
  border-color: var(--soft-line);
  border-radius: var(--soft-r-lg);
}

.card {
  --bs-card-border-radius: var(--soft-r-lg);
  --bs-card-inner-border-radius: calc(var(--soft-r-lg) - 1px);
  --bs-card-border-color: var(--soft-line);
  box-shadow: var(--soft-shadow-sm);
}

.card.border-0 { box-shadow: none; }

.card-custom {
  border-radius: var(--soft-r-xl);
  box-shadow: var(--soft-shadow-md);
}

.card-custom:hover { box-shadow: var(--soft-shadow-md); }

.admin-settings-panel { box-shadow: var(--soft-shadow-sm); }

.list-group { --bs-list-group-border-radius: var(--soft-r-md); }

.accordion {
  --bs-accordion-border-radius: var(--soft-r-md);
  --bs-accordion-inner-border-radius: calc(var(--soft-r-md) - 1px);
}

.alert {
  --bs-alert-border-radius: var(--soft-r-md);
  border-radius: var(--soft-r-md);
}

.img-thumbnail { border-radius: var(--soft-r-md); }

/* ---------- Buttons ---------- */

.btn {
  --bs-btn-border-radius: var(--soft-r-sm);
  --bs-btn-focus-box-shadow: 0 0 0 4px var(--soft-accent-ring);
  border-radius: var(--soft-r-sm);
  font-weight: 600;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn-sm { --bs-btn-border-radius: var(--soft-r-xs); border-radius: var(--soft-r-xs); }
.btn-lg { --bs-btn-border-radius: var(--soft-r-md); border-radius: var(--soft-r-md); }

/* Grouped buttons keep flat inner joins, rounded outer ends (Bootstrap handles inner corners). */
.btn-group > .btn:first-child,
.btn-group > .btn-group:first-child > .btn { border-top-left-radius: var(--soft-r-sm); border-bottom-left-radius: var(--soft-r-sm); }
.btn-group > .btn:last-child,
.btn-group > .btn-group:last-child > .btn { border-top-right-radius: var(--soft-r-sm); border-bottom-right-radius: var(--soft-r-sm); }

.btn-close { border-radius: var(--soft-r-pill); }
.btn-close:focus { box-shadow: 0 0 0 4px var(--soft-accent-ring); }

/* ---------- Forms ---------- */

.form-control,
.form-select,
.input-group-text {
  border-color: var(--soft-line-strong);
  border-radius: var(--soft-r-sm);
}

.form-control-sm,
.form-select-sm { border-radius: var(--soft-r-xs); }

.form-control-lg,
.form-select-lg { border-radius: var(--soft-r-md); }

.form-control:focus,
.form-select:focus {
  border-color: var(--soft-accent);
  box-shadow: 0 0 0 4px var(--soft-accent-ring);
}

.form-check-input { border-color: var(--soft-line-strong); }
.form-check-input[type="checkbox"] { border-radius: 6px; }
.form-check-input:focus {
  border-color: var(--soft-accent);
  box-shadow: 0 0 0 4px var(--soft-accent-ring);
}

.form-switch .form-check-input { border-radius: var(--soft-r-pill); }

textarea.form-control { border-radius: var(--soft-r-md); }

/* ---------- Navigation ---------- */

.nav-pills { --bs-nav-pills-border-radius: var(--soft-r-sm); }

.nav-tabs {
  --bs-nav-tabs-border-radius: var(--soft-r-sm);
  border-bottom-color: var(--soft-line);
}

.nav-tabs .nav-link {
  border-top-left-radius: var(--soft-r-sm);
  border-top-right-radius: var(--soft-r-sm);
}

.pagination {
  --bs-pagination-border-radius: var(--soft-r-xs);
  gap: 4px;
  flex-wrap: wrap;
}

.pagination .page-item .page-link,
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  margin-left: 0;
  border-radius: var(--soft-r-xs);
}

.dropdown-menu {
  --bs-dropdown-border-radius: var(--soft-r-md);
  --bs-dropdown-inner-border-radius: calc(var(--soft-r-md) - 1px);
  padding: 6px;
  border-color: var(--soft-line);
  box-shadow: var(--soft-shadow-lg);
}

.dropdown-item { border-radius: var(--soft-r-xs); }

/* ---------- Badges, progress, chips ---------- */

.badge { border-radius: var(--soft-r-pill); font-weight: 600; }

.progress,
.progress-stacked {
  --bs-progress-border-radius: var(--soft-r-pill);
  border-radius: var(--soft-r-pill);
}

/* ---------- Tables ---------- */

.table-responsive,
.log-table-container,
.dataTables_wrapper .dataTables_scroll {
  border-radius: var(--soft-r-md);
}

.table-responsive > .table,
.log-table-container > .table { margin-bottom: 0; }

.table-responsive > .table > :first-child > tr:first-child > :first-child,
.log-table-container .table > thead > tr:first-child > :first-child { border-top-left-radius: var(--soft-r-md); }
.table-responsive > .table > :first-child > tr:first-child > :last-child,
.log-table-container .table > thead > tr:first-child > :last-child { border-top-right-radius: var(--soft-r-md); }

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: var(--soft-r-sm);
}

/* ---------- Modals ---------- */

.modal {
  --bs-modal-border-radius: var(--soft-r-xl);
  --bs-modal-inner-border-radius: calc(var(--soft-r-xl) - 1px);
  --bs-modal-box-shadow: var(--soft-shadow-lg);
}

.modal-content {
  border: 1px solid var(--soft-line);
  border-radius: var(--soft-r-xl);
  box-shadow: var(--soft-shadow-lg);
}

.modal .modal-content > .modal-header,
#extraDataModal .modal-content .modal-header {
  border-top-left-radius: calc(var(--soft-r-xl) - 1px) !important;
  border-top-right-radius: calc(var(--soft-r-xl) - 1px) !important;
}

.modal .modal-content > .modal-footer,
#extraDataModal .modal-content .modal-footer {
  border-bottom-left-radius: calc(var(--soft-r-xl) - 1px) !important;
  border-bottom-right-radius: calc(var(--soft-r-xl) - 1px) !important;
}

/* Full-screen dialogs stay edge to edge. */
.modal-fullscreen .modal-content,
.modal-fullscreen .modal-content > .modal-header,
.modal-fullscreen .modal-content > .modal-footer { border-radius: 0 !important; }

@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down .modal-content,
  .modal-fullscreen-sm-down .modal-content > .modal-header,
  .modal-fullscreen-sm-down .modal-content > .modal-footer { border-radius: 0 !important; }
}

/* ---------- Popovers, tooltips, toasts ---------- */

.popover { --bs-popover-border-radius: var(--soft-r-md); --bs-popover-inner-border-radius: calc(var(--soft-r-md) - 1px); box-shadow: var(--soft-shadow-md); }
.tooltip { --bs-tooltip-border-radius: var(--soft-r-xs); }
.toast { --bs-toast-border-radius: var(--soft-r-md); box-shadow: var(--soft-shadow-md); }

/* ---------- SweetAlert2 ---------- */

.swal2-popup {
  border-radius: var(--soft-r-xl) !important;
  box-shadow: var(--soft-shadow-lg);
}

.swal2-styled,
.swal2-input,
.swal2-select,
.swal2-textarea,
.swal2-file {
  border-radius: var(--soft-r-sm) !important;
}

.swal2-styled:focus { box-shadow: 0 0 0 4px var(--soft-accent-ring) !important; }

.swal2-toast { border-radius: var(--soft-r-md) !important; }

/* ---------- FullCalendar ---------- */

.fc .fc-button { border-radius: var(--soft-r-sm); }
.fc .fc-button-group > .fc-button:first-child { border-top-left-radius: var(--soft-r-sm) !important; border-bottom-left-radius: var(--soft-r-sm) !important; }
.fc .fc-button-group > .fc-button:last-child { border-top-right-radius: var(--soft-r-sm) !important; border-bottom-right-radius: var(--soft-r-sm) !important; }

.fc .fc-scrollgrid {
  border-radius: var(--soft-r-md);
  overflow: hidden;
}

.fc .fc-event,
.fc .fc-daygrid-event { border-radius: 6px; }

/* ---------- Small details ---------- */

.news-skeleton-line { border-radius: var(--soft-r-pill); }

::-webkit-scrollbar-thumb { border-radius: var(--soft-r-pill); }

/* Keyboard focus stays visible and rounded. */
:focus-visible { outline-offset: 2px; }
.btn:focus-visible,
.nav-link:focus-visible,
.page-link:focus-visible,
.dropdown-item:focus-visible { border-radius: var(--soft-r-sm); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* History screen: keep the records readable without stacking framed panels. */
#pills-history > .card-custom {
  padding: 30px 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#pills-history > .card-custom:hover {
  background: transparent;
  box-shadow: none;
}

#pills-history .history-page-intro { margin-bottom: 22px; }

#pills-history .history-filter-panel {
  padding: 16px 18px;
  border: 0;
  background: #f2f5f9;
}

#pills-history .history-filter-panel .form-control,
#pills-history .history-filter-panel .form-select,
#pills-history .history-filter-panel .input-group-text {
  border-color: #d7e0eb;
}

#pills-history .table-container {
  border: 0;
  border-radius: 0;
  background: transparent;
}

#pills-history .table-custom thead th {
  border-bottom: 1px solid #dce4ee;
  background: #f2f5f9;
}

#pills-history .table-custom td {
  border-bottom: 1px solid #e8edf3;
}

#pills-history .table-custom tbody tr:hover {
  background: #f8fafc;
}

#pills-history .history-col-date { width: 12%; }
#pills-history .history-col-org { width: 36%; }
#pills-history .history-col-visitors { width: 9%; }
#pills-history .history-col-image { width: 8%; }
#pills-history .history-col-follow { width: 17%; }
#pills-history .history-col-actions { width: 18%; min-width: 240px; }

.history-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end !important;
  gap: 4px;
  flex-wrap: wrap !important;
}

.history-action-button,
.history-actions-disclosure > summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #253b5d;
  background: transparent;
  font: 600 0.76rem/1.2 'Prompt', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.history-action-button:hover,
.history-actions-disclosure > summary:hover {
  color: #b83c13;
  background: #fbeee8;
}

.history-action-button:focus-visible,
.history-actions-disclosure > summary:focus-visible,
.history-action-menu-item:focus-visible {
  outline: 3px solid rgba(241, 90, 36, 0.32);
  outline-offset: 2px;
}

.history-action-edit {
  color: #a9340d;
  background: #fff0e9;
}

.history-actions-disclosure { position: relative; }

.history-actions-disclosure > summary {
  list-style: none;
}

.history-actions-disclosure > summary::-webkit-details-marker { display: none; }
.history-actions-disclosure > summary::marker { content: ''; }

.history-actions-disclosure[open] { flex: 1 0 100%; }

.history-actions-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin-top: 5px;
  padding: 6px;
  border-radius: 11px;
  background: #f4f6f9;
}

.history-action-menu-item {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  color: #344863;
  background: transparent;
  font: 500 0.72rem/1.35 'Prompt', sans-serif;
  text-align: left;
  cursor: pointer;
}

.history-action-menu-item:hover { background: #fff; color: #a9340d; }
.history-action-menu-item i { flex: 0 0 15px; text-align: center; }
.history-action-delete,
.history-action-delete:hover { color: #b42318; }

.history-card-actions .history-action-bar {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 1100px) and (min-width: 768px) {
  #pills-history .history-col-date { width: 12%; }
  #pills-history .history-col-org { width: 34%; }
  #pills-history .history-col-visitors { width: 9%; }
  #pills-history .history-col-image { width: 5%; }
  #pills-history .history-col-follow { width: 16%; }
  #pills-history .history-col-actions { width: 24%; min-width: 205px; }
  #pills-history .history-cell-actions {
    width: auto !important;
    padding: 8px 10px !important;
    text-align: right !important;
  }
  #pills-history .history-action-bar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }
  .history-action-visible-label { display: none; }
  .history-action-bar { gap: 2px; }
  .history-action-button,
  .history-actions-disclosure > summary { padding-right: 8px; padding-left: 8px; }
}

@media (max-width: 767.98px) {
  #pills-history > .card-custom { padding: 22px 16px; }
  #pills-history .history-filter-panel { padding: 14px; }
  #pills-history .history-table tbody tr {
    margin: 0;
    padding: 12px 8px;
    border: 0;
    border-bottom: 1px solid #e8edf3;
    border-radius: 0;
    box-shadow: none;
  }
  #pills-history .history-cell-actions { border-top: 0 !important; }
  #pills-history .history-actions { justify-content: flex-start !important; }
  .history-action-menu-item { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .history-action-button,
  .history-actions-disclosure > summary { transition: none; }
}

/* PDTI visual system: one quiet, institutional surface across every page. */
:root {
  --soft-ink: #1e3553;
  --soft-ink-muted: #586a80;
  --soft-line: #e5eaf0;
  --soft-line-strong: #cbd5e1;
  --soft-canvas: #f4f6f9;
  --soft-surface: #ffffff;
  --soft-surface-sunken: #f7f9fc;
  --soft-accent: #bd4217;
  --soft-accent-dark: #9f3512;
  --soft-accent-ring: rgba(189, 66, 23, 0.2);
  --soft-shadow-sm: 0 1px 5px rgba(30, 53, 83, 0.055);
  --soft-shadow-md: 0 8px 24px rgba(30, 53, 83, 0.075);
  --soft-shadow-lg: 0 16px 40px rgba(30, 53, 83, 0.13);
}

html { scroll-behavior: smooth; }

body {
  color: var(--soft-ink);
  background: var(--soft-canvas) !important;
  background-image: none !important;
  font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--soft-ink);
  font-family: 'Prompt', 'Inter', sans-serif;
  letter-spacing: 0;
}

.text-muted { color: var(--soft-ink-muted) !important; }

:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(189, 66, 23, 0.55) !important;
  outline-offset: 3px;
}

/* Shared controls: clear affordance, one quiet edge, no stacked shadows. */
.btn {
  min-height: 44px;
  border-radius: 10px;
  box-shadow: none !important;
  font-weight: 600;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover { transform: none; }
.btn-primary {
  color: #fff !important;
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: #142d4b !important;
  border-color: #142d4b !important;
}
.btn-outline-primary {
  color: #1e3a5f;
  border-color: #b9c7d8;
}
.btn-outline-primary:hover {
  color: #1e3a5f;
  background: #edf2f7;
  border-color: #9aacc2;
}
.form-control, .form-select, .input-group-text {
  min-height: 44px;
  color: var(--soft-ink);
  border-color: var(--soft-line-strong);
  border-radius: 10px;
  background-color: #fff;
  box-shadow: none;
}
.form-control:focus, .form-select:focus {
  border-color: #8ca1bb;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}
.form-control::placeholder { color: #718096; opacity: 1; }

/* Remove decorative glass, glowing edges and hover lift from old surfaces. */
.card, .card-custom, .admin-settings-panel, .db-chart-card,
.report-container, .log-table-container, .modal-content {
  border-color: transparent !important;
  box-shadow: var(--soft-shadow-sm) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.card-custom, .card {
  border-radius: 16px;
  background: var(--soft-surface);
}
.card-custom::before, .card-custom::after { display: none !important; }
.card-custom:hover, .db-chart-card:hover {
  transform: none !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.card-custom .card.bg-light,
.admin-settings-panel .card.bg-light {
  background: var(--soft-surface-sunken) !important;
  border: 0 !important;
  box-shadow: none !important;
}
.modal-content { border-radius: 18px !important; }

/* Main workspace navigation and page frame. */
.app-shell-header {
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--soft-line) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.app-shell-header::before, .app-shell-header::after,
.app-header::before, .app-header::after { display: none !important; }
.app-shell-header .app-header {
  margin: 0 auto;
  padding: 12px clamp(16px, 2.8vw, 40px);
  background: #fff;
  border: 0;
  box-shadow: none;
}
.app-title {
  color: var(--soft-ink) !important;
  background: none !important;
  text-shadow: none !important;
  font-size: clamp(1.12rem, 1.4vw, 1.45rem);
  font-weight: 600;
  animation: none !important;
}
.app-subtitle { color: var(--soft-ink-muted) !important; }
.app-shell-header .app-header-actions .header-utility-button,
.app-shell-header .app-header-actions .header-online-button {
  min-height: 42px;
  border: 0 !important;
  border-radius: 9px;
  background: #f3f6f9 !important;
  color: var(--soft-ink) !important;
  box-shadow: none !important;
}
.app-shell-header .app-header-actions .header-utility-button:hover,
.app-shell-header .app-header-actions .header-online-button:hover {
  background: #e9eef4 !important;
  color: #142d4b !important;
}
.app-shell-header > .d-flex.justify-content-center {
  background: #1e3a5f;
}
.app-shell-header .visitor-nav-v30 {
  padding-block: 7px;
}
.app-shell-header .visitor-nav-v30 .nav-link {
  border-color: transparent !important;
  border-radius: 9px !important;
  background: transparent;
  box-shadow: none !important;
  color: #e6edf5;
  font-weight: 500;
}
.app-shell-header .visitor-nav-v30 .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.app-shell-header .visitor-nav-v30 .nav-link.active,
.app-shell-header .visitor-nav-v30 #formTabItem:not(.d-none) .nav-link.active {
  color: #1e3a5f !important;
  background: #fff !important;
  border-color: #fff !important;
  font-weight: 700;
}
.app-shell-header .visitor-nav-v30 #formTabItem:not(.d-none) .nav-link:not(.active) {
  background: #c74715;
  color: #fff;
}
.main-container {
  width: min(100% - 40px, 1640px);
  max-width: 1640px;
  margin: 28px auto 48px;
  padding: 0;
}

/* History stays a continuous list rather than a stack of outlined rows. */
#pills-history .history-table { border-spacing: 0 !important; }
#pills-history .history-table tbody tr {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
#pills-history .history-table td:first-child,
#pills-history .history-table td:last-child { border-radius: 0 !important; }
#pills-history .history-table tbody tr:hover { background: #f8fafc !important; }
#pills-history .history-table thead th {
  color: #41546d;
  font-weight: 600;
}
#pills-history .history-filter-panel { border-radius: 14px; }
#pills-history .history-grid-view { gap: 16px; }
#pills-history .history-card {
  border: 0 !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
#pills-history .history-card::before { display: none !important; }
#pills-history .history-card:hover {
  transform: none !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
#pills-history .history-card-org { color: var(--soft-ink) !important; }
#pills-history .history-card-follow { border: 0 !important; background: #f3f6f9 !important; }
#pills-history .history-card-action {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #edf2f7 !important;
  color: #1e3a5f !important;
  box-shadow: none !important;
}
#pills-history .history-card-action:hover { background: #dfe7f0 !important; }

/* Form and calendar views use spacing and typography as their hierarchy. */
.form-container-limit { max-width: 1080px; }
.form-container-limit.card-custom {
  border: 0 !important;
  background: #fff !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.section-title {
  padding-bottom: 8px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--soft-line);
  color: var(--soft-ink);
  font-size: 1.02rem;
  font-weight: 600;
}
.section-title::after { display: none !important; }
.section-title i {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b84519;
  font-size: 0.95rem;
}
.section-title:hover i { transform: none; }
.upload-area {
  border-color: #b9c7d8;
  border-radius: 14px;
  background: #f8fafc;
}
.upload-area:hover, .upload-area.dragover {
  border-color: #8ca1bb;
  background: #f1f5f9;
  transform: none;
}
.line-card-route-toggle { min-height: 44px; border-color: #d8e1eb; background: #f7f9fc; }
.line-card-route-toggle.is-off { border-color: #e5eaf0; }
.fc .fc-scrollgrid { border-color: var(--soft-line); }
.fc .fc-daygrid-day, .fc .fc-timegrid-slot { border-color: var(--soft-line); }
.fc .fc-button-primary {
  background: #1e3a5f;
  border-color: #1e3a5f;
}
.fc .fc-button-primary:hover { background: #142d4b; border-color: #142d4b; }

/* Dashboard uses white space and a restrained palette instead of colored tiles. */
.db-hero {
  border-bottom: 1px solid var(--soft-line) !important;
  background: transparent !important;
  box-shadow: none !important;
}
.db-hero-title { color: var(--soft-ink) !important; font-weight: 600 !important; }
.db-hero-badge { color: #36516f !important; background: #eef2f7 !important; }
.db-kpi-card {
  min-height: 132px;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: var(--soft-ink) !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.db-kpi-card:hover { transform: none !important; box-shadow: var(--soft-shadow-sm) !important; }
.db-kpi-bg-orb, .db-kpi-shimmer { display: none !important; }
.db-kpi-icon-wrap {
  color: #28496f !important;
  background: #edf2f7 !important;
  box-shadow: none !important;
}
.db-kpi-val, .db-kpi-lbl { color: var(--soft-ink) !important; }
.db-kpi-lbl { color: var(--soft-ink-muted) !important; }
.db-mini-card {
  border: 0 !important;
  border-radius: 11px !important;
  background: #eef2f7 !important;
  box-shadow: none !important;
}
.db-chart-card {
  border-radius: 14px !important;
  background: #fff !important;
  padding: 20px !important;
}
.db-chart-head { border-bottom-color: var(--soft-line) !important; }
.db-chart-title { color: var(--soft-ink) !important; font-weight: 600 !important; }
.db-chart-sub { color: var(--soft-ink-muted) !important; }
.db-trophy-banner { border-radius: 14px !important; box-shadow: none !important; }

/* Report page: keep filters and records in one calm workspace. */
.report-wrapper {
  width: min(100%, 1640px);
  max-width: 1640px;
  margin: 0 auto;
  padding: 26px clamp(16px, 2.8vw, 40px) 48px;
}
.report-container {
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.report-container > .d-flex.justify-content-between.border-bottom {
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--soft-line) !important;
}
.report-container .nav-pills {
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: #e9eef4;
}
.report-container .nav-pills .nav-link {
  min-height: 44px;
  border-radius: 9px !important;
  color: #52647b;
  font-weight: 600;
}
.report-container .nav-pills .nav-link.active {
  color: #1e3a5f !important;
  background: #fff !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.report-container .row.bg-light {
  padding: 0 0 18px !important;
  margin-bottom: 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--soft-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.report-container .list-item-row {
  border: 0 !important;
  border-bottom: 1px solid var(--soft-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}
.report-container .list-item-row:hover { background: #f8fafc !important; }
.report-container .list-item-row.unread-row {
  border-left: 3px solid #bd4217 !important;
  background: #fffaf7 !important;
}
.report-container .org-name { color: var(--soft-ink) !important; font-weight: 600; }
.report-container .org-type-badge { color: #50647d !important; background: #edf2f7 !important; }
.report-container .visitor-count { color: #1e3a5f !important; background: #edf2f7 !important; }
.report-container .action-btn {
  min-height: 44px;
  border: 0 !important;
  border-radius: 9px !important;
  background: #edf2f7 !important;
  color: #1e3a5f !important;
  box-shadow: none !important;
}
.report-container .action-btn:hover { background: #dfe7f0 !important; }
.report-container table thead th { color: #40536b; background: #f0f3f7; }
.report-container table tbody tr { border-color: var(--soft-line); }

/* Public news and image feed: keep photography, simplify its surrounding UI. */
#pills-news .news-hero {
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: var(--soft-shadow-md) !important;
}
#pills-news .news-hero-bg-overlay {
  background: linear-gradient(90deg, rgba(16, 37, 63, 0.88), rgba(16, 37, 63, 0.56) 58%, rgba(16, 37, 63, 0.24)) !important;
}
#pills-news .news-hero-title { text-shadow: none !important; font-weight: 600 !important; }
#pills-news .news-search-bar {
  border: 0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}
#pills-news .news-filter-bar { border: 0 !important; background: transparent !important; box-shadow: none !important; }
#pills-news .news-chip {
  border: 0 !important;
  border-radius: 9px !important;
  background: #edf2f7 !important;
  color: #42566f !important;
  box-shadow: none !important;
}
#pills-news .news-chip.active {
  background: #1e3a5f !important;
  color: #fff !important;
}
#pills-news .news-card {
  overflow: hidden;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: var(--soft-shadow-sm) !important;
  transform: none !important;
}
#pills-news .news-card:hover { box-shadow: var(--soft-shadow-md) !important; transform: none !important; }
#pills-news .news-card-title { color: var(--soft-ink) !important; font-weight: 600 !important; }
#pills-news .news-card-footer-btn { border-radius: 8px !important; box-shadow: none !important; }

/* Admin: one settings surface with quiet section dividers, not nested cards. */
.full-width-container {
  width: min(100%, 1520px) !important;
  max-width: 1520px !important;
  margin: 0 auto;
  padding: 26px clamp(14px, 2.8vw, 40px) 48px !important;
}
.full-width-container > .d-flex.justify-content-between.border-bottom {
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--soft-line) !important;
}
.full-width-container h4.text-danger { color: var(--soft-ink) !important; }
#passwordScreen {
  width: min(100%, 620px);
  min-height: 320px;
  height: auto;
  margin: 28px auto;
  padding: 32px 24px;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: var(--soft-shadow-md) !important;
}
#adminContent:not(.d-none) {
  margin-top: 20px;
  padding: 8px 28px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow-sm);
}
.admin-settings-panel {
  margin-bottom: 0 !important;
  padding: 22px 0;
  border: 0 !important;
  border-bottom: 1px solid var(--soft-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.admin-settings-panel:last-child { border-bottom: 0 !important; }
.admin-settings-panel h5 { color: var(--soft-ink); font-weight: 600 !important; }
.line-notification-meta, .reminder-meta { color: var(--soft-ink-muted); }
.log-table-container {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.table-responsive { border: 0 !important; box-shadow: none !important; }
.table thead th {
  padding-block: 12px;
  border-bottom: 1px solid #d8e0e9 !important;
  background: #f0f3f7 !important;
  color: #40536b;
  font-weight: 600;
}
.table tbody td {
  padding-block: 12px;
  border-color: var(--soft-line) !important;
  color: #293d57;
}
.table-hover tbody tr:hover > * { background: #f8fafc; }
.table-bordered > :not(caption) > * > * {
  border-right: 0 !important;
  border-left: 0 !important;
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select { min-height: 40px; border-radius: 9px; }

/* Consistent footer and small-screen rhythm across all routes. */
.site-contact-footer {
  border-top: 1px solid #304b6c !important;
  background: #1e3553 !important;
  color: #e8edf4;
}
.site-contact-footer::before { display: none !important; }
.site-contact-footer__eyebrow { color: #ffd0b8 !important; }
.site-contact-footer__map-container {
  border: 0 !important;
  border-radius: 12px;
  box-shadow: none !important;
}
.site-contact-footer__map-link,
.site-contact-footer__links a,
.site-contact-footer__map-load {
  border-color: rgba(255,255,255,0.32) !important;
  color: #fff !important;
}
.site-contact-footer__links a { background: rgba(255,255,255,0.08); }

.auth-gate-card {
  border: 0 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: var(--soft-shadow-md) !important;
}
.auth-card-top-bar { background: #1e3a5f !important; }
.auth-provider-btn { border-radius: 10px !important; box-shadow: none !important; }

@media (max-width: 768px) {
  .main-container { width: 100%; margin: 18px auto 32px; padding: 0 14px; }
  .app-shell-header .app-header { flex-wrap: wrap; gap: 8px 14px; }
  .app-shell-header .app-header-actions { width: 100%; justify-content: flex-start; }
  .app-shell-header .visitor-nav-v30 { border-radius: 0; }
  .report-wrapper { padding: 18px 14px 32px; }
  .full-width-container { padding: 18px 14px 32px !important; }
  #adminContent:not(.d-none) { padding: 8px 16px; border-radius: 14px; }
  .admin-settings-panel { padding: 18px 0; }
  .db-chart-card { padding: 16px !important; }
}

@media (max-width: 480px) {
  .app-shell-header .app-header-actions .header-utility-button { min-width: 42px; }
  .app-shell-header .app-header-actions .header-utility-button span { max-width: 150px; }
  #passwordScreen { padding: 24px 18px; }
  #adminContent:not(.d-none) { padding: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Calendar: keep one clean surface and use light dividers for the day grid. */
#pills-calendar > .card-custom {
  padding: 26px 24px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
#pills-calendar > .card-custom::before,
#pills-calendar > .card-custom::after { display: none !important; }
#pills-calendar > .card-custom:hover {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
#pills-calendar #calendar {
  margin-top: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#pills-calendar .fc .fc-toolbar.fc-header-toolbar {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border: 0 !important;
  border-bottom: 1px solid var(--soft-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#pills-calendar .fc .fc-toolbar-title {
  color: var(--soft-ink) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  font-weight: 600;
}
#pills-calendar .fc-theme-standard .fc-scrollgrid,
#pills-calendar .fc-theme-bootstrap5 .fc-scrollgrid {
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
}
#pills-calendar .fc-theme-standard th,
#pills-calendar .fc-theme-bootstrap5 th {
  border-color: var(--soft-line) !important;
  border-bottom-width: 1px !important;
  background: #f0f3f7 !important;
  color: #50647d !important;
  text-transform: none;
  letter-spacing: 0;
}
#pills-calendar .fc-theme-standard td,
#pills-calendar .fc-theme-bootstrap5 td {
  border-color: #e9edf2 !important;
  background: #fff;
}

@media (max-width: 768px) {
  #pills-calendar > .card-custom { padding: 20px 12px !important; }
  #pills-calendar .fc .fc-toolbar.fc-header-toolbar { padding-bottom: 12px; }
}
