/* ==========================================================
   GUIDANCE - STUDENT RECORDS
   FILE:
       Guidance/asset/css/student_records.css
========================================================== */


/* ==========================================================
   PAGE
========================================================== */

.student-records-page {

    padding: 24px 28px 40px;

    width: 100%;

    box-sizing: border-box;

}


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

.page-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;

}


.breadcrumb {

    display: flex;

    align-items: center;

    gap: 8px;

    color: #64748b;

    font-size: 13px;

    margin-bottom: 8px;

}


.breadcrumb i {

    font-size: 9px;

    color: #94a3b8;

}


.breadcrumb strong {

    color: #334155;

}


.page-header h1 {

    margin: 0;

    display: flex;

    align-items: center;

    gap: 10px;

    color: #0f172a;

    font-size: 27px;

    font-weight: 800;

}


.page-header h1 i {

    color: #2563eb;

}


.page-header p {

    margin: 8px 0 0;

    color: #64748b;

    font-size: 14px;

}


/* ==========================================================
   STATISTICS
========================================================== */

.record-stat-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 20px;

}


.record-stat-card {

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    padding: 18px;

    display: flex;

    align-items: center;

    gap: 14px;

    min-width: 0;

    box-shadow:
        0 3px 12px
        rgba(15, 23, 42, 0.04);

}


.record-stat-icon {

    width: 48px;

    height: 48px;

    min-width: 48px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 19px;

}


.record-stat-icon.blue {

    background: #eff6ff;

    color: #2563eb;

}


.record-stat-icon.green {

    background: #ecfdf5;

    color: #059669;

}


.record-stat-icon.purple {

    background: #f5f3ff;

    color: #7c3aed;

}


.record-stat-icon.orange {

    background: #fff7ed;

    color: #ea580c;

}


.record-stat-label {

    display: block;

    color: #64748b;

    font-size: 12px;

    font-weight: 600;

    margin-bottom: 4px;

}


.record-stat-value {

    display: block;

    color: #0f172a;

    font-size: 22px;

    font-weight: 800;

}


/* ==========================================================
   GENERAL CARD
========================================================== */

.records-card {

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    box-shadow:
        0 3px 12px
        rgba(15, 23, 42, 0.04);

    margin-bottom: 20px;

    overflow: hidden;

}


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

.search-card {

    padding: 16px;

}


.student-search-form {

    display: flex;

    align-items: center;

    gap: 10px;

}


.search-input-wrap {

    flex: 1;

    position: relative;

}


.search-input-wrap i {

    position: absolute;

    left: 14px;

    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

    pointer-events: none;

}


.search-input-wrap input {

    width: 100%;

    height: 44px;

    box-sizing: border-box;

    border: 1px solid #cbd5e1;

    border-radius: 9px;

    padding:
        0 14px 0 42px;

    font-size: 14px;

    color: #0f172a;

    outline: none;

    transition: .2s;

}


.search-input-wrap input:focus {

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, .10);

}


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

.btn-primary,
.btn-secondary {

    height: 44px;

    border-radius: 9px;

    padding: 0 16px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition: .2s;

    box-sizing: border-box;

    white-space: nowrap;

}


.btn-primary {

    border: 1px solid #2563eb;

    background: #2563eb;

    color: #ffffff;

}


.btn-primary:hover {

    background: #1d4ed8;

    border-color: #1d4ed8;

}


.btn-secondary {

    border: 1px solid #cbd5e1;

    background: #ffffff;

    color: #475569;

}


.btn-secondary:hover {

    background: #f8fafc;

}


/* ==========================================================
   CARD HEADING
========================================================== */

.card-heading {

    padding: 20px 20px 15px;

    border-bottom: 1px solid #e2e8f0;

}


.card-heading h2 {

    margin: 0;

    display: flex;

    align-items: center;

    gap: 9px;

    color: #0f172a;

    font-size: 17px;

    font-weight: 800;

}


.card-heading h2 i {

    color: #2563eb;

}


.card-heading p {

    margin: 5px 0 0;

    color: #64748b;

    font-size: 12px;

}


/* ==========================================================
   TABLE
========================================================== */

.table-responsive {

    width: 100%;

    overflow-x: auto;

}


