/* Iron Basement — Deep Analytics, RTO File Kanban, Due Locker */

#nbDeepAnalytics {
  margin: 20px 0 28px;
  padding: 0;
}

.nb-iron-hd {
  margin-bottom: 14px;
}

.nb-iron-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.nb-iron-hd h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.nb-iron-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
}

.nb-iron-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.nb-iron-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.nb-iron-card:hover,
.nb-iron-card:focus {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.2);
  outline: none;
}

.nb-iron-card--office,
.nb-iron-card--rto {
  border-left: 4px solid #38bdf8;
}

.nb-iron-card--field,
.nb-iron-card--train {
  border-left: 4px solid #fbbf24;
}

.nb-iron-card--fuel {
  border-left: 4px solid #f472b6;
}

.nb-iron-card__label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 6px;
}

.nb-iron-card__main {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.2;
}

.nb-iron-card__sub {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  margin-top: 6px;
}

.nb-iron-card__hint {
  display: block;
  font-size: 10px;
  color: #6366f1;
  font-weight: 800;
  margin-top: 10px;
}

.nb-deep-drill-modal,
.nb-due-lock-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.nb-deep-drill-modal.hidden,
.nb-due-lock-modal.hidden {
  display: none !important;
}

.nb-deep-drill-backdrop,
.nb-due-lock-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.nb-deep-drill-card {
  position: relative;
  width: min(720px, 100%);
  max-height: 85vh;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(28, 25, 23, 0.15);
}

.nb-deep-drill-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(28, 25, 23, 0.1);
  background: #fafaf9;
}

.nb-deep-drill-hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #0c0a09;
}

.nb-deep-drill-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
}

.nb-deep-drill-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}

.nb-deep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.nb-deep-table th {
  text-align: left;
  padding: 8px 10px;
  color: #94a3b8;
  font-weight: 800;
  border-bottom: 1px solid #334155;
}

.nb-deep-table td {
  padding: 8px 10px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  font-weight: 700;
}

.nb-deep-empty {
  text-align: center;
  color: #64748b;
  font-weight: 700;
  padding: 24px;
}

/* Due locker */
.nb-due-lock-card {
  position: relative;
  width: min(400px, 100%);
  background: linear-gradient(160deg, #450a0a, #7f1d1d);
  border: 2px solid #ef4444;
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.35);
}

.nb-due-lock-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.nb-due-lock-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
  color: #fecaca;
}

.nb-due-lock-msg {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
}

.nb-due-lock-sub {
  font-size: 12px;
  color: #fca5a5;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 20px;
}

.nb-due-lock-btn {
  width: 100%;
  padding: 14px !important;
  font-weight: 900 !important;
}

/* RTO File Kanban */
#rtoFileSection {
  padding: 12px 0 40px;
  overflow: visible;
}

.rto-file-kanban-empty-banner {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.55);
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
}

.rto-file-kanban-empty-banner strong {
  display: block;
  font-weight: 900;
  margin-bottom: 4px;
  color: #f8fafc;
}

.rto-file-kanban-empty-banner span {
  color: #94a3b8;
  font-weight: 600;
}

.rto-file-kanban-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(168px, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 1100px) {
  .rto-file-kanban-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .rto-file-kanban-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile / tablet: horizontal swipe board + sticky column headers */
@media (max-width: 900px) {
  #rtoFileSection {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 12px;
  }

  .rto-file-kanban-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    grid-template-columns: unset;
    min-width: min-content;
    padding-right: 16px;
  }

  .rto-file-col {
    flex: 0 0 min(82vw, 300px);
    max-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
  }

  .rto-file-col__hd {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 12px 12px 0 0;
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  .rto-file-col__body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
}

.rto-file-card--clickable {
  cursor: pointer;
}

.rto-file-card--clickable:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

