/* Reset và base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    background: #fff;
    min-height: 100vh;
}

.container {
    width: 100%;
    margin: 0;
    background: #fff;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Header */
.header {
    background: #fff;
    width: 100%;
    line-height: 0;
}

.header-logo {
    width: 100%;
    height: auto;
    display: block;
}

.language-selector select option {
    background: #ffcc80;
    color: white;
}

/* Main Content */
.main-content {
    padding: 0;
}

.content-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Left Panel */
.left-panel {
    flex: 1.2;
    padding: 15px 20px;
    background: #fff;
    border-right: 1px solid #ddd;
}

.left-panel h2 {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.left-panel h3 {
    color: #333;
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0 10px 0;
}

.left-panel h4 {
    color: #333;
    font-size: 13px;
    font-weight: bold;
    margin: 10px 0 5px 0;
}

.notification-section {
    margin-bottom: 30px;
}

.notification-item {
    background: #fff;
    padding: 10px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.notification-item p {
    margin: 0;
    line-height: 1.5;
}

.guide-section {
    margin-bottom: 30px;
}

.guide-step {
    margin-bottom: 20px;
}

.guide-step p {
    margin-bottom: 8px;
    text-align: justify;
}

.mobile-guide {
    margin-bottom: 30px;
}

.mobile-guide p {
    margin-bottom: 10px;
    text-align: justify;
}

.news-section {
    margin-bottom: 20px;
}

.news-list {
    list-style: none;
}

.news-list li {
    margin-bottom: 8px;
}

.link {
    color: #007bff;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Right Panel */
.right-panel {
    flex: 0.8;
    padding: 15px 15px;
    background: #fff;
    margin-left: 10px;
}

/* Invoice Status Styles */
.invoice-status {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    display: inline-block;
}

.invoice-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.invoice-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Total Amount Highlight */
.info-item.total-amount {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
    margin: 10px 0;
}

.info-item.total-amount label {
    font-weight: bold;
    color: #007bff;
}

.info-item.total-amount span {
    font-weight: bold;
    font-size: 16px;
    color: #007bff;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.language-selector .dropdown {
    position: relative;
    display: inline-block;
}

.language-selector .dropdown-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    min-width: 100px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.language-selector .dropdown-btn:hover {
    background: #f5f5f5;
}

.language-selector .arrow {
    margin-left: 5px;
    font-size: 12px;
    color: #666;
}

.language-selector .dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 140px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
    border-radius: 3px;
    z-index: 1;
    top: 100%;
    right: 0;
    margin-top: 5px;
}

.language-selector .dropdown-content.show {
    display: block;
}

.language-selector .dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.language-selector .dropdown-item:hover {
    background-color: #f1f1f1;
}
.language-selector .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}
.language-selector .dropdown-item label {
    cursor: pointer;
    flex-grow: 1;
}



.search-form {
    max-width: 100%;
    background-color: #fff;
    padding: 20px;
}

.search-options {
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #ffcc80;
    background: #ffcc80;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.input-group {
    margin-bottom: 15px;
}


.search-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #ffcc80;
}





.submit-btn {
    padding: 8px 20px;
    background: #ffcc80;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background: #e68a00;
}

/* Search Results */
.search-result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 6px;
}

.result-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result-success h3 {
    margin-bottom: 15px;
    color: #155724;
}

.invoice-info p {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Invoice Modal Styles */
.invoice-modal-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.invoice-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.invoice-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.invoice-pdf-container {
    margin: 20px auto;
    max-width: 900px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.invoice-pdf-container iframe {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
    margin: 0 auto;
}

.invoice-details {
    margin: 20px auto;
    max-width: 900px;
}

.invoice-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.info-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 14px;
    line-height: 1.4;
}

/* Footer */
.footer {
    background: #f5f5f5;
    padding: 10px 20px;
    text-align: left;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .left-panel {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        order: 2;
    }

    .right-panel {
        flex: 1;
        order: 1;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .language-selector {
        margin-top: 15px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .logo .e-invoice {
        font-size: 24px;
    }
    
    /* Invoice Modal Responsive */
    .invoice-modal-content {
        padding: 10px;
    }
    
    .invoice-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .invoice-actions {
        justify-content: center;
    }
    
    .invoice-pdf-container {
        margin: 15px auto;
        max-width: 100%;
    }
    
    .invoice-pdf-container iframe {
        height: 500px;
    }
    
    .invoice-details {
        margin: 15px auto;
        max-width: 100%;
    }
    
    .invoice-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 0;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .left-panel,
    .right-panel {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo .e-invoice {
        font-size: 20px;
    }
}

/* Result Container Styles */
.result-container {
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    display: none;
}

.result-container.show {
    display: block;
}

/* PDF Centering */
.invoice-pdf-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 100%;
}

.invoice-pdf-container embed {
    max-width: 100%;
    height: 800px;
}

.btn-close:focus {
  box-shadow: none;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 2% auto;
  padding: 0;
  border: 1px solid #888;
  width: 90%;
  max-width: 1200px;
  border-radius: 0.3rem;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

/* .modal-body { */
  /* position: relative; */
  /* flex: 1 1 auto; */
  /* padding: 0; */
  /* height: 80vh; */
  /* overflow: hidden; */
/* } */

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;
  background-color: transparent;
  border: 0;
  cursor: pointer;
  z-index: 1051;
}

.modal-close:hover {
  opacity: 1;
}

/* Two column layout for modal */
.modal-row {
  display: flex;
  height: 100%;
  min-height: 75vh;
}

.modal-col-left {
  flex: 0 0 70%;
  padding: 15px;
  border-right: 1px solid #dee2e6;
}

.modal-col-right {
  flex: 0 0 30%;
  padding: 15px;
  background-color: #f8f9fa;
}

.pdfModal-left {
  height: 100%;
  min-height: 70vh;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.pdfModal-left iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pdfModal-right h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

.pdfModal-right-table {
  width: 100%;
  margin-bottom: 20px;
}

.pdfModal-right-table td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.pdfModal-right-table td:first-child {
  color: #666;
  width: 60%;
}

.pdfModal-right-table td:last-child {
  text-align: right;
  font-weight: bold;
  color: #333;
}

.pdfModal-right-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pdfModal-right-list li {
  margin-bottom: 10px;
}

.pdfModal-right-item {
  display: block;
  padding: 10px 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: all 0.2s ease;
}

.pdfModal-right-item:hover {
  background-color: #e9ecef;
  text-decoration: none;
  color: #333;
}

.pdfModal-right-item i {
  margin-right: 8px;
  color: #007bff;
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
  }
  
  .modal-row {
    flex-direction: column;
  }
  
  .modal-col-left {
    flex: none;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
  }
  
  .modal-col-right {
    flex: none;
    padding-top: 15px;
  }
  
  .pdfModal-left {
    min-height: 400px;
  }
}