/* ============================================================
   Flynext Voucher Theme — Module Visa Chine Stylesheet
   Source: visa-chine-module-v3 (1).html
   Version: 5.0.0
   ============================================================ */

body.vc-active-view .flynext-app > .layout,
body.vc-active-view .layout,
body.vc-active-view .panel {
  display: none !important;
}

body.vc-active-view #visa-chine-section {
  display: block !important;
}

#visa-chine-section {
  --grad-start: #d6198f;
  --grad-end: #7a1fa8;
  --bg: #f5f3f8;
  --card: #ffffff;
  --border: #e8e4ee;
  --text: #231b2e;
  --muted: #7d7488;
  --accent: #8c1fc9;
  --success: #1fa86a;
  --danger: #d63b3b;
  --warn: #c9720b;
  --shadow: 0 6px 24px rgba(96, 26, 140, 0.10);

  margin: 0;
  padding: 0 0 60px 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  box-sizing: border-box;
}

#visa-chine-section * {
  box-sizing: border-box;
}

#visa-chine-section .topbar {
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(122, 31, 168, 0.25);
  flex-wrap: wrap;
  gap: 12px;
}

#visa-chine-section .brand {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

#visa-chine-section .brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

#visa-chine-section .top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#visa-chine-section .pill {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

#visa-chine-section .pill:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

#visa-chine-section .pill.solid {
  background: #fff;
  color: var(--accent);
}

#visa-chine-section .pill.solid:hover {
  background: #f3e9fb;
}

#visa-chine-section .pill.visa-china {
  background: linear-gradient(90deg, #ffb347, #ff6a3d);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 106, 61, 0.4);
}

#visa-chine-section .pill.visa-china:hover {
  box-shadow: 0 6px 20px rgba(255, 106, 61, 0.55);
  transform: translateY(-1px);
}

#visa-chine-section .container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px;
}

#visa-chine-section .hero {
  background: linear-gradient(120deg, var(--grad-start), var(--grad-end));
  border-radius: 18px;
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

#visa-chine-section .hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

#visa-chine-section .hero p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
  color: #ffffff;
}

#visa-chine-section .hero-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

#visa-chine-section .card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 26px 28px;
  margin-bottom: 26px;
}

#visa-chine-section .card h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

#visa-chine-section .card h2::before {
  content: "";
  width: 5px;
  height: 18px;
  background: linear-gradient(180deg, var(--grad-start), var(--grad-end));
  border-radius: 3px;
  display: inline-block;
}

#visa-chine-section .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media(max-width: 720px) {
  #visa-chine-section .grid {
    grid-template-columns: 1fr;
  }
}

#visa-chine-section .field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
}

#visa-chine-section .field input,
#visa-chine-section .field select,
#visa-chine-section .field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fbfaff;
  color: var(--text);
  transition: border .2s, box-shadow .2s;
  font-family: inherit;
}

#visa-chine-section .field input:focus,
#visa-chine-section .field select:focus,
#visa-chine-section .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140, 31, 201, 0.12);
  background: #fff;
}

#visa-chine-section .field input:disabled {
  background: #f1eef6;
  color: var(--muted);
  cursor: not-allowed;
}

#visa-chine-section .field textarea {
  resize: vertical;
  min-height: 90px;
}

#visa-chine-section .date-mode-toggle {
  display: flex;
  gap: 16px;
  margin-bottom: 9px;
}

#visa-chine-section .date-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  margin-bottom: 0;
  cursor: pointer;
}

#visa-chine-section .date-mode-toggle input[type=radio] {
  width: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

#visa-chine-section .passport-counter {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  display: none;
}

#visa-chine-section .passport-counter.show {
  display: inline-block;
}

#visa-chine-section .passport-counter.ok {
  background: #eafaf1;
  color: var(--success);
}

#visa-chine-section .passport-counter.warn {
  background: #fff4e6;
  color: var(--warn);
}

#visa-chine-section .passport-counter.danger {
  background: #fdeaea;
  color: var(--danger);
}

#visa-chine-section .doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media(max-width: 900px) {
  #visa-chine-section .doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 560px) {
  #visa-chine-section .doc-grid {
    grid-template-columns: 1fr;
  }
}

#visa-chine-section .doc-box {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  background: #fbfaff;
  transition: all .2s ease;
  position: relative;
  cursor: pointer;
}

#visa-chine-section .doc-box:hover {
  border-color: var(--accent);
  background: #f6effc;
}

#visa-chine-section .doc-box.filled {
  border-style: solid;
  border-color: var(--success);
  background: #f0fbf6;
}

#visa-chine-section .doc-box input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 5;
}

#visa-chine-section .doc-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}

#visa-chine-section .doc-status {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  word-break: break-word;
}

#visa-chine-section .doc-status.ok {
  color: var(--success);
  font-weight: 600;
}

#visa-chine-section .doc-hint {
  font-size: 12px;
  color: var(--muted);
  margin: -8px 0 18px;
}

#visa-chine-section .submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

#visa-chine-section .btn-send {
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  color: #fff;
  border: none;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 20px rgba(140, 31, 201, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}

#visa-chine-section .btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(140, 31, 201, 0.45);
}

#visa-chine-section .btn-send:active {
  transform: translateY(0);
}

#visa-chine-section .list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

#visa-chine-section .list-header .date-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

#visa-chine-section .download-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#visa-chine-section .btn-download {
  background: #fff;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

#visa-chine-section .btn-download:hover {
  background: var(--accent);
  color: #fff;
}

#visa-chine-section .btn-archive {
  background: #fff;
  border: 1.5px solid var(--warn);
  color: var(--warn);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

#visa-chine-section .btn-archive:hover {
  background: var(--warn);
  color: #fff;
}

