/* ===== RESET + BASE ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f4f8;
    color: #333;
}

h1, h2, h3 {
    text-align: center;
    color: #0057b7;
}

.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.main-header {
    background: linear-gradient(90deg, #004aad, #0074e4);
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logo {
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.header-title {
    color: #cccccc;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.main-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}

/* Thanh nav nằm gọn trong container và canh giữa */
.page-content {
    margin-top: 20px;
}

.top-nav .nav-link.active {
    background: #0066cc;
    color: #fff;
}

.top-nav {
    display: flex;
    justify-content: center; /* canh giữa */
    gap: 30px; /* khoảng cách giữa 2 link */
    background: #004080;
    padding: 12px 0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.top-nav .nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 6px;
    transition: background 0.3s;
}

.top-nav .nav-link:hover {
    background: #0066cc;
}

.top-nav .nav-link.active {
    background: #0066cc;
}

/* Thanh ngang */
.led-bar {
    height: 4px;
    width: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff, #ff00ff, #ffff00);
    background-size: 300% 100%;
    animation: ledRun 3s linear infinite;
    margin: 15px 0;
}

@keyframes ledRun {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===== CONTAINER ===== */
.container {
    flex: 1;
    max-width: 700px;
    margin: 30px auto;
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* ===== BUTTONS ===== */
.button-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
    flex-wrap: wrap;
    text-decoration: none;
}

.action-btn {
    padding: 12px 20px;
    background-color: #0074e4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.action-btn:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
}

/* ===== FORM ===== */
form {
    text-align: center;
    padding-bottom: 15px;
}

input[type="text"] {
    width: 30%;
    padding: 12px;
    margin-bottom: 20px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

button {
    padding: 12px 24px;
    background-color: #0057b7;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background-color: #003f9a;
}

/* ===== RESULT BOX ===== */
.result-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #f6faff;
    border-radius: 8px;
    border: 1px solid #d6e9f8;
}

.message {
    font-size: 18px;
    margin-bottom: 20px;
    color: #444;
}

.no-data {
    color: red;
    font-weight: bold;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

th {
    background-color: #e6f2ff;
}

/* ===== IMAGE GALLERY ===== */
.image-gallery {
    margin-top: 40px;
    text-align: center;
}

.footer-image {
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #f1f1f1;
    color: #666;
    font-size: 15px;
    border-top: 1px solid #ccc;
}

.footer a {
    color: #0057b7;
    text-decoration: none;
    font-weight: 600;
}

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

/* ===== RESPONSIVE (MOBILE) ===== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 10px;
    }

    .header-logo {
        height: 50px;
    }

    .header-title {
        font-size: 16px;
        text-align: center;
    }

    .main-header h1 {
        font-size: 20px;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
        max-width: 600px;
    }

    .action-btn {
        width: 80%;
        margin: 0 auto;
        font-size: 16px;
    }

    input[type="text"] {
        width: 80%;
        max-width: 600px;
        margin: 0 auto;
    }

    form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    button {
        width: 80%;
        margin: 0 auto;
        max-width: 400px;
    }

    .footer-image {
        max-width: 100%;
    }

    th, td {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    #tra-diem-lop-10 th:nth-child(1), /* STT */
    #tra-diem-lop-10 td:nth-child(1),
    #tra-diem-lop-10 th:nth-child(5), /* TBMC */
    #tra-diem-lop-10 td:nth-child(5),
    #tra-diem-lop-10 th:nth-child(6), /* Vắng thi */
    #tra-diem-lop-10 td:nth-child(6),
    #tra-diem-lop-10 th:nth-child(7), /* Đăng ký */
    #tra-diem-lop-10 td:nth-child(7) {
        display: none;
    }

    .top-nav {
        display: flex;
        justify-content: center;
        gap: 10px;
        background: #004080;
        padding: 10px 10px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
}

/* ===== ADMISSION LOOKUP CARD ===== */
.admission-card {
    margin: 24px 0 28px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.admission-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    background: #f7f9fc;
    border-bottom: 1px solid #d8dee8;
}

.admission-title svg {
    flex: 0 0 auto;
}

.admission-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admission-table {
    min-width: 620px;
    margin-top: 0;
    border-collapse: collapse;
    color: #222;
    font-size: 14px;
}

.admission-table td {
    border: 1px solid #d8dee8;
    padding: 12px;
    vertical-align: middle;
}

.admission-table tr:first-child td {
    border-top: 0;
}

.admission-table td:first-child {
    border-left: 0;
}

.admission-table td:last-child {
    border-right: 0;
}

.admission-table tr:last-child td {
    border-bottom: 0;
}

.admission-label {
    background: #fbfcfe;
    color: #333;
    font-weight: 500;
}

.admission-info small {
    color: #777;
}

.admission-status-cell,
.admission-action-cell {
    text-align: center;
}

.admission-status {
    display: inline-block;
    padding: 5px 10px;
    color: #1473e6;
    background: #eaf3ff;
    border: 1px solid #b9d8ff;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.admission-search-btn {
    padding: 8px 14px;
    color: #fff;
    background: #0057b7;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.admission-search-btn:hover {
    background: #003f9a;
}

@media (max-width: 760px) {
    .container {
        padding: 22px 16px;
    }

    .top-nav {
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }

    .top-nav .nav-link {
        text-align: center;
    }

    input[type="text"] {
        width: calc(100% - 26px);
        margin-right: 0;
    }

    .admission-card {
        margin-left: -4px;
        margin-right: -4px;
    }

    .admission-title {
        align-items: flex-start;
        font-size: 14px;
    }

    .footer-image {
        max-width: 100%;
    }
}
