/* Dashboard Hotline — mode terang dengan merah brand #b5121b, mengikuti template AdminLTE. */
:root {
  color-scheme: light;
  --bs-danger: #b5121b;
  --bs-danger-rgb: 181, 18, 27;
  --bs-primary: #b5121b;
  --bs-primary-rgb: 181, 18, 27;
  --bs-body-color: #292d32;
  --bs-body-bg: #fff;
  --bs-border-color: #dfe2e6;
  --hotline-red: #b5121b;
  --hotline-red-dark: #850d16;
  --hotline-border: #dfe2e6;
}
body[data-bs-theme="dark"] {
  color-scheme: light;
  --bs-body-color: #292d32;
  --bs-body-bg: #fff;
  --bs-emphasis-color: #181a1d;
  --bs-secondary-color: #626970;
  --bs-tertiary-color: #626970;
  --bs-tertiary-bg: #f1f2f4;
  --bs-secondary-bg: #f7f7f8;
  --bs-border-color: #dfe2e6;
  --bs-link-color: #98111c;
  --bs-link-hover-color: #6f0c14;
}
html {
  color-scheme: light;
}
body {
  min-width: 320px;
  color: #292d32 !important;
  background: #fff !important;
}
.hidden {
  display: none !important;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #070707 0%, #171717 42%, #5f0b12 78%, #b5121b 100%) !important;
}
.login-standalone-shell {
  width: min(100%, 410px);
}
.login-standalone-shell .login-card-box {
  width: 100%;
}
body.role-admin .master-only {
  display: none !important;
}
.text-secondary,
.muted {
  color: #626970 !important;
}
a {
  color: #98111c !important;
}
a:hover {
  color: #6f0c14 !important;
}
::selection {
  color: #fff;
  background: #92111b;
}

.app-wrapper,
.app-main,
.app-content,
.app-footer {
  min-width: 0;
  color: #292d32 !important;
  background: #fff !important;
}
.app-header {
  min-height: 48px;
  color: #fff !important;
  background: #b5121b !important;
  border: 0 !important;
  box-shadow: none;
}
.app-header .container-fluid {
  min-height: 48px;
}
.app-header .navbar-nav {
  align-items: center;
}
.app-header .nav-link {
  height: auto !important;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}
.app-header .header-brand-title {
  display: flex;
  align-items: center;
  line-height: 1.25;
  padding-block: 0.25rem;
}
.app-header .nav-link,
.app-header .fw-semibold,
.app-header .phone-info,
.app-header .sidebar-toggle .bi {
  color: #fff !important;
}
.app-header .sidebar-toggle {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 !important;
  display: grid;
  place-items: center;
  border: 0;
  line-height: 1;
}
.app-header .sidebar-toggle .bi {
  display: block;
  line-height: 1;
}
.app-header .sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 0.35rem;
}
.app-header .btn-outline-secondary,
.app-header .btn-outline-danger {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.app-header .btn-outline-secondary:hover,
.app-header .btn-outline-danger:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

.app-sidebar {
  color: #34383e !important;
  background: #fff !important;
  --lte-sidebar-bg: #fff;
  --lte-sidebar-color: #34383e;
  --lte-sidebar-hover-bg: #f8eaec;
  --lte-sidebar-hover-color: #94111e;
  --lte-sidebar-active-bg: #b5121b;
  --lte-sidebar-active-color: #fff;
  border-right: 1px solid #e1e3e6 !important;
  box-shadow: none;
}
.sidebar-brand {
  background: #b5121b !important;
  border-bottom: 1px solid #8f1018 !important;
}
.sidebar-brand .brand-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: #fff !important;
  text-decoration: none;
}
.sidebar-brand .brand-image {
  display: block;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 0 !important;
  background: transparent !important;
}
.brand-text {
  color: #fff !important;
  font-weight: 600 !important;
}
.sidebar-menu .nav-link {
  width: calc(100% - 1rem);
  margin: 0.12rem 0.5rem;
  border: 0;
  border-radius: 0.35rem;
  text-align: left;
  color: #34383e !important;
  background: transparent;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}
