/* =========================================
   UI/UX DESIGN & THEME VARIABLES
   Copyright 2026 @egianshari
   ========================================= */
:root {
  --primary: #0f6cbd;
  --primary-hover: #0c5696;
  --bg-color: #f3f2f1;
  --card-bg: #ffffff;
  --text-main: #323130;
  --text-muted: #605e5c;
  --border-color: #edebe9;
  --table-header-bg: #faf9f8;
  --table-hover: #f0f6ff;
  --table-font-size: 14px;
  --highlight-bg: #fff100;
  --highlight-text: #000000;
}

[data-theme="dark"] {
  --primary: #479ef5;
  --primary-hover: #6cb0f7;
  --bg-color: #111111;
  --card-bg: #212121;
  --text-main: #f0f0f0;
  --text-muted: #a0a0a0;
  --border-color: #333333;
  --table-header-bg: #1a1a1a;
  --table-hover: #2d3748;
  --highlight-bg: #b2a800;
  --highlight-text: #ffffff;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  padding: 20px;
  color: var(--text-main);
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =========================================
   ANIMASI MODERN & STAGGERED EFFECTS
   ========================================= */
@keyframes backgroundPan {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Class Stagger (Digunakan via JS) */
.stagger-1 {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.stagger-2 {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.stagger-3 {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.stagger-4 {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
.stagger-5 {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

/* =========================================
   LAYAR LOGIN PREMIUM
   ========================================= */
#login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background:
    linear-gradient(
      -45deg,
      rgba(15, 108, 189, 0.85),
      rgba(0, 0, 0, 0.8),
      rgba(28, 43, 61, 0.8)
    ),
    url("https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?q=80&w=2070&auto=format&fit=crop")
      center/cover no-repeat;
  background-size: 200% 200%;
  animation: backgroundPan 0s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  transition:
    opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    visibility 0.6s;
}

.login-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 40px;
  border-radius: 20px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  width: 90%;
  max-width: 420px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation:
    fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    float 6s ease-in-out infinite;
  transition: box-shadow 0.3s ease;
}
.login-card:hover {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .login-card {
  background: rgba(28, 28, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}
.login-header h2 {
  margin: 0;
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
}
.login-header p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}
.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-main);
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.password-wrapper input {
  padding-right: 46px;
}

[data-theme="dark"] .input-group input {
  background: rgba(40, 40, 40, 0.6);
  border-color: rgba(255, 255, 255, 0.05);
}
.input-group input:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 4px rgba(15, 108, 189, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  color: var(--text-muted);
  transition: 0.2s;
}
.password-toggle-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
}
.caps-warning {
  display: none;
  font-size: 11px;
  color: #d13438;
  font-weight: 600;
  margin-top: 5px;
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--text-muted);
}
.remember-me-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
}
.remember-me-label input {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(15, 108, 189, 0.3);
  overflow: hidden;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 108, 189, 0.4);
  filter: brightness(1.1);
}
.btn-login:active {
  transform: scale(0.98) translateY(0);
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.login-divider:not(:empty)::before {
  margin-right: 1em;
}
.login-divider:not(:empty)::after {
  margin-left: 1em;
}

.btn-qr-login {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text-main);
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-qr-login:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(15, 108, 189, 0.06);
  transform: translateY(-2px);
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.copyright-text {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 25px;
  opacity: 0.8;
  transition: 0.3s;
}
.copyright-text:hover {
  opacity: 1;
  color: var(--primary);
}
.copyright-dashboard {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

/* =========================================
   DASHBOARD COMPONENTS
   ========================================= */
#app-container {
  display: none;
  max-width: 1300px;
  margin: auto;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  position: relative;
}
body.fullscreen-active {
  padding: 0;
  overflow: hidden;
}
#app-container.fullscreen-mode {
  max-width: 100% !important;
  height: 100vh !important;
  border-radius: 0 !important;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
#app-container.fullscreen-mode .table-wrapper {
  flex-grow: 1;
  max-height: none;
}

.header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}
.header-title-group {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.header-panel h2 {
  margin: 0;
  font-size: 24px;
  color: var(--primary);
}

.toggle-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--bg-color);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: 0.2s;
  user-select: none;
}
.toggle-sync:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.toggle-sync input {
  cursor: pointer;
  accent-color: var(--primary);
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.icon-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: var(--border-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
.icon-btn:active {
  transform: scale(0.95);
}

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  position: relative;
  flex-grow: 1;
  display: flex;
  min-width: 250px;
}
input[type="text"],
select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
input[type="text"] {
  width: 100%;
  padding-right: 80px;
}
input[type="text"]:focus,
select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 108, 189, 0.15);
  transform: translateY(-1px);
}

