/* =========================================================
   COLLEGE CMS - COMMON ADMIN LAYOUT
========================================================= */

:root {
    --admin-sidebar-width: 260px;
    --admin-sidebar-bg: #111827;
    --admin-sidebar-hover: #1f2937;
    --admin-sidebar-active: #2563eb;
    --admin-sidebar-text: #d1d5db;
    --admin-sidebar-muted: #9ca3af;
    --admin-border: #e5e7eb;
    --admin-bg: #f5f7fb;
    --admin-white: #ffffff;
    --admin-text: #171b21;
    --admin-muted: #68717d;
}

/* =========================================================
   SIDEBAR
========================================================= */

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;

    width: var(--admin-sidebar-width);

    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);

    overflow-y: auto;
    overflow-x: hidden;

    border-right: 1px solid rgba(255, 255, 255, .05);
}

.admin-sidebar-brand {
    min-height: 76px;

    display: flex;
    align-items: center;

    padding: 16px 18px;

    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-brand-icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #1d4ed8;
    color: #ffffff;

    border-radius: 8px;

    font-size: 18px;
}

.admin-brand-text {
    margin-left: 12px;
    min-width: 0;
}

.admin-brand-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.admin-brand-subtitle {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 3px;
}

/* =========================================================
   NAVIGATION
========================================================= */

.admin-navigation {
    padding: 18px 12px 24px;
}

.admin-sidebar-section {
    padding: 0 12px;
    margin: 18px 0 7px;

    color: var(--admin-sidebar-muted);

    font-size: 10px;
    font-weight: 600;
    letter-spacing: .7px;

    text-transform: uppercase;
}

.admin-sidebar-section:first-child {
    margin-top: 0;
}

.admin-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sidebar-menu a {
    min-height: 40px;

    display: flex;
    align-items: center;

    padding: 9px 12px;

    color: var(--admin-sidebar-text);
    text-decoration: none;

    border-radius: 6px;

    font-size: 13px;
    font-weight: 400;

    transition:
        background-color .15s ease,
        color .15s ease;
}

.admin-sidebar-menu a i {
    width: 20px;
    margin-right: 10px;

    text-align: center;

    font-size: 15px;
}

.admin-sidebar-menu a:hover {
    background: var(--admin-sidebar-hover);
    color: #ffffff;
}

.admin-sidebar-menu a.active {
    background: var(--admin-sidebar-active);
    color: #ffffff;
    font-weight: 500;
}

.admin-sidebar-menu a.logout-link {
    color: #fca5a5;
}

.admin-sidebar-menu a.logout-link:hover {
    background: rgba(220, 38, 38, .16);
    color: #fecaca;
}

/* =========================================================
   MAIN AREA
========================================================= */

.admin-main {
    min-height: 100vh;
    margin-left: var(--admin-sidebar-width);

    background: var(--admin-bg);
}

.admin-topbar {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    background: var(--admin-white);

    border-bottom: 1px solid var(--admin-border);
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-mobile-menu {
    display: none;

    width: 40px;
    height: 40px;

    border: 1px solid var(--admin-border);
    border-radius: 6px;

    background: #ffffff;
    color: #374151;

    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.admin-topbar-title {
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 600;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-content {
    padding: 28px;
}

/* =========================================================
   SIDEBAR OVERLAY
========================================================= */

.admin-sidebar-overlay {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 1030;

    background: rgba(0, 0, 0, .45);
}

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

@media (max-width: 991px) {

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-sidebar-overlay.show {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-mobile-menu {
        display: flex;
    }

    .admin-topbar {
        padding: 0 18px;
    }

    .admin-content {
        padding: 22px 18px;
    }
}

@media (max-width: 575px) {

    .admin-topbar {
        min-height: 60px;
        padding: 0 14px;
    }

    .admin-content {
        padding: 18px 14px;
    }

    .admin-topbar-title {
        font-size: 15px;
    }

    .admin-topbar-right {
        gap: 8px;
    }
}

/* =========================================================
   SCROLLBAR
========================================================= */

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 10px;
}

/* Shared admin sidebar layout */
body.admin-sidebar-enabled {
    margin-left: var(--admin-sidebar-width);
}

body.admin-sidebar-enabled .admin-sidebar {
    left: 0;
}

@media (max-width: 991px) {
    body.admin-sidebar-enabled {
        margin-left: 0;
    }
}
/* Shared admin profile */
.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--admin-sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
}

.profile-role {
    font-size: 11px;
    color: var(--admin-muted);
}
/* =========================================================
   DASHBOARD
========================================================= */

.admin-page-heading {
    margin-bottom: 24px;
}

.admin-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-text);
}

.admin-page-subtitle {
    margin: 6px 0 0;
    color: var(--admin-muted);
    font-size: 14px;
}


/* ---------- STATISTICS ---------- */

.admin-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--admin-white);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    padding: 22px;
}

.admin-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-stat-label {
    margin-bottom: 8px;
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-stat-number {
    color: var(--admin-text);
    font-size: 30px;
    line-height: 1.1;
    font-weight: 700;
}

.admin-stat-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 20px;
}

.admin-stat-blue {
    background: #dbeafe;
    color: #2563eb;
}

.admin-stat-green {
    background: #dcfce7;
    color: #16a34a;
}

.admin-stat-orange {
    background: #ffedd5;
    color: #ea580c;
}

.admin-stat-purple {
    background: #ede9fe;
    color: #7c3aed;
}


/* ---------- DASHBOARD GRID ---------- */

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}


/* ---------- PANELS ---------- */

.admin-panel {
    background: var(--admin-white);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    overflow: hidden;
}

.admin-panel-header {
    min-height: 58px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--admin-border);
}

.admin-panel-title {
    margin: 0;
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 700;
}

.admin-panel-body {
    padding: 20px;
}


/* ---------- QUICK ACTIONS ---------- */

.admin-quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--admin-border);
    transition: background-color .15s ease;
}

.admin-quick-action:last-child {
    border-bottom: 0;
}

.admin-quick-action:hover {
    background: #f8fafc;
}

.admin-action-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 5px;
}

.admin-action-title {
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 600;
}

.admin-action-desc {
    margin-top: 3px;
    color: var(--admin-muted);
    font-size: 12px;
}


/* ---------- SYSTEM STATUS ---------- */

.admin-status-list {
    padding: 4px 20px;
}

.admin-status-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--admin-border);
}

.admin-status-item:last-child {
    border-bottom: 0;
}

.admin-status-indicator {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: #16a34a;
}

.admin-status-title {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
}

.admin-status-text {
    margin-top: 3px;
    color: var(--admin-muted);
    font-size: 12px;
}


/* ---------- DASHBOARD RESPONSIVE ---------- */

@media (max-width: 1199px) {
    .admin-dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .admin-content {
        padding: 20px 16px;
    }

    .admin-page-title {
        font-size: 24px;
    }

    .admin-dashboard-stats,
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-card {
        padding: 18px;
    }
}

