/* Palette */
:root {
  --main-red: #bc191f;
  --main-red-dark: #b91c1c;
  --main-red-light: #fff5f5;
  --main-red-border: #fecaca;
  --main-red-hover: #991b1b;
  --main-red-gradient: linear-gradient(90deg, #bc191f 60%, #b91c1c 100%);
}

/* Container layout */
.container-tra-cuu {
  max-width: 100%;
  margin: 40px auto;
  padding: 12px;
}

/* Box Form */
.box-form {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px 0 rgba(188, 25, 31, 0.10);
  border: 1px solid #ffe4e6;
  overflow: hidden;
}

/* Tab Bar */
.tab-bar {
  display: flex;
  background: #f5f7fa;
  border-bottom: 1px solid #ffe4e6;
}
.tab-active {
  flex: 1;
  text-align: center;
  background: var(--main-red);
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 0.5px;
  padding: 18px 0 16px 0;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

/* Form body */
.form-body {
  padding: 28px 24px 24px 24px;
}
/* Vehicle radio group */
.vehicle-group {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 26px;
}
.vehicle-radio {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  color: #374151;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.vehicle-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.vehicle-radio span {
  margin-left: 2px;
}
.vehicle-radio:before {
  content: '';
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #fecaca;
  background: #fff;
  transition: border-color 0.3s;
}
.vehicle-radio input[type="radio"]:checked ~ span,
.vehicle-radio input[type="radio"]:checked ~ * {
  color: var(--main-red);
}
.vehicle-radio input[type="radio"]:checked + span:before,
.vehicle-radio input[type="radio"]:checked ~ span:before {
  border-color: var(--main-red);
}
.vehicle-radio input[type="radio"]:checked ~ span:after,
.vehicle-radio input[type="radio"]:checked ~ *:after {
  content: '';
  position: absolute;
  left: 5px; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--main-red);
  display: block;
}
#result.box-result {
  display: flex;
  flex-direction: column;
  align-items: center;       /* Căn giữa ngang */
  justify-content: center;   /* Căn giữa dọc nếu muốn (tùy thuộc chiều cao) */
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
#result h2 {
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
}

/* Input group */
.input-group {
  margin-bottom: 26px;
}
.input-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #fecaca;
  background: #f8fafc;
  font-size: 16px;
  color: #2d384b;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input[type="text"]:focus {
  border-color: var(--main-red);
  box-shadow: 0 0 0 2px #bc191f22;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 5px 0;
  background: var(--main-red-gradient);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 12px 0 #bc191f33;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-submit:hover, .btn-submit:focus {
  background: linear-gradient(90deg, #991b1b 60%, #bc191f 100%);
  box-shadow: 0 2px 24px 0 #b91c1c44;
}
.table-status.table-status-done {
  background: #21b389 !important;
  color: #fff !important;
  border: 2px solid #21b389 !important; 

}
/* Result box */
.box-result {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 18px 0 rgba(188,25,31,0.10);
  border: 1px solid #ffe4e6;
  margin-top: 10px;
  padding: 28px 24px;
  display: block;
  animation: fadeIn 0.5s;
}
.box-result.hidden { display: none; }
.box-result h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--main-red);
  margin-bottom: 14px;
  letter-spacing: 0.4px;
}

