/* =========================================================
   Layout chrome — navbar + sidebar (matches admin dashboard)
   ========================================================= */

:root {
    --mina-teal: #0d9488;
    --mina-teal-dark: #0f766e;
    --mina-cyan: #0891b2;
    --mina-sky: #0284c7;
    --mina-slate: #0f172a;
    --mina-muted: #64748b;
    --mina-border: #e2e8f0;
    --mina-surface: #ffffff;
    --mina-soft: #f0fdfa;
    --mina-sidebar-bg: #0b3b3a;
    --mina-sidebar-bg-2: #0f766e;
}

/* ---------- Top navbar ---------- */
.topbar {
    background: transparent;
    box-shadow: none !important;
}

.topbar .top-navbar,
.topbar .navbar-collapse {
    background: linear-gradient(135deg, var(--mina-teal-dark) 0%, var(--mina-teal) 45%, var(--mina-sky) 100%) !important;
}

.topbar .navbar-header {
    background: transparent !important;
}

.topbar .navbar-brand {
    background: transparent !important;
    padding: 0.35rem 0.75rem !important;
}

.topbar .navbar-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none !important;
}

.topbar .navbar-brand .logo-icon {
    margin: 0 !important;
}

.topbar .navbar-brand .logo-icon img {
    width: 42px !important;
    height: 42px !important;
    object-fit: cover;
    border-radius: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    background: #fff;
}

.topbar .navbar-brand .dark-logo {
    display: none !important;
}

.topbar .mina-brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.topbar .mina-brand-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
}

.topbar .sidebartoggler,
.topbar .nav-toggler,
.topbar .topbartoggler {
    color: #fff !important;
}

.topbar .sidebartoggler i,
.topbar .nav-toggler i,
.topbar .topbartoggler i {
    color: #fff !important;
}

.topbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
}

.topbar .pro-pic {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.65rem !important;
    margin: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease;
}

.topbar .pro-pic:hover {
    background: rgba(255, 255, 255, 0.22);
}

.topbar .pro-pic img {
    border: 2px solid rgba(255, 255, 255, 0.45);
    object-fit: cover;
}

.topbar .user-dd {
    border: 1px solid var(--mina-border) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
    margin-top: 0.5rem !important;
}

.topbar .user-dd .with-arrow {
    display: none;
}

.topbar .user-dd .bg-primary {
    background: linear-gradient(135deg, var(--mina-teal-dark), var(--mina-cyan)) !important;
}

.topbar .user-dd .dropdown-item {
    font-weight: 600;
    color: var(--mina-slate);
    padding: 0.7rem 1rem;
}

.topbar .user-dd .dropdown-item:hover {
    background: var(--mina-soft);
    color: var(--mina-teal-dark);
}

.topbar .user-dd .dropdown-item i {
    color: var(--mina-teal);
}

