/* ===============================
   COMMON
================================ */

#ssp-portal,
#ssp-teacher-portal,
#ssp-attendance-portal {
    max-width: 1200px;
    margin: auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.ssp-loading {
    padding: 20px;
    text-align: center;
    color: #555;
}

.ssp-empty {
    padding: 30px;
    text-align: center;
    color: #999;
    font-size: 15px;
}

/* ===============================
   TOP BAR
================================ */

.ssp-top {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

#ssp-class-select,
#ssp-search {
    padding: 9px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #d0d7e2;
    width: 100%;
    max-width: 260px;
}

/* ===============================
   COUNTERS
================================ */

.ssp-counters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 25px;
}

.ssp-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.ssp-counter {
    background: #f4f7fb;
    border-radius: 14px;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: .25s ease;
    border: 2px solid transparent;
}

.ssp-counter:hover {
    background: #e8eef7;
}

.ssp-counter.active {
    border-color: #2563eb;
    background: #eaf1ff;
}

.ssp-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.ssp-counter strong {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.ssp-counter span {
    font-size: 14px;
    color: #374151;
}

/* ===============================
   STUDENT GRID
================================ */

/* Compact student grid */
.ssp-students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.ssp-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transition: .25s ease;
}

.ssp-card:hover {
    transform: translateY(-4px);
}

/* Student avatar – circle, no head cut */
.ssp-card img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: contain;      /* 🔥 cover বাদ */
    background: #f1f3f5;
    margin: 0 auto 8px;
    display: block;
}

.ssp-card h4 {
    margin: 6px 0 2px;
    font-size: 14px;
    font-weight: 600;
}

.ssp-card span {
    font-size: 12px;
    color: #6b7280;
}

/* ===== Counter Enhancement ===== */

.ssp-counter {
    padding: 14px 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #eef3ff);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.ssp-counter.active {
    background: linear-gradient(180deg, #2563eb, #1e40af);
    color: #fff;
}

.ssp-counter.active strong,
.ssp-counter.active span {
    color: #fff;
}

.ssp-icon {
    font-size: 30px;
    margin-bottom: 4px;
}

.ssp-counter strong {
    font-size: 24px;
}

.ssp-counter span {
    font-size: 13px;
    opacity: 0.9;
}


/* ===============================
   PAGINATION
================================ */

.ssp-pagination {
    margin: 25px 0;
    text-align: center;
}

.ssp-page {
    padding: 7px 16px;
    margin: 0 5px;
    border-radius: 8px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    cursor: pointer;
    font-size: 14px;
}

.ssp-page:hover {
    background: #e0e7ff;
}

/* ===============================
   TEACHERS GRID
================================ */

#ssp-teachers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-top: 25px;
}

.ssp-teacher-card {
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border-radius: 16px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    transition: .25s ease;
}

.ssp-teacher-card:hover {
    transform: translateY(-6px);
}

.ssp-teacher-card img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 4px solid #e5edff;
    background: #f1f1f1;
}

.ssp-teacher-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
    font-weight: 700;
}

.ssp-designation {
    display: block;
    font-size: 14px;
    color: #2563eb;
    margin-bottom: 6px;
}

.ssp-mobile {
    font-size: 14px;
    color: #374151;
}

/* ===============================
   ATTENDANCE (NEW – APPENDED)
================================ */

.ssp-attendance-top {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.ssp-attendance-top select,
.ssp-attendance-top button {
    padding: 9px 12px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #c7d2fe;
}

.ssp-attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ssp-attendance-table th,
.ssp-attendance-table td {
    border: 1px solid #000;
    padding: 4px 6px;
    text-align: center;
    white-space: nowrap;
}

.ssp-attendance-table td.name {
    text-align: left;
    font-weight: 600;
}

/* Attendance Color Rules */
.att-p { color: #2563eb; font-weight: 700; } /* Blue */
.att-a { color: #dc2626; font-weight: 700; } /* Red */
.att-na { color: #999; }

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 600px) {

    .ssp-top,
    .ssp-attendance-top {
        flex-direction: column;
    }

    #ssp-class-select,
    #ssp-search {
        max-width: 100%;
    }
}
/* ===============================
   ROUTINE (APPENDED)
================================ */

#ssp-routine-portal {
    margin-top: 30px;
}

.ssp-routine-top {
    margin-bottom: 16px;
}

#ssp-routine-class {
    padding: 9px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #d0d7e2;
    max-width: 260px;
}

.ssp-routine-days {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ssp-routine-days button {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    cursor: pointer;
    font-size: 14px;
}

.ssp-routine-days button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.ssp-routine-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ssp-routine-table th,
.ssp-routine-table td {
    border: 1px solid #d1d5db;
    padding: 10px;
    text-align: center;
}

.ssp-routine-table th {
    background: #f4f7fb;
    font-weight: 700;
}
@media (max-width: 600px) {

    .ssp-students-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ssp-card img {
        width: 72px;
        height: 72px;
    }
}