#visa-chine-section .btn-close-day {
  background: #fff;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

#visa-chine-section .btn-close-day:hover {
  background: var(--danger);
  color: #fff;
}

#visa-chine-section .last-download-log {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 16px;
  min-height: 16px;
}

#visa-chine-section .last-download-log span {
  font-weight: 700;
  color: var(--text);
}

#visa-chine-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

#visa-chine-section thead tr {
  background: #f6effc;
}

#visa-chine-section th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

#visa-chine-section td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

#visa-chine-section tbody tr:hover {
  background: #fbfaff;
}

#visa-chine-section .empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 34px;
  font-style: italic;
}

#visa-chine-section .tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}

#visa-chine-section .tag.first {
  background: #e9f3ff;
  color: #1a6bd6;
}

#visa-chine-section .tag.renew {
  background: #fff4e6;
  color: #c9720b;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 45, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  padding: 30px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: pop .25s ease;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #177a4d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.modal-icon.warn {
  background: linear-gradient(135deg, var(--warn), #8a4d00);
}

.modal h3 {
  text-align: center;
  margin: 0 0 6px;
  font-size: 18px;
}

.modal p.sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 22px;
}

.email-preview {
  background: #fbfaff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.6;
}

.email-preview .row {
  margin-bottom: 8px;
}

.email-preview .lbl {
  font-weight: 700;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.attach-chip {
  background: #f0e6fa;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.modal-close {
  display: block;
  margin: 22px auto 0;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}

.archive-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.archive-item .archive-info {
  font-size: 13px;
}

.archive-item .archive-info .d {
  font-weight: 700;
}

.archive-item .archive-info .c {
  color: var(--muted);
  font-size: 12px;
}

.archive-actions {
  display: flex;
  gap: 8px;
}

.archive-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: #1c1526;
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  transition: all .3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.note-banner {
  display: none !important;
}

.passport-scan-box {
  background: #fbfaff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.scan-msg {
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.4;
}

.scan-msg.info {
  background: #f0e6fa;
  color: var(--accent);
  border: 1px solid #e2cdf5;
}

.scan-msg.scanning {
  background: #fff4e6;
  color: var(--warn);
  border: 1px solid #ffe0ad;
  animation: pulseScan 1.2s infinite ease-in-out;
}

@keyframes pulseScan {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.scan-msg.error {
  background: #fdeaea !important;
  color: #d63b3b !important;
  border: 1px solid #f8c1c1 !important;
  font-weight: 700 !important;
}

.scan-msg.success {
  background: #eafaf1 !important;
  color: #1fa86a !important;
  border: 1px solid #bcecd3 !important;
  font-weight: 700 !important;
}

/* ============================================================
   ULTRA-PREMIUM OCR PASSPORT SCANNER STYLES
   ============================================================ */
.doc-box[data-doc="Passeport"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-box[data-doc="Passeport"].scanning {
  border-color: #8c1fc9 !important;
  background: linear-gradient(135deg, #f6effc 0%, #f0e6fa 100%) !important;
  box-shadow: 0 0 20px rgba(140, 31, 201, 0.25) !important;
}

.doc-box[data-doc="Passeport"].scan-success {
  border-color: #1fa86a !important;
  background: linear-gradient(135deg, #f0fbf6 0%, #e3f8ee 100%) !important;
  box-shadow: 0 0 18px rgba(31, 168, 106, 0.2) !important;
}

/* Laser Beam Animation */
.passport-laser-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(214, 25, 143, 0) 0%, #ff2a8d 50%, rgba(122, 31, 168, 0) 100%);
  box-shadow: 0 0 15px 3px #d6198f, 0 0 25px 6px #7a1fa8;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.doc-box[data-doc="Passeport"].scanning .passport-laser-beam {
  opacity: 1;
  animation: laserScan 1.6s infinite ease-in-out alternate;
}

@keyframes laserScan {
  0% { top: 0%; }
  100% { top: 96%; }
}

/* OCR Processing Pill & Badges */
.ocr-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 6px;
  transition: all 0.3s ease;
}

.ocr-status-pill.scanning {
  background: rgba(140, 31, 201, 0.12);
  color: #8c1fc9;
  border: 1px solid rgba(140, 31, 201, 0.3);
  animation: pulseGlow 1.5s infinite alternate;
}

.ocr-status-pill.success {
  background: #eafaf1;
  color: #1fa86a;
  border: 1px solid #bcecd3;
}

.ocr-status-pill.error {
  background: #fdeaea;
  color: #d63b3b;
  border: 1px solid #f8c1c1;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 4px rgba(140, 31, 201, 0.2); }
  100% { box-shadow: 0 0 12px rgba(140, 31, 201, 0.5); }
}

/* Auto-filled Input Glow Animation */
.input-auto-filled {
  animation: fieldHighlight 2s ease-out;
  border-color: #1fa86a !important;
  box-shadow: 0 0 0 4px rgba(31, 168, 106, 0.25) !important;
}

@keyframes fieldHighlight {
  0% {
    background-color: #d1f7e4;
    transform: scale(1.01);
  }
  50% {
    background-color: #eafaf1;
  }
  100% {
    background-color: #fbfaff;
    transform: scale(1);
  }
}

.ocr-extracted-preview {
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #e8e4ee;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: #231b2e;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ocr-extracted-preview .ocr-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}
.ocr-extracted-preview .ocr-row:last-child {
  margin-bottom: 0;
}
.ocr-extracted-preview .ocr-key {
  color: #7d7488;
  font-weight: 600;
}
.ocr-extracted-preview .ocr-val {
  font-weight: 700;
  color: #8c1fc9;
}

