/* =========================================================
   SMART ATTENDANCE SYSTEM
   DR SACOE | ECE - 2
   STYLE SHEET
========================================================= */


/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #111111;
    min-height: 100vh;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --black: #111111;
    --yellow: #ffd400;
    --white: #ffffff;
    --gray: #f4f4f4;
    --border: #dddddd;
    --green: #16803c;
    --red: #c62828;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   COMMON
========================================================= */

.hidden {
    display: none !important;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   HEADER
========================================================= */

.main-header {
    background: var(--black);
    color: var(--white);
    padding: 18px 20px;
    border-bottom: 5px solid var(--yellow);
}

.college-brand {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.college-logo {
    width: 58px;
    height: 58px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--yellow);
    color: var(--black);

    border-radius: 12px;

    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.college-info h1 {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 900;
}

.college-info p {
    margin-top: 5px;
    color: #dddddd;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
}


/* =========================================================
   LOGIN SECTION
========================================================= */

.login-section {
    min-height: calc(100vh - 150px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px 18px;
}

.login-card {
    width: 100%;
    max-width: 430px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;

    padding: 30px 24px;

    box-shadow: var(--shadow);
}

.class-badge {
    display: inline-block;

    background: var(--yellow);
    color: var(--black);

    padding: 7px 12px;
    border-radius: 20px;

    font-size: 12px;
    font-weight: 900;
}

.login-card h2 {
    margin-top: 18px;

    font-size: 25px;
    line-height: 1.15;
    font-weight: 900;
}

.login-subtitle {
    margin-top: 8px;
    color: #666666;
    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   INPUTS
========================================================= */

.input-group {
    margin-top: 20px;
}

.input-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 800;
}

.input-group input,
.search-box input,
.history-controls input {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #fafafa;

    padding: 13px 14px;

    outline: none;

    color: var(--black);
}

.input-group input:focus,
.search-box input:focus,
.history-controls input:focus {
    border-color: var(--black);
    background: var(--white);
}


/* =========================================================
   ERROR
========================================================= */

.error-message {
    min-height: 20px;

    margin-top: 10px;

    color: var(--red);

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   BUTTONS
========================================================= */

.primary-btn {
    width: 100%;

    margin-top: 12px;

    padding: 14px;

    border: none;
    border-radius: 10px;

    background: var(--black);
    color: var(--white);

    font-weight: 900;
    letter-spacing: 0.5px;

    transition: 0.2s;
}

.primary-btn:hover {
    background: #333333;
}

.primary-btn:active {
    transform: scale(0.98);
}

.logout-btn {
    border: none;
    border-radius: 9px;

    padding: 10px 14px;

    background: var(--yellow);
    color: var(--black);

    font-size: 12px;
    font-weight: 900;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-section {
    max-width: 1100px;
    margin: auto;

    padding: 25px 18px 50px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 22px;
}

.small-label {
    color: #777777;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1px;
}

.dashboard-header h2 {
    margin-top: 5px;

    font-size: 24px;
    font-weight: 900;
}


/* =========================================================
   STAT CARDS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;

    margin-bottom: 22px;
}

.stat-card {
    padding: 20px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: var(--white);

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-card span {
    display: block;

    color: #666666;

    font-size: 10px;
    font-weight: 900;
}

.stat-card strong {
    display: block;

    margin-top: 8px;

    font-size: 30px;
    font-weight: 900;
}

.present-card {
    border-left: 5px solid var(--green);
}

.absent-card {
    border-left: 5px solid var(--red);
}


/* =========================================================
   DASHBOARD TOOLS
========================================================= */

.dashboard-tools {
    display: flex;
    gap: 8px;

    margin-bottom: 15px;

    overflow-x: auto;
}

.tool-btn {
    flex-shrink: 0;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--white);
    color: var(--black);

    padding: 10px 16px;

    font-size: 11px;
    font-weight: 900;
}

.tool-btn.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}


/* =========================================================
   TOOL PANELS
========================================================= */

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}


/* =========================================================
   SECTION CARD
========================================================= */

.section-card {
    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 17px;

    padding: 20px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.section-heading h3 {
    margin-top: 5px;

    font-size: 18px;
    font-weight: 900;
}

.live-status {
    background: #eeeeee;
    color: #555555;

    padding: 6px 9px;
    border-radius: 20px;

    font-size: 9px;
    font-weight: 900;
}


/* =========================================================
   SEARCH
========================================================= */

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    background: #f7f7f7;
}


/* =========================================================
   ATTENDANCE LIST
========================================================= */

.attendance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attendance-item {
    border: 1px solid var(--border);
    border-radius: 12px;

    padding: 15px;

    background: #ffffff;

    transition: 0.2s;
}

.attendance-item:hover {
    border-color: var(--black);
}

.attendance-main {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.student-name {
    font-size: 15px;
    font-weight: 900;
}

.roll-number {
    margin-top: 4px;

    color: #666666;

    font-size: 11px;
    font-weight: 600;
}

.attendance-status {
    padding: 6px 9px;

    border-radius: 20px;

    font-size: 9px;
    font-weight: 900;
}

.status-present {
    background: #e7f6ec;
    color: var(--green);
}

.status-absent {
    background: #fdeaea;
    color: var(--red);
}

.attendance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;

    margin-top: 12px;

    color: #666666;

    font-size: 10px;
    font-weight: 600;
}


/* =========================================================
   STUDENTS
========================================================= */

.students-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 14px;

    border: 1px solid var(--border);
    border-radius: 12px;
}

.student-info strong {
    display: block;

    font-size: 14px;
    font-weight: 900;
}

.student-info span {
    display: block;

    margin-top: 4px;

    color: #666666;

    font-size: 11px;
}

.student-active {
    padding: 6px 9px;

    border-radius: 20px;

    background: #e7f6ec;
    color: var(--green);

    font-size: 9px;
    font-weight: 900;
}


/* =========================================================
   HISTORY
========================================================= */

.history-controls {
    display: grid;

    grid-template-columns: 1fr auto;

    gap: 10px;

    align-items: end;

    margin-bottom: 18px;
}

.history-controls label {
    grid-column: 1 / -1;

    font-size: 12px;
    font-weight: 900;
}

.secondary-btn {
    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--white);
    color: var(--black);

    padding: 12px 15px;

    font-size: 11px;
    font-weight: 900;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.history-item {
    padding: 13px;

    border: 1px solid var(--border);
    border-radius: 11px;
}

.history-item strong {
    font-size: 13px;
    font-weight: 900;
}

.history-item span {
    display: block;

    margin-top: 4px;

    color: #666666;

    font-size: 10px;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    padding: 30px 15px;

    text-align: center;

    color: #888888;

    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   MODAL
========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: rgba(0, 0, 0, 0.55);
}

.modal.hidden {
    display: none;
}

.modal-box {
    width: 100%;
    max-width: 450px;

    background: var(--white);

    border-radius: 18px;

    padding: 22px;

    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;

    padding-bottom: 15px;

    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin-top: 5px;

    font-size: 19px;
    font-weight: 900;
}

.close-btn {
    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: #eeeeee;

    font-size: 22px;
    line-height: 1;
}

.entry-details {
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding-top: 18px;
}

.entry-details div {
    padding: 12px;

    background: #f7f7f7;

    border-radius: 9px;

    font-size: 12px;
}


/* =========================================================
   FOOTER
========================================================= */

.main-footer {
    padding: 28px 18px;

    background: var(--black);
    color: var(--white);

    text-align: center;

    border-top: 5px solid var(--yellow);
}

.footer-title {
    color: var(--yellow);

    margin-bottom: 10px;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1px;
}

.main-footer p {
    margin-top: 5px;

    font-size: 11px;
    font-weight: 700;
}

.footer-bottom {
    margin-top: 15px !important;

    color: #aaaaaa;

    font-size: 10px !important;
}


/* =========================================================
   TABLET / DESKTOP
========================================================= */

@media (min-width: 700px) {

    .main-header {
        padding: 22px 30px;
    }

    .college-info h1 {
        font-size: 20px;
    }

    .college-info p {
        font-size: 12px;
    }

    .login-card {
        padding: 35px;
    }

    .dashboard-section {
        padding: 35px 25px 60px;
    }

    .dashboard-header h2 {
        font-size: 30px;
    }

    .section-card {
        padding: 25px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .college-brand {
        align-items: flex-start;
    }

    .college-logo {
        width: 50px;
        height: 50px;
    }

    .college-info h1 {
        font-size: 13px;
    }

    .college-info p {
        font-size: 9px;
    }

    .login-card h2 {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card strong {
        font-size: 25px;
    }

    .dashboard-header {
        align-items: flex-start;
    }

    .dashboard-header h2 {
        font-size: 20px;
    }

    .section-card {
        padding: 16px;
    }

    .attendance-main {
        align-items: flex-start;
    }

    .history-controls {
        grid-template-columns: 1fr;
    }

    .history-controls label {
        grid-column: auto;
    }

    .secondary-btn {
        width: 100%;
    }
}