/* ---------- Sidebar ---------- */
.left-sidebar {
    background: linear-gradient(180deg, #083534 0%, #0b4f4c 45%, #0f766e 100%) !important;
    box-shadow: 8px 0 28px rgba(8, 53, 52, 0.22);
    border-left: none !important;
}

.left-sidebar .scroll-sidebar {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
}

.sidebar-nav ul {
    padding: 0 0.75rem;
}

.sidebar-nav .sidebar-item {
    margin-bottom: 0.35rem;
}

.sidebar-nav .sidebar-link {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    padding: 0.72rem 0.9rem !important;
    border-radius: 12px !important;
    background: transparent !important;
    border: 1px solid transparent;
    transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: normal;
    line-height: 1.35;
}

.sidebar-nav .sidebar-link i {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
}

.sidebar-nav .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    transform: translateX(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-nav .sidebar-link.active,
.sidebar-nav .sidebar-item.selected > .sidebar-link,
.sidebar-nav .sidebar-item.active > .sidebar-link {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.sidebar-nav .sidebar-link.active i,
.sidebar-nav .sidebar-item.selected > .sidebar-link i,
.sidebar-nav .sidebar-item.active > .sidebar-link i {
    background: #fff;
    color: var(--mina-teal-dark) !important;
}

.sidebar-nav .nav-small-cap,
.sidebar-nav .mina-nav-section {
    display: block;
    margin: 1rem 0.55rem 0.45rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-nav .mina-nav-section::after {
    content: '';
    display: block;
    height: 1px;
    margin-top: 0.45rem;
    background: rgba(255, 255, 255, 0.12);
}

/* Mini sidebar polish */
.mini-sidebar .left-sidebar .sidebar-nav .sidebar-link {
    justify-content: center;
    padding: 0.65rem !important;
}

.mini-sidebar .left-sidebar .sidebar-nav .sidebar-link span,
.mini-sidebar .left-sidebar .sidebar-nav .mina-nav-section {
    display: none;
}

.mini-sidebar .left-sidebar .sidebar-nav .sidebar-link i {
    margin: 0 !important;
}

/* Page wrapper soft background to match dashboard */
.page-wrapper {
    background: #f8fafc !important;
}

.page-wrapper > .container-fluid {
    padding-top: 1.25rem;
}

@media screen and (max-width: 767px) {
    .topbar .mina-brand-sub {
        display: none;
    }

    .topbar .navbar-brand .logo-icon img {
        width: 36px !important;
        height: 36px !important;
    }
}

/* =========================================================
   Shared page chrome (lists / CRUD pages)
   ========================================================= */

.mina-page {
    color: #1e293b;
}

.mina-page-hero {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 45%, #0284c7 100%);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.35rem;
    color: #fff;
    box-shadow: 0 18px 40px rgba(13, 148, 136, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mina-page-hero-title {
    margin: 0 0 0.25rem;
    font-size: 1.55rem;
    font-weight: 800;
}

.mina-page-hero-subtitle {
    margin: 0;
    opacity: 0.92;
    font-size: 0.98rem;
}

.mina-page-hero-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mina-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.mina-card-body {
    padding: 1.15rem 1.25rem 1.35rem;
}

.mina-alert-success {
    border: none;
    border-radius: 14px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 600;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
}

.mina-alert-danger {
    border: none;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 600;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
}

.mina-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    border-radius: 12px;
    padding: 0.65rem 1.05rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.mina-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.mina-btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, #0d9488, #0891b2);
    box-shadow: 0 8px 18px rgba(13, 148, 136, 0.28);
}

.mina-btn-secondary {
    color: #0f172a !important;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.mina-btn-danger {
    color: #fff !important;
    background: linear-gradient(135deg, #be123c, #e11d48);
    box-shadow: 0 8px 18px rgba(190, 18, 60, 0.22);
}

.mina-btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
}

.mina-btn-icon.edit {
    color: #0f766e !important;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
}

.mina-btn-icon.delete {
    color: #be123c !important;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.mina-table-wrap {
    overflow-x: hidden;
    width: 100%;
}

.mina-table {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

@media (min-width: 768px) {
    .mina-table {
        table-layout: fixed;
    }
}

.mina-table thead th {
    background: #f0fdfa;
    color: #0f766e;
    font-weight: 800;
    font-size: 0.88rem;
    border: none !important;
    padding: 0.75rem 0.65rem !important;
    white-space: normal;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: normal;
}

.mina-table tbody td {
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
    vertical-align: middle !important;
    padding: 0.75rem 0.65rem !important;
    color: #0f172a;
    background: #fff;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
}

.mina-table tbody tr:hover td {
    background: #f8fafc;
}

.mina-table .mina-col-id {
    width: 4%;
}

.mina-table .mina-col-name {
    width: 28%;
}

.mina-table .mina-col-level {
    width: 18%;
}

.mina-table .mina-col-count {
    width: 9%;
}

.mina-table .mina-col-slot {
    width: 7%;
}

.mina-table .mina-col-meta {
    width: 12%;
}

.mina-table .mina-col-actions {
    width: 10%;
}

.mina-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    text-align: right;
}

.mina-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* Mobile: turn table rows into readable cards */
@media screen and (max-width: 767.98px) {
    .mina-page-hero {
        padding: 1.15rem 1.1rem;
        text-align: center;
        justify-content: center;
    }

    .mina-page-hero-title {
        font-size: 1.3rem;
    }

    .mina-page-hero-actions {
        width: 100%;
    }

    .mina-page-hero-actions .mina-btn {
        width: 100%;
    }

    .mina-card-body {
        padding: 0.85rem;
    }

    .mina-table-wrap {
        overflow: visible;
    }

    .mina-table,
    .mina-table thead,
    .mina-table tbody,
    .mina-table tr,
    .mina-table th,
    .mina-table td {
        display: block;
        width: 100% !important;
    }

    .mina-table {
        table-layout: auto !important;
        border: none;
    }

    .mina-table thead {
        display: none;
    }

    .mina-table tbody tr {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 0.85rem 0.95rem;
        margin-bottom: 0.85rem;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    }

    .mina-table tbody tr:hover td {
        background: transparent;
    }

    .mina-table tbody td {
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        padding: 0.7rem 0 !important;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.85rem;
        text-align: left;
        background: transparent !important;
    }

    .mina-table tbody td:last-child {
        border-bottom: none !important;
        padding-top: 0.85rem !important;
        align-items: center;
    }

    .mina-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 0.85rem;
        flex: 0 1 42%;
        max-width: 42%;
        text-align: right;
        line-height: 1.45;
    }

    .mina-table tbody td .mina-cell-value,
    .mina-table tbody td > strong,
    .mina-table tbody td > span,
    .mina-table tbody td > div {
        margin-inline-start: auto;
        text-align: left;
        max-width: 58%;
        line-height: 1.45;
    }

    .mina-table tbody td .mina-actions {
        margin-inline-start: auto;
        justify-content: flex-end;
        max-width: none;
    }

    .mina-table tbody td[data-label=""]::before,
    .mina-table tbody td:not([data-label])::before {
        display: none;
    }

    .mina-table .mina-empty {
        padding: 1.5rem 0.5rem;
    }

    .mina-table tbody tr.mina-empty-row td {
        display: block;
        text-align: center;
    }

    .mina-table tbody tr.mina-empty-row td::before {
        display: none;
    }

    /* Hide low-priority meta fields on very small screens */
    .mina-table tbody td[data-label="أُنشئت بواسطة"],
    .mina-table tbody td[data-label="آخر تعديل بواسطة"],
    .mina-table tbody td[data-label="آخر تعديل"],
    .mina-table tbody td[data-label="#"] {
        display: none;
    }

    .mina-page .dataTables_wrapper .dataTables_length,
    .mina-page .dataTables_wrapper .dataTables_filter,
    .mina-page .dataTables_wrapper .dataTables_info,
    .mina-page .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        float: none !important;
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

.mina-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748b;
}

.mina-empty i {
    font-size: 2rem;
    color: #14b8a6;
    margin-bottom: 0.75rem;
}

.mina-modal .modal-content {
    border: none;
    border-radius: 18px;
    overflow: visible;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
}

.mina-modal .modal-header {
    background: linear-gradient(135deg, #0f766e, #0284c7);
    color: #fff;
    border: none;
    padding: 1rem 1.25rem;
    border-radius: 18px 18px 0 0;
}

.mina-modal .select2-container {
    z-index: 1;
}

.mina-modal .select2-container--open {
    z-index: 1060;
}

.mina-modal .select2-dropdown {
    z-index: 1061;
    border-color: #99f6e4;
    border-radius: 12px;
    overflow: hidden;
}

.mina-modal .select2-search--dropdown .select2-search__field {
    border-radius: 10px;
    border-color: #cbd5e1;
    padding: 0.45rem 0.7rem;
}

.mina-modal .select2-search--dropdown .select2-search__field:focus {
    border-color: #14b8a6;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(20, 184, 166, 0.18);
}

.mina-modal .modal-title {
    font-weight: 800;
}

.mina-modal .modal-header .close {
    color: #fff;
    opacity: 0.9;
    text-shadow: none;
}

.mina-modal .modal-body {
    padding: 1.25rem 1.35rem 0.5rem;
}

.mina-modal .modal-footer {
    border: none;
    padding: 0.75rem 1.35rem 1.25rem;
}

.mina-modal label {
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.35rem;
}

.mina-modal .form-control {
    border-radius: 10px;
    border-color: #cbd5e1;
    min-height: 42px;
}

.mina-modal .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

.mina-meta {
    color: #64748b;
    font-size: 0.9rem;
}

/* DataTables within mina pages */
.mina-page .dataTables_wrapper {
    width: 100%;
    overflow: hidden;
    padding: 0.85rem 1rem 1rem;
}

.mina-page .dataTables_wrapper .dataTables_scroll,
.mina-page .dataTables_wrapper .dataTables_scrollBody,
.mina-page .dataTables_wrapper .dataTables_scrollHead,
.mina-page .dataTables_wrapper .dataTables_scrollHeadInner {
    width: 100% !important;
}

.mina-page .dataTables_wrapper table.dataTable {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.75rem 0 1rem !important;
    table-layout: fixed !important;
}

.mina-page .dataTables_wrapper table.dataTable td,
.mina-page .dataTables_wrapper table.dataTable th {
    box-sizing: border-box !important;
}

.mina-page .dataTables_wrapper .dataTables_length,
.mina-page .dataTables_wrapper .dataTables_filter {
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.mina-page .dataTables_wrapper .dataTables_filter input,
.mina-page .dataTables_wrapper .dataTables_length select {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 0.4rem 0.7rem;
    min-height: 38px;
    margin: 0 0.35rem;
    color: #0f172a;
}

.mina-page .dataTables_wrapper .dataTables_filter input:focus,
.mina-page .dataTables_wrapper .dataTables_length select:focus {
    border-color: #14b8a6;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

.mina-table tfoot th {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 0.65rem 0.5rem !important;
    vertical-align: middle;
}

.mina-table tfoot .mina-footer-search {
    width: 100%;
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}

.mina-table tfoot .mina-footer-search:focus {
    border-color: #14b8a6;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

@media screen and (max-width: 767.98px) {
    .mina-table tfoot {
        display: none !important;
    }
}

/* Attendance session page */
.att-session-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
}

.att-session-bar .form-group {
    margin-bottom: 0;
    flex: 1 1 180px;
    min-width: 0;
}

.att-session-bar .form-group.att-group-field {
    flex: 2 1 320px;
    min-width: min(100%, 280px);
}

.att-session-bar .form-group.att-date-field {
    flex: 0 1 200px;
}

.att-session-bar .form-group.att-count-field {
    flex: 0 1 140px;
}

.att-session-bar label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.att-session-bar .form-control,
.att-session-bar select.form-control {
    width: 100%;
    border-radius: 10px;
    border-color: #cbd5e1;
    min-height: 42px;
}

.att-session-bar .select2-container {
    width: 100% !important;
    display: block;
}

.att-session-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.att-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.att-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.att-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.att-toolbar-left,
.att-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.att-search {
    min-width: 220px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    min-height: 40px;
    padding: 0.4rem 0.75rem;
}

.att-table-wrap {
    overflow-x: auto;
}

.att-table {
    width: 100%;
    margin: 0;
}

.att-table thead th {
    background: #f0fdfa;
    color: #0f766e;
    font-weight: 800;
    font-size: 0.88rem;
    text-align: center;
    white-space: nowrap;
    border: none !important;
    padding: 0.85rem 0.55rem !important;
    position: sticky;
    top: 0;
    z-index: 2;
}

.att-table tbody td {
    vertical-align: middle !important;
    text-align: center;
    border-top: 1px solid #e2e8f0 !important;
    padding: 0.7rem 0.45rem !important;
}

.att-table tbody td.att-name,
.att-table tbody td.att-code {
    text-align: right;
    font-weight: 700;
}

.att-table tfoot th {
    background: #f8fafc;
    padding: 0.55rem !important;
}

.att-notes {
    width: 100%;
    min-width: 120px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    min-height: 36px;
    padding: 0.3rem 0.5rem;
}

.att-date {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    min-height: 36px;
    padding: 0.25rem 0.4rem;
    max-width: 145px;
}

.att-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(6px);
}

.att-quick-btn {
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.att-quick-btn:hover {
    background: #ccfbf1;
}

.att-mobile-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.att-modal-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.att-page .select2-container {
    width: 100% !important;
}

.att-page .select2-container .select2-selection--single {
    min-height: 42px;
    border-radius: 10px;
    border-color: #cbd5e1;
    display: flex;
    align-items: center;
}

.att-page .select2-container .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding-inline: 0.75rem;
    line-height: 40px;
}

.att-page .select2-container .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

@media screen and (max-width: 767.98px) {
    .att-session-actions,
    .att-toolbar,
    .att-sticky-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .att-search {
        min-width: 0;
        width: 100%;
    }

    .att-page .att-table tbody td[data-label="حضور"],
    .att-page .att-table tbody td[data-label="تأخير"],
    .att-page .att-table tbody td[data-label="واجب"],
    .att-page .att-table tbody td[data-label="اعتذار"],
    .att-page .att-table tbody td[data-label="تعويض"] {
        align-items: center;
    }

    .att-page .att-table tbody td[data-label="تعويض عن يوم"] .att-date,
    .att-page .att-table tbody td[data-label="ملاحظات"] .att-notes {
        max-width: 100%;
        width: 100%;
    }
}

/* Compact attendance session — denser list, less scrolling */
.att-compact .att-hero-compact {
    padding: 0.7rem 1rem;
    margin-bottom: 0.75rem;
}

.att-compact .att-hero-compact .mina-page-hero-title {
    font-size: 1.15rem;
    margin: 0;
}

.att-compact .mina-card.mb-3 {
    margin-bottom: 0.65rem !important;
}

.att-compact .mina-card-body {
    padding: 0.75rem 0.85rem;
}

.att-compact .att-session-bar {
    gap: 0.5rem;
}

.att-compact .att-session-bar .form-control,
.att-compact .att-session-bar select.form-control,
.att-compact .att-page .select2-container .select2-selection--single {
    min-height: 36px;
}

.att-compact .att-session-meta {
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.att-compact .att-chip {
    padding: 0.22rem 0.6rem;
    font-size: 0.75rem;
}

.att-compact .att-toolbar {
    padding: 0.55rem 0.75rem;
}

.att-compact .att-search {
    min-height: 34px;
    font-size: 0.85rem;
}

.att-compact .att-quick-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.att-compact .att-table-wrap {
    max-height: calc(100vh - 290px);
    overflow: auto;
}

.att-compact .att-table {
    font-size: 0.82rem;
    table-layout: fixed;
    width: 100%;
}

.att-compact .att-table col.att-col-code { width: 70px; }
.att-compact .att-table col.att-col-name { width: auto; }
.att-compact .att-table col.att-col-check { width: 54px; }
.att-compact .att-table col.att-col-date { width: 150px; }
.att-compact .att-table col.att-col-notes { width: 170px; }

.att-compact .att-table thead th {
    font-size: 0.75rem;
    padding: 0.45rem 0.25rem !important;
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: 0 1px 0 #e2e8f0;
}

.att-compact .att-table thead th:nth-child(1),
.att-compact .att-table tbody td.att-code {
    width: 70px;
    max-width: 70px;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.att-compact .att-table thead th:nth-child(2),
.att-compact .att-table tbody td.att-name {
    width: auto;
    min-width: 180px;
}

.att-compact .att-table thead th:nth-child(3),
.att-compact .att-table thead th:nth-child(4),
.att-compact .att-table thead th:nth-child(5),
.att-compact .att-table thead th:nth-child(6),
.att-compact .att-table thead th:nth-child(7),
.att-compact .att-table tbody td.att-check-cell {
    width: 54px;
    max-width: 54px;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
}

.att-compact .att-table thead th:nth-child(8),
.att-compact .att-table tbody td.att-extra-cell:nth-child(8) {
    width: 150px;
    max-width: 150px;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
}

.att-compact .att-table thead th:nth-child(9),
.att-compact .att-table tbody td.att-extra-cell:nth-child(9) {
    width: 170px;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
}

.att-compact .att-table tbody td.att-extra-cell .att-date,
.att-compact .att-table tbody td.att-extra-cell .att-notes {
    width: 100%;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
}

.att-compact .att-date {
    max-width: 100%;
}

.att-compact .att-table tbody td {
    padding: 0.35rem 0.25rem !important;
    font-size: 0.82rem;
}

.att-compact .att-table tbody td.att-code {
    text-align: center;
    white-space: nowrap;
}

.att-compact .att-table tbody td.att-name {
    font-size: 0.84rem;
    max-width: none;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.att-compact .att-table tbody td.att-name .att-student-head,
.att-compact .att-table tbody td.att-name .att-student-head strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.att-compact .att-student-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 0;
}

.att-compact .att-student-head strong {
    font-size: inherit;
    line-height: 1.3;
}

.att-compact .att-code-inline {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 0.08rem 0.4rem;
}

.att-compact .checkbox-wrapper-31 {
    width: 28px;
    height: 28px;
}

.att-compact .checkbox-wrapper-31 svg {
    width: 28px;
    height: 28px;
    display: block;
}

.att-compact .att-notes,
.att-compact .att-date {
    min-height: 30px;
    font-size: 0.78rem;
    padding: 0.2rem 0.4rem;
}

.att-compact .att-sticky-actions {
    padding: 0.55rem 0.75rem;
}

.att-compact .att-sticky-actions .mina-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

.att-compact .att-sticky-actions .text-muted.small {
    font-size: 0.75rem;
}

.att-compact .att-table tfoot {
    display: none;
}

@media screen and (max-width: 767.98px) {
    .att-compact .att-table-wrap {
        max-height: none;
        overflow: visible;
    }

    .att-compact .att-table tbody tr[data-att-row] {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.3rem 0.25rem;
        padding: 0.65rem 0.7rem;
        margin-bottom: 0.55rem;
        border-radius: 12px;
    }

    .att-compact .att-table tbody td {
        width: auto !important;
        border: none !important;
        padding: 0.15rem !important;
        background: transparent !important;
    }

    .att-compact .att-table tbody td.att-code {
        display: none !important;
    }

    .att-compact .att-table tbody td.att-name {
        grid-column: 1 / -1;
        display: block !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 0.45rem !important;
        margin-bottom: 0.15rem;
        text-align: right;
        max-width: none;
    }

    .att-compact .att-table tbody td.att-name::before {
        display: none;
    }

    .att-compact .att-table tbody td.att-name .att-student-head,
    .att-compact .att-table tbody td.att-name .mina-cell-value {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        text-align: right;
    }

    .att-compact .att-table tbody td.att-name .att-student-head strong {
        font-size: 0.92rem;
        white-space: normal;
    }

    .att-compact .att-table tbody td.att-check-cell {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.2rem;
        text-align: center;
    }

    .att-compact .att-table tbody td.att-check-cell::before {
        content: attr(data-label);
        flex: none;
        max-width: none;
        width: 100%;
        font-size: 0.65rem;
        font-weight: 800;
        color: #64748b;
        text-align: center;
        line-height: 1.2;
    }

    .att-compact .att-table tbody td.att-check-cell .mina-cell-value,
    .att-compact .att-table tbody td.att-check-cell .checkbox-wrapper-31 {
        margin: 0 !important;
        max-width: none !important;
    }

    .att-compact .att-table tbody td.att-extra-cell {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.25rem 0 !important;
        border-top: 1px solid #f1f5f9 !important;
    }

    .att-compact .att-table tbody td.att-extra-cell::before {
        flex: 0 0 auto;
        max-width: 38%;
        font-size: 0.72rem;
        text-align: right;
    }

    .att-compact .att-table tbody td.att-extra-cell .mina-cell-value {
        flex: 1 1 auto;
        max-width: 62% !important;
        margin: 0 !important;
        width: 100%;
    }

    .att-compact .mina-filters.d-md-none {
        margin-bottom: 0.55rem !important;
        padding: 0.75rem 0.85rem 0.35rem;
    }

    .att-compact .att-mobile-quick {
        padding-top: 0.65rem !important;
        gap: 0.35rem;
    }

    .att-compact .att-sticky-actions .att-toolbar-left {
        display: none;
    }
}

.mina-page .dataTables_wrapper .dataTables_info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    padding-top: 0.65rem !important;
}

.mina-page .dataTables_wrapper .dataTables_paginate {
    padding-top: 0.35rem !important;
}

.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin: 0 0.2rem !important;
    padding: 0 0.7rem !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f0fdfa !important;
    border-color: #99f6e4 !important;
    color: #0f766e !important;
    transform: translateY(-1px);
}

.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #0d9488, #0891b2) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(13, 148, 136, 0.25) !important;
}

.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.mina-page .dataTables_wrapper .dataTables_paginate .paginate_button:active {
    box-shadow: none !important;
}

.mina-page .mina-card,
.mina-page .mina-card-body,
.mina-page .mina-table-wrap {
    max-width: 100%;
}

/* Filter panel */
.mina-filters {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 1.1rem 1.2rem 0.4rem;
    margin-bottom: 1.15rem;
}

.mina-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 0.85rem;
    align-items: end;
}

.mina-filters .form-group {
    margin-bottom: 0.75rem;
}

.mina-filters label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.mina-filters .form-control,
.mina-filters select.form-control {
    border-radius: 10px;
    border-color: #cbd5e1;
    min-height: 40px;
    font-size: 0.9rem;
}

.mina-filters .form-control:focus,
.mina-filters select.form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

.mina-filters-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.mina-filters-actions .mina-btn {
    min-height: 40px;
}

/* Laravel pagination (bootstrap-5 view) */
.mina-pagination {
    display: flex;
    justify-content: center;
    padding: 1rem 1.1rem 1.2rem;
}

.mina-pagination nav {
    width: 100%;
}

.mina-pagination .pagination {
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
}

.mina-pagination .page-link {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 700;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 0.7rem !important;
}

.mina-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0d9488, #0891b2) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(13, 148, 136, 0.25);
}

.mina-pagination .page-item.disabled .page-link {
    background: #f8fafc !important;
    color: #94a3b8 !important;
}

.mina-pagination .page-link:hover {
    background: #f0fdfa !important;
    border-color: #99f6e4 !important;
    color: #0f766e !important;
}

.mina-pagination .page-item.active .page-link:hover {
    color: #fff !important;
}

.mina-password-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.mina-password-value {
    font-weight: 700;
    color: #0f766e;
    letter-spacing: 0.03em;
}

.mina-btn-icon.view {
    color: #0f766e !important;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.mina-btn-icon.dash {
    color: #0369a1 !important;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.mina-btn-icon.restore {
    color: #047857 !important;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.mina-btn-icon.assign {
    color: #047857 !important;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.mina-reason-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
}

@media screen and (max-width: 767.98px) {
    .mina-filters-grid {
        grid-template-columns: 1fr;
    }

    .mina-filters-actions {
        width: 100%;
    }

    .mina-filters-actions .mina-btn {
        flex: 1;
    }

    .mina-table tbody td[data-label="تليفون ولي الأمر 2"],
    .mina-table tbody td[data-label="كود المنصة"],
    .mina-table tbody td[data-label="أُنشئت بواسطة"],
    .mina-table tbody td[data-label="آخر تعديل"] {
        display: none;
    }
}

@media screen and (max-width: 767.98px) {
    .mina-page .dataTables_wrapper {
        padding: 0.75rem;
    }

    .mina-page .dataTables_wrapper table.dataTable,
    .mina-page .dataTables_wrapper table.dataTable tbody,
    .mina-page .dataTables_wrapper table.dataTable tr,
    .mina-page .dataTables_wrapper table.dataTable td {
        display: block !important;
        width: 100% !important;
    }

    .mina-page .dataTables_wrapper table.dataTable thead {
        display: none !important;
    }

    .mina-page .dataTables_wrapper .dataTables_length,
    .mina-page .dataTables_wrapper .dataTables_filter,
    .mina-page .dataTables_wrapper .dataTables_info,
    .mina-page .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: center;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .mina-page .dataTables_wrapper .dataTables_paginate .paginate_button {
        margin: 0.15rem !important;
    }
}

/* Attendance status / lecture report */
.att-status-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.att-status-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.att-status-stat-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.att-status-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f766e;
    line-height: 1.1;
}

.att-status-stat.is-warn .att-status-stat-value {
    color: #b45309;
}

.att-status-stat.is-danger .att-status-stat-value {
    color: #be123c;
}

.att-status-stat.is-info .att-status-stat-value {
    color: #0369a1;
}

.att-report-section {
    margin-bottom: 1.15rem;
}

.att-report-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.att-report-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.att-report-count {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.att-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.att-flag-yes {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.att-flag-no {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.att-flag-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.att-flag-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.att-status-empty {
    text-align: center;
    color: #64748b;
    font-weight: 600;
    padding: 1.5rem 1rem;
}

@media print {
    @page {
        size: A4;
        margin: 8mm 10mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt !important;
    }

    .left-sidebar,
    .topbar,
    .mina-page-hero-actions,
    .att-no-print,
    .sidebar-nav,
    footer,
    .scroll-sidebar,
    .preloader,
    .customizer,
    #main-wrapper > .topbar,
    .navbar,
    .footer {
        display: none !important;
    }

    #main-wrapper,
    .page-wrapper,
    .body-wrapper,
    .container-fluid,
    .mina-page,
    .mina-print-report {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #fff !important;
    }

    .page-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Compact top — stay on same page as first table */
    .mina-print-report .mina-page-hero {
        padding: 0 0 0.35rem !important;
        margin: 0 0 0.35rem !important;
        border: none !important;
        box-shadow: none !important;
        background: none !important;
        break-after: avoid;
        page-break-after: avoid;
    }

    .mina-print-report .mina-page-hero-title {
        font-size: 14pt !important;
        margin: 0 !important;
        color: #000 !important;
    }

    .mina-print-report .mina-page-hero-subtitle {
        font-size: 10pt !important;
        margin: 0.15rem 0 0 !important;
        color: #333 !important;
    }

    .mina-print-report .att-session-meta {
        gap: 0.25rem !important;
        margin: 0 0 0.4rem !important;
        break-after: avoid;
        page-break-after: avoid;
    }

    .mina-print-report .att-chip {
        padding: 0.1rem 0.4rem !important;
        font-size: 8.5pt !important;
        background: #fff !important;
        border: 1px solid #999 !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    .mina-print-report .att-status-stats {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.3rem !important;
        margin: 0 0 0.5rem !important;
        break-after: avoid;
        page-break-after: avoid;
    }

    .mina-print-report .att-status-stat {
        box-shadow: none !important;
        border: 1px solid #bbb !important;
        background: #fff !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 6px !important;
        min-width: auto !important;
        flex: 0 1 auto !important;
        break-inside: avoid;
    }

    .mina-print-report .att-status-stat-label {
        font-size: 8pt !important;
        color: #444 !important;
    }

    .mina-print-report .att-status-stat-value {
        font-size: 11pt !important;
        color: #000 !important;
    }

    /* Allow sections/tables to continue across pages */
    .mina-print-report .att-report-section,
    .mina-print-report .mina-card,
    .mina-print-report .mina-card-body,
    .mina-print-report .mina-table-wrap {
        break-inside: auto !important;
        page-break-inside: auto !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .mina-print-report .att-report-section {
        margin: 0 0 0.55rem !important;
    }

    .mina-print-report .att-report-section-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 0.35rem 0 0.2rem !important;
        padding: 0 !important;
        break-after: avoid;
        page-break-after: avoid;
        break-inside: avoid;
    }

    .mina-print-report .att-report-section-title {
        font-size: 11pt !important;
        margin: 0 !important;
        color: #000 !important;
    }

    .mina-print-report .att-report-count {
        font-size: 9pt !important;
        padding: 0.1rem 0.4rem !important;
        border: 1px solid #999 !important;
        background: #fff !important;
        color: #000 !important;
    }

    /* Force real table layout in print (override any leftover card styles) */
    .mina-print-report table,
    .mina-print-report .mina-table,
    .mina-print-report .mina-table thead,
    .mina-print-report .mina-table tbody,
    .mina-print-report .mina-table tfoot,
    .mina-print-report .mina-table tr,
    .mina-print-report .mina-table th,
    .mina-print-report .mina-table td,
    .mina-print-report table.dataTable,
    .mina-print-report table.dataTable thead,
    .mina-print-report table.dataTable tbody,
    .mina-print-report table.dataTable tr,
    .mina-print-report table.dataTable th,
    .mina-print-report table.dataTable td {
        display: revert !important;
        width: auto !important;
        float: none !important;
        position: static !important;
    }

    .mina-print-report table,
    .mina-print-report .mina-table,
    .mina-print-report table.dataTable {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
        font-size: 9pt !important;
    }

    .mina-print-report .mina-table thead,
    .mina-print-report table.dataTable thead {
        display: table-header-group !important;
    }

    .mina-print-report .mina-table tbody,
    .mina-print-report table.dataTable tbody {
        display: table-row-group !important;
    }

    .mina-print-report .mina-table tfoot {
        display: none !important;
    }

    .mina-print-report .mina-table tr,
    .mina-print-report table.dataTable tr {
        display: table-row !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .mina-print-report .mina-table th,
    .mina-print-report .mina-table td,
    .mina-print-report table.dataTable th,
    .mina-print-report table.dataTable td {
        display: table-cell !important;
        border: 1px solid #777 !important;
        padding: 0.18rem 0.3rem !important;
        background: #fff !important;
        color: #000 !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .mina-print-report .mina-table td[data-label="اسم الطالب"],
    .mina-print-report .mina-table td[data-label="الملاحظات"] {
        white-space: normal !important;
    }

    .mina-print-report .mina-table thead th,
    .mina-print-report table.dataTable thead th {
        background: #eee !important;
        font-weight: 800 !important;
        font-size: 8.5pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .mina-print-report .mina-table tbody td::before,
    .mina-print-report table.dataTable tbody td::before {
        display: none !important;
        content: none !important;
    }

    .mina-print-report .mina-cell-value,
    .mina-print-report .att-flag {
        max-width: none !important;
        margin: 0 !important;
        font-size: inherit !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    .mina-print-report .att-status-empty {
        padding: 0.5rem 0 !important;
        color: #333 !important;
    }

    /* DataTables wrappers on print reports */
    .mina-print-report .dataTables_wrapper,
    .mina-print-report .dataTables_scroll,
    .mina-print-report .dataTables_scrollHead,
    .mina-print-report .dataTables_scrollBody {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .mina-print-report .dataTables_filter,
    .mina-print-report .dataTables_length,
    .mina-print-report .dataTables_info,
    .mina-print-report .dataTables_paginate,
    .mina-print-report .dataTables_scrollHead {
        display: none !important;
    }

    .mina-print-report table.dataTable {
        margin: 0 !important;
        width: 100% !important;
    }

    .mina-print-report .grd-row-fail td {
        background: #f8d7da !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Grades entry page */
.grd-page .select2-container {
    width: 100% !important;
}

.grd-score-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    max-width: 220px;
}

.grd-score-wrap .grade-input,
.grd-score-wrap #c_grade {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    min-height: 40px;
    text-align: center;
    font-weight: 700;
}

.grd-total {
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
}

.grd-table .note-input {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    min-height: 40px;
    width: 100%;
    min-width: 140px;
}

.grd-table tbody tr.grd-row-pass td {
    background: #f0fdf4 !important;
}

.grd-table tbody tr.grd-row-fail td {
    background: #fff1f2 !important;
}

.grd-table tbody tr.grd-row-pass:hover td {
    background: #dcfce7 !important;
}

.grd-table tbody tr.grd-row-fail:hover td {
    background: #ffe4e6 !important;
}

.grd-table tbody tr.grd-row-awarded td {
    background: #ecfdf5 !important;
}

.grd-table tbody tr.grd-row-awarded:hover td {
    background: #d1fae5 !important;
}

@media screen and (max-width: 767.98px) {
    .grd-score-wrap {
        max-width: 100%;
    }
}

/* Transactions / migration page */
.txn-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    color: #92400e;
}

.txn-warning-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: #b45309;
}

.txn-done {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    padding: 1rem;
    color: #047857;
}

.txn-done > i {
    font-size: 1.4rem;
    margin-top: 0.1rem;
}

.txn-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.txn-history-item:last-of-type {
    border-bottom: none;
}

.txn-steps {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.txn-steps-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.45rem;
}

.txn-steps ol {
    padding-right: 1.1rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
}

.txn-page .form-control,
.txn-page select.form-control {
    border-radius: 10px;
    border-color: #cbd5e1;
    min-height: 42px;
}

/* Students index: keep one student per row */
.students-table-wrap {
    overflow-x: auto;
}

.students-table {
    table-layout: fixed;
    min-width: 900px;
}

.students-table thead th,
.students-table tbody td {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
    vertical-align: middle !important;
}

.students-table .students-col-id { width: 72px; }
.students-table .students-col-name { width: 18%; }
.students-table .students-col-level { width: 16%; }
.students-table .students-col-group { width: 22%; }
.students-table .students-col-phone { width: 120px; }
.students-table .students-col-reason { width: 12%; }
.students-table .students-col-actions { width: 230px; }

.students-cell-ellipsis {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.students-cell-nowrap {
    white-space: nowrap !important;
}

.students-badge-compact {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
    vertical-align: middle;
    line-height: 1.2;
    padding: 0.2rem 0.55rem;
}

.students-actions {
    flex-wrap: nowrap !important;
    gap: 0.25rem;
    justify-content: flex-start;
}

.students-actions .mina-btn-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
}

.students-actions form.d-inline {
    display: inline-flex !important;
    margin: 0;
}

.students-password-inline {
    font-size: 0.85rem;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.students-details-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.students-details-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-width: 0;
}

.students-details-row.is-full {
    grid-column: 1 / -1;
}

.students-details-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.students-details-value {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    text-align: right;
    word-break: break-word;
    line-height: 1.35;
}

.students-details-value[dir="ltr"] {
    text-align: left;
    direction: ltr;
}

@media screen and (max-width: 575.98px) {
    .students-details-list {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 767.98px) {
    .students-table {
        min-width: 0;
        table-layout: auto;
    }

    .students-table thead th,
    .students-table tbody td {
        white-space: normal !important;
        overflow: visible;
        text-overflow: clip;
    }

    .students-cell-ellipsis,
    .students-badge-compact {
        white-space: normal !important;
        overflow: visible;
        text-overflow: clip;
        display: inline;
    }

    .students-actions {
        flex-wrap: wrap !important;
    }
}

/* =========================================================
   Auth pages — login + password reset (mina style)
   ========================================================= */
.mina-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Noto Kufi Arabic', sans-serif;
    background: #0b3b3a;
}

.mina-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.mina-auth-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.mina-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(145deg, rgba(11, 59, 58, 0.72) 0%, rgba(13, 148, 136, 0.45) 45%, rgba(8, 145, 178, 0.55) 100%);
}

.mina-auth-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
}

.mina-auth-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
    padding: 1.5rem 1.4rem 1.6rem;
    backdrop-filter: blur(10px);
}

.mina-auth-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
    border: 1px solid #99f6e4;
}

.mina-auth-brand img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid #fff;
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.25);
}

.mina-auth-brand h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f766e;
}

.mina-auth-brand p {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.mina-auth-form {
    display: grid;
    gap: 0.95rem;
}

.mina-auth-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.mina-auth-input {
    position: relative;
}

.mina-auth-input > i {
    position: absolute;
    top: 50%;
    right: 0.95rem;
    transform: translateY(-50%);
    color: #0d9488;
    font-size: 0.95rem;
    pointer-events: none;
}

.mina-auth-input .form-control {
    height: 48px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 2.6rem 0.65rem 0.95rem;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
    box-shadow: none;
}

.mina-auth-input .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

.mina-auth-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mina-auth-remember label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
}

.mina-auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 0.25rem;
}