.rto-file-col {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 8px;
  min-height: 120px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.rto-file-kanban-grid--loading .rto-file-col {
  pointer-events: none;
}

.rto-file-col--skeleton .rto-file-col__hd {
  opacity: 0.85;
}

.rto-file-card-skeleton {
  background: linear-gradient(
    90deg,
    rgba(26, 29, 36, 0.65) 0%,
    rgba(38, 42, 52, 0.85) 50%,
    rgba(26, 29, 36, 0.65) 100%
  );
  background-size: 200% 100%;
  animation: rto-skeleton-shimmer 1.35s ease-in-out infinite;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.rto-file-card-skeleton__line {
  height: 10px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.22);
  margin-bottom: 8px;
}

.rto-file-card-skeleton__line--lg {
  width: 72%;
  height: 12px;
}

.rto-file-card-skeleton__line--sm {
  width: 48%;
  margin-bottom: 0;
}

@keyframes rto-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.rto-file-col--over,
.rto-file-col--drop-glow {
  border-color: rgba(96, 165, 250, 0.45) !important;
  background: rgba(59, 130, 246, 0.06) !important;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rto-file-col--droppable.rto-file-col--drop-glow {
  transform: translateY(-1px);
}

body.rto-kanban-dragging {
  cursor: grabbing;
}

body.rto-kanban-dragging .rto-file-card:not(.rto-file-card--lifting) {
  transition: opacity 0.15s ease;
}

.rto-file-col__hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rto-file-col__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.rto-file-col__dot--llr_applied {
  background: #60a5fa;
  color: #60a5fa;
}

.rto-file-col__dot--medical {
  background: #fbbf24;
  color: #fbbf24;
}

.rto-file-col__dot--slot_booked {
  background: #a78bfa;
  color: #a78bfa;
}

.rto-file-col__dot--test_phase {
  background: #34d399;
  color: #34d399;
}

.rto-file-col__dot--license_ready {
  background: #22d3ee;
  color: #22d3ee;
}

.rto-file-col__title {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d1d5db;
  line-height: 1.35;
}

.rto-file-col__cnt {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #9ca3af;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rto-file-col__cnt--sk {
  opacity: 0.55;
}

.rto-file-col__body {
  padding: 4px 2px 2px;
  min-height: 80px;
}

.rto-file-col__empty {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  padding: 16px 12px;
  text-align: center;
  letter-spacing: 0.04em;
}

.rto-file-card {
  background: #1a1d24;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: grab;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.rto-file-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.rto-file-card--drag {
  opacity: 0.92;
}

.rto-file-card--lifting {
  cursor: grabbing;
  transform: rotate(1.2deg) scale(1.02);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(96, 165, 250, 0.2);
  z-index: 50;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.rto-file-card--optimistic {
  outline: 2px dashed rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

@keyframes rto-card-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  18% {
    transform: translateX(-8px);
  }
  36% {
    transform: translateX(8px);
  }
  54% {
    transform: translateX(-6px);
  }
  72% {
    transform: translateX(6px);
  }
  90% {
    transform: translateX(-2px);
  }
}

.rto-file-card--shake {
  animation: rto-card-shake 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  border-color: rgba(251, 113, 133, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.25);
}

.toast--premium {
  min-width: min(360px, 92vw);
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 14px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(220, 38, 38, 0.25);
  box-shadow: 0 18px 40px rgba(28, 25, 23, 0.12);
  color: #1c1917;
}

.toast--premium.toast--danger .rto-fee-toast__title {
  color: #fecaca;
}

.rto-fee-toast__body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.rto-fee-toast__icon {
  font-size: 22px;
  line-height: 1;
}

.rto-fee-toast__title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.rto-fee-toast__msg {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  color: #e2e8f0;
}

.rto-fee-toast__wa {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #052e16;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.rto-fee-toast__wa:hover {
  filter: brightness(1.06);
}

.rto-file-card__name {
  font-weight: 700;
  font-size: 14px;
  color: #f3f4f6;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.rto-file-card__sub {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 6px;
  line-height: 1.45;
  font-weight: 400;
}

.rto-file-card__due-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.rto-file-card__nav {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.rto-file-card__btn {
  flex: 1;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 6px;
  font-weight: 600;
  font-size: 12px;
  color: #d1d5db;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.rto-file-card__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f3f4f6;
}

.rto-file-card__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rto-file-card__btn--next {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(129, 140, 248, 0.25);
  color: #a5b4fc;
}

.rto-file-card__btn--next:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}

.rto-file-card__btn--open {
  flex: 0 0 40px;
}

.rto-file-card--ssr-alert {
  background: rgba(26, 29, 36, 0.95);
  border: 1px solid rgba(244, 63, 94, 0.45);
  animation: rto-file-pulse 1.4s ease-in-out infinite;
}

@keyframes rto-file-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(244, 63, 94, 0.35),
      0 10px 24px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow:
      0 0 16px 2px rgba(244, 63, 94, 0.28),
      0 10px 24px rgba(0, 0, 0, 0.28);
  }
}

.rto-file-card__countdown {
  display: block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
  letter-spacing: 0.02em;
}

.rto-file-card__countdown--ready {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.rto-file-card--locked .rto-file-card__countdown {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

.rto-file-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.rto-file-card__outcome {
  width: 100%;
  position: relative;
  z-index: 2;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.rto-file-card__outcome--pass {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.rto-file-card__outcome--pass:hover {
  background: rgba(16, 185, 129, 0.2);
}

.rto-file-card__outcome--fail {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.rto-file-card__outcome--fail:hover {
  background: rgba(244, 63, 94, 0.2);
}

.rto-file-card__outcome--absent {
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.rto-file-card__outcome--absent:hover {
  background: rgba(249, 115, 22, 0.2);
}

.rto-file-col--slot_booked.rto-file-col--over {
  border-color: rgba(52, 211, 153, 0.35);
}
