/* ==========================================================================
   TravelOps CRM - Booking Wizard Step 6 (Issuance) Compact & Modern Layout
   ========================================================================== */

/* --- Step 6 Container --- */
.issuance-builder {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Page Intro Banner --- */
.issuance-page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border-radius: 12px;
  border: 1px solid #334155;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.issuance-page-intro small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #60a5fa;
  margin-bottom: 2px;
}

.issuance-page-intro h2 {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.issuance-page-intro p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

/* Read-Only Profile & Company Pills */
.issuance-read-grid.compact {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.issuance-read-grid.compact span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f1f5f9;
  text-align: center;
  min-width: 90px;
}

.issuance-read-grid.compact small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.issuance-read-grid.compact b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

/* --- Service Request Cards --- */
.issuance-request-form {
  margin: 10px 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  opacity: 0.82;
  transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.issuance-request-form.selected {
  border-color: #3b82f6;
  opacity: 1;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.08);
}

.issuance-form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

.issuance-form-head small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 2px;
}

.issuance-form-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

/* Include / Included Toggle Button */
.issuance-form-head button {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.issuance-form-head button:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.issuance-form-head button.selected {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.issuance-form-head button.selected:hover {
  background: #059669;
}

/* --- Service Units (Flight, Visa, Transport Units) --- */
.issuance-unit {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.issuance-unit.excluded {
  opacity: 0.55;
}

.issuance-unit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.issuance-unit-head input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.issuance-unit-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.issuance-unit-head small {
  font-size: 11px;
  color: #64748b;
}

.issuance-unit pre {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #334155;
  white-space: pre-wrap;
  margin: 0 0 12px;
}

/* --- Passenger Selection Table (Flight & Visa) --- */
.issuance-table.v2-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow-x: auto;
  background: #ffffff;
  margin: 10px 0 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.issuance-table.v2-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 780px;
}

.issuance-table.v2-table thead th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 10px;
  border-bottom: 1px solid #cbd5e1;
  text-align: left;
  white-space: nowrap;
}

.issuance-table.v2-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background .12s ease;
}

.issuance-table.v2-table tbody tr:hover {
  background: #f8fafc;
}

.issuance-table.v2-table tbody tr.issuance-locked {
  background: #f8fafc;
  opacity: 0.65;
}

.issuance-table.v2-table td {
  padding: 6px 10px;
  vertical-align: middle;
}

.issuance-table.v2-table td:first-child {
  text-align: center;
  width: 44px;
}

.issuance-table.v2-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
}

.issuance-table.v2-table b {
  font-weight: 600;
  color: #0f172a;
  font-size: 12px;
}

.issuance-table.v2-table small {
  display: block;
  font-size: 10px;
  color: #ef4444;
  font-weight: 600;
}

.issuance-table.v2-table input[type="text"],
.issuance-table.v2-table input[type="number"],
.issuance-table.v2-table input[type="date"],
.issuance-table.v2-table select {
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.issuance-table.v2-table input:focus,
.issuance-table.v2-table select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* --- Issuance Form Fields Grid --- */
.issuance-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}

.v2-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v2-field > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #475569;
}

.issuance-fields input,
.issuance-fields select {
  height: 32px;
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.issuance-fields input:focus,
.issuance-fields select:focus,
.issuance-fields textarea:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.issuance-fields textarea {
  min-height: 56px;
  max-height: 120px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

/* Supporting Documents File Upload */
.issuance-files {
  grid-column: 1 / -1;
  padding: 10px 14px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.issuance-files b {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #1e40af;
}

.issuance-files input[type="file"] {
  font-size: 12px;
  color: #475569;
  margin: 4px 0;
}

.issuance-files small {
  font-size: 11px;
  color: #64748b;
}

/* --- Hotel Issuance Layout --- */
.hotel-original {
  margin: 10px 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.hotel-original small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.hotel-original h3 {
  margin: 2px 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.hotel-original p {
  margin: 2px 0 8px;
  font-size: 12px;
  color: #64748b;
}

.hotel-original-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.hotel-original-grid span {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
}

.hotel-original-grid small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 2px;
}

.hotel-original-grid b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

/* Hotel Issuance Coverage */
.hotel-coverage {
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.hotel-coverage h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
}

.hotel-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.hotel-coverage-grid span {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.hotel-coverage-grid span b {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.hotel-success,
.hotel-warning,
.hotel-error {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin: 6px 0 0;
  line-height: 1.4;
}

.hotel-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.hotel-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.hotel-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Hotel Allocation Parts */
.hotel-part {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.hotel-part-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.hotel-part-head small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.hotel-part-head h3 {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

button[data-hotel-part-remove] {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  cursor: pointer;
  transition: all .15s ease;
}

button[data-hotel-part-remove]:hover {
  background: #fecaca;
  color: #7f1d1d;
}

button[data-hotel-part-add] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #2563eb;
  color: #2563eb;
  cursor: pointer;
  transition: all .15s ease;
  margin: 6px 0;
}

button[data-hotel-part-add]:hover {
  background: #2563eb;
  color: #ffffff;
}

.hotel-help {
  font-size: 11px;
  color: #64748b;
  margin: 6px 0 0;
}

/* Hotel Locked Parts */
.hotel-part-locked {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.hotel-lock-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.hotel-locked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.hotel-locked-grid span {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
}

.hotel-locked-grid b {
  display: block;
  font-size: 12px;
  color: #0f172a;
  margin-top: 2px;
}

/* --- Transport Totals --- */
.v2-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin: 14px 0 0;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.v2-total b {
  font-size: 17px;
  font-weight: 800;
  color: #2563eb;
}

/* --- Controlled Request Rule Banner --- */
.issuance-rule {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12px;
  line-height: 1.45;
}

.issuance-rule b {
  font-weight: 700;
  color: #14532d;
  font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .issuance-page-intro {
    flex-direction: column;
    align-items: flex-start;
  }
  .issuance-read-grid.compact {
    width: 100%;
    justify-content: flex-start;
  }
  .issuance-fields {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .issuance-fields {
    grid-template-columns: 1fr;
  }
}