.sidebar-menu .nav-link p {
  margin: 0;
  color: inherit !important;
}
.sidebar-menu .nav-link .nav-icon {
  color: inherit !important;
}
.sidebar-menu .nav-link:hover {
  color: #94111e !important;
  background: #f8eaec !important;
}
.sidebar-menu .nav-link.active {
  color: #fff !important;
  background: #b5121b !important;
  box-shadow: 0 2px 7px rgba(165, 17, 32, 0.18);
}
.sidebar-menu .nav-link.active p,
.sidebar-menu .nav-link.active .nav-icon {
  color: #fff !important;
}
.sidebar-footer {
  margin-top: auto;
  color: #687078 !important;
  border-top: 1px solid #e2e4e8 !important;
}
.app-sidebar .text-white-50 {
  color: #687078 !important;
}

.app-content-header {
  padding-block: 0.7rem 0.55rem;
  color: #292d32 !important;
  background: #fff !important;
  border-bottom: 0 !important;
}
.app-content-header .container-fluid > .d-flex {
  gap: 1rem;
}
.app-content-header .header-actions {
  max-width: 100%;
}
.app-content-header .form-control {
  width: auto;
  min-width: 135px;
}
.page-title,
.app-content-header .page-title {
  color: #25282d !important;
  font-size: 1.28rem;
  font-weight: 700;
}
.page-title::before {
  display: none;
}
.app-content-header p {
  color: #626970 !important;
}
.app-footer {
  color: #626970 !important;
  font-size: 0.82rem;
}

.card,
.modal-content,
.tpl-card {
  --bs-card-color: #292d32;
  --bs-card-bg: #fff;
  --bs-card-border-color: #dfe2e6;
  color: #292d32 !important;
  background: #fff !important;
  border: 1px solid #dfe2e6 !important;
  border-radius: 0.35rem;
  box-shadow: 0 1px 4px rgba(30, 35, 40, 0.06) !important;
}
.card-header,
.card-footer,
.modal-header,
.modal-footer {
  color: #292d32 !important;
  background: #fafafa !important;
  border-color: #e2e4e8 !important;
}
.card-header {
  align-items: center;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0;
  color: #292d32 !important;
}
.card-title .bi {
  color: #45494e !important;
}
.card-body,
.card-body p,
.card-body h3,
.modal-title,
.modal-body,
.modal-footer,
label,
strong,
small {
  color: #292d32 !important;
}
.card-body .text-secondary,
.card-body .text-muted,
.card-body .muted,
.conv-item .last,
.bubble .meta,
.tpl-card-title .tpl-key,
.empty-hint {
  color: #687078 !important;
}
.card-body .text-danger,
.dir-out {
  color: #a51220 !important;
}
.card-body .text-success,
.dir-in {
  color: #176b50 !important;
}
.license-preview,
.license-preview strong {
  color: #292d32 !important;
  background: #f1f2f4 !important;
  border-color: #cfd3d8 !important;
}
.license-preview strong {
  font-weight: 700;
}
.pm2-card-header {
  display: flex !important;
  align-items: center !important;
  width: 100%;
  justify-content: space-between !important;
}
.pm2-card-header #pm2Status {
  margin-left: auto !important;
  white-space: nowrap;
}
.pm2-action-btn {
  min-width: 128px;
  min-height: 36px;
  padding: 0.5rem 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  border-width: 1px !important;
  border-radius: 0.35rem !important;
  white-space: nowrap;
}
.pm2-action-btn.btn-warning {
  color: #4b3810 !important;
  background: #ffc107 !important;
  border-color: #d39e00 !important;
}
.pm2-action-btn.btn-dark {
  color: #fff !important;
  background: #343a40 !important;
  border-color: #343a40 !important;
}
.pm2-action-btn:disabled {
  opacity: 0.58 !important;
  cursor: not-allowed;
}
.card:not(.security-panel) {
  border-top: 1px solid #e0e3e6 !important;
}

