* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.record-count-desktop {
    background: rgba(255,255,255,0.2);
    padding: 6px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
    margin-top: 8px;
}

.record-count-desktop span {
    color: #ffeb3b;
    font-weight: 700;
    font-size: 1.1em;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    padding: 20px 15px;
    border-radius: 0 0 16px 16px;
    margin: -10px -10px 15px -10px;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    width: calc(100% + 20px);
}

.mobile-header .header-content h1 {
    font-size: 1.4em;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.mobile-header .header-content p {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.mobile-header .record-count {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 600;
    margin-top: 5px;
}

.mobile-header .record-count span {
    color: #ffeb3b;
    font-weight: 700;
}

.mobile-header .refresh-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mobile-header .refresh-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    overflow: hidden;
}

.empty-state .barcode-icon {
    font-size: 40px;
    letter-spacing: 2px;
    color: #ddd;
    margin-bottom: 15px;
    font-family: monospace;
    overflow: hidden;
    word-break: break-all;
    max-width: 100%;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
    color: #888;
}

/* No Result */
.no-result {
    text-align: center;
    padding: 20px;
}

.no-result .info {
    color: #27ae60;
    font-weight: 600;
}

.no-result-hint {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.no-result-hint a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.no-result-hint a:hover {
    text-decoration: underline;
}

/* Navigation menu - Desktop */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-menu a {
    padding: 10px 25px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #667eea;
}

.nav-menu a .nav-icon {
    display: none;
}

.nav-menu a:nth-child(4) .nav-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 5px;
}

.nav-menu a .nav-text-mobile {
    display: none;
}

.nav-menu a:hover {
    background: #667eea;
    color: white;
}

.nav-menu a.active {
    background: #667eea;
    color: white;
}

.nav-menu a.add-btn {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.nav-menu a.add-btn:hover {
    background: #219a52;
    border-color: #219a52;
}

section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Search */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box button {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #5a6fd6;
}

/* Form */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Buttons */
button, .btn-primary, .btn-secondary, .btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    margin: 2px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

tr:hover {
    background: #f8f9fa;
}

/* Filter row */
.filter-row td {
    padding: 8px 5px;
    background: #f0f0f0;
}

.filter-row input,
.filter-row select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.filter-row input:focus,
.filter-row select:focus {
    outline: none;
    border-color: #667eea;
}

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

/* Pagination */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

#pagination button {
    padding: 8px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    min-width: 36px;
    transition: all 0.2s;
}

#pagination button.active {
    background: #667eea;
    color: white;
}

#pagination button:hover:not(.active) {
    background: #d0d0d0;
}

#pagination .dots {
    padding: 8px 5px;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.modal-content button {
    margin: 0 5px;
}

/* Utilities */
.info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
    color: #666;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
}

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

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