/* =========================================================
   ADMIN LOGIN
   ========================================================= */

.admin-login-page {
    margin: 0;
    min-height: 100vh;
    background: #f3f6fa;
    color: #1f2937;
}

.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.admin-login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-top: 4px solid #17365d;
    padding: 34px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.admin-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-login-mark {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #17365d;
    color: #ffffff;
    border: 1px solid #102a47;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.admin-login-system {
    color: #17365d;
    font-size: 18px;
    font-weight: 700;
}

.admin-login-system-subtitle {
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
}

.admin-login-heading {
    padding: 26px 0 22px;
}

.admin-login-heading h1 {
    margin: 0;
    color: #172033;
    font-size: 25px;
    font-weight: 700;
}

.admin-login-heading p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.admin-login-error {
    margin-bottom: 20px;
    padding: 11px 13px;
    border: 1px solid #f1b8b8;
    background: #fff3f3;
    color: #991b1b;
    font-size: 14px;
}

.admin-login-field {
    margin-bottom: 18px;
}

.admin-login-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.admin-login-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    border-radius: 2px;
    outline: none;
}

.admin-login-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.10);
}

.admin-login-button {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;
    border: 1px solid #17365d;
    background: #17365d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 2px;
}

.admin-login-button:hover {
    background: #102a47;
}

.admin-login-footer {
    margin-top: 24px;
    padding-top: 17px;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 575px) {
    .admin-login-wrapper {
        padding: 18px 12px;
    }

    .admin-login-card {
        padding: 24px 20px;
    }

    .admin-login-heading h1 {
        font-size: 22px;
    }
}


/* =========================================================
   SHARED ADMIN BRANDING
   ========================================================= */

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.admin-brand:hover {
    color: inherit;
    text-decoration: none;
}

.admin-brand-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    padding: 3px;
}

.admin-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.admin-brand-name {
    max-width: 520px;
    overflow: hidden;
    color: #17365d;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-brand-short {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

@media (max-width: 767px) {

    .admin-brand-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .admin-brand-name {
        max-width: 260px;
        font-size: 13px;
    }

    .admin-brand-short {
        font-size: 10px;
    }
}

@media (max-width: 575px) {

    .admin-brand-name {
        max-width: 190px;
    }
}


/* Login college branding */

.admin-login-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    padding: 4px;
}

.admin-login-brand-text {
    min-width: 0;
}

@media (max-width: 575px) {
    .admin-login-logo {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }
}


/* Shared admin sidebar branding */
.admin-sidebar-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    padding: 3px;
}

@media (max-width: 767px) {
    .admin-sidebar-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
}
/* =========================================================
   FINAL ADMIN RESPONSIVE LAYOUT
========================================================= */

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

.admin-sidebar {
    width: var(--admin-sidebar-width);
}

.admin-main {
    min-width: 0;
    width: auto;
}

/* Mobile hamburger - outside sidebar */
.admin-mobile-menu {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1060;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    background: #ffffff;
    color: #1f2937;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.admin-mobile-menu i {
    font-size: 22px;
    line-height: 1;
}

/* Sidebar branding */
.admin-sidebar-brand {
    min-height: 82px;
    padding: 16px 18px;
}

.admin-brand-title {
    font-size: 16px;
    line-height: 1.3;
    white-space: normal;
}

.admin-brand-subtitle {
    font-size: 12px;
    line-height: 1.4;
}

/* Navigation readability */
.admin-sidebar-menu a {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.35;
}

.admin-sidebar-menu a i {
    font-size: 16px;
}

/* Prevent content from becoming too wide */
.admin-content,
.page-content {
    max-width: 100%;
    min-width: 0;
}

/* Tables remain usable on small screens */
.admin-content table,
.page-content table {
    width: 100%;
}

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

@media (max-width: 991px) {

    body.admin-sidebar-enabled {
        margin-left: 0;
    }

    .admin-sidebar {
        width: min(86vw, 300px);
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .admin-mobile-menu {
        display: flex;
    }

    .admin-content {
        padding: 20px 16px;
    }

    .admin-sidebar-overlay.show {
        display: block;
    }

}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 575px) {

    .admin-sidebar {
        width: min(88vw, 300px);
    }

    .admin-sidebar-brand {
        min-height: 82px;
        padding: 16px 54px 16px 14px;
    }

    .admin-sidebar-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .admin-brand-text {
        margin-left: 10px;
    }

    .admin-brand-title {
        font-size: 15px;
        line-height: 1.3;
    }

    .admin-brand-subtitle {
        font-size: 12px;
    }

    .admin-navigation {
        padding: 14px 10px 22px;
    }

    .admin-sidebar-section {
        font-size: 11px;
        margin-top: 16px;
    }

    .admin-sidebar-menu a {
        min-height: 46px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .admin-content {
        padding: 16px 12px;
    }

}

/* =========================================================
   MOBILE ADMIN COLLEGE HEADER
========================================================= */

.admin-mobile-header {
    display: none;
}

.admin-mobile-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.admin-mobile-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    padding: 3px;
}

.admin-mobile-brand-text {
    min-width: 0;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
}

.admin-mobile-brand-text strong {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.admin-mobile-brand-text span {
    margin-top: 3px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.2;
}

@media (max-width: 991px) {

    .admin-mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        min-height: 68px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        background: #ffffff;
        border-bottom: 1px solid #dfe4ea;
        box-shadow: 0 1px 5px rgba(0, 0, 0, .08);
    }

    .admin-mobile-menu {
        position: static;
        display: flex;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        border: 1px solid #cfd6df;
        border-radius: 4px;
        background: #ffffff;
        color: #172033;
        box-shadow: none;
    }

    .admin-main {
        padding-top: 68px;
    }

    .admin-sidebar {
        z-index: 1060;
        top: 0;
        bottom: 0;
    }

}

@media (max-width: 575px) {

    .admin-mobile-header {
        min-height: 64px;
        padding: 8px 12px;
    }

    .admin-mobile-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .admin-mobile-brand-text {
        margin-left: 9px;
    }

    .admin-mobile-brand-text strong {
        font-size: 14px;
    }

    .admin-mobile-brand-text span {
        font-size: 10px;
    }

    .admin-mobile-menu {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .admin-mobile-menu i {
        font-size: 21px;
    }

    .admin-main {
        padding-top: 64px;
    }

}
 
/* =========================================================
   RESPONSIVE ADMIN TABLES
========================================================= */

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table {
    min-width: 720px;
}

@media (max-width: 767px) {

    .table-responsive {
        border-left: 0;
        border-right: 0;
    }

    .table-responsive > table {
        min-width: 720px;
    }

    .table-responsive th,
    .table-responsive td {
        white-space: nowrap;
        vertical-align: middle;
    }

}


/* =========================================
   STUDENT MESSAGES
========================================= */

.admin-content-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.4fr);
    gap: 22px;
    align-items: start;
}