.search-inner-btn {
  position: absolute;
  background: none;
  border: none;
  font-size: 18px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.7;
  transition: 0.2s;
}
.search-inner-btn:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}
#btnVoice {
  right: 40px;
  color: var(--primary);
}
#btnScan {
  right: 10px;
}

.recent-searches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  min-height: 24px;
  align-items: center;
}
.search-chip {
  display: flex;
  align-items: center;
  background: var(--table-header-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.2s;
}
.search-chip:hover {
  border-color: var(--primary);
}
.chip-text {
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.chip-text:hover {
  background: var(--primary);
  color: white;
}
.chip-delete {
  padding: 4px 8px;
  cursor: pointer;
  color: #a4262c;
  font-weight: bold;
  border-left: 1px solid var(--border-color);
  transition: 0.2s;
}
.chip-delete:hover {
  background: #d13438;
  color: white;
  border-color: #d13438;
}
.search-chip-clear {
  background: #fdf3f4;
  border: 1px solid #f3b6b8;
  color: #d13438;
  font-size: 11px;
  cursor: pointer;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: auto;
  transition: 0.2s;
}
.search-chip-clear:hover {
  background: #d13438;
  color: white;
}

.action-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-action {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-action:hover {
  background: var(--border-color);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}
.btn-action:active {
  transform: scale(0.96);
}
.btn-danger {
  color: #d13438;
  border-color: #f3b6b8;
  background: #fdf3f4;
}
.btn-danger:hover {
  background: #fce2e3;
}
.separator {
  border-left: 1px solid var(--border-color);
  margin: 0 5px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  color: white;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  transition: 0.3s;
}
.status-connected {
  background-color: #107c41;
  box-shadow: 0 0 10px rgba(16, 124, 65, 0.3);
}
.status-loading {
  background-color: #d83b01;
  animation: pulseAnimation 1.5s infinite;
}
.status-offline {
  background-color: #a4262c;
}
.status-syncing {
  background-color: #0078d4;
}

.summary-container {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.summary-card {
  flex: 1;
  min-width: 140px;
  background: var(--table-header-bg);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.summary-card .card-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: bold;
  letter-spacing: 0.5px;
}
.summary-card .card-value {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary);
}

.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

/* TABLE & PAGINATION (Hover Animasi Mulus) */
.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 48vh;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--table-font-size);
  transition: font-size 0.2s;
}
th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
th {
  background-color: var(--table-header-bg);
  color: var(--text-main);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  transition: 0.2s;
}
th:hover {
  background-color: var(--border-color);
  color: var(--primary);
}
th::after {
  content: " ⇅";
  font-size: 11px;
  opacity: 0.4;
}

tbody tr {
  transition: all 0.2s ease-in-out;
}
#tableBody:hover tr {
  opacity: 0.5;
}
#tableBody tr:hover {
  opacity: 1 !important;
  background-color: var(--table-hover);
  transform: scale(1.002) translateX(4px);
  box-shadow: inset 4px 0 0 var(--primary);
  cursor: pointer;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}