.mina-auth-inline-card {
    margin-top: 0.25rem;
}

.mina-auth-inline-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.mina-auth-inline-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.mina-auth-inline-icon.is-admin {
    color: #0369a1;
    background: #e0f2fe;
    border-color: #bae6fd;
}

.mina-auth-inline-head h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.mina-auth-inline-head p {
    margin: 0.2rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
}

@media screen and (max-width: 575.98px) {
    .mina-auth-card {
        padding: 1.2rem 1rem 1.35rem;
    }

    .mina-auth-brand {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================================
   Groups page — compact list (especially mobile)
   ========================================================= */
.groups-table {
    min-width: 720px;
}

.groups-table .groups-col-name { width: 34%; }
.groups-table .groups-col-level { width: 24%; }
.groups-table .groups-col-count { width: 12%; }
.groups-table .groups-col-slot { width: 12%; }
.groups-table .groups-col-actions { width: 160px; }

.groups-name-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.groups-id-chip {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.groups-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 800;
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
    white-space: nowrap;
}

.groups-stat-chip.is-slot {
    background: #f0fdfa;
    color: #0f766e;
    border-color: #99f6e4;
}

@media screen and (max-width: 767.98px) {
    .groups-page .mina-page-hero-subtitle {
        font-size: 0.9rem;
    }

    .groups-table {
        min-width: 0;
    }

    .groups-page .mina-table tbody tr {
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.7rem;
    }

    .groups-page .mina-table tbody td {
        padding: 0.45rem 0 !important;
        align-items: center;
    }

    .groups-page .mina-table tbody td[data-label="المجموعة"] {
        display: block;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 0.65rem !important;
        margin-bottom: 0.25rem;
    }

    .groups-page .mina-table tbody td[data-label="المجموعة"]::before {
        display: none;
    }

    .groups-page .mina-table tbody td[data-label="المجموعة"] > .groups-name-cell,
    .groups-page .mina-table tbody td[data-label="المجموعة"] .groups-name-cell {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.5rem;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .groups-page .mina-table tbody td[data-label="المجموعة"] .mina-cell-value,
    .groups-page .mina-table tbody td[data-label="المجموعة"] .students-cell-ellipsis {
        flex: 1 1 auto;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        text-align: right !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        display: block !important;
        font-size: 1.02rem;
        line-height: 1.45;
    }

    .groups-page .mina-table tbody td[data-label="المجموعة"] .groups-id-chip {
        margin-top: 0.15rem;
    }

    .groups-page .mina-table tbody td[data-label="المرحلة"],
    .groups-page .mina-table tbody td[data-label="الطلاب"],
    .groups-page .mina-table tbody td[data-label="الحصة"] {
        display: inline-flex;
        width: auto !important;
        vertical-align: middle;
        border-bottom: none !important;
        padding: 0.25rem 0.2rem !important;
        gap: 0.35rem;
    }

    .groups-page .mina-table tbody td[data-label="المرحلة"]::before,
    .groups-page .mina-table tbody td[data-label="الطلاب"]::before,
    .groups-page .mina-table tbody td[data-label="الحصة"]::before {
        display: none;
    }

    .groups-page .mina-table tbody td[data-label="المرحلة"] .mina-cell-value,
    .groups-page .mina-table tbody td[data-label="الطلاب"] .mina-cell-value,
    .groups-page .mina-table tbody td[data-label="الحصة"] .mina-cell-value {
        max-width: none;
        margin: 0;
    }

    .groups-page .mina-table tbody td[data-label="إجراءات"] {
        display: flex;
        width: 100% !important;
        border-top: 1px solid #f1f5f9 !important;
        margin-top: 0.45rem;
        padding-top: 0.65rem !important;
        justify-content: flex-start;
    }

    .groups-page .mina-table tbody td[data-label="إجراءات"]::before {
        display: none;
    }

    .groups-page .mina-table tbody td[data-label="إجراءات"] .mina-actions {
        margin: 0;
        width: 100%;
        justify-content: flex-start;
    }
}



