.toolbar-card {
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.app-header-logo {
  width: 172px;
  max-width: 48vw;
  height: auto;
  display: block;
}

.app-profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.78rem;
}

.app-profile-menu {
  width: 260px;
  border-color: #dbeafe;
}

.package-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.08);
}

.package-icon-bg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 6.2rem;
  color: #3b82f6;
  opacity: 0.07;
  pointer-events: none;
}

.usage-block {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #d4e4ff;
  border-radius: 6px;
  padding: 6px 8px;
}

.package-header-line1 {
  font-size: 0.98rem;
  line-height: 1.35;
}

.package-quota-cell {
  /* Tight stack: label → counts → bar (avoid flex mt-auto stretching) */
  min-height: 0;
  gap: 0.2rem;
}

.package-quota-cell .package-quota-counts {
  line-height: 3.2;
}

.package-icon-col {
  width: 100%;
  min-height: 100%;
  border: 1px dashed #c8ddff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.45);
}

.package-icon-col i {
  font-size: 2.8rem;
  color: #2563eb;
  opacity: 0.8;
}

.scenario-card {
  border: 1px solid #dbe7ff;
  border-radius: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none;
}

.scenario-card .card-body {
  padding: 0.55rem 0.7rem;
}

.scenario-card .scenario-card-title-row {
  margin-bottom: 0.25rem;
}

.scenario-card:hover {
  transform: none;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.08);
  border-color: #93c5fd;
  background: #f8fbff;
}

.scenario-description {
  color: #475467;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.target-url {
  word-break: break-all;
  font-size: 0.9rem;
  color: #334155;
}

.scenario-meta {
  font-size: 0.82rem;
}

.logout-inline {
  color: #dc3545;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.82rem;
}

.logout-inline:hover {
  text-decoration: underline;
}

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 8px;
  font-weight: 600;
}

.toolbar-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#emptyState {
  border-radius: 6px;
  background: #f5f9ff;
  border: 1px dashed #bfd8ff;
}

.scenario-detail-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  border: 1px solid #dbe7ff;
}

.scenario-detail-icon-bg {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 108px;
  height: 108px;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.95);
  background: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #3b82f6;
  opacity: 0.22;
  pointer-events: none;
}

.scenario-detail-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.scenario-detail-meta {
  display: grid;
  gap: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  padding: 0.58rem 0.72rem;
  position: relative;
  z-index: 1;
}

.scenario-detail-meta .meta-row {
  display: grid;
  grid-template-columns: 26px auto 1fr;
  gap: 0.45rem;
  align-items: center;
}