.highlight {
  background-color: var(--highlight-bg);
  color: var(--highlight-text);
  font-weight: bold;
  border-radius: 3px;
  padding: 0 2px;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  font-size: 13px;
  color: var(--text-main);
  flex-wrap: wrap;
}
.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}
.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.page-btn:not(:disabled):hover {
  background: var(--border-color);
}

/* TOASTS & MODALS (Bouncy Entrance) */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--card-bg);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--primary);
  font-size: 13px;
  font-weight: 600;
  min-width: 200px;
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
}
.toast.success {
  border-left-color: #107c41;
}
.toast.error {
  border-left-color: #d13438;
}
@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  color: var(--text-main);
  padding: 25px;
  border-radius: 12px;
  z-index: 1000;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 450px;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
#detail-modal {
  max-width: 750px;
  max-height: 85vh;
  overflow-y: auto;
}
#qr-scanner-modal {
  max-width: 480px;
  text-align: center;
}
#reader {
  width: 100%;
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.modal-header {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-voice {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.2s;
}
.btn-voice:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}
.btn-voice.speaking {
  background: #d83b01;
  animation: pulseAnimation 1.5s infinite;
}

.modal-row {
  margin-bottom: 12px;
}
.modal-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 2px;
}
.modal-value-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.modal-value {
  flex-grow: 1;
  font-size: 14px;
  background: var(--bg-color);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  word-wrap: break-word;
  white-space: pre-wrap;
  font-weight: 500;
}
.btn-copy-mini {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  transition: 0.2s;
}
.btn-copy-mini:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.1);
}

.qr-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
  width: 100%;
}
.qr-actions button {
  flex: 1;
  padding: 6px 0;
  justify-content: center;
  font-size: 12px;
}

#col-modal {
  width: 300px;
}
.col-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}
.col-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.btn-close {
  width: 100%;
  padding: 12px;
  background: var(--text-muted);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}
.btn-close:hover {
  filter: brightness(0.9);
}
.btn-close-outline {
  margin-top: 10px;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* =========================================
   PRINT SPECIFIC STYLES
   ========================================= */
#print-header-doc {
  display: none;
}
@media print {
  body {
    background: white !important;
    color: black !important;
    padding: 0;
    font-family: "Times New Roman", serif;
  }
  #app-container {
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    border: none;
  }
  .controls,
  .top-actions,
  .pagination,
  .info-bar,
  .action-controls,
  .summary-container,
  #toast-container,
  #login-wrapper,
  .header-panel,
  .recent-searches,
  .copyright-dashboard {
    display: none !important;
  }
  .table-wrapper {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    margin-top: 20px;
  }
  table {
    font-size: 10pt !important;
    width: 100%;
    border-collapse: collapse;
    page-break-inside: auto;
  }
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
  th,
  td {
    border: 1px solid #000 !important;
    padding: 6px 8px !important;
    white-space: normal !important;
    color: black !important;
  }
  th {
    background-color: #f0f0f0 !important;
    font-weight: bold;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  th::after {
    display: none;
  }
  #print-header-doc {
    display: block !important;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px double #000;
    padding-bottom: 15px;
  }
  #print-header-doc h1 {
    margin: 0;
    font-size: 24pt;
    color: #000;
    text-transform: uppercase;
  }
  #print-header-doc h2 {
    margin: 5px 0 0;
    font-size: 16pt;
    color: #333;
    font-weight: normal;
  }
  #print-header-doc p {
    margin: 10px 0 0;
    font-size: 11pt;
    color: #555;
  }
}

@media (max-width: 900px) {
  .controls,
  .header-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .header-title-group h2 {
    font-size: 20px;
  }
  .top-actions {
    justify-content: flex-start;
    margin-top: 10px;
  }
  select,
  input[type="text"] {
    width: 100%;
    box-sizing: border-box;
  }
  .action-controls {
    justify-content: center;
    width: 100%;
  }
  .action-controls .btn-action {
    flex: 1;
    justify-content: center;
  }
  .separator {
    display: none;
  }
  #detail-modal .detail-container {
    flex-direction: column;
  }
}
