 
:root {
  --accent: #81d4fa;
  --accent-2: #1976d2;
  --primary: #2196f3;
  --bg: #121622;
  --card-bg: #1e212d;
  --muted: #b0bec5;
  --tooltip-bg: #64b5f6;
  --preloader-bg: rgba(18,22,34,0.96);
  --preloader-spinner: #81d4fa;
}

 
.modal-xl {
  max-width: 1140px !important;
  width: 100%;
}

 
.nav-link.active-underline {
  color: var(--accent) !important;
}

 
.navbar-nav .nav-link {
  position: relative;
  overflow: visible;
  color: #fff;
  background: none;
  font-weight: 600;
  text-decoration: none;
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -4px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.2s;
  opacity: 0.8;
  z-index: 2;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after,
.navbar-nav .nav-link.active-underline::after {
  transform: scaleX(1);
  opacity: 1;
}
 
.login-title-dashboard {
  font-family: 'Rajdhani', 'Segoe UI', Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  text-shadow:
    0 1px 0 #fff,
    0 2px 4px rgba(33,150,243,0.10);
  text-align: center;
  margin-bottom: 0.5rem;
}
 
body.dashboard-page {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.dashboard-wrapper {
  padding-top: 0;
}

.dashboard-card {
  background-color: var(--card-bg);
  border: 1px solid #2b2f3c;
  border-radius: 10px;
  color: white;
  padding: 1rem;
  margin-bottom: 1.2rem;
  margin-top: 0;
}
  
.dashboard-card .card-header {
  padding: 0.5rem 0;
  border-bottom: 1px solid #2c2c2c;
  overflow: hidden;
}
.marquee {
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 12s linear infinite;
  font-weight: bold;
  font-size: 1rem;
  color: #81d4fa;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.chart-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .chart-row {
    flex-direction: row;
  }
}
.chart-container {
  flex: 1;
  max-width: 420px;
}

/* === Custom Boxed Pager (boxed_full template) === */
.ci-boxed-pager { font-size: 0.85rem; }
/* Dark theme pagination */
.ci-boxed-pager-list { list-style:none; margin:0; padding:0; display:flex; gap:0; border:1px solid #2f3644; background:#1c222e; border-radius:4px; overflow:hidden; }
.ci-boxed-item { display:flex; }
.ci-boxed-item + .ci-boxed-item { border-left:1px solid #2f3644; }
.ci-boxed-item a, .ci-boxed-item span { display:block; padding:6px 16px; text-decoration:none; color:#b9c4d3; font-weight:500; background:transparent; line-height:1.2; transition:background .15s,color .15s; }
.ci-boxed-item a:focus { outline:2px solid #3b82f6; outline-offset:-2px; }
.ci-boxed-item.active a { background:#2563eb; color:#fff; font-weight:600; box-shadow:inset 0 0 0 1px #3b82f6; }
.ci-boxed-item.disabled a { color:#546070; cursor:not-allowed; background:#1c222e; }
.ci-boxed-item a:hover { background:#334155; color:#fff; }
.ci-boxed-item.active a:hover { background:#1d4ed8; }
.ci-boxed-item.disabled a:hover { background:#1c222e; color:#546070; }
.ci-boxed-item.ellipsis span { cursor:default; background:transparent; color:#647285; }
@media (prefers-color-scheme: light) {
  .ci-boxed-pager-list { border-color:#d0d7e2; background:#fff; }
  .ci-boxed-item + .ci-boxed-item { border-color:#d0d7e2; }
  .ci-boxed-item a, .ci-boxed-item span { color:#2d3642; }
  .ci-boxed-item.active a { background:#0d6efd; box-shadow:none; }
  .ci-boxed-item.disabled a { background:#f5f6f8; color:#9aa4b2; }
  .ci-boxed-item a:hover { background:#0d6efd; color:#fff; }
  .ci-boxed-item.disabled a:hover { background:#f5f6f8; color:#9aa4b2; }
  .ci-boxed-item.ellipsis span { color:#66707f; }
}
@media (max-width: 576px) {
  .ci-boxed-item a, .ci-boxed-item span { padding:6px 10px; }
  .ci-boxed-pager { font-size:0.75rem; }
}
.chart-container {
  /* Make chart take available vertical space while staying responsive */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  width: 100%;
}

#chartSurat {
  width: 100% !important;
  height: 100% !important;
  max-height: 520px;
  display: block;
}

@media (max-width: 768px) {
  .chart-container { min-height: 220px; }
}
.chart-description {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.desc-box {
  background-color: #262b3a;
  border: 1px solid #3a3f4f;
  border-radius: 8px;
  padding: 1rem;
  min-width: 180px;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
 
.desc-box h5 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--accent);
}
.desc-box .value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
}
.desc-box .note {
  font-size: 0.9rem;
  color: #b0bec5;
  margin-top: 0.25rem;
}
canvas#chartSurat {
  width: 100% !important;
  height: auto !important;
}
 
tr.paginated {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

tr.paginated[data-visible="false"] {
  opacity: 0;
  transform: scale(0.98);
}

tr.paginated[data-visible="true"] {
  opacity: 1;
  transform: scale(1);
}
 

 
:root, html, body { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

html, body {
  background-color: var(--bg);
  color: #f1f1f1;
  font-family: 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

 
#preloader {
  position: fixed;
  inset: 0;
  background: var(--preloader-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000; 
  transition: opacity .4s ease, visibility .4s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
#preloader .preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
#preloader .preloader-text {
  margin-top: 0;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .4px;
}
.preloader-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255,255,255,0.12);
  border-top-color: var(--preloader-spinner);
  border-radius: 50%;
  animation: preloader-spin 1s linear infinite;
}
@keyframes preloader-spin {
  to { transform: rotate(360deg); }
}

 
.content-wrapper {
  padding-block: 32px;
  display: flex;
  justify-content: center;
}

.row-balanced {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1240px;
  width: 100%;
}

 
.card {
  background: #1e2a3b;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid #2c3444;
  overflow: hidden;
}

.card-header {
  background-color: #0f172a;
  color: #90caf9;
  font-weight: 600;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  user-select: none;
}

.card-footer {
  background-color: #1c2233;
  padding: 0.75rem 1rem;
}

 
.preview-zone {
  background-color: #0d111b;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-zone img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

iframe {
  width: 100%;
  height: 360px;
  border: none;
}

 
.info-zone {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  flex-grow: 1;
}

.info-zone dl {
  margin-bottom: 1rem;
}

.info-zone dt {
  font-weight: 600;
  color: #ffffff;
}

.info-zone dd {
  margin-bottom: 1rem;
  color: #f1f1f1;
}

/* === Info Card: two-column alignment === */
/* Use a dedicated grid so labels and values line up perfectly like a table */
dl.info-grid {
  display: grid;
  grid-template-columns: 180px 10px minmax(0, 1fr); /* label | colon | value */
  column-gap: 8px;
  row-gap: 10px;
  align-items: start; /* top-align multi-line rows */
  margin: 0 0 1rem 0;
}

dl.info-grid dt.info-label,
dl.info-grid dd.info-value {
  margin: 0; /* reset default dl spacing */
}

dl.info-grid dt.info-label {
  color: #cfd8dc; /* slightly muted label */
  font-weight: 600;
  display: flex;
  justify-content: flex-start; /* left align labels for a cleaner look */
  align-items: center;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0;
}
dl.info-grid dt.info-label i {
  margin-right: 8px;
  color: #81d4fa;
  flex: 0 0 auto;
}

dl.info-grid dd.info-value {
  color: #ffffff;
  /* keep values readable and allow wrapping */
  word-break: break-word;
}

/* Inject the centered colon in the middle grid column */
/* Arrange columns: label (1), colon (2), value (3) */
dl.info-grid dt.info-label { grid-column: 1; position: relative; }
dl.info-grid dd.info-value { grid-column: 3; }

/* Render a centered colon in the middle column using the value cell as anchor */
dl.info-grid dd.info-value { position: relative; }
dl.info-grid dd.info-value::before {
  content: ':';
  position: absolute;
  /* move left into the reduced gap + colon column center */
  left: calc(-8px - 5px - 0.5ch);
  top: 50%;
  transform: translateY(-50%);
  color: #7f8a96;
}

/* Responsive: stack into a single column on small screens */
@media (max-width: 576px) {
  dl.info-grid {
    grid-template-columns: 1fr;
  }
  dl.info-grid dt.info-label {
    justify-content: flex-start;
    text-align: left;
    padding-right: 0;
  }
  /* Hide the colon on stacked layout to avoid odd line breaks */
  dl.info-grid dd.info-value::before { display: none; }
}

/* Detail label styling: fixed width, muted color, and icon spacing */
.info-zone dt.label-fixed {
  width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cfd8dc;
  
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 12px;
}
.info-zone dt.label-fixed i {
  margin-right: 8px;
  color: #81d4fa;
  flex: 0 0 auto;
}
.info-zone dd.label-value {
  display: block;
  margin-left: 0;
  padding-left: 12px;
  width: calc(100% - 180px);
}

 
@media (max-width: 768px) {
  .info-zone dt.label-fixed {
    display: block;
    text-align: left;
    padding-right: 0;
    margin-bottom: 0.25rem;
  }
  .info-zone dt.label-fixed i { margin-right: 8px; }
  .info-zone dd.label-value { width: 100%; padding-left: 0; }
}

 
.card-custom {
  flex: 1 1 500px;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

 
.btn {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
}

.btn-outline-light {
  color: #ffffff;
  border-color: #64b5f6;
  background-color: transparent;
}

.btn-outline-light:hover {
  background-color: #64b5f6;
  color: #121622;
  border-color: #64b5f6;
}

.btn-secondary {
  background-color: #546e7a;
  color: #fff;
  border: none;
}

.btn-secondary:hover {
  background-color: #37474f;
}

.btn-sm {
  padding: 6px 14px;
}

.btn-info.text-dark {
  background-color: #0dcaf0;
  border: none;
}

.btn-info.text-dark:hover {
  background-color: #31d2f2;
}

 
/* Scoped uppercase utility: apply only when intentional by adding .form-uppercase */
.form-uppercase input[type="text"],
.form-uppercase textarea {
  text-transform: uppercase;
}

.form-dark input,
.form-dark select,
.form-dark textarea {
  background-color: #1e212d;
  border: 1px solid #495057;
  color: white;
  min-height: 44px;
}

.form-dark input:focus,
.form-dark textarea:focus,
.form-dark select:focus {
  border-color: #0dcaf0;
  box-shadow: 0 0 0 0.15rem rgba(13, 202, 240, 0.25);
  background-color: #212531;
  color: white;
}

.form-label {
  color: #aeb6c1;
  font-weight: 500;
}

 
#filePreview {
  color: var(--primary);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

 
@media (max-width: 768px) {
  .card-custom {
    max-width: 100%;
  }

  .info-zone {
    padding: 1rem;
  }

  .card-header {
    font-size: 1rem;
  }

  .preview-zone iframe,
  .preview-zone img {
    max-height: 300px;
  }
}

 
.table td:not(.col-nomor),
.table th:not(.col-nomor) {
  text-transform: uppercase;
}


 
.col-no { width: 65px; max-width: 65px; }
.col-nomor { width: 180px; max-width: 180px; }
.col-pengirim, .col-tujuan { width: 180px; max-width: 180px; }
.col-tanggal, .col-tgl-disposisi { width: 140px; max-width: 140px; }
.col-perihal { width: 220px; max-width: 220px; }
.col-aksi { width: 220px; max-width: 220px; }

 
.table { min-width: 920px; }

 
.action-btn-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

 
.table td .truncate-text,
.table th .truncate-text {
  display: inline-block;
  max-width: 220px;
}

 
.toast-z { z-index: 1100 !important; }

 
.heading-poppins { font-size: 1.8rem; font-family: 'Poppins', sans-serif; }

 
.search-group { flex: 1 1 auto; max-width: 500px; }

 
.truncate-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

 
#suratTable {
  table-layout: fixed; 
  width: 100%;
}

#suratTable th, #suratTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#suratTable td .truncate-text, #suratTable th .truncate-text {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

 
#suratTable .col-tgl-disposisi { width: 120px; max-width: 120px; }
#suratTable .col-tanggal { width: 114px; max-width: 114px; }
#suratTable .col-tujuan { width: 171px; max-width: 171px; }
#suratTable .col-no { width: 65px; max-width: 65px; }

 

 
.tooltip-inner {
  background-color: var(--tooltip-bg);
  color: #121622;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  max-width: 240px;
  text-align: center;
}

.tooltip.bs-tooltip-top .tooltip-arrow { border-top-color: var(--tooltip-bg); }
.tooltip.bs-tooltip-bottom .tooltip-arrow { border-bottom-color: var(--tooltip-bg); }
.tooltip.bs-tooltip-start .tooltip-arrow { border-left-color: var(--tooltip-bg); }
.tooltip.bs-tooltip-end .tooltip-arrow { border-right-color: var(--tooltip-bg); }

 
.modal-backdrop.show { z-index: 1990 !important; }
.modal.show { z-index: 2000 !important; }
body.modal-open { overflow: hidden !important; }

 
.content-wrapper {
  padding-block: 32px;
  display: flex;
  justify-content: center;
}

.row-balanced {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1240px;
  width: 100%;
}

.card-custom {
  flex: 1 1 500px;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.preview-zone {
  background-color: #0d111b;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-zone img { max-width: 100%; max-height: 360px; object-fit: contain; display: block; margin: 0 auto; }

iframe { width: 100%; height: 360px; border: none; }

.info-zone { padding: 1.5rem; flex-grow: 1; }

@keyframes popIn { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

 

 

 
.dropdown-menu {
  background: linear-gradient(180deg, #0e1116, #14161b);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 30px rgba(2,6,23,0.6);
  color: #e6eef6;
  border-radius: 8px;
  padding: 6px 6px;
}

.dropdown-menu .px-3.py-2 { background: transparent; }

 
.dropdown-menu .fw-bold { color: #ffffff; font-size: 1rem; }
.dropdown-menu .text-muted { color: #9aa9b8 !important; }

 
.dropdown-menu .dropdown-item {
  color: #dbeaf7;
  padding: 9px 12px;
  border-radius: 6px;
  transition: background .14s ease, transform .06s ease;
}
.dropdown-menu .dropdown-item i {
  color: var(--accent);
  min-width: 18px;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background: linear-gradient(90deg, rgba(129,212,250,0.06), rgba(25,118,210,0.03));
  transform: translateY(-1px);
  color: #ffffff;
}

 
.dropdown-menu .text-danger { color: #ff7b7b !important; }
.dropdown-menu .text-danger:hover { background: rgba(255,123,123,0.06); }

 
.dropdown-submenu > .dropdown-menu {
  background: linear-gradient(180deg, #0c0f13, #111316);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.03);
}

 
.dropdown-divider { border-top-color: rgba(255,255,255,0.04); }

 
@media (max-width: 576px) {
  .dropdown-menu.dropdown-menu-end { right: 8px !important; left: 8px !important; }
}