.admin-message-list {
    border-top: 1px solid #e1e7ed;
}

.admin-message-item {
    display: block;
    padding: 17px 18px;
    border-bottom: 1px solid #e1e7ed;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.admin-message-item:hover {
    background: #f6f9fc;
}

.admin-message-item.is-active {
    background: #edf5fc;
    border-left: 4px solid #0b467d;
    padding-left: 14px;
}

.admin-message-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-message-item-top strong {
    color: #173f69;
    font-size: 15px;
}

.admin-message-subject {
    margin-top: 7px;
    color: #263f55;
    font-size: 14px;
    font-weight: 700;
}

.admin-message-preview {
    margin-top: 5px;
    color: #71808e;
    font-size: 13px;
    line-height: 1.5;
}

.admin-message-date {
    margin-top: 9px;
    color: #8a98a5;
    font-size: 12px;
}

.admin-message-date i {
    margin-right: 4px;
}

.admin-message-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid #d7e0e8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}

.admin-message-status.new {
    color: #9a5b00;
    background: #fff6df;
    border-color: #efd99a;
}

.admin-message-status.read {
    color: #315f86;
    background: #eef5fb;
    border-color: #cfdfed;
}

.admin-message-status.replied {
    color: #287044;
    background: #edf8f0;
    border-color: #c9e5d0;
}

.admin-message-details {
    padding-top: 5px;
}

.admin-message-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 25px;
    border: 1px solid #dfe6ec;
    background: #dfe6ec;
}

.admin-message-contact > div {
    padding: 13px 15px;
    background: #fff;
}