.btn-danger,
.btn-primary {
  color: #fff !important;
  background: #b5121b !important;
  border-color: #b5121b !important;
  box-shadow: none;
}
.btn-danger:hover,
.btn-primary:hover {
  color: #fff !important;
  background: #850d16 !important;
  border-color: #850d16 !important;
}
.btn-outline-primary,
.btn-outline-danger {
  color: #98111c !important;
  border-color: #b5121b !important;
  background: #fff !important;
}
.btn-outline-primary:hover,
.btn-outline-danger:hover {
  color: #fff !important;
  background: #b5121b !important;
  border-color: #b5121b !important;
}
.btn-outline-secondary {
  color: #4f555c !important;
  border-color: #b9bec4 !important;
  background: #fff !important;
}
.btn-outline-secondary:hover {
  color: #292d32 !important;
  background: #f1f2f4 !important;
}

.badge-starting,
.badge-qr {
  color: #604300 !important;
  background: #fff0bd !important;
}
.badge-preview {
  color: #07586a !important;
  background: #d8f3f7 !important;
}
.badge-qr {
  animation: pulse 1.5s ease-in-out infinite;
}
.badge-open {
  color: #14583a !important;
  background: #d9f1e3 !important;
}
.badge-closed,
.badge-logged_out {
  color: #77101c !important;
  background: #f6dadd !important;
}
@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}
.phone-info {
  max-width: min(35vw, 260px);
  overflow-wrap: anywhere;
}

.qr-panel {
  padding: 1rem 1.25rem;
}
.qr-image {
  width: min(220px, 55vw);
  height: auto;
  border: 1px solid #d8dadd;
  border-radius: 0.5rem;
  background: #fff !important;
}
.security-panel {
  overflow: hidden;
  margin-bottom: 1rem;
  background: #f6e3e5 !important;
  border: 1px solid #dfb6bb !important;
  border-top: 0 !important;
  box-shadow: none !important;
}
.security-panel .card-header {
  background: #c8868d !important;
  border-color: #c8868d !important;
}
.security-panel .card-header,
.security-panel .card-title,
.security-panel .card-title .bi {
  color: #40151a !important;
}
.security-panel .card-body {
  background: #f6e3e5 !important;
  color: #34272a !important;
}
.security-panel #authStatus,
.security-panel .text-secondary {
  color: #34272a !important;
}
.alert-info {
  color: #4b1e23 !important;
  background: #f8e9eb !important;
  border: 1px solid #e8c4c8 !important;
  border-left: 4px solid #b5121b !important;
}
.alert-warning {
  color: #4b3810 !important;
  background: #fff6dc !important;
  border: 1px solid #f0dfa8 !important;
}
.alert-info *,
.alert-warning * {
  color: inherit !important;
}

/* Grid statistik: tiga kolom per baris pada desktop. */
.small-box {
  min-height: 60px;
  border: 1px solid rgba(80, 25, 30, 0.2) !important;
  border-radius: 0.35rem;
  box-shadow: 0 1px 3px rgba(30, 20, 20, 0.08) !important;
}
.small-box .inner {
  padding: 0.5rem 0.65rem;
}
.small-box .inner p {
  margin: 0 0 0.15rem;
  font-size: 0.76rem;
}
.small-box .inner h3 {
  margin: 0;
  font-size: 1.35rem;
}
.small-box .small-box-icon {
  top: 8px;
  right: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 2rem;
}
.small-box.text-bg-danger {
  color: #fff !important;
  background: #b5121b !important;
}
.small-box.text-bg-primary {
  background: #f7e6e8 !important;
}
.small-box.text-bg-success {
  background: #c51e2d !important;
}
.small-box.text-bg-info {
  background: #e4f3f1 !important;
}
.small-box.text-bg-warning {
  background: #79232d !important;
}
.small-box.text-bg-secondary {
  background: #c77d87 !important;
}
.small-box.text-bg-danger .inner,
.small-box.text-bg-danger .inner p,
.small-box.text-bg-danger .inner h3,
.small-box.text-bg-danger .small-box-icon,
.small-box.text-bg-success .inner,
.small-box.text-bg-success .inner p,
.small-box.text-bg-success .inner h3,
.small-box.text-bg-success .small-box-icon,
.small-box.text-bg-warning .inner,
.small-box.text-bg-warning .inner p,
.small-box.text-bg-warning .inner h3,
.small-box.text-bg-warning .small-box-icon,
.small-box.text-bg-secondary .inner,
.small-box.text-bg-secondary .inner p,
.small-box.text-bg-secondary .inner h3,
.small-box.text-bg-secondary .small-box-icon {
  color: #fff !important;
}
.small-box.text-bg-primary .inner,
.small-box.text-bg-primary .inner p,
.small-box.text-bg-primary .inner h3,
.small-box.text-bg-primary .small-box-icon {
  color: #59131c !important;
}
.small-box.text-bg-info .inner,
.small-box.text-bg-info .inner p,
.small-box.text-bg-info .inner h3,
.small-box.text-bg-info .small-box-icon {
  color: #194d47 !important;
}