.status-trung {
    display: inline-block;
    padding: 4px 12px;
    background: #e74c3c;
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-khong-trung {
    display: inline-block;
    padding: 4px 12px;
    background: #27ae60;
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.row-trung {
    background: #fff3cd !important;
    border-left: 4px solid #e74c3c;
}

.row-trung:hover {
    background: #ffe8a1 !important;
}

.center {
    text-align: center;
}

/* Search results cards */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid #1abc9c;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.result-card .result-row {
    padding: 6px 0;
    border-bottom: none;
}

.result-card .result-row:last-child {
    border-bottom: none;
}

.result-card .label {
    color: #666;
    font-size: 13px;
}

.result-card strong {
    color: #667eea;
    font-size: 16px;
}

/* 2 columns layout for desktop */
.info-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.info-columns .overview-section,
.info-columns .notice-section {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .info-columns {
        flex-direction: column;
        gap: 15px;
    }
}

/* Overview section */
.overview-section {
    background: linear-gradient(135deg, #e8f8f5 0%, #d1f2eb 100%);
    border: 1px solid #a3e4d7;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

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

.overview-title {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
}

.overview-link {
    font-size: 12px;
    color: #1abc9c;
    text-decoration: none;
    font-weight: 600;
}

.overview-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 28px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #e67e22;
    display: block;
    line-height: 1;
}

.stat-desc {
    font-size: 12px;
    color: #666;
}

/* Section header with badge */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.section-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.badge-count {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.section-desc {
    color: #888;
    font-size: 13px;
    margin-bottom: 15px;
}

/* Notice section */
.notice-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notice-icon {
    font-size: 20px;
    color: #3498db;
}

.notice-content {
    flex: 1;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.notice-content strong {
    color: #333;
}

.notice-highlight {
    color: #e67e22;
    font-weight: 600;
}

.notice-link {
    display: inline-block;
    margin-top: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

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

/* Check mã NE trong form thêm */
.check-warning {
    margin-top: 8px;
    padding: 10px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
}

.check-warning .check-item {
    margin-top: 4px;
    font-size: 12px;
    color: #664d03;
}

.check-ok {
    margin-top: 8px;
    padding: 8px 12px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 6px;
    font-size: 13px;
    color: #155724;
}

/* Mobile search styles */
.search-label {
    text-align: center;
    color: #888;
    font-size: 11px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 500;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-wrapper .search-icon {
    display: none;
}

@media (max-width: 768px) {
    .search-input-wrapper .search-icon {
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
        opacity: 0.4;
    }
}

.search-input-wrapper input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: #fafafa;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .search-input-wrapper input {
        padding: 14px 15px 14px 45px;
        border: 1px solid #ddd;
        border-radius: 10px;
    }
}

.search-input-wrapper input:focus {
    background: white;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.btn-search {
    padding: 14px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .btn-search {
        width: 100%;
        background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
    }
}

.btn-search:hover {
    background: #5a6fd6;
}

@media (max-width: 768px) {
    .btn-search:hover {
        background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(26, 188, 156, 0.4);
    }
    
    .btn-search:active {
        transform: translateY(0);
    }
}

/* Mobile alert */
.mobile-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    padding: 12px 15px;
}

.mobile-alert .alert-icon {
    font-size: 28px;
}

.mobile-alert strong {
    font-size: 14px;
}

.mobile-alert small {
    opacity: 0.8;
    font-size: 12px;
}

/* Mobile card status badge */
.card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-status.status-trung {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.card-status.status-ok {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
}

/* Mobile result row styles */
.result-card .result-row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 0;
    border-bottom: none;
}

.result-card .row-icon {
    color: #1abc9c;
    font-size: 12px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #e8f8f5;
    border-radius: 6px;
    font-weight: 600;
}

.result-card .row-content {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.result-card .row-content small {
    display: block;
    color: #aaa;
    font-size: 10px;
    margin-top: 2px;
}

.result-card .ma-ne {
    font-size: 22px;
    color: #222;
    font-weight: 700;
}

/* Info row */
.result-card .info-row {
    flex-direction: column;
    align-items: flex-start;
    background: linear-gradient(135deg, #e8f8f5 0%, #d5f5e3 100%);
    margin: 10px -15px -15px -15px;
    padding: 12px 15px;
    gap: 4px;
    border-radius: 0 0 8px 8px;
}

.result-card .info-label {
    color: #1abc9c;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.result-card .info-content {
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

/* Desktop/Mobile visibility */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    /* Desktop/Mobile visibility override */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
    
    .nav-menu a.mobile-only {
        display: flex !important;
    }

    /* Hiển thị mobile header */
    header.mobile-header {
        display: flex !important;
    }

    .mobile-header h1 {
        font-size: 1.3em;
    }

    /* Header thường trên mobile (cho các trang khác) */
    header:not(.mobile-header):not(.desktop-only) {
        padding: 12px 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    header:not(.mobile-header):not(.desktop-only) h1 {
        font-size: 1.3em;
        margin-bottom: 3px;
    }

    header:not(.mobile-header):not(.desktop-only) p {
        font-size: 11px;
        opacity: 0.9;
    }

    section {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
        gap: 12px;
    }

    .search-box button:not(.btn-search) {
        display: none;
    }

    .search-input-wrapper .search-icon {
        display: block;
    }

    .search-section h2.desktop-only {
        display: none;
    }

    .search-section .search-label {
        display: block;
    }

    /* Table responsive - cuộn ngang */
    .list-section {
        overflow-x: auto;
    }
    
    table {
        font-size: 12px;
        min-width: 800px;
    }
    
    th, td {
        padding: 8px 6px;
        white-space: pre-wrap;
        word-break: break-word;
    }

    /* Thu gọn cột ghi chú */
    td:nth-child(4) {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Status badge nhỏ hơn */
    .status-trung,
    .status-khong-trung {
        padding: 3px 8px;
        font-size: 10px;
    }

    /* Pagination nhỏ gọn */
    #pagination button {
        padding: 6px 10px;
        min-width: 30px;
        font-size: 12px;
    }

    /* Bottom navigation cho mobile */
    .nav-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #f8f9fa;
        border-top: 1px solid #ddd;
        margin: 0;
        padding: 5px 0;
        gap: 0;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        align-items: flex-end;
    }

    .nav-menu a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding: 8px 5px;
        background: transparent;
        border: none;
        border-radius: 0;
        color: #666;
        font-size: 11px;
        font-weight: 500;
        height: 56px;
    }

    /* Thứ tự mobile: Thêm(1), Danh sách(2), Tra cứu(3), GitHub(4), Ủng hộ(5) */
    .nav-menu a:nth-child(1) { order: 3; } /* Tra cứu - giữa */
    .nav-menu a:nth-child(2) { order: 1; } /* Thêm */
    .nav-menu a:nth-child(3) { order: 2; } /* Danh sách */
    .nav-menu a:nth-child(4) { order: 4; } /* GitHub */
    .nav-menu a:nth-child(5) { order: 5; } /* Ủng hộ */

    .nav-menu a .nav-icon {
        display: block;
        font-size: 20px;
        margin-bottom: 3px;
    }

    .nav-menu a .nav-text {
        display: none;
    }

    .nav-menu a .nav-text-mobile {
        display: block;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: transparent;
        color: #667eea;
    }

    /* Nút Tra cứu (a:nth-child(1)) nằm giữa, lệch lên */
    .nav-menu a:nth-child(1) {
        position: relative;
        top: -25px;
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        color: white;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        flex: none;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
        border: 3px solid white;
    }

    .nav-menu a:nth-child(1) .nav-icon {
        font-size: 26px;
        margin: 0;
    }

    .nav-menu a:nth-child(1) .nav-text-mobile {
        display: none;
    }

    .nav-menu a:nth-child(1):hover,
    .nav-menu a:nth-child(1).active {
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
        color: white;
        transform: scale(1.05);
    }

    /* Nút Thêm dữ liệu (add-btn) */
    .nav-menu a.add-btn {
        position: relative;
        top: 0;
        background: transparent;
        color: #555;
        box-shadow: none;
    }

    .nav-menu a.add-btn .nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: #e8f5e9;
        border-radius: 8px;
        margin: 0 auto 2px;
    }

    .nav-menu a.add-btn .nav-text-mobile {
        display: block;
        font-size: 10px;
        color: #666;
    }

    .nav-menu a.add-btn:hover,
    .nav-menu a.add-btn.active {
        background: transparent;
        color: #27ae60;
    }

    .nav-menu a.add-btn:hover .nav-icon,
    .nav-menu a.add-btn.active .nav-icon {
        background: #27ae60;
        color: white;
    }

    /* Nút Danh sách (nth-child(3)) */
    .nav-menu a:nth-child(3) .nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: #e3f2fd;
        border-radius: 8px;
        margin: 0 auto 2px;
    }

    .nav-menu a:nth-child(3) .nav-text-mobile {
        font-size: 10px;
        color: #666;
    }

    .nav-menu a:nth-child(3):hover .nav-icon,
    .nav-menu a:nth-child(3).active .nav-icon {
        background: #3498db;
        color: white;
    }
    
    /* Nút GitHub (nth-child(4)) và Ủng hộ (nth-child(5)) */
    .nav-menu a:nth-child(4) .nav-icon,
    .nav-menu a:nth-child(5) .nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: #f0f0f0;
        border-radius: 8px;
        margin: 0 auto 2px;
    }
    
    .nav-menu a:nth-child(4) .nav-text-mobile,
    .nav-menu a:nth-child(5) .nav-text-mobile {
        font-size: 10px;
        color: #666;
        text-align: center;
        width: 100%;
    }
    
    .nav-menu a:nth-child(4):hover .nav-icon,
    .nav-menu a:nth-child(5):hover .nav-icon {
        background: #667eea;
        color: white;
    }

    /* Padding bottom cho container để tránh bị che bởi nav */
    .container {
        padding-bottom: 40px;
    }
}

/* Mobile Form Styles */
.mobile-form {
    background: linear-gradient(135deg, #e8f8f5 0%, #d5f5e3 100%);
    border: none;
    border-radius: 16px;
}

.mobile-form .form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mobile-form .form-label .required {
    color: #e74c3c;
}

.mobile-form .form-group {
    margin-bottom: 16px;
}

.mobile-form input,
.mobile-form select,
.mobile-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.2s;
}

.mobile-form input:focus,
.mobile-form select:focus,
.mobile-form textarea:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.mobile-form input::placeholder,
.mobile-form textarea::placeholder {
    color: #aaa;
}

.mobile-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.input-with-icon input {
    padding-left: 44px;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Desktop form adjustments */
@media (min-width: 769px) {
    .mobile-form {
        background: white;
        max-width: 100%;
        margin: 0;
    }
    
    .mobile-form .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .mobile-form .form-row-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .btn-submit {
        background: #667eea;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    
    .btn-submit:hover {
        background: #5a6fd6;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
}

/* Guide Page Styles */
.guide-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.guide-block {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 15px;
}

.guide-block h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
}

.guide-block p {
    color: #444;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.guide-block ul {
    margin: 8px 0;
    padding-left: 18px;
}

.guide-block li {
    color: #444;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.guide-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 4px;
}

.guide-badge.danger {
    background: #ffebee;
    color: #c62828;
}

.guide-badge.warning {
    background: #fff8e1;
    color: #f57f17;
}

.guide-badge.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.guide-note {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 12px;
    font-size: 13px;
    color: #555;
}

@media (max-width: 768px) {
    .guide-block {
        padding: 14px 16px;
    }
    
    .guide-block h3 {
        font-size: 14px;
    }
    
    .guide-block p,
    .guide-block li {
        font-size: 13px;
    }
}

/* Donate Button & Popup */
.donate-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    z-index: 999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    5% { transform: rotate(-10deg); }
    10% { transform: rotate(10deg); }
    15% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
    25% { transform: rotate(0deg); }
}

.donate-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
    animation: none;
}

.donate-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.donate-content {
    background: white;
    border-radius: 16px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.donate-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
}

.donate-close:hover {
    color: #333;
}

.donate-content h3 {
    text-align: center;
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 20px;
}

.donate-content > p {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.donate-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.bank-info {
    flex: 1;
}

.bank-info strong {
    display: block;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.bank-info p {
    font-size: 13px;
    color: #555;
    margin: 6px 0;
}

.bank-info p strong {
    display: inline;
    color: #e74c3c;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 200px;
    height: 200px;
    border: 2px solid #eee;
    border-radius: 8px;
}

.qr-code p {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

.donate-link {
    display: block;
    text-align: center;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

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

.bank-info-expanded {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.bank-info-expanded .bank-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
}

.bank-info-expanded .bank-details p strong {
    color: #667eea;
}

@media (max-width: 768px) {
    .donate-btn {
        display: none;
    }
    

    .donate-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .qr-code img {
        width: 180px;
        height: 180px;
    }
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 10px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.site-footer a {
    color: #667eea;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-footer {
        margin-bottom: 70px;
        padding: 15px;
        font-size: 12px;
    }
}
.modal-content-img {
    max-width: 75%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: default;
    display: block;
    margin: 0 auto;
}

.click-hint {
    font-size: 11px;
    font-weight: normal;
    margin-left: 4px;
    color: #7f8c8d;
}

.admin-table .click-hint {
    color: rgba(255,255,255,0.8);
}

.click-hint-mobile {
    text-align: center;
    font-size: 12px;
    color: #667eea;
    margin: 5px 0 10px;
    font-style: italic;
    display: block;
}