/* style.css - ระบบประกาศคะแนน ห้องเรียนพิเศษ 2569 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sarabun', 'TH Sarabun New', Arial, sans-serif;
    font-size: 16px;
    background: #e8f4fd;
    color: #333;
    min-height: 100vh;
}

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #3949ab 100%);
    color: #fff;
    text-align: center;
    padding: 20px 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.site-header h1 {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.site-header p {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.85;
}

/* ===== Main Container ===== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 15px 40px;
}

/* ===== Login Card ===== */
.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-width: 420px;
    margin: 40px auto;
    padding: 36px 32px;
    border-top: 5px solid #1a237e;
}

.login-card .card-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 24px;
}

.login-card .card-title .icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #555;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #283593;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-danger {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #a00;
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
}

/* ===== Result Page ===== */
.result-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    padding: 28px 28px 32px;
    margin-bottom: 24px;
    border-top: 5px solid #1a237e;
}

.result-card h2 {
    font-size: 18px;
    color: #1a237e;
    margin-bottom: 18px;
    border-bottom: 2px solid #e8eaf6;
    padding-bottom: 10px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    vertical-align: top;
}

.info-table td:first-child {
    width: 180px;
    color: #666;
    font-weight: bold;
    white-space: nowrap;
}

.info-table td:last-child {
    color: #222;
}

/* Score Table */
.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.score-table thead tr {
    background: #1a237e;
    color: #fff;
}

.score-table thead th {
    padding: 10px 14px;
    text-align: center;
    font-weight: bold;
}

.score-table tbody tr:nth-child(even) {
    background: #f5f7ff;
}

.score-table tbody tr:hover {
    background: #e8eaf6;
}

.score-table tbody td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.score-table tbody td.subject {
    text-align: left;
    font-weight: bold;
    color: #333;
}

.score-highlight {
    font-size: 28px;
    font-weight: bold;
    color: #1a237e;
    text-align: center;
    padding: 12px 0 4px;
}

.score-label {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

.rank-badge {
    display: inline-block;
    background: #1a237e;
    color: #fff;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 15px;
    font-weight: bold;
}

.score-na {
    color: #bbb;
    font-style: italic;
}

/* ===== Navbar top ===== */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.topbar .user-info {
    font-weight: bold;
    color: #1a237e;
}

.btn-logout {
    display: inline-block;
    padding: 6px 16px;
    background: #e53935;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #b71c1c;
    color: #fff;
}

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    font-size: 13px;
    color: #999;
    padding: 20px;
    margin-top: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .login-card {
        padding: 24px 16px;
        margin: 20px auto;
    }
    .result-card {
        padding: 18px 14px;
    }
    .info-table td:first-child {
        width: 130px;
        font-size: 13px;
    }
    .score-table {
        font-size: 13px;
    }
    .score-table thead th,
    .score-table tbody td {
        padding: 8px 8px;
    }
}
