
/* =========================
   BASIC RESET
========================= */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 1400px;
    height: 1200px;
    margin: 15px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;

    /* 🔥 IMPORTANT */
    overflow: visible;     /* container কখনো scroll করবে না */
}


/* =========================
   HEADINGS
========================= */
h2 {
    text-align: center;
    color: #2c3e50;
}

/* =========================
   DASHBOARD CARDS
========================= */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.dashboard-cards .card {
    color: #fff;
    padding: 25px 15px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    transition: transform 0.25s ease;
}

.dashboard-cards .card:hover {
    transform: translateY(-6px);
}

.dashboard-cards .card h3 {
    margin: 0;
    font-size: 38px;
}

.dashboard-cards .card p {
    margin-top: 8px;
    font-size: 14px;
}

.dashboard-cards .card:nth-child(1) {
    background: linear-gradient(135deg, #6f42c1, #59339d);
}
.dashboard-cards .card:nth-child(2) {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}
.dashboard-cards .card:nth-child(3) {
    background: linear-gradient(135deg, #e83e8c, #c82362);
}

/* =========================
   FORM & BUTTONS
========================= */
input, select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

button,
.print-btn,
.top-bar a {
    padding: 8px 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

button:hover,
.print-btn:hover,
.top-bar a:hover {
    background: #0056b3;
}

/* =========================
   TOP BAR
========================= */
.top-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
}

/* =========================
   TABLE WRAPPER (SCROLL)
========================= */
.table-wrapper {
    max-height: 1200px;
    height: 1200px;
    overflow-y: auto;
    overflow-x: auto;
    border: none;          /* 🔥 REMOVE INNER BOX */
}

/* =========================
   FINAL SMART TABLE
========================= */
.student-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;   /* 🔥 IMPORTANT */
    font-size: 13px;
}

.student-table th,
.student-table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
    text-align: left;
}

.student-table th {
    background: #f1f1f1;
}

/* Sticky header */
.table-wrapper thead th {
    position: sticky;
    top: 0;
    background: #f1f1f1;
    z-index: 2;
}

/* Column widths */
/* SL */
.student-table th:nth-child(1),
.student-table td:nth-child(1){
    width: 40px;
    text-align: center;
}

/* Form */
.student-table th:nth-child(2),
.student-table td:nth-child(2){
    width: 70px;
}

/* Class */
.student-table th:nth-child(3),
.student-table td:nth-child(3){
    width: 90px;
}

/* Name */
.student-table th:nth-child(4),
.student-table td:nth-child(4){
    width: 140px;
}

/* Guardian */
.student-table th:nth-child(5),
.student-table td:nth-child(5){
    width: 140px;
}

/* DOB */
.student-table th:nth-child(6),
.student-table td:nth-child(6){
    width: 110px;
    white-space: nowrap;
}

/* Gender */
.student-table th:nth-child(7),
.student-table td:nth-child(7){
    width: 70px;
    text-align: center;
}

/* Address (MOST SPACE) */
.student-table th:nth-child(8),
.student-table td:nth-child(8){
    width: 380px;
}

/* Mobile */
.student-table th:nth-child(9),
.student-table td:nth-child(9){
    width: 120px;
    white-space: nowrap;
}

/* Photo */
.student-table th:nth-child(10),
.student-table td:nth-child(10){
    width: 80px;
    text-align: center;
}

/* Action */
.student-table th:nth-child(11),
.student-table td:nth-child(11){
    width: 90px;
    text-align: center;
    white-space: nowrap;
}

/* Photo image */
.student-table td img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    display: block;
    margin: auto;
    border-radius: 4px;
}

/* =========================
   EDIT FORM – INDEX STYLE
========================= */
.single-form {
    display: block;
}

.single-form input,
.single-form select,
.single-form button {
    width: 100%;
    display: block;
    margin-bottom: 15px;
}

.single-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.single-form img {
    display: block;
    margin: 10px 0;
}

.single-form button {
    padding: 12px;
}

/* =========================
   LOGIN PAGE
========================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2f7, #d9e2ec);
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    text-align: center;
}

.login-box h2 {
    margin-bottom: 25px;
    color: #2c3e50;
}

.login-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.login-box .error {
    margin-top: 15px;
    color: #e74c3c;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
    }

    .search-box {
        flex-direction: column;
    }

    .table-wrapper {
        max-height: 400px;
    }
}

/* =========================
   PRINT
========================= */
@media print {
    body * {
        visibility: hidden;
    }
    .container, .container * {
        visibility: visible;
    }
    .print-btn {
        display: none;
    }
}
/* ===== FORCE SMART TABLE WIDTH (FINAL OVERRIDE) ===== */

.student-table {
    table-layout: fixed !important;
}

.student-table th,
.student-table td {
    white-space: normal !important;
    word-break: break-word !important;
}

/* SL */
.student-table th:nth-child(1),
.student-table td:nth-child(1){
    width: 40px !important;
    text-align: center;
}

/* Form */
.student-table th:nth-child(2),
.student-table td:nth-child(2){
    width: 70px !important;
}

/* Class */
.student-table th:nth-child(3),
.student-table td:nth-child(3){
    width: 90px !important;
}

/* Name */
.student-table th:nth-child(4),
.student-table td:nth-child(4){
    width: 140px !important;
}

/* Guardian */
.student-table th:nth-child(5),
.student-table td:nth-child(5){
    width: 140px !important;
}

/* DOB */
.student-table th:nth-child(6),
.student-table td:nth-child(6){
    width: 110px !important;
    white-space: nowrap !important;
}

/* Gender */
.student-table th:nth-child(7),
.student-table td:nth-child(7){
    width: 70px !important;
    text-align: center;
}

/* Address (MOST SPACE) */
.student-table th:nth-child(8),
.student-table td:nth-child(8){
    width: 400px !important;
}

/* Mobile */
.student-table th:nth-child(9),
.student-table td:nth-child(9){
    width: 120px !important;
    white-space: nowrap !important;
}

/* Photo */
.student-table th:nth-child(10),
.student-table td:nth-child(10){
    width: 80px !important;
    text-align: center;
}

/* Action */
.student-table th:nth-child(11),
.student-table td:nth-child(11){
    width: 90px !important;
    text-align: center;
}
/* =========================
   STUDENT REGISTRATION FORM FIX
========================= */
.student-form {
    max-width: 700px;
    margin: 30px auto;
}

.student-form input,
.student-form select,
.student-form button {
    width: 100%;
    display: block;
    margin-bottom: 15px;
}

.student-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.student-form input[type="file"] {
    padding: 6px;
}

.student-form button {
    padding: 12px;
    font-size: 16px;
}
a.logout-btn {
    background: #dc3545;
}

a.logout-btn:hover {
    background: #b02a37;
}

.cropper-container {
    max-width: 100% !important;
}

.cropper-crop-box,
.cropper-view-box {
    border: 2px dashed #007bff;
}

.cropper-point {
    width: 14px;
    height: 14px;
    background-color: #007bff;
    opacity: 1;
}