.scenario-detail-meta .meta-icon {
  width: 26px;
  height: 26px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: rgba(239, 246, 255, 0.95);
  color: #1d4ed8;
  opacity: 0.9;
  font-size: 0.82rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scenario-detail-meta .label {
  font-weight: 600;
  color: #1e3a8a;
}

.scenario-detail-meta .value {
  color: #334155;
}

@media (max-width: 768px) {
  .scenario-detail-icon-bg {
    display: none;
  }
}

.history-selected-badge {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.62rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.history-table .selection-check {
  width: 0.95rem;
  height: 0.95rem;
  cursor: pointer;
  border-color: #94a3b8;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.history-table .selection-check:hover {
  border-color: #2563eb;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.history-table .selection-check:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

.history-table {
  font-size: 0.86rem;
}

.history-table thead th,
.history-table tbody td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

.history-table thead th:nth-child(1),
.history-table tbody td:nth-child(1) {
  width: 42px;
  text-align: center;
}

.history-table thead th:nth-child(2),
.history-table tbody td:nth-child(2) {
  width: 48px;
  text-align: center;
}

.history-table tbody td:nth-child(2) {
  font-size: 0.8rem;
  color: #475467;
}

.history-table thead th:nth-child(4),
.history-table tbody td:nth-child(4),
.history-table thead th:nth-child(5),
.history-table tbody td:nth-child(5) {
  width: 90px;
  white-space: nowrap;
}

.history-table thead th:nth-child(6),
.history-table tbody td:nth-child(6) {
  width: 86px;
  white-space: nowrap;
}

.history-table .compact-action-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
}

/* App-wide Skenario / Scanner navigation */
.app-main-nav {
  gap: 0.35rem;
  flex-wrap: wrap;
}

.app-main-nav .nav-link {
  border-radius: 8px;
  border: 1px solid #dbe7ff;
  color: #334155;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.65);
}

.app-main-nav .nav-link:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  color: #1e40af;
}

.app-main-nav .nav-link.active {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

/* Scanner list (accent: teal, same patterns as scenario list) */
.scanner-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #c5f0e8;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.06);
}

.scanner-hero-icon-bg {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 4.2rem;
  color: #14b8a6;
  opacity: 0.09;
  pointer-events: none;
}

.scanner-icon-col {
  width: 100%;
  min-height: 72px;
  border: 1px dashed #99f6e4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
}

.scanner-icon-col i {
  font-size: 2.2rem;
  color: #0d9488;
  opacity: 0.85;
}

.scanner-toolbar {
  background: linear-gradient(180deg, #f0fdfa 0%, #f4fbfb 100%);
  border-color: #c5f0e8;
}

.scanner-outline-btn {
  border-color: #5eead4;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.85);
}

.scanner-outline-btn:hover {
  border-color: #2dd4bf;
  color: #0f766e;
  background: #f0fdfa;
}

.scanner-search-group {
  width: 360px;
  min-width: 240px;
  max-width: 100%;
}

.scanner-target-card {
  border: 1px solid #ccfbf1;
  border-radius: 6px;
  border-left: 3px solid #14b8a6;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  box-shadow: none;
}

.scanner-target-card .card-body {
  padding: 0.55rem 0.7rem;
}

.scanner-target-card:hover {
  border-color: #5eead4;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.08);
  background: #fafffe;
}

.scanner-target-url {
  word-break: break-all;
  font-size: 0.9rem;
  color: #0f766e;
}

.scanner-badge-outline {
  border: 1px solid #5eead4;
  color: #0f766e;
  background: transparent;
  font-weight: 500;
  font-size: 0.75rem;
}

.scanner-empty {
  border-radius: 6px;
  background: #f0fdfa;
  border: 1px dashed #99f6e4;
  color: #115e59;
}

.scanner-chip {
  border: 1px solid #ccfbf1 !important;
  color: #0f766e !important;
  background: #f0fdfa !important;
  font-weight: 500;
}

.scanner-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.scanner-mode-card {
  display: block;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-check:checked + .scanner-mode-card {
  border-color: #14b8a6;
  background: #f0fdfa;
  box-shadow: 0 0 0 0.15rem rgba(20, 184, 166, 0.15);
}

.scanner-form-modern .form-label {
  margin-bottom: 0.42rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.scanner-form-modern .form-control-sm,
.scanner-form-modern .form-select-sm {
  min-height: 2rem;
}

.scanner-form-modern .form-check-label {
  font-size: 0.9rem;
  color: #334155;
}

.scanner-form-modern .scanner-switch-block .form-check {
  margin-top: 0.15rem;
}

.scanner-form-modern .form-text {
  margin-top: 0.35rem;
}

.scanner-form-modern .scanner-subrow {
  margin-top: -0.15rem;
}

.scanner-history-table-wrap {
  border-color: #dbe7e4 !important;
  background: #ffffff;
}

.scanner-history-table thead th {
  background: #f8fbfb;
  color: #475569;
  font-weight: 600;
  border-bottom: 1px solid #e6efed;
}

.scanner-history-table tbody td {
  background: #ffffff;
  border-color: #edf3f2;
}

.scanner-history-table.table-hover tbody tr:hover td {
  background: #fbfefe;
}

.scanner-history-section {
  background: #ffffff !important;
  border-color: #e5ecea !important;
}

.modal-result-detail {
  max-width: min(90vw, 1400px);
}

.btn-teal-scanner {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  border: 1px solid #0f766e;
  color: #fff;
  font-weight: 600;
}

.btn-teal-scanner:hover:not(:disabled) {
  background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 100%);
  color: #fff;
  border-color: #0d9488;
}

.btn-teal-scanner:disabled {
  opacity: 0.55;
}

.scanner-scenario-pick {
  max-height: 220px;
  overflow-y: auto;
}

.scanner-modal-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
  border-radius: 0 0 var(--bs-modal-inner-border-radius, 0.375rem) var(--bs-modal-inner-border-radius, 0.375rem);
}

/* Login page */
.login-page-bg {
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.08), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(13, 148, 136, 0.08), transparent 35%),
    #f8fafc;
}

.login-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08) !important;
}

.login-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.login-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
}

.login-badge {
  color: #0f172a !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-alert {
  border-radius: 10px;
  font-size: 0.92rem;
}

.login-footnote {
  color: #64748b;
  font-size: 0.82rem;
}