/* Loading spinner */
.loading {
  align-items: center;
  padding: 20px;
}
.spinner {
  border: 4px solid #ffe4e6;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { 0% { opacity: 0; transform: translateY(24px);} 100%{ opacity: 1; transform: none;} }

/* Responsive */
@media (max-width: 600px) {
  .container-tra-cuu { padding: 6px; }
  .box-form, .box-result { padding: 18px 8px; }
  .form-body { padding: 20px 8px; }
  .box-form { border-radius: 12px; }
  .tab-active { font-size: 16px; padding: 12px 0 10px 0; }
}

.table-violation {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px 0 rgba(188, 25, 31, 0.07);
  overflow: hidden;
  font-size: 15.5px;
}

.table-violation tr {
  transition: background 0.15s;
}

.table-violation tr:not(:last-child) {
  border-bottom: 1px solid #ffe4e6;
}

.table-violation td {
  padding: 13px 16px;
  vertical-align: top;
  border: none;
}

.table-violation td:first-child {
  background: #fff5f5;
  font-weight: 600;
  color: #b91c1c;
  min-width: 165px;
  width: 34%;
  border-right: 1.5px solid #ffe4e6;
  letter-spacing: 0.1px;
  border-radius: 0;
}

.table-violation td:last-child {
  color: #991b1b;
  font-weight: 500;
  word-break: break-word;
}

/* Highlight đặc biệt cho các dòng thông tin quan trọng */
.table-violation td.value-highlight {
  font-size: 17px;
  font-weight: 700;
  color: #bc191f;
  letter-spacing: 1px;
  background: #fff0f1;
  border-radius: 8px;
}

.table-violation td.status-warning {
  color: #b91c1c;
  font-weight: 700;
  text-transform: uppercase;
  background: #fff0f1;
  letter-spacing: 1px;
  border-radius: 8px;
  padding: 13px 16px;
}

/* Responsive */
@media (max-width: 600px) {
  .table-violation td, .table-violation td.value-highlight, .table-violation td.status-warning {
    padding: 8px 7px;
    font-size: 14.3px;
  }
  .table-violation td:first-child {
    min-width: 90px;
    width: 44%;
    font-size: 13.7px;
  }
}
 
 
.alert {
  border-radius: 12px;
  margin-bottom: 24px;
  background: #fff;
  border: 2px solid #ffe4e6;
  box-shadow: 0 2px 12px 0 rgba(150,0,0,0.04);
  padding: 24px 20px 20px 20px;
  font-size: 1rem;
  text-align: center;
  position: relative;
}
.alert .alert-icon {
  text-align: center;
  margin-bottom: 12px;
}
.alert-heading {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.3rem;
  color: var(--main-red-dark);
}
.alert-text {
  margin-top: 8px;
  color: #333;
}
.alert-description {
  display: block;
  font-size: 1rem;
  color: #555;
}
.alert-success {
  border: 2px solid #badbcc;
  background: #f6fffa;
  color: #18984d;
}
.alert-warning {
  border: 2px solid #ffe4e6;
  background: #fff5f5;
  color: #bc191f;
}
.alert-danger {
  border: 2px solid #fecaca;
  background: #fff0f0;
  color: #b91c1c;
}
.bks {
  color: #000;
  padding: 4px 10px;
  border: 1.2px solid #000;
  border-radius: 4px;
  background: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 4px;
  letter-spacing: 1.5px;
  display: inline-block;
  text-transform:uppercase;

}

/* Text status */
.text-red { color: #b91c1c !important; font-weight: 700; }
.text-green { color: #18984d !important; font-weight: 700; }
.text-blue { color: #23c6e7; font-weight: 700; }

/* Info status row */
.status-info {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid #ffe4e6;
  background: #fff;
  margin: 0.7rem 0 1.1rem 0;
  overflow: hidden;
}
.status-info__error {
  color: #bc191f;
  flex: 1 0 0;
  padding: 9px 0;
  text-align: center;
  font-weight: 600;
}
.status-info__success {
  color: #18984d;
  flex: 1 0 0;
  padding: 9px 0;
  text-align: center;
  font-weight: 600;
}
.divider {
  width: 1.2px;
  height: 22px;
  background: #ffe4e6;
  display: block;
}

/* Update info */
.update-info {
  font-size: 13px;
  color: #666;
  margin-bottom: 3px;
  font-weight: 400;
}
.update-info .date {
  color: #bc191f;
  font-weight: 700;
}

.table-result {
  margin-top: 15px;
}

/* Dòng tiêu đề lỗi */
.stt {
  text-align: left;
  font-size: 1.07rem;
  color: #bc191f;
  margin-top: 18px;
  margin-bottom: 5px;
  font-weight: 700;
}

/* Table lỗi vi phạm */
.table {
  width: 100%;
  background: #fff;
  border: 1px solid #ffe4e6;
  border-radius: 12px;
  margin-bottom: 25px;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 1px 8px 0 rgba(188,25,31,0.06);
  font-size: 15.5px;
}
.table-striped tbody tr:nth-of-type(odd) { background: #fff8f7; }
.table-striped tbody tr:nth-of-type(even) { background: #fff; }
.table td {
  font-size: 15.1px;
  padding: 10px 14px;
  vertical-align: top;
  border: none;
  text-align: left;
}
.table td:first-child {
  font-weight: 600;
  color: #bc191f;
  min-width: 145px;
  width: 36%;
  background: #fff5f5;
  border-right: 1px solid #ffe4e6;
  letter-spacing: 0.12px;
}
.table td:last-child {
  color: #991b1b;
  font-weight: 500;
  word-break: break-word;
}
.table-status {
  color: #fff;
  background: #b91c1c;
  border: 1.1px solid #991b1b;
  padding: 2px 13px;
  border-radius: 4px;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.6px;
  display: inline-block;
}

/* Button style cho alert/link */
.btn,
.btn-primary,
.btn-outline-primary,
.btn.btn-primary,
.btn.btn-outline-primary {
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  background: var(--main-red-gradient);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px 0 #bc191f17;
  transition: background 0.18s, box-shadow 0.18s;
  width: 100%;
  margin-bottom: 10px;
  display: block;
}
.btn-outline-primary {
  background: #fff;
  color: var(--main-red);
  border: 2px solid var(--main-red);
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background: var(--main-red-gradient);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(90deg, #991b1b 60%, #bc191f 100%);
  color: #fff;
}

@media (max-width: 600px) {
  .alert,
  .box-result {
    padding: 10px 2px 10px 2px;
  }
  .form-body { padding: 15px 2px; }
  .stt { font-size: 0.98rem; }
  .table td,
  .table-status {
    font-size: 13.7px;
    padding: 7px 5px;
  }
  .table td:first-child {
    min-width: 90px;
    width: 44%;
    font-size: 13.7px;
  }
}

/* Spinner */
.spinner {
  width: 28px; height: 28px;
  border: 4px solid #ffe4e6;
  border-top: 4px solid var(--main-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

@keyframes fadeIn { 0% { opacity: 0; transform: translateY(24px);} 100%{ opacity: 1; transform: none;} }

/*CSS Q&A */
      .faq-question {
            display: flex;
            align-items: center;
            padding: 10px;
            padding-left: 30px; /* Táº¡o khoáº£ng trá»‘ng cho SVG */
            font-weight: bold;
            color: #D02E2E;
            cursor: pointer;
            position: relative;
        }

        .faq-question::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D02E2E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-size: contain;
            background-repeat: no-repeat;
            transition: transform 0.3s ease;
        }

        .faq-question:hover {
            /*background: #f1f1f1;*/
        }

        .faq-answer {
            padding: 0 15px 15px 30px; /* Giá»¯ cÄƒn lá» vá»›i SVG */
            background: #fff;
            display: none;
            color: #333;
            line-height: 1.6;
            margin-bottom: 10px;
        }

        .faq-question.active {
            background: #e6f0fa;
        }

        .faq-question.active::before {
            transform: translateY(-50%) rotate(180deg);
        }

        .faq-question.active + .faq-answer {
            display: block;
        }