.admin-message-contact span {
    display: block;
    margin-bottom: 4px;
    color: #7a8793;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.admin-message-contact strong,
.admin-message-contact a {
    color: #173f69;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.admin-message-body {
    margin-top: 22px;
}

.admin-message-body h3 {
    margin: 0 0 10px;
    color: #173f69;
    font-size: 15px;
    font-weight: 700;
}

.admin-message-text,
.admin-message-reply {
    padding: 16px;
    border: 1px solid #dfe6ec;
    background: #f8fafc;
    color: #334b60;
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-message-reply {
    background: #f0f7f2;
    border-color: #cfe4d4;
}

.admin-message-body small {
    display: block;
    margin-top: 8px;
    color: #87939d;
    font-size: 11px;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.admin-message-select-state {
    min-height: 420px;
}

@media (max-width: 1100px) {
    .admin-content-grid {
        grid-template-columns: 1fr;
    }

    .admin-message-select-state {
        min-height: 250px;
    }
}

@media (max-width: 576px) {
    .admin-message-contact {
        grid-template-columns: 1fr;
    }

    .admin-message-item {
        padding: 14px;
    }

    .admin-message-item.is-active {
        padding-left: 10px;
    }

    .admin-message-item-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-message-status {
        align-self: flex-start;
    }

    .admin-form-actions {
        justify-content: stretch;
    }

    .admin-form-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   STUDENT MESSAGES - ADMIN PANEL
========================================================= */

.admin-message-page {
    width: 100%;
}

.admin-message-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.admin-message-stat {
    background: #fff;
    border: 1px solid #dce4eb;
    padding: 17px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.admin-message-stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf5fc;
    color: #075da2;
    font-size: 18px;
}

.admin-message-stat strong {
    display: block;
    color: #173f69;
    font-size: 21px;
    line-height: 1;
}

.admin-message-stat span {
    display: block;
    margin-top: 5px;
    color: #718090;
    font-size: 11px;
}


/* MAIN INBOX */

.admin-message-layout {
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    min-height: 620px;
    background: #fff;
    border: 1px solid #d8e1e8;
}


/* MESSAGE LIST */

.admin-message-list {
    min-width: 0;
    border-right: 1px solid #d8e1e8;
    background: #f8fafc;
}

.admin-message-list-header {
    padding: 17px 18px;
    border-bottom: 1px solid #d8e1e8;
    background: #fff;
}

.admin-message-list-header h2 {
    margin: 0;
    color: #173f69;
    font-size: 17px;
    font-weight: 800;
}

.admin-message-list-header p {
    margin: 4px 0 0;
    color: #778695;
    font-size: 11px;
}


/* MESSAGE ITEM */

.admin-message-item {
    display: block;
    padding: 15px 17px;
    border-bottom: 1px solid #dfe6ec;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

.admin-message-item:hover {
    background: #f2f7fb;
    color: inherit;
}

.admin-message-item.active {
    background: #eaf4fc;
    border-left: 4px solid #0868b1;
    padding-left: 13px;
}

.admin-message-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.admin-message-item-name {
    color: #173f69;
    font-size: 13px;
    font-weight: 800;
}

.admin-message-item-date {
    color: #8a98a5;
    font-size: 10px;
    white-space: nowrap;
}

.admin-message-item-subject {
    margin-top: 5px;
    color: #304e69;
    font-size: 12px;
    font-weight: 700;
}

.admin-message-item-preview {
    margin-top: 5px;
    color: #778695;
    font-size: 11px;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* STATUS */

.admin-message-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    margin-top: 9px;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.admin-message-status.new {
    background: #fff1df;
    color: #9a5a00;
}

.admin-message-status.read {
    background: #edf1f5;
    color: #627384;
}

.admin-message-status.replied {
    background: #e8f7ee;
    color: #287444;
}


/* DETAIL */

.admin-message-detail {
    min-width: 0;
    background: #fff;
}

.admin-message-detail-header {
    padding: 19px 22px;
    border-bottom: 1px solid #dce4eb;
}

.admin-message-detail-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.admin-message-detail-header h2 {
    margin: 0;
    color: #173f69;
    font-size: 20px;
    font-weight: 800;
}

.admin-message-detail-header p {
    margin: 5px 0 0;
    color: #7a8996;
    font-size: 11px;
}


/* CONTACT INFO */

.admin-message-contact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 22px;
    background: #f7f9fb;
    border-bottom: 1px solid #e0e6eb;
}

.admin-message-contact-item {
    min-width: 0;
}

.admin-message-contact-item span {
    display: block;
    margin-bottom: 4px;
    color: #82909d;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 800;
}

.admin-message-contact-item strong,
.admin-message-contact-item a {
    display: block;
    overflow: hidden;
    color: #294d6b;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-message-contact-item a {
    text-decoration: none;
}

.admin-message-contact-item a:hover {
    color: #0868b1;
}


/* BODY */

.admin-message-body {
    padding: 22px;
}

.admin-message-body h3 {
    margin: 0 0 9px;
    color: #173f69;
    font-size: 13px;
    font-weight: 800;
}

.admin-message-text {
    padding: 15px;
    min-height: 100px;
    background: #f8fafc;
    border: 1px solid #dfe6ec;
    color: #526879;
    font-size: 13px;
    line-height: 1.7;
    white-space: normal;
    overflow-wrap: anywhere;
}


/* PREVIOUS REPLY */

.admin-message-reply {
    margin-bottom: 20px;
    padding: 15px;
    background: #edf8f1;
    border: 1px solid #cbe5d3;
    color: #386247;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.admin-message-replied-meta {
    margin-top: -12px;
    margin-bottom: 20px;
    color: #7c8b84;
    font-size: 10px;
}


/* REPLY */

.admin-message-reply-form {
    border-top: 1px solid #dfe6ec;
    padding-top: 20px;
}

.admin-message-reply-form label {
    display: block;
    margin-bottom: 7px;
    color: #294a68;
    font-size: 12px;
    font-weight: 800;
}

.admin-message-reply-form textarea {
    display: block;
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 12px 13px;
    border: 1px solid #cbd7e1;
    border-radius: 2px;
    outline: none;
    background: #fff;
    color: #29435c;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
}

.admin-message-reply-form textarea:focus {
    border-color: #0868b1;
    box-shadow: 0 0 0 3px rgba(8,104,177,.09);
}

.admin-message-reply-form textarea::placeholder {
    color: #9aa7b3;
}

.admin-message-reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}

.admin-message-reply-help {
    color: #82909d;
    font-size: 10px;
}

.admin-message-reply-help i {
    color: #287444;
}

.admin-message-reply-actions .btn {
    min-height: 40px;
    padding: 0 17px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
}


/* EMPTY STATE */

.admin-message-empty {
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.admin-message-empty-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf5fc;
    color: #0868b1;
    font-size: 26px;
}

.admin-message-empty h3 {
    margin: 0 0 7px;
    color: #173f69;
    font-size: 17px;
    font-weight: 800;
}

.admin-message-empty p {
    max-width: 360px;
    margin: 0 auto;
    color: #7a8996;
    font-size: 12px;
    line-height: 1.6;
}


/* FLASH */

.admin-message-flash {
    margin-bottom: 18px;
    border-radius: 0;
}


/* TABLET */

@media (max-width: 1100px) {

    .admin-message-layout {
        grid-template-columns: 315px minmax(0, 1fr);
    }

    .admin-message-stats {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* MOBILE */

@media (max-width: 767px) {

    .admin-message-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .admin-message-stat {
        padding: 13px;
    }

    .admin-message-stat-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 15px;
    }

    .admin-message-stat strong {
        font-size: 18px;
    }

    .admin-message-layout {
        display: block;
        min-height: 0;
    }

    .admin-message-list {
        border-right: 0;
        border-bottom: 1px solid #d8e1e8;
    }

    .admin-message-list-header {
        padding: 14px;
    }

    .admin-message-item {
        padding: 13px 14px;
    }

    .admin-message-detail-header {
        padding: 16px;
    }

    .admin-message-detail-header h2 {
        font-size: 17px;
    }

    .admin-message-contact {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 16px;
    }

    .admin-message-body {
        padding: 16px;
    }

    .admin-message-reply-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-message-reply-actions .btn {
        width: 100%;
    }

    .admin-message-empty {
        min-height: 350px;
    }

}


/* SMALL MOBILE */

@media (max-width: 480px) {

    .admin-message-stats {
        grid-template-columns: 1fr;
    }

    .admin-message-stat {
        padding: 12px;
    }

    .admin-message-item-top {
        flex-direction: column;
        gap: 4px;
    }

    .admin-message-item-date {
        white-space: normal;
    }

}

/* =========================================================
   STUDENT MESSAGES - ACTUAL ADMIN PAGE CLASSES
========================================================= */

.admin-main,
.admin-content,
.admin-page {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: #243b53;
}


/* PAGE */

.page-title {
    color: #173f69 !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 30px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
}

.page-description {
    color: #718090 !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}


/* STATS */

.admin-stats,
.admin-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 0 0 22px !important;
}

.admin-stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    min-height: 86px !important;
    padding: 16px !important;
    background: #ffffff !important;
    border: 1px solid #dce4eb !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.admin-stat-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #edf5fc !important;
    color: #0868b1 !important;
    font-size: 18px !important;
}

.admin-stat-card span {
    display: block !important;
    color: #758493 !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

.admin-stat-card strong {
    display: block !important;
    margin-top: 3px !important;
    color: #173f69 !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
}


/* MESSAGE TWO-COLUMN AREA */

.admin-messages-grid,
.messages-grid,
.admin-content-grid {
    display: grid !important;
    grid-template-columns: 350px minmax(0, 1fr) !important;
    gap: 0 !important;
    min-height: 570px !important;
    background: #ffffff !important;
    border: 1px solid #d8e1e8 !important;
}


/* LEFT */

.admin-messages-list,
.messages-list,
.admin-message-list {
    min-width: 0 !important;
    background: #f8fafc !important;
    border-right: 1px solid #d8e1e8 !important;
}

.admin-messages-list-header,
.messages-list-header {
    padding: 16px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #d8e1e8 !important;
}


/* RIGHT */

.admin-messages-detail,
.messages-detail,
.admin-message-detail {
    min-width: 0 !important;
    background: #ffffff !important;
}


/* EMPTY */

.admin-empty-state,
.empty-state {
    padding: 55px 25px !important;
    text-align: center !important;
    color: #718090 !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

.admin-empty-state h3,
.empty-state h3 {
    margin: 10px 0 7px !important;
    color: #173f69 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

.admin-empty-state p,
.empty-state p {
    margin: 0 !important;
    color: #7a8996 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
}


/* BOOTSTRAP FORM */

.admin-content .form-control,
.admin-main .form-control,
.admin-page .form-control {
    border-radius: 2px !important;
    border-color: #cbd7e1 !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 13px !important;
}

.admin-content .btn,
.admin-main .btn,
.admin-page .btn {
    border-radius: 2px !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}


/* MOBILE */

@media (max-width: 991px) {

    .admin-stats,
    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .admin-messages-grid,
    .messages-grid,
    .admin-content-grid {
        grid-template-columns: 300px minmax(0, 1fr) !important;
    }

}


@media (max-width: 767px) {

    .admin-stats,
    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .admin-stat-card {
        min-height: 72px !important;
        padding: 12px !important;
    }

    .admin-stat-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 15px !important;
    }

    .admin-stat-card strong {
        font-size: 18px !important;
    }

    .admin-messages-grid,
    .messages-grid,
    .admin-content-grid {
        display: block !important;
        min-height: 0 !important;
    }

    .admin-messages-list,
    .messages-list,
    .admin-message-list {
        border-right: 0 !important;
        border-bottom: 1px solid #d8e1e8 !important;
    }

    .page-title {
        font-size: 25px !important;
    }

}


@media (max-width: 480px) {

    .admin-stats,
    .admin-stat-grid {
        grid-template-columns: 1fr !important;
    }

}

/* =========================================================
   STUDENT MESSAGES - COMPACT PROFESSIONAL UI
========================================================= */

.admin-main,
.admin-content,
.admin-page {
    font-family: "Segoe UI", Arial, sans-serif !important;
}


/* PAGE HEADING */

.page-title {
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 28px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
    color: #173f69 !important;
    margin-bottom: 5px !important;
}

.page-description {
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 12px !important;
    color: #748392 !important;
    margin-bottom: 18px !important;
}


/* =========================================================
   STAT CARDS
========================================================= */

.admin-stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    min-height: 76px !important;
    padding: 13px 15px !important;
    background: #fff !important;
    border: 1px solid #dce4eb !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.admin-stat-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #edf5fc !important;
    color: #0868b1 !important;
    font-size: 16px !important;
}

.admin-stat-card span {
    display: block !important;
    color: #778695 !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
}

.admin-stat-card strong {
    display: block !important;
    margin-top: 3px !important;
    color: #173f69 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
}


/* =========================================================
   MESSAGE AREA
========================================================= */

.admin-message-list,
.admin-message-detail {
    font-family: "Segoe UI", Arial, sans-serif !important;
}

.admin-message-list {
    background: #f8fafc !important;
}

.admin-message-list-header {
    padding: 14px 16px !important;
}

.admin-message-list-header h2 {
    font-size: 15px !important;
    color: #173f69 !important;
    font-weight: 800 !important;
}

.admin-message-list-header p {
    margin-top: 3px !important;
    font-size: 10px !important;
}


/* MESSAGE ITEMS */

.admin-message-item {
    padding: 12px 14px !important;
}

.admin-message-item.active {
    padding-left: 11px !important;
    border-left-width: 3px !important;
}

.admin-message-item-name {
    font-size: 12px !important;
}

.admin-message-item-date {
    font-size: 9px !important;
}

.admin-message-item-subject {
    margin-top: 4px !important;
    font-size: 11px !important;
}

.admin-message-item-preview {
    margin-top: 4px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 1 !important;
}

.admin-message-status {
    padding: 3px 7px !important;
    margin-top: 7px !important;
    font-size: 8px !important;
}


/* =========================================================
   MESSAGE DETAIL
========================================================= */

.admin-message-detail-header {
    padding: 16px 19px !important;
}

.admin-message-detail-header h2 {
    font-size: 18px !important;
}

.admin-message-detail-header p {
    margin-top: 4px !important;
    font-size: 10px !important;
}

.admin-message-contact {
    padding: 12px 19px !important;
    gap: 15px !important;
}

.admin-message-contact-item span {
    font-size: 8px !important;
}

.admin-message-contact-item strong,
.admin-message-contact-item a {
    font-size: 11px !important;
}


/* MESSAGE BODY */

.admin-message-body {
    padding: 17px 19px !important;
}

.admin-message-body h3 {
    margin-bottom: 7px !important;
    font-size: 12px !important;
}

.admin-message-text {
    min-height: 75px !important;
    padding: 12px !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}


/* PREVIOUS REPLY */

.admin-message-reply {
    margin-bottom: 14px !important;
    padding: 12px !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}


/* =========================================================
   REPLY BOX
========================================================= */

.admin-message-reply-form {
    padding-top: 16px !important;
}

.admin-message-reply-form label {
    margin-bottom: 5px !important;
    font-size: 11px !important;
}

.admin-message-reply-form textarea {
    min-height: 105px !important;
    padding: 10px 11px !important;
    font-size: 12px !important;
}

.admin-form-actions {
    margin-top: 9px !important;
}

.admin-form-actions .btn {
    min-height: 36px !important;
    padding: 0 15px !important;
    border-radius: 2px !important;
    font-size: 11px !important;
}


/* =========================================================
   EMPTY MESSAGE STATE
========================================================= */

.admin-message-empty {
    min-height: 430px !important;
    padding: 30px !important;
}

.admin-message-empty-icon {
    width: 52px !important;
    height: 52px !important;
    font-size: 21px !important;
}

.admin-message-empty h3 {
    font-size: 15px !important;
}

.admin-message-empty p {
    font-size: 11px !important;
}


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

@media (max-width: 767px) {

    .page-title {
        font-size: 24px !important;
    }

    .admin-stat-card {
        min-height: 68px !important;
        padding: 11px !important;
    }

    .admin-stat-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        font-size: 14px !important;
    }

    .admin-stat-card strong {
        font-size: 17px !important;
    }

    .admin-message-layout,
    .admin-messages-grid,
    .messages-grid,
    .admin-content-grid {
        display: block !important;
        min-height: 0 !important;
    }

    .admin-message-list {
        border-right: 0 !important;
        border-bottom: 1px solid #d8e1e8 !important;
    }

    .admin-message-detail-header {
        padding: 14px !important;
    }

    .admin-message-contact {
        grid-template-columns: 1fr !important;
    }

    .admin-message-body {
        padding: 14px !important;
    }

    .admin-form-actions .btn {
        width: 100% !important;
    }

}


@media (max-width: 480px) {

    .admin-stat-card {
        padding: 10px !important;
    }

    .admin-stat-card span {
        font-size: 9px !important;
    }

    .admin-stat-card strong {
        font-size: 16px !important;
    }

}


/* =========================================================
   RGIVTC STUDENT MESSAGES - FINAL RESPONSIVE OVERRIDE
========================================================= */

.admin-main {
    background: #f4f7fa !important;
    color: #243b53 !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
}

.admin-main * {
    box-sizing: border-box;
}

/* PAGE HEADER */

.admin-page-header {
    padding: 24px 28px 18px !important;
}

.admin-page-header .admin-page-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #0b5a94 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 1px;
}

.admin-page-header h1 {
    margin: 0 !important;
    color: #173f69 !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 28px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
}

.admin-page-header p {
    margin: 6px 0 0 !important;
    color: #718090 !important;
    font-size: 12px !important;
}


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

.admin-main .admin-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 0 28px 20px !important;
}

.admin-main .admin-stat-card {
    min-width: 0 !important;
    min-height: 82px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    background: #fff !important;
    border: 1px solid #d8e1e8 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.admin-main .admin-stat-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #edf5fc !important;
    color: #0868b1 !important;
    font-size: 17px !important;
}

.admin-main .admin-stat-card span {
    display: block !important;
    color: #718090 !important;
    font-size: 10px !important;
}

.admin-main .admin-stat-card strong {
    display: block !important;
    margin-top: 4px !important;
    color: #173f69 !important;
    font-size: 21px !important;
    font-weight: 800 !important;
}


/* =========================================================
   MAIN TWO-COLUMN INBOX
========================================================= */

.admin-main .admin-content-grid {
    display: grid !important;
    grid-template-columns: 36% 64% !important;
    gap: 16px !important;
    margin: 0 28px 28px !important;
    align-items: stretch !important;
}

.admin-main .admin-content-grid > .admin-card {
    min-width: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid #d8e1e8 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}


/* CARD HEADER */

.admin-main .admin-card-header {
    min-height: 66px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 13px 16px !important;
    background: #fff !important;
    border-bottom: 1px solid #dfe6ec !important;
}

.admin-main .admin-card-header h2 {
    margin: 2px 0 0 !important;
    color: #173f69 !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 750 !important;
}

.admin-main .admin-card-header p {
    margin: 3px 0 0 !important;
    color: #7b8996 !important;
    font-size: 10px !important;
}


/* =========================================================
   MESSAGE LIST
========================================================= */

.admin-main .admin-message-list {
    background: #f8fafc !important;
}

.admin-main .admin-message-item {
    display: block !important;
    padding: 13px 15px !important;
    background: #fff !important;
    color: inherit !important;
    text-decoration: none !important;
    border-bottom: 1px solid #e1e7ec !important;
    border-left: 3px solid transparent !important;
}

.admin-main .admin-message-item:hover {
    background: #f4f8fb !important;
}

.admin-main .admin-message-item.is-active {
    background: #edf5fc !important;
    border-left-color: #0868b1 !important;
}

.admin-main .admin-message-item-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.admin-main .admin-message-item-top strong {
    overflow: hidden !important;
    color: #244766 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.admin-main .admin-message-subject {
    margin-top: 5px !important;
    overflow: hidden !important;
    color: #304e69 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.admin-main .admin-message-preview {
    margin-top: 4px !important;
    overflow: hidden !important;
    color: #778695 !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

.admin-main .admin-message-date {
    margin-top: 6px !important;
    color: #96a2ad !important;
    font-size: 9px !important;
}

.admin-main .admin-message-status {
    display: inline-flex !important;
    padding: 4px 7px !important;
    border-radius: 2px !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
}

.admin-main .admin-message-status.new {
    background: #fff2df !important;
    color: #9a5a00 !important;
}

.admin-main .admin-message-status.read {
    background: #edf1f5 !important;
    color: #657586 !important;
}

.admin-main .admin-message-status.replied {
    background: #e8f7ee !important;
    color: #287444 !important;
}


/* =========================================================
   MESSAGE DETAILS
========================================================= */

.admin-main .admin-message-contact {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    padding: 13px 16px !important;
    background: #f7f9fb !important;
    border-bottom: 1px solid #dfe6ec !important;
}

.admin-main .admin-message-contact span {
    display: block !important;
    margin-bottom: 4px !important;
    color: #8996a1 !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
}

.admin-main .admin-message-contact strong,
.admin-main .admin-message-contact a {
    display: block !important;
    overflow: hidden !important;
    color: #294d6b !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.admin-main .admin-message-body {
    padding: 15px 16px !important;
}

.admin-main .admin-message-body h3 {
    margin: 0 0 7px !important;
    color: #294a68 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

.admin-main .admin-message-text {
    min-height: 70px !important;
    padding: 11px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #dfe6ec !important;
    color: #526879 !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
}

.admin-main .admin-message-reply {
    padding: 11px 12px !important;
    background: #edf8f1 !important;
    border: 1px solid #cbe5d3 !important;
    color: #386247 !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
}


/* =========================================================
   REPLY FORM
========================================================= */

.admin-main .admin-message-body form .form-control {
    width: 100% !important;
    min-height: 110px !important;
    padding: 10px 11px !important;
    resize: vertical !important;
    border: 1px solid #cbd7e1 !important;
    border-radius: 2px !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 11px !important;
}

.admin-main .admin-form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 9px !important;
}

.admin-main .admin-form-actions .btn {
    min-height: 35px !important;
    padding: 0 14px !important;
    border-radius: 2px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.admin-main .admin-empty-state {
    min-height: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 35px 20px !important;
    text-align: center !important;
}

.admin-main .admin-empty-state > i {
    color: #8ba2b6 !important;
    font-size: 28px !important;
}

.admin-main .admin-empty-state h3 {
    margin: 10px 0 5px !important;
    color: #294a68 !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 750 !important;
}

.admin-main .admin-empty-state p {
    max-width: 310px !important;
    margin: 0 !important;
    color: #7b8996 !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
}


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

@media (max-width: 1100px) {

    .admin-main .admin-stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .admin-main .admin-content-grid {
        grid-template-columns: 38% 62% !important;
    }

    .admin-main .admin-message-contact {
        grid-template-columns: repeat(2, 1fr) !important;
    }

}


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

@media (max-width: 767px) {

    .admin-page-header {
        padding: 18px 15px 14px !important;
    }

    .admin-page-header h1 {
        font-size: 23px !important;
    }

    .admin-main .admin-stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 9px !important;
        margin: 0 15px 15px !important;
    }

    .admin-main .admin-stat-card {
        min-height: 67px !important;
        padding: 10px !important;
    }

    .admin-main .admin-stat-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 13px !important;
    }

    .admin-main .admin-stat-card strong {
        font-size: 17px !important;
    }

    .admin-main .admin-content-grid {
        display: block !important;
        margin: 0 15px 20px !important;
    }

    .admin-main .admin-content-grid > .admin-card {
        margin-bottom: 12px !important;
    }

    .admin-main .admin-message-contact {
        grid-template-columns: 1fr 1fr !important;
    }

    .admin-main .admin-message-body {
        padding: 13px !important;
    }

}


@media (max-width: 480px) {

    .admin-main .admin-stat-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .admin-main .admin-message-contact {
        grid-template-columns: 1fr !important;
    }

}


/* =========================================================
   RGIVTC - Shared Admin Form System
   Students / Results / CMS Forms
   ========================================================= */


.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.admin-form-group {
    min-width: 0;
}

.admin-form-group-full {
    grid-column: 1 / -1;
}

.admin-form-label {
    display: block;
    margin-bottom: 7px;
    color: #26384d;
    font-size: 14px;
    font-weight: 600;
}

.admin-form-control,
.admin-form-select,
.admin-form-textarea,
.admin-form-file {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-form-textarea {
    min-height: 110px;
    resize: vertical;
}

.admin-form-file {
    padding: 7px 10px;
}

.admin-form-control:focus,
.admin-form-select:focus,
.admin-form-textarea:focus,
.admin-form-file:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.admin-form-help {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.admin-form-check {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
}

.admin-form-check input[type="checkbox"],
.admin-form-check input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: #17365d;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #17365d;
    border-radius: 3px;
    background: #17365d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.admin-btn-primary:hover {
    background: #102a4a;
    color: #ffffff;
}

.admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.admin-btn-secondary:hover {
    background: #f8fafc;
    color: #17365d;
}

.admin-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid #dc2626;
    border-radius: 3px;
    background: #ffffff;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.admin-btn-danger:hover {
    background: #fef2f2;
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.admin-data-table th {
    padding: 12px 14px;
    border-bottom: 2px solid #cbd5e1;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.admin-data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    vertical-align: middle;
}

.admin-data-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-form-section {
    margin-bottom: 22px;
}

.admin-form-section:last-child {
    margin-bottom: 0;
}

.admin-form-section-title {
    margin: 0 0 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e2e8f0;
    color: #17365d;
    font-size: 16px;
    font-weight: 700;
}

.admin-photo-preview {
    width: 82px;
    height: 82px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #f8fafc;
    object-fit: cover;
}

.admin-stat-box {
    padding: 16px;
    border: 1px solid #d9e1ea;
    border-radius: 3px;
    background: #f8fafc;
}

.admin-stat-box-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.admin-stat-box-value {
    color: #17365d;
    font-size: 22px;
    font-weight: 700;
}

.admin-subjects-table input,
.admin-subjects-table select {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #ffffff;
    font-size: 13px;
}

.admin-subjects-table input:focus,
.admin-subjects-table select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.admin-percentage-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    min-height: 56px;
    padding: 8px 18px;
    border: 1px solid #b8c7d9;
    border-radius: 3px;
    background: #f1f5f9;
    color: #17365d;
    font-size: 24px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .admin-panel-body {
        padding: 16px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .admin-form-group-full {
        grid-column: auto;
    }

    .admin-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-form-actions .btn,
    .admin-form-actions button,
    .admin-form-actions a,
    .admin-btn-primary,
    .admin-btn-secondary,
    .admin-btn-danger {
        width: 100%;
    }

    .admin-table-wrap {
        margin-left: -16px;
        width: calc(100% + 32px);
    }

    .admin-data-table {
        min-width: 720px;
    }

    .admin-percentage-box {
        width: 100%;
    }
}

/* =========================================================
   Results / Subjects Toolbar
   ========================================================= */

.admin-section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-section-toolbar .admin-form-help {
    margin-top: 0;
}

.admin-subjects-table {
    min-width: 760px;
}

.admin-subjects-table th:last-child,
.admin-subjects-table td:last-child {
    width: 90px;
    text-align: center;
}

.admin-subjects-table .admin-form-control {
    min-width: 100px;
}

@media (max-width: 767.98px) {
    .admin-section-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-section-toolbar .admin-btn-secondary {
        width: 100%;
    }

    .admin-subjects-table {
        min-width: 760px;
    }
}

/* =========================================================
   RGIVTC ADMIN â€” RESPONSIVE OPTIMIZATION
   Desktop + Tablet + Mobile
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.admin-main {
    min-width: 0;
}

.admin-content {
    min-width: 0;
    overflow-x: hidden;
}

.admin-page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
}

.admin-page-title {
    overflow-wrap: anywhere;
}

.admin-page-subtitle {
    max-width: 850px;
}

.admin-form-grid {
    min-width: 0;
}

.admin-form-control,
.admin-form-select,
.admin-form-textarea,
.form-control,
.form-select {
    max-width: 100%;
}

.admin-table-wrap,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-data-table,
.student-table {
    min-width: 760px;
}

.admin-data-table th,
.admin-data-table td,
.student-table th,
.student-table td {
    vertical-align: middle;
}

.admin-panel,
.student-card {
    min-width: 0;
    max-width: 100%;
}

.admin-panel-body {
    min-width: 0;
}

.admin-btn-primary,
.admin-btn-secondary,
.admin-btn-danger {
    white-space: nowrap;
}

/* Tablet */
@media (max-width: 1100px) {

    .admin-content {
        padding-left: 22px;
        padding-right: 22px;
    }

    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-page-title {
        font-size: 28px;
    }

}

/* Small tablet */
@media (max-width: 820px) {

    .admin-content {
        padding: 20px 16px;
    }

    .admin-page-heading {
        gap: 8px 14px;
    }

    .admin-page-title {
        font-size: 24px;
    }

    .admin-page-subtitle {
        font-size: 14px;
    }

    .admin-panel-header,
    .admin-panel-body {
        padding: 16px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-actions {
        flex-wrap: wrap;
    }

    .admin-section-toolbar {
        flex-wrap: wrap;
    }

    .admin-section-toolbar > * {
        max-width: 100%;
    }

}

/* Mobile */
@media (max-width: 576px) {

    .admin-content {
        padding: 16px 12px;
    }

    .admin-page-heading {
        display: block;
        margin-bottom: 18px;
    }

    .admin-page-title {
        font-size: 21px;
        line-height: 1.3;
        margin-bottom: 5px;
    }

    .admin-page-subtitle {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .admin-panel,
    .student-card {
        border-radius: 4px;
    }

    .admin-panel-header {
        padding: 13px 12px;
    }

    .admin-panel-body {
        padding: 13px 12px;
    }

    .admin-form-group {
        width: 100%;
        min-width: 0;
    }

    .admin-form-label {
        font-size: 13px;
    }

    .admin-form-control,
    .admin-form-select,
    .admin-form-textarea,
    .form-control,
    .form-select {
        width: 100%;
        min-height: 42px;
        font-size: 14px;
    }

    .admin-form-textarea {
        min-height: 110px;
    }

    .admin-form-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .admin-form-actions > *,
    .admin-btn-primary,
    .admin-btn-secondary,
    .admin-btn-danger {
        width: 100%;
        justify-content: center;
    }

    .admin-section-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .admin-section-toolbar > * {
        width: 100%;
    }

    .admin-panel-header .d-flex {
        width: 100%;
    }

    .admin-panel-header form {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-panel-header form .form-control,
    .admin-panel-header form .form-select {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0 !important;
    }

    .admin-panel-header form button,
    .admin-panel-header form a {
        flex: 1 1 auto;
    }

    .admin-table-wrap,
    .table-responsive {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }

    .admin-data-table,
    .student-table {
        min-width: 720px;
        font-size: 13px;
    }

    .admin-data-table th,
    .admin-data-table td,
    .student-table th,
    .student-table td {
        padding: 10px 9px;
        white-space: nowrap;
    }

    .admin-photo-preview {
        max-width: 90px;
        max-height: 90px;
    }

    .admin-stat-box {
        min-width: 0;
    }

    .admin-subjects-table {
        min-width: 680px;
        font-size: 13px;
    }

}

/* Very small phones */
@media (max-width: 380px) {

    .admin-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .admin-page-title {
        font-size: 19px;
    }

    .admin-panel-header,
    .admin-panel-body {
        padding: 11px 10px;
    }

    .admin-data-table,
    .student-table {
        min-width: 680px;
    }

}

/* Prevent long URLs/emails from breaking cards */
.admin-content a,
.admin-content td,
.admin-content p,
.admin-content label {
    overflow-wrap: anywhere;
}

/* Keep action groups usable on narrow screens */
.admin-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 576px) {
    .admin-table-actions {
        flex-direction: column;
        align-items: stretch;
    }
}


/* =========================================================
   RGIVTC STUDENT MANAGEMENT - OVERFLOW / RESPONSIVE FIX
   ========================================================= */

.student-card,
.student-card *,
.admin-content,
.admin-content *,
.admin-main {
    box-sizing: border-box;
}

.admin-main,
.admin-content {
    min-width: 0;
    max-width: 100%;
}

.admin-content {
    overflow-x: hidden;
}

/* Student form */
.student-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.student-card .admin-form-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.student-card .admin-form-group {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.student-card input,
.student-card select,
.student-card textarea,
.student-card .admin-form-control,
.student-card .admin-form-select,
.student-card .admin-form-textarea,
.student-card .admin-form-file {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.student-card textarea {
    resize: vertical;
}

/* Form actions */
.student-card .admin-form-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.student-card .admin-form-actions .admin-btn-primary,
.student-card .admin-form-actions .admin-btn-secondary,
.student-card .admin-form-actions .admin-btn-danger {
    flex: 0 0 auto;
    max-width: 100%;
}

/* Search/filter area */
.student-card .admin-panel-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.student-card .admin-panel-header > div {
    min-width: 0;
    max-width: 100%;
}

.student-card .admin-panel-header form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.student-card .admin-panel-header form input,
.student-card .admin-panel-header form select {
    min-width: 0;
    max-width: 100%;
}

/* Table: only the wrapper scrolls */
.student-card .admin-panel-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.student-card .table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.student-card .student-table {
    width: 100%;
    min-width: 850px;
    margin-bottom: 0;
    border-collapse: collapse;
}

.student-card .student-table th,
.student-card .student-table td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--admin-border, #dee2e6);
}

.student-card .student-table th {
    white-space: nowrap;
    font-weight: 700;
}

.student-card .student-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.student-card .student-table td:nth-child(1) {
    width: 70px;
    min-width: 70px;
}

.student-card .student-table td:nth-child(2) {
    min-width: 170px;
}

.student-card .student-table td:nth-child(3),
.student-card .student-table td:nth-child(4) {
    min-width: 125px;
}

.student-card .student-table td:nth-child(5) {
    min-width: 180px;
}

.student-card .student-table td:nth-child(6) {
    min-width: 110px;
}

.student-card .student-table td:nth-child(7) {
    min-width: 90px;
    white-space: nowrap;
}

.student-card .student-table td:last-child {
    min-width: 130px;
    white-space: nowrap;
}

/* Student photo */
.student-card .student-table img {
    display: block;
    width: 46px;
    height: 46px;
    max-width: 46px;
    object-fit: cover;
}

/* Actions */
.student-card .student-table td:last-child > *,
.student-card .student-table .admin-table-actions {
    max-width: 100%;
}

.student-card .admin-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Desktop form grid */
@media (min-width: 992px) {

    .student-card .admin-form-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .student-card .admin-form-group.full-width,
    .student-card .admin-form-group.admin-form-full,
    .student-card .admin-form-grid > .full-width {
        grid-column: 1 / -1;
    }
}

/* Tablet */
@media (min-width: 577px) and (max-width: 991px) {

    .student-card .admin-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .student-card .admin-form-group.full-width,
    .student-card .admin-form-group.admin-form-full,
    .student-card .admin-form-grid > .full-width {
        grid-column: 1 / -1;
    }

}

/* Mobile */
@media (max-width: 576px) {

    .admin-content {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .student-card {
        width: 100%;
        max-width: 100%;
    }

    .student-card .admin-form-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .student-card .admin-form-group {
        grid-column: 1 / -1;
    }

    .student-card .admin-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .student-card .admin-form-actions > * {
        width: 100%;
        max-width: 100%;
    }

    .student-card .admin-panel-header {
        padding: 12px;
    }

    .student-card .admin-panel-header > div {
        width: 100%;
    }

    .student-card .admin-panel-header form {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .student-card .admin-panel-header form input,
    .student-card .admin-panel-header form select,
    .student-card .admin-panel-header form button,
    .student-card .admin-panel-header form a {
        width: 100%;
        min-width: 0 !important;
    }

    .student-card .student-table {
        min-width: 850px;
    }

    .student-card .student-table th,
    .student-card .student-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

}

/* Small phones */
@media (max-width: 380px) {

    .admin-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .student-card .admin-panel-header,
    .student-card .admin-panel-body {
        padding-left: 10px;
        padding-right: 10px;
    }

}

/* =========================================================
   RESPONSIVE POLISH PATCH
   Admin panel, controls, tables and mobile sidebar
========================================================= */
.admin-main,
.admin-content,
.admin-content-grid,
.admin-card,
.admin-panel,
.admin-panel-body {
    min-width: 0;
    max-width: 100%;
}

.admin-main img,
.admin-content img,
.admin-card img {
    max-width: 100%;
    height: auto;
}

.admin-content input,
.admin-content select,
.admin-content textarea,
.admin-content .form-control,
.admin-content .form-select,
.admin-main input,
.admin-main select,
.admin-main textarea,
.admin-main .form-control,
.admin-main .form-select {
    max-width: 100%;
    min-width: 0;
}

.admin-content button,
.admin-content .btn,
.admin-main button,
.admin-main .btn,
.admin-sidebar-menu a,
.admin-mobile-menu {
    -webkit-tap-highlight-color: transparent;
}

.admin-content button,
.admin-content .btn,
.admin-main button,
.admin-main .btn,
.admin-sidebar-menu a {
    touch-action: manipulation;
}

.admin-content button:focus-visible,
.admin-content .btn:focus-visible,
.admin-main button:focus-visible,
.admin-main .btn:focus-visible,
.admin-sidebar-menu a:focus-visible,
.admin-mobile-menu:focus-visible {
    outline: 3px solid #f0b429;
    outline-offset: 2px;
}

.admin-table-wrap,
.admin-content .table-responsive,
.admin-content table {
    max-width: 100%;
}

.admin-table-wrap,
.admin-content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-content table {
    width: 100%;
}

.admin-content td,
.admin-content th {
    overflow-wrap: anywhere;
}

.admin-content .admin-form-actions,
.admin-content .admin-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 991.98px) {
    body.admin-sidebar-enabled {
        margin-left: 0 !important;
    }

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

    .admin-content {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-sidebar {
        max-width: min(86vw, 300px);
        z-index: 1050;
    }

    .admin-sidebar-overlay {
        z-index: 1040;
    }

    .admin-mobile-header {
        position: sticky;
        top: 0;
        z-index: 1030;
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .admin-content {
        padding: 14px 10px;
    }

    .admin-content .admin-panel,
    .admin-content .admin-card,
    .admin-main .admin-card {
        min-width: 0;
        border-radius: 10px;
    }

    .admin-content .form-control,
    .admin-content .form-select,
    .admin-content input,
    .admin-content select,
    .admin-content textarea,
    .admin-main .form-control,
    .admin-main .form-select {
        width: 100%;
        font-size: 16px;
    }

    .admin-content button,
    .admin-content .btn,
    .admin-main button,
    .admin-main .btn {
        min-height: 42px;
        max-width: 100%;
        white-space: normal;
    }

    .admin-content .admin-form-actions > *,
    .admin-content .admin-table-actions > * {
        max-width: 100%;
    }

    .admin-content table {
        font-size: 13px;
    }

    .admin-content th,
    .admin-content td {
        padding: 8px;
    }
}
