body {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.vertical-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    margin-top: 2rem;
}
.main-title {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #2d3a4b;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}
.container {
    background: #fff;
    padding: 2.5rem 2rem 2rem 2rem;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    width: 340px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
}
.welcome {
    font-size: 1.2rem;
    color: #2d3a4b;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}
.instruction {
    font-size: 1rem;
    color: #4a90e2;
    text-align: center;
    margin-bottom: 1rem;
}
.selected {
    color: #27ae60;
    font-weight: bold;
    background: #eafaf1;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    margin-bottom: 0.7rem;
}
form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.times-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: stretch;
    justify-content: center;
}
.time-radio {
    display: flex;
    align-items: center;
    background: #f4faff;
    border-radius: 7px;
    padding: 0.3rem 0.8rem;
    border: 1px solid #bfc9d1;
    transition: border 0.2s, box-shadow 0.2s;
    cursor: pointer;
    min-width: 80px;
    margin-bottom: 0.2rem;
    width: 30%;
    box-sizing: border-box;
    justify-content: center;
}
.time-radio input[type="radio"] {
    accent-color: #5b9bd5;
    margin-left: 0.5rem;
    margin-right: 0.2rem;
    cursor: pointer;
}
.time-radio input[type="radio"]:disabled + label {
    color: #bbb;
    text-decoration: line-through;
}
.time-radio input[type="radio"]:checked + label {
    color: #fff;
    background: #5b9bd5;
    border-radius: 5px;
    padding: 0.1rem 0.5rem;
}
button[type="submit"] {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    margin-top: 1rem;
    padding: 0.7rem 0;
    background: linear-gradient(90deg, #5b9bd5 0%, #4a90e2 100%);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(90, 155, 213, 0.08);
    width: 100%;
    box-sizing: border-box;
    display: block;
}
button[type="submit"]:hover {
    background: linear-gradient(90deg, #4a90e2 0%, #5b9bd5 100%);
    transform: translateY(-2px) scale(1.03);
}
@media (max-width: 500px) {
    .container { padding: 1.2rem; width: 98vw; }
    .times-list { gap: 0.3rem; }
}

/* Table styles for report.php and upload.php */
.table-container {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
    width: 90vw;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    padding: 2rem 1rem;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    background: #fff;
}
th, td {
    padding: 0.7rem 0.5rem;
    text-align: center;
}
th {
    background: #5b9bd5;
    color: #fff;
    font-weight: bold;
}
tr:nth-child(even) {
    background: #f4faff;
}
tr:hover {
    background: #e0eafc;
}
.download-btn {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    background: #5b9bd5;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 0.6rem 2.2rem;
    font-size: 1.08rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin: 1.5rem auto 2.5rem auto;
    display: block;
}
.download-btn:hover {
    background: #4a90e2;
}
.delete-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1.1rem;
    font-size: 1rem;
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.delete-btn:hover {
    background: #c0392b;
}
.upload-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(90, 155, 213, 0.08);
    width: 90vw;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    padding: 1.5rem 1rem;
    text-align: center;
}
.upload-section input[type="file"] {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    margin-bottom: 1rem;
}
.upload-section button {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    background: #5b9bd5;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.upload-section button:hover {
    background: #4a90e2;
}
.upload-message {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.pass-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #b3c6e0;
    padding: 2.5rem 2rem;
    min-width: 280px;
    text-align: center;
}
.pass-box label {
    font-size: 1.1rem;
    color: #2d3a4b;
    margin-bottom: 1rem;
    display: block;
}
.pass-box input[type="password"] {
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 7px;
    border: 1px solid #bfc9d1;
    width: 90%;
    margin-bottom: 1rem;
}
.pass-box button {
    font-family: Vazir,'B Nazanin', Tahoma,sans-serif;
    background: #5b9bd5;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 0.5rem 2.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}
.pass-box .error {
    color: #e74c3c;
    margin-top: 1rem;
}
.inactive-msg {
    color: #e74c3c;
    font-weight: bold;
    text-align: center;
    margin: 1.5rem 0;
    border: 2px solid #e74c3c;
    background: #fff0f0;
    border-radius: 10px;
    padding: 1rem 0.5rem;
}
.login-container {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
    width: 340px;
    max-width: 95vw;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}
.form-group input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border-radius: 7px;
    border: 1px solid #bfc9d1;
    font-size: 1rem;
}
.error {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 1rem;
    text-align: center;
}
@media (max-width: 600px) {
    .table-container, .upload-section { padding: 0.5rem; }
    th, td { font-size: 0.95rem; padding: 0.4rem 0.2rem; }
    .download-btn { width: 95vw; }
    .container, .login-container { padding: 1.2rem; width: 98vw; }
    .times-list { gap: 0.3rem; }
}

/* Management page: upload and new student sections */
.upload-section-mng,
.new-student-section,
.config-management-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(90, 155, 213, 0.08);
    width: 100%;
    max-width: 900px;
    margin: 2rem auto 1rem auto;
    padding: 1.5rem 1rem;
    text-align: center;
}

/* Section header for each section */
.section-header {
    background: #2980b9;
    color: #fff;
    font-weight: bold;
    font-size: 1.15rem;
    padding: 0.7rem 1rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Inputs and selects for edit/new student forms */
.edit-table input[type="text"], .edit-table select,
.new-student-section input[type="text"], .new-student-section select {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    border: 1px solid #bfc9d1;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.7rem;
}
.edit-table select,
.new-student-section select {
    height: 2.2rem;
}

/* Responsive for new student form */
@media (min-width: 600px) {
    .new-student-form-row {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }
    .new-student-form-row > div {
        flex: 1;
    }
}

/* Edit form buttons */
.edit-form-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.edit-form-btns .save-btn,
.edit-form-btns .cancel-btn {
    background: #27ae60 !important;
    color: #fff !important;
}

/* Action buttons in table */
.action-btns {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* All management page buttons green */
.download-btn,
.upload-section-mng button,
.new-student-section button,
.edit-form-btns .save-btn,
.edit-form-btns .cancel-btn,
.delete-btn {
    background: #27ae60 !important;
    color: #fff !important;
    border: none;
    border-radius: 7px;
    padding: 0.3rem 1.2rem;
    font-size: 0.95rem;
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    height: auto;
    min-height: unset;
    line-height: 1.5;
    margin: 0;
    display: inline-block;
}
.download-btn:hover,
.upload-section-mng button:hover,
.new-student-section button:hover,
.edit-form-btns .save-btn:hover,
.edit-form-btns .cancel-btn:hover,
.delete-btn:hover {
    background: #219150 !important;
}

/* Green button for login */
.green-btn {
    background: #27ae60 !important;
    color: #fff !important;
    border: none;
    border-radius: 7px;
    padding: 0.6rem 1.5rem;
    font-size: 1.08rem;
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.green-btn:hover {
    background: #219150 !important;
}

/* Blue button for management */
.blue-btn {
    background: #2980b9 !important;
    color: #fff !important;
    border: none;
    border-radius: 7px;
    padding: 0.6rem 1.5rem;
    font-size: 1.08rem;
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.blue-btn:hover {
    background: #2063a0 !important;
}

/* Red for delete button */
.red-btn,
.delete-btn {
    background: #e74c3c !important;
    color: #fff !important;
}
.red-btn:hover,
.delete-btn:hover {
    background: #c0392b !important;
}

/* Yellow for cancel button in edit mode */
.yellow-btn {
    background: #f7ca18 !important;
    color: #333 !important;
}
.yellow-btn:hover {
    background: #f4b400 !important;
}

/* Upload message and errors */
.upload-message,
.new-message {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.upload-errors {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: right;
    font-size: 0.98rem;
}

/* Font size adjustment for Vazir,'B Nazanin' */
body,
.vertical-stack,
.main-title,
.container,
.welcome,
.instruction,
.selected,
form,
.times-list,
.time-radio,
.table-container,
table,
th, td,
.download-btn,
.delete-btn,
.upload-section,
.upload-section-mng,
.new-student-section,
.edit-table input[type="text"], .edit-table select,
.new-student-section input[type="text"], .new-student-section select,
.pass-box,
.pass-box label,
.pass-box input[type="password"],
.pass-box button,
.login-container,
.form-group input[type="text"] {
    font-size: 1rem;
}
@font-face {
    font-family: Vazir,'B Nazanin';
    /* ...existing font-face definition if any... */
}
/* Increase font size for B Nazanin only */
body,
.vertical-stack,
.main-title,
.container,
.welcome,
.instruction,
.selected,
form,
.times-list,
.time-radio,
.table-container,
table,
th, td,
.download-btn,
.delete-btn,
.upload-section,
.upload-section-mng,
.new-student-section,
.edit-table input[type="text"], .edit-table select,
.new-student-section input[type="text"], .new-student-section select,
.pass-box,
.pass-box label,
.pass-box input[type="password"],
.pass-box button,
.login-container,
.form-group input[type="text"] {
    font-family: Vazir,'B Nazanin', Tahoma, sans-serif;
}
@media all {
    body,
    .vertical-stack,
    .main-title,
    .container,
    .welcome,
    .instruction,
    .selected,
    form,
    .times-list,
    .time-radio,
    .table-container,
    table,
    th, td,
    .download-btn,
    .delete-btn,
    .upload-section,
    .upload-section-mng,
    .new-student-section,
    .edit-table input[type="text"], .edit-table select,
    .new-student-section input[type="text"], .new-student-section select,
    .pass-box,
    .pass-box label,
    .pass-box input[type="password"],
    .pass-box button,
    .login-container,
    .form-group input[type="text"] {
        font-size: 1rem;
    }
    /* Only for B Nazanin, increase font size by 2 steps (e.g. 1rem -> 1.25rem) */
    body,
    .vertical-stack,
    .main-title,
    .container,
    .welcome,
    .instruction,
    .selected,
    form,
    .times-list,
    .time-radio,
    .table-container,
    table,
    th, td,
    .download-btn,
    .delete-btn,
    .upload-section,
    .upload-section-mng,
    .new-student-section,
    .edit-table input[type="text"], .edit-table select,
    .new-student-section input[type="text"], .new-student-section select,
    .pass-box,
    .pass-box label,
    .pass-box input[type="password"],
    .pass-box button,
    .login-container,
    .form-group input[type="text"] {
        font-size: 1rem;
    }
    /* Use a selector for B Nazanin only */
    [style*="font-family: Vazir,'B Nazanin'"], 
    .bnazanin-font {
        font-size: 1.25rem !important;
    }
}