.student-record-table {

    width: 100%;

    border-collapse: collapse;

    min-width: 1050px;

}


.student-record-table thead th {

    background: #f8fafc;

    border-bottom: 1px solid #e2e8f0;

    color: #475569;

    font-size: 11px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .35px;

    padding: 13px 14px;

    text-align: left;

    white-space: nowrap;

}


.student-record-table tbody td {

    padding: 13px 14px;

    border-bottom: 1px solid #edf2f7;

    color: #475569;

    font-size: 13px;

    vertical-align: middle;

}


.student-record-table tbody tr {

    transition: .15s;

}


.student-record-table tbody tr:hover {

    background: #f8fbff;

}


.row-number {

    color: #94a3b8 !important;

    width: 40px;

    font-weight: 700;

}


/* ==========================================================
   STUDENT CELL
========================================================== */

.student-cell {

    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 220px;

}


.student-avatar {

    width: 40px;

    height: 40px;

    min-width: 40px;

    border-radius: 50%;

    background: #eff6ff;

    color: #2563eb;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 14px;

    font-weight: 800;

    overflow: hidden;

}


.student-avatar img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.student-avatar span {

    align-items: center;

    justify-content: center;

    width: 100%;

    height: 100%;

}


.student-cell strong {

    display: block;

    color: #0f172a;

    font-size: 13px;

    font-weight: 750;

}


.student-cell small {

    display: block;

    color: #94a3b8;

    font-size: 11px;

    margin-top: 2px;

}


/* ==========================================================
   STATUS BADGES
========================================================== */

.status-badge {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    border-radius: 999px;

    padding: 5px 9px;

    font-size: 10px;

    font-weight: 800;

    white-space: nowrap;

}


.status-badge.success {

    background: #ecfdf5;

    color: #047857;

}


.status-badge.info {

    background: #eff6ff;

    color: #1d4ed8;

}


.status-badge.warning {

    background: #fffbeb;

    color: #b45309;

}


.status-badge.danger {

    background: #fef2f2;

    color: #dc2626;

}


.status-badge.muted {

    background: #f1f5f9;

    color: #64748b;

}


/* ==========================================================
   VIEW BUTTON
========================================================== */

.view-record-btn {

    border: 1px solid #bfdbfe;

    background: #eff6ff;

    color: #2563eb;

    border-radius: 8px;

    padding: 8px 11px;

    display: inline-flex;

    align-items: center;

    gap: 6px;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    transition: .2s;

    white-space: nowrap;

}


.view-record-btn:hover {

    background: #dbeafe;

    border-color: #93c5fd;

}


/* ==========================================================
   EMPTY TABLE
========================================================== */

.empty-table {

    padding: 0 !important;

}


.empty-state {

    min-height: 250px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 7px;

    color: #64748b;

}


.empty-state i {

    font-size: 36px;

    color: #cbd5e1;

    margin-bottom: 5px;

}


.empty-state strong {

    color: #475569;

    font-size: 14px;

}


.empty-state span {

    font-size: 12px;

}


/* ==========================================================
   PAGINATION
========================================================== */

.pagination-wrapper {

    padding: 15px 20px;

    border-top: 1px solid #e2e8f0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

}


.pagination-info {

    color: #64748b;

    font-size: 12px;

}


.pagination-info strong {

    color: #334155;

}


.pagination {

    display: flex;

    align-items: center;

    gap: 5px;

}


.page-btn {

    min-width: 34px;

    height: 34px;

    padding: 0 8px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #e2e8f0;

    border-radius: 7px;

    background: #ffffff;

    color: #475569;

    text-decoration: none;

    font-size: 12px;

    font-weight: 700;

}


.page-btn:hover {

    background: #f8fafc;

}


.page-btn.active {

    background: #2563eb;

    border-color: #2563eb;

    color: #ffffff;

}


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

.student-modal-overlay {

    position: fixed;

    inset: 0;

    z-index: 9999;

    background:
        rgba(15, 23, 42, .58);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 25px;

    box-sizing: border-box;

}


.student-modal-overlay.show {

    display: flex;

}


