/* ==========================================================
   SCOPED DOCUMENT SEARCH STYLES (Enlarged Laptop Layout)
   ========================================================== */

/* Dark wrapper background with generous top clearance from the main navbar */
.doc-app-wrapper {
  background-color: #080d19;
  min-height: 90vh;
  padding-top: 120px !important; /* Space below smart-scroll navbar */
  padding-bottom: 60px !important;
}

@media (max-width: 991px) {
  .doc-app-wrapper {
    padding-top: 100px !important;
  }
}

/* Action Top Bar */
.doc-action-bar {
  background: #0d1527;
  border: 1px solid #1c2b4a;
  padding: 18px 24px !important;
  margin-bottom: 24px !important;
}

.doc-brand-icon {
  font-size: 32px;
}

.doc-action-bar h5 {
  font-size: 1.25rem !important; /* 20px */
}

.doc-action-bar small {
  font-size: 13px !important;
}

/* Badges */
.doc-badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.doc-badge-outline {
  border: 1px solid #1c2b4a;
  color: #38bdf8;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
}

.doc-badge-slate {
  background: #1a2744;
  color: #94a3b8;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Buttons inside Document App */
.doc-btn-group .btn {
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 500;
  border-radius: 8px;
}

/* Cards & Layout */
.doc-card {
  background: #0d1527;
  border: 1px solid #1c2b4a;
  border-radius: 12px;
  padding: 22px 24px !important;
  margin-bottom: 20px !important;
}

.doc-card-title {
  font-size: 14px !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 16px;
}

.doc-label {
  font-size: 12.5px !important;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

/* Form Inputs inside DocuExtract (Enlarged) */
.doc-input {
  background: #0a1120 !important;
  border: 1px solid #1c2b4a !important;
  color: #ffffff !important;
  font-size: 14.5px !important;
  padding: 10px 14px !important;
  height: auto !important;
  border-radius: 8px !important;
}

.doc-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
}

textarea.doc-input {
  min-height: 80px;
}

/* Number inputs in totals */
.doc-input-num {
  background: #0a1120 !important;
  border: 1px solid #1c2b4a !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600;
  width: 150px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
}

/* AI Assistant Search Bar */
.doc-app-wrapper #userPrompt {
  padding: 12px 16px !important;
  font-size: 15px !important;
  height: auto !important;
}

.doc-app-wrapper .btn-primary {
  padding: 10px 20px !important;
  font-size: 14.5px !important;
  font-weight: 600;
}

/* Left Document Preview Panel (Sticky & Taller on Laptop) */
.doc-preview-panel {
  background: #0d1527;
  border: 1px solid #1c2b4a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .doc-preview-panel {
    position: sticky;
    top: 95px; /* Offset from top header */
    height: calc(100vh - 160px);
    min-height: 580px;
  }
}

.doc-panel-header {
  background: #111c35;
  padding: 14px 18px;
  border-bottom: 1px solid #1c2b4a;
}

.doc-panel-header span#docFileName {
  font-size: 14px !important;
  font-weight: 500;
}

.doc-zoom-controls .btn {
  padding: 4px 10px !important;
  font-size: 13px !important;
}

.doc-preview-canvas {
  flex: 1;
  background: #050811;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  min-height: 480px;
}

.doc-dropzone {
  border: 2px dashed #22355b;
  border-radius: 12px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  max-width: 360px;
}

.doc-drop-icon {
  font-size: 44px;
}

.doc-dropzone h6 {
  font-size: 17px !important;
}

.doc-dropzone p {
  font-size: 13.5px !important;
}

/* Floating Document Sheet Preview */
.doc-paper-sheet {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.85);
  max-width: 100%;
  transition: transform 0.2s ease-in-out;
}

.doc-paper-sheet img {
  max-width: 100%;
  height: auto;
  display: block;
}

.doc-paper-sheet iframe {
  width: 580px;
  height: 720px;
  border: none;
}

/* Line Items Table */
.doc-line-header {
  font-size: 13px !important;
  padding: 10px 6px !important;
  border-bottom: 1px solid #1c2b4a;
}

.line-item-entry input {
  font-size: 14px !important;
  padding: 8px 12px !important;
}

/* Uncertainty Highlights */
.uncertain-field {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.doc-alert-amber {
  display: flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 14px 20px !important;
}

.doc-alert-amber h6 {
  font-size: 15px !important;
}

.doc-alert-amber p {
  font-size: 13px !important;
}

/* Integrity & AI Answer Box */
.doc-integrity-box {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.doc-integrity-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.doc-ai-answer {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 14px 18px;
}

.doc-ai-answer .answer-text, 
#aiSummaryContent {
  font-size: 14.5px !important;
  line-height: 1.6;
}