.chart {
  height: 218px;
  display: flex;
  align-items: flex-end;
  gap: clamp(2px, 0.55vw, 8px);
  padding: 12px 3px 28px;
  border-bottom: 1px solid #d8dadd;
  overflow-x: auto;
}
.bar-col {
  min-width: 13px;
  flex: 1 0 13px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.bar-stack {
  width: min(100%, 28px);
  min-height: 2px;
  display: flex;
  flex-direction: column-reverse;
}
.bar-in,
.bar-out {
  width: 100%;
  min-height: 1px;
}
.bar-in {
  background: #b5121b;
  border-radius: 3px 3px 0 0;
}
.bar-out {
  background: #d9848c;
}
.bar-label {
  color: #53585e !important;
  font-size: 0.68rem;
  white-space: nowrap;
}
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 0.5rem;
  color: #545b63 !important;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #545b63 !important;
}
.legend-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.55rem 0;
  color: #30343a !important;
  border-bottom: 1px solid #e3e5e8;
  font-size: 0.86rem;
}
.breakdown-row:last-child {
  border-bottom: 0;
}
.breakdown .bar-track {
  flex: 1;
  height: 7px;
  min-width: 28px;
  background: #e6e7e9 !important;
  border-radius: 999px;
  overflow: hidden;
}
.breakdown .bar-fill {
  height: 100%;
  background: #b5121b;
  border-radius: inherit;
}
.breakdown .num {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.input-wide {
  flex: 1 1 260px;
  min-width: 220px;
}
.table-responsive {
  width: 100%;
}
.table {
  width: 100%;
  margin-bottom: 0;
  --bs-table-color: #292d32;
  --bs-table-bg: #fff;
  --bs-table-border-color: #e0e3e6;
  --bs-table-striped-color: #292d32;
  --bs-table-striped-bg: #f7f7f8;
  --bs-table-hover-color: #292d32;
  --bs-table-hover-bg: #f9edef;
  color: #292d32 !important;
}
.table > :not(caption) > * > * {
  color: #292d32 !important;
  border-color: #e0e3e6 !important;
}
.table thead.table-light,
.table thead.table-light th {
  color: #292d32 !important;
  background: #f1f2f4 !important;
}
#msgBody td {
  font-size: 0.82rem;
}
.cell-text {
  min-width: 220px;
  max-width: 420px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dir-in {
  color: #176b50 !important;
  font-weight: 700;
}
.dir-out {
  color: #a51220 !important;
  font-weight: 700;
}

.conv-list {
  max-height: 66vh;
  overflow-y: auto;
}
.conv-item {
  padding: 0.75rem;
  color: #30343a !important;
  border-bottom: 1px solid #e4e6e8;
  cursor: pointer;
  border-radius: 0.375rem;
}
.conv-item:hover,
.conv-item.active {
  color: #292d32 !important;
  background: #f9eaec !important;
}
.conv-item .num {
  display: block;
  color: #292d32 !important;
  font-weight: 650;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.conv-item .last {
  display: block;
  color: #687078 !important;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-thread {
  max-height: 66vh;
  min-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.25rem;
}
.bubble {
  max-width: 86%;
  padding: 0.6rem 0.8rem;
  border-radius: 0.85rem;
  font-size: 0.87rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.in {
  align-self: flex-start;
  color: #292d32 !important;
  background: #f0f1f3 !important;
  border: 1px solid #e0e2e5;
  border-bottom-left-radius: 0.2rem;
}
.bubble.out {
  align-self: flex-end;
  color: #fff !important;
  background: #941321 !important;
  border: 1px solid #80101d;
  border-bottom-right-radius: 0.2rem;
}
.bubble .meta {
  display: block;
  margin-top: 0.25rem;
  color: inherit !important;
  font-size: 0.68rem;
  opacity: 0.72;
}

.tpl-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tpl-card {
  padding: 1rem;
}
.tpl-card.custom {
  border-left: 4px solid #25835e !important;
}
.tpl-card.builtin {
  border-left: 4px solid #b5121b !important;
}
.tpl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}
.tpl-card-title {
  color: #292d32 !important;
  font-weight: 650;
  font-size: 0.9rem;
}
.tpl-card-title .tpl-key {
  margin-left: 0.4rem;
  color: #687078 !important;
  font-size: 0.75rem;
  font-family: var(--bs-font-monospace);
}
.tpl-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tpl-input,
.tpl-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  color: #292d32 !important;
  background: #fff !important;
  border: 1px solid #cfd3d8;
  border-radius: 0.375rem;
  font-size: 0.88rem;
  font-family: inherit;
  margin-bottom: 0.5rem;
}
.tpl-input:focus,
.tpl-textarea:focus {
  border-color: #b5121b !important;
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgba(181, 18, 27, 0.14);
}
.tpl-textarea {
  min-height: 90px;
  resize: vertical;
  white-space: pre-wrap;
}
.tpl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tpl-row .tpl-input {
  flex: 1 1 180px;
}
.tpl-saved,
.form-msg.ok,
.ok-text {
  color: #176b50 !important;
  font-size: 0.8rem;
  font-weight: 650;
}
.tpl-error,
.form-msg.err {
  color: #9d1b28 !important;
  font-size: 0.8rem;
}
.empty-hint {
  padding: 1.25rem;
  color: #687078 !important;
  text-align: center;
  font-size: 0.88rem;
  border: 1px dashed #c7ccd1 !important;
  border-radius: 0.5rem;
}
.form-msg {
  min-height: 1.25rem;
}
.warn-text {
  color: #8a5a00 !important;
  font-weight: 600;
}
.form-control,
.form-select,
.input-group-text {
  color: #292d32 !important;
  background: #fff !important;
  border-color: #cfd3d8 !important;
}
.form-control::placeholder,
.tpl-input::placeholder,
.tpl-textarea::placeholder {
  color: #727981 !important;
  opacity: 1;
}
.form-control:focus,
.form-select:focus {
  color: #292d32 !important;
  background: #fff !important;
  border-color: #b5121b !important;
  box-shadow: 0 0 0 0.18rem rgba(181, 18, 27, 0.14) !important;
}
.modal-backdrop {
  --bs-backdrop-bg: #171717;
  --bs-backdrop-opacity: 0.45;
}

/* Tinggi navbar dan kepala sidebar diselaraskan; keduanya memakai merah brand yang sama. */
.app-header {
  min-height: 64px !important;
  height: auto;
  padding-block: 0 !important;
  background: #b5121b !important;
}
.app-header .container-fluid {
  min-height: 64px !important;
}
.sidebar-brand {
  height: 64px !important;
  min-height: 64px !important;
  flex: 0 0 64px;
  background: #b5121b !important;
  border-bottom: 1px solid #8f1018 !important;
}
.sidebar-brand .brand-link {
  height: 64px !important;
  min-height: 64px !important;
  box-sizing: border-box;
  padding-block: 0.5rem;
  background: #b5121b !important;
}

/* Navigasi tab: sembunyikan semua panel selain panel yang sedang dipilih. */
.tab-panel {
  display: none !important;
}
.tab-panel.active {
  display: block !important;
}

@media (min-width: 768px) {
  .tab-panel#tab-ringkasan > .row:first-child > [class*="col-"] {
    flex: 0 0 33.333333%;
    width: 33.333333%;
  }
}
@media (max-width: 767.98px) {
  .app-content-header .container-fluid > .d-flex {
    align-items: stretch !important;
  }
  .app-content-header .container-fluid > .d-flex > div:last-child {
    width: 100%;
    margin-left: 0 !important;
    justify-content: flex-end;
  }
  .app-content-header .form-control {
    flex: 1 1 115px;
    min-width: 0;
  }
  .phone-info {
    display: none;
  }
  .small-box {
    min-height: 68px;
  }
  .small-box .inner h3 {
    font-size: 1.2rem;
  }
  .card-header {
    align-items: flex-start;
  }
  .tpl-card-header {
    align-items: flex-start;
  }
  .tpl-card-actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 479.98px) {
  .tab-panel#tab-ringkasan > .row:first-child > [class*="col-"] {
    flex: 0 0 100%;
    width: 100%;
  }
}

