/* GLOBAL */
body {
    min-height: 100vh;
    background: #2e7d32;
    color: white;
    font-family: system-ui;
}

.card {
    background: #1c2541;
    color: #fff;
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto 1.5rem auto;
    width: 100% !important;
    max-width: 700px;
    justify-content: center;
    box-sizing: border-box;
}

table {
    background-color: #1c2541;
}

/* Unified table cell styling */
.table td,
.table th,
.custom-table td,
.custom-table th {
    background-color: #1c2541;
    color: wheat;
    font-size: 1.1rem;
}

.table.table-bordered th,
.table.table-bordered td {
    border: 1px solid #28a745 !important;
}

.table.table-bordered thead {
    background-color: #28a745 !important;
    color: white !important;
}

.table.table-bordered tbody tr:hover {
    background-color: #7cad7eff !important;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    line-height: 1.0;
}

.ls-normal {
    letter-spacing: normal;
}

.ls-wide {
    letter-spacing: 0.25rem; /* adjust to what you want */
}

.ls-wider {
    letter-spacing: 1.5rem;
}
/* ===============================
   MOBILE VIEW
================================== */
@media (max-width: 768px) {

    body {
        font-size: 85%;
    }

    .container {
        padding: 0 8px !important;
        max-width: 100%;
    }

    .card {
        padding: 20px !important;
    }

    .exam-card-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    table.table td,
    table.table th {
        font-size: 0.8rem !important;
        padding: 10px 4px !important;
    }

    /* Hide teacher column on mobile */
    th:nth-child(6),
    td:nth-child(6) {
        display: none !important;
    }

    small {
        font-size: 0.55rem;
    }

    /* Column widths */
    table.table th:nth-child(1),
    table.table td:nth-child(1) {
        width: 25% !important;
    }

    table.table th:nth-child(2),
    table.table td:nth-child(2) {
        width: 12% !important;
    }

    table.table th:nth-child(3),
    table.table td:nth-child(3) {
        width: 12% !important;
    }

    table.table th:nth-child(4),
    table.table td:nth-child(4) {
        width: 15% !important;
    }

    table.table th:nth-child(5),
    table.table td:nth-child(5) {
        width: 20% !important;
    }
}

/* PRINT STYLES */
@media print {

    @page {
        size: A4 portrait;
        margin: 0;
    }

    body {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        margin: 0 !important;
        padding: 20mm !important;
        background: white !important;
        color: black !important;
        border: none !important;
        page-break-after: always;
    }

    /* Show the teacher column during print */
    th:nth-child(6),
    td:nth-child(6) {
        display: table-cell !important;
    }

    table.table th,
    table.table td {
        background: white !important;
        color: black !important;
        border-color: #000 !important;
        height: 1.3rem;
    }

    /* Hide buttons in print */
    button,
    .btn {
        display: none !important;
    }
}