.student-modal {

    width: min(
        1050px,
        100%
    );

    max-height: 92vh;

    background: #ffffff;

    border-radius: 16px;

    overflow: hidden;

    box-shadow:
        0 25px 70px
        rgba(15, 23, 42, .28);

    display: flex;

    flex-direction: column;

}


.student-modal-header {

    padding: 20px 22px;

    border-bottom: 1px solid #e2e8f0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    flex-shrink: 0;

}


.modal-eyebrow {

    display: block;

    color: #2563eb;

    font-size: 10px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .6px;

    margin-bottom: 4px;

}


.student-modal-header h2 {

    margin: 0;

    color: #0f172a;

    font-size: 20px;

    font-weight: 800;

}


.modal-close {

    width: 38px;

    height: 38px;

    border: 1px solid #e2e8f0;

    border-radius: 9px;

    background: #ffffff;

    color: #64748b;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    font-size: 16px;

}


.modal-close:hover {

    background: #f8fafc;

    color: #0f172a;

}


.student-modal-body {

    overflow-y: auto;

    padding: 22px;

}


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

.modal-loading {

    min-height: 300px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 12px;

    color: #64748b;

    font-size: 13px;

}


.loading-spinner {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    border: 3px solid #e2e8f0;

    border-top-color: #2563eb;

    animation:
        studentSpin .8s linear infinite;

}


@keyframes studentSpin {

    to {
        transform: rotate(360deg);
    }

}


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

.detail-section {

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    overflow: hidden;

    margin-bottom: 18px;

}


.detail-section:last-child {

    margin-bottom: 0;

}


.detail-section-header {

    padding: 13px 16px;

    background: #f8fafc;

    border-bottom: 1px solid #e2e8f0;

    display: flex;

    align-items: center;

    gap: 8px;

}


.detail-section-header i {

    color: #2563eb;

}


.detail-section-header strong {

    color: #334155;

    font-size: 13px;

}


.detail-grid {

    display: grid;

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

}


.detail-item {

    padding: 12px 15px;

    border-right: 1px solid #edf2f7;

    border-bottom: 1px solid #edf2f7;

    min-width: 0;

}


.detail-item:nth-child(3n) {

    border-right: 0;

}


.detail-label {

    display: block;

    color: #94a3b8;

    font-size: 10px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .35px;

    margin-bottom: 4px;

}


.detail-value {

    display: block;

    color: #334155;

    font-size: 13px;

    font-weight: 600;

    word-break: break-word;

    white-space: pre-wrap;

}


.detail-value.empty {

    color: #cbd5e1;

    font-weight: 500;

}


/* ==========================================================
   GUARDIAN CARDS
========================================================== */

.guardian-list {

    padding: 15px;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 13px;

}


.guardian-card {

    border: 1px solid #e2e8f0;

    border-radius: 10px;

    padding: 14px;

    background: #ffffff;

}


.guardian-card-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 12px;

}


.guardian-name {

    color: #0f172a;

    font-size: 14px;

    font-weight: 800;

}


.guardian-flags {

    display: flex;

    flex-wrap: wrap;

    gap: 4px;

    justify-content: flex-end;

}


.guardian-flag {

    background: #eff6ff;

    color: #2563eb;

    border-radius: 999px;

    padding: 4px 7px;

    font-size: 9px;

    font-weight: 800;

}


.guardian-detail-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 9px;

}


.guardian-detail {

    min-width: 0;

}


.guardian-detail label {

    display: block;

    color: #94a3b8;

    font-size: 9px;

    font-weight: 800;

    text-transform: uppercase;

    margin-bottom: 2px;

}


.guardian-detail span {

    display: block;

    color: #475569;

    font-size: 11px;

    word-break: break-word;

}


/* ==========================================================
   INVENTORY STATUS
========================================================== */

.inventory-status {

    padding: 15px;

    border-bottom: 1px solid #e2e8f0;

}


.inventory-status-badge {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 7px 11px;

    border-radius: 999px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 11px;

    font-weight: 800;

}


/* ==========================================================
   TEXT BLOCK
========================================================== */

.detail-text {

    padding: 13px 15px;

    border-bottom: 1px solid #edf2f7;

}


.detail-text:last-child {

    border-bottom: 0;

}


