/* =====================================================
   CENTRAL SANSKRIT UNIVERSITY
   Attendance Management System
   ===================================================== */

/* ---------- RESET ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(to right, #f4f6f9, #e9eef5);
    color: #333;
}

/* ---------- HEADER ---------- */
.header {
    background: #1f3c88;
    color: #ffffff;
    padding: 14px 20px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.header p {
    margin: 6px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* ---------- CONTAINER ---------- */
.container {
    min-height: calc(100vh - 60px); /* top-bar height */
    padding: 40px 20px 20px;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- CARD ---------- */
.card {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    border-radius: 14px;
    padding: 30px 28px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

/* ---------- TITLES ---------- */
.section-title {
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #1f3c88;
}

.meta {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 22px;
    color: #666;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 22px 0;
}

/* ---------- FORM ---------- */
label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="month"],
select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    background: #fafafa;
}

input[type="month"]:focus,
select:focus {
    border-color: #1f3c88;
    background: #fff;
}

small {
    font-size: 13px;
    color: #555;
}

/* ---------- BUTTON GROUP ---------- */
.btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

/* ---------- BASE BUTTON ---------- */
.btn {
    padding: 15px 12px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;

    text-decoration: none;   /* ✅ IMPORTANT */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

/* ---------- SUMMARY EXCEL ---------- */
.btn-green {
    background: linear-gradient(135deg, #2e7d32, #43a047);
}
.btn-green:hover {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
}

/* ---------- SUMMARY PDF ---------- */
.btn-teal {
    background: linear-gradient(135deg, #006064, #0097a7);
}
.btn-teal:hover {
    background: linear-gradient(135deg, #004d40, #006064);
}

/* ---------- REGISTER EXCEL ---------- */
.btn-blue {
    background: linear-gradient(135deg, #512da8, #673ab7);
}
.btn-blue:hover {
    background: linear-gradient(135deg, #311b92, #512da8);
}

/* ---------- REGISTER PDF ---------- */
.btn-dark {
    background: linear-gradient(135deg, #263238, #37474f);
}
.btn-dark:hover {
    background: linear-gradient(135deg, #1c1c1c, #263238);
}

/* ---------- FOOTER ---------- */
.footer {
    background: #f1f3f6;
    text-align: center;
    padding: 32px 10px 20px;
    font-size: 13px;
    color: #555;
    }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    .card {
        padding: 22px 18px;
    }

    .btn-group {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 20px;
    }
}
/* ===== COMMON UTILITIES ===== */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ===== COMMON SUCCESS / INFO BOX ===== */
.info-box {
    padding: 16px;
    border-radius: 10px;
    background: #f5f8ff;
    border-left: 5px solid #1f3c88;
    margin: 16px 0;
}

/* ===== DISABLED BUTTON ===== */
.btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-group.column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.btn-grey {
    background: linear-gradient(135deg, #616161, #9e9e9e);
    color: #fff;
}
.btn-grey:hover {
    background: linear-gradient(135deg, #424242, #616161);
}
.table-wrapper {
    overflow-x: auto;
}
input[type="checkbox"] {
    transform: scale(1.1);
    cursor: pointer;
}

.logout-btn {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.logout-btn:hover {
    text-decoration: underline;
}
/* ===== TOP BAR MOBILE FIX ===== */
@media (max-width: 600px) {

    .header h1 {
        font-size: 18px;
        line-height: 1.3;
    }

    .header p {
        font-size: 13px;
    }

    .logout-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
}
/* =====================================================
   PAGE CONTENT WRAPPER
===================================================== */

.page-content {
    padding-bottom: 8vh;      /* viewport-based */
    min-height: calc(100vh - 140px);
}

/* =====================================================
   ATTENDANCE PAGE – OVERRIDE GLOBAL CENTERING
===================================================== */

body.attendance-page .container {
    display: block;              /* flex hatao */
    padding: 0 24px 24px;        /* top gap zero */
    min-height: auto;
    margin: 0;
}

body.attendance-page .card.large {
    margin-top: 0;               /* header se chipka */
}
/* =====================================================
   ADMIN – CARD WIDTH FIX
===================================================== */

body.admin-page .card {
    max-width: 1000px;   /* 👈 pehle 460px tha */
    width: 100%;
}
/* ===== ADMIN TABLE BORDER FIX ===== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table th,
.data-table td {
    border: 1px solid #cfd6e0;   /* 👈 visible border */
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.data-table thead th {
    background-color: #f3f4f6;
    font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.data-table tbody tr:hover {
    background-color: #eef2ff;
}