/* ===== Tambahan: fitur dashboard lama (Laporan, Excel, modal password, chip filter) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  padding: 1.25rem;
}
.modal-overlay.hidden {
  display: none !important;
}
body.role-admin .master-only {
  display: none !important;
}
.modal-box {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid #dfe2e6;
  border-radius: 0.5rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  padding: 1.25rem 1.4rem;
}
.modal-box .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #292d32;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.modal-box .form-row {
  margin-bottom: 0.85rem;
}
.modal-box .form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #292d32;
  margin-bottom: 0.3rem;
}
.modal-box .form-row input:disabled {
  background: #f1f2f4;
  color: #687078;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.form-msg {
  min-height: 1.25rem;
  font-size: 0.82rem;
}

.chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chip {
  padding: 0.38rem 0.85rem;
  border: 1px solid #cfd3d8;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #30343a;
}
.chip:hover {
  background: #f8eaec;
  color: #94111e;
}
.chip.active {
  background: #b5121b;
  color: #fff;
  border-color: #b5121b;
  font-weight: 600;
}

.kpi-mini {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
  font-size: 0.83rem;
  color: #30343a;
}
.kpi-mini b {
  color: #b5121b;
  font-size: 0.95rem;
}

.admin-badge {
  font-size: 0.68rem;
  background: #fff0bd;
  color: #604300;
  border: 1px solid #ecd27a;
  border-radius: 6px;
  padding: 1px 7px;
  margin-left: 0.5rem;
  font-weight: 600;
}

/* Baris breakdown (markup app.js saat ini): nama, track, jumlah. */
.breakdown .row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-left: 0;
  margin-right: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid #e3e5e8;
  font-size: 0.86rem;
}
.breakdown .row > * {
  width: auto;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.breakdown .row:last-child {
  border-bottom: 0;
}
.breakdown .row > :first-child {
  flex: 0 1 42%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breakdown .row .bar-track {
  flex: 1 1 auto;
  height: 7px;
  min-width: 48px;
  background: #e6e7e9;
  border-radius: 999px;
  overflow: hidden;
  margin: 0;
}
.breakdown .row .bar-fill {
  height: 100%;
  background: #b5121b;
  border-radius: inherit;
}
.breakdown .row .num,
.breakdown .row > :last-child {
  flex: 0 0 auto;
  min-width: 2.75rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.tpl-msg {
  font-size: 0.8rem;
  margin-right: 0.4rem;
}
.tpl-msg.tpl-saved {
  color: #176b50;
  font-weight: 650;
}
.tpl-msg.tpl-error {
  color: #9d1b28;
}

#lapFrom,
#lapTo {
  width: auto;
  min-width: 135px;
}
#lapBody td {
  font-size: 0.82rem;
}

/* Penyelaras visual dengan template referensi: area navigasi sidebar putih,
   teks brand berwarna putih di atas kepala sidebar yang merah brand. */
.sidebar-wrapper {
  background: #fff !important;
}
.sidebar-brand .brand-link {
  color: #fff !important;
}

/* Tombol ekspor CSV di kepala halaman (sejajar dengan tombol PDF). */
.header-actions .btn-outline-primary {
  color: #98111c !important;
  border-color: #b5121b !important;
  background: #fff !important;
}
.header-actions .btn-outline-primary:hover {
  color: #fff !important;
  background: #b5121b !important;
  border-color: #b5121b !important;
}

/* Halaman login mandiri harus memiliki latar sendiri, bukan latar putih dashboard. */
body.login-page {
  background: linear-gradient(135deg, #070707 0%, #171717 42%, #5f0b12 78%, #b5121b 100%) !important;
}

/* Efek blur/gelap pada backdrop khusus saat belum login dengan nuansa merah khas PDI Perjuangan */
#loginModal.modal {
  background: radial-gradient(circle at center, rgba(181, 18, 27, 0.45) 0%, rgba(20, 10, 12, 0.88) 100%);
  backdrop-filter: blur(6px);
}
#loginModal .modal-dialog {
  max-width: 410px;
}
.login-card-box {
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35) !important;
}
.login-header-banner {
  background: linear-gradient(145deg, #b5121b 0%, #830b13 100%);
  position: relative;
}
.login-logo-wrapper {
  display: inline-flex;
  padding: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.login-brand-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.modal-sm-custom {
  max-width: 380px !important;
}

/* Semua modal dashboard memakai kaca transparan merah-hitam seperti nuansa login. */
.modal-backdrop.show {
  opacity: 1 !important;
  background: radial-gradient(
    circle at 50% 35%,
    rgba(181, 18, 27, 0.22) 0%,
    rgba(15, 15, 15, 0.68) 72%,
    rgba(5, 5, 5, 0.8) 100%
  ) !important;
  backdrop-filter: blur(8px);
}
.modal:not(#loginModal) .modal-content {
  color: #292d32 !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 246, 247, 0.86)) !important;
  border: 1px solid rgba(181, 18, 27, 0.38) !important;
  border-radius: 0.85rem !important;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.28) inset !important;
  backdrop-filter: blur(16px);
}
.modal:not(#loginModal) .modal-header,
.modal:not(#loginModal) .modal-body,
.modal:not(#loginModal) .modal-footer {
  color: #292d32 !important;
  background: transparent !important;
  border-color: rgba(181, 18, 27, 0.12) !important;
}
.modal:not(#loginModal) .modal-title,
.modal:not(#loginModal) label,
.modal:not(#loginModal) strong,
.modal:not(#loginModal) small,
.modal:not(#loginModal) p,
.modal:not(#loginModal) .form-label {
  color: #292d32 !important;
}
.modal:not(#loginModal) .btn-close {
  filter: none;
}
.modal:not(#loginModal) .form-control,
.modal:not(#loginModal) .form-select,
.modal:not(#loginModal) .input-group-text {
  color: #292d32 !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border-color: rgba(181, 18, 27, 0.22) !important;
}
.modal:not(#loginModal) .form-control::placeholder {
  color: rgba(41, 45, 50, 0.56) !important;
}
.modal-overlay {
  background: radial-gradient(circle at 50% 35%, rgba(181, 18, 27, 0.22) 0%, rgba(15, 15, 15, 0.68) 72%, rgba(5, 5, 5, 0.8) 100%) !important;
  backdrop-filter: blur(8px);
}
.modal-box {
  color: #292d32 !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 246, 247, 0.86)) !important;
  border-color: rgba(181, 18, 27, 0.38) !important;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.28) inset !important;
  backdrop-filter: blur(16px);
}
.modal-box .modal-title,
.modal-box .form-row label {
  color: #292d32 !important;
}

/* Notifikasi logout pada halaman auth: lebih khas brand daripada alert Bootstrap standar. */
.login-notice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 1.1rem;
  padding: 0.82rem 2.85rem;
  overflow: hidden;
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: center;
  background: linear-gradient(110deg, rgba(12, 12, 12, 0.96), rgba(94, 9, 18, 0.94));
  border: 1px solid rgba(181, 18, 27, 0.72);
  border-radius: 0.65rem;
  box-shadow: 0 8px 20px rgba(90, 8, 15, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  animation: loginNoticeIn 0.38s ease-out both;
}
.login-notice::before {
  position: absolute;
  left: 0.85rem;
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  color: #b5121b;
  font-size: 0.8rem;
  font-weight: 800;
  content: "✓";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.login-notice::after {
  position: absolute;
  top: -2rem;
  right: -1rem;
  width: 7rem;
  height: 7rem;
  content: "";
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
@keyframes loginNoticeIn {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