.detail-text .detail-label {

    margin-bottom: 7px;

}


.detail-text .detail-value {

    line-height: 1.55;

}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (
    max-width: 1100px
) {

    .record-stat-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


@media (
    max-width: 800px
) {

    .student-records-page {

        padding:
            18px 15px 30px;

    }


    .record-stat-grid {

        grid-template-columns:
            1fr 1fr;

    }


    .student-search-form {

        flex-wrap: wrap;

    }


    .search-input-wrap {

        flex-basis: 100%;

    }


    .pagination-wrapper {

        align-items: flex-start;

        flex-direction: column;

    }


    .detail-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .detail-item:nth-child(3n) {

        border-right: 1px solid #edf2f7;

    }


    .detail-item:nth-child(2n) {

        border-right: 0;

    }


    .guardian-list {

        grid-template-columns: 1fr;

    }

}


@media (
    max-width: 550px
) {

    .student-records-page {

        padding:
            15px 10px 25px;

    }


    .page-header h1 {

        font-size: 22px;

    }


    .page-header p {

        font-size: 12px;

    }


    .record-stat-grid {

        grid-template-columns: 1fr;

    }


    .student-search-form {

        display: grid;

        grid-template-columns: 1fr;

    }


    .btn-primary,
    .btn-secondary {

        width: 100%;

    }


    .detail-grid {

        grid-template-columns: 1fr;

    }


    .detail-item,
    .detail-item:nth-child(2n),
    .detail-item:nth-child(3n) {

        border-right: 0;

    }


    .student-modal-overlay {

        padding: 8px;

    }


    .student-modal {

        max-height: 96vh;

        border-radius: 12px;

    }


    .student-modal-header {

        padding: 15px;

    }


    .student-modal-body {

        padding: 14px;

    }

}
/* ==========================================================
   FIX: STUDENT RECORDS CONTENT POSITION
   Prevent content from going underneath the sidebar
========================================================== */

.main-content {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
    min-height: 100vh;
    box-sizing: border-box;
}


/* ==========================================================
   STUDENT RECORD PAGE
========================================================== */

.student-records-page {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 24px 28px 40px;
}


/* ==========================================================
   PREVENT HORIZONTAL OVERFLOW
========================================================== */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}


/* ==========================================================
   TABLE CARD
========================================================== */

.records-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


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

.search-card {
    width: 100%;
    box-sizing: border-box;
}


/* ==========================================================
   TABLE
========================================================== */

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}


/* ==========================================================
   LARGE SCREEN
========================================================== */

@media (min-width: 1200px) {

    .main-content {
        margin-left: 250px !important;
        width: calc(100% - 250px) !important;
    }

    .student-records-page {
        padding-left: 28px;
        padding-right: 28px;
    }

}


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

@media (max-width: 991px) {

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .student-records-page {
        padding: 20px;
    }

}


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

@media (max-width: 600px) {

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .student-records-page {
        padding: 15px 10px 25px;
    }

}

/* ==========================================================
   STUDENT MODAL FOOTER
========================================================== */

.student-modal-footer {

    padding: 15px 22px;

    border-top: 1px solid #e2e8f0;

    background: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    flex-shrink: 0;

}


/* ==========================================================
   BACK BUTTON
========================================================== */

.student-modal-back {

    height: 42px;

    padding: 0 17px;

    border: 1px solid #cbd5e1;

    border-radius: 9px;

    background: #ffffff;

    color: #475569;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition: .2s;

}


.student-modal-back:hover {

    background: #f8fafc;

    border-color: #94a3b8;

    color: #1e293b;

}


/* ==========================================================
   PRINT BUTTON
========================================================== */

.student-modal-print {

    height: 42px;

    padding: 0 18px;

    border: 1px solid #2563eb;

    border-radius: 9px;

    background: #2563eb;

    color: #ffffff;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition: .2s;

}


.student-modal-print:hover {

    background: #1d4ed8;

    border-color: #1d4ed8;

}


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

@media (max-width: 550px) {

    .student-modal-footer {

        flex-direction: column-reverse;

        align-items: stretch;

    }


    .student-modal-back,
    .student-modal-print {

        width: 100%;

    }

}