:root {
    --bs-primary: #5d60ef;
    --bs-primary-hover: #e56747;
}

body.auth-page {
    min-height: 100vh;
    background-image: url('/assets/images/login-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.primary-color {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--bs-primary-hover);
    border-color: var(--bs-primary-hover);
}

.text-primary {
    color: var(--bs-primary) !important;
}
.text-primary:hover {
    color: var(--bs-primary-hover) !important;
    text-decoration: underline;
}

/* Cover card */
.cover-card {
    min-height: 200px;
    border-radius: 1.25rem;

    background-image: url('/assets/images/cover-image.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Ensure content fills height */
.cover-content {
    min-height: 100%;
}

/* Logo */
.cover-logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}

/* Rating */
.rating {
    font-size: 0.875rem;
    color: #f59e0b;
}

/* Responsive tweaks */
@media (min-width: 768px) {
    .cover-logo {
        width: 120px;
        height: 120px;
    }

    .cover-card {
        min-height: 200px;
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .cover-card {
        min-height: 160px;
    }
}

/* Table Card */
.ui-table {
    background: #ffffff;
    border-radius: 16px;
    padding: 1rem;
}

/* Header (buttons + search) */
.ui-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Button Group */
.ui-btn-group .btn {
    border-radius: 10px;
    padding: 0.45rem 0.95rem;
    font-weight: 500;
}

.ui-btn-group .btn.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.ui-btn-group .btn:not(.active) {
    background: #f4f6ff;
    border-color: transparent;
    color: var(--bs-primary);
}

.ui-btn-group .btn:not(.active):hover {
    background: rgba(93, 96, 239, 0.12);
}

/* Search */
.ui-search {
    position: relative;
    width: 100%;
}

.ui-search i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #9ca3af;
}

.ui-search input {
    padding-left: 34px;
    border-radius: 10px;
    font-size: 0.875rem;
    height: 40px;
    background-color: #f8f9fa;
}

/* Table */
.ui-table table {
    border-collapse: separate; 
    border-spacing: 0;
    border-radius: 0.3rem;  
    overflow: hidden; 
}

.ui-table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8f9fb;
    white-space: nowrap;
    padding: 0.75rem;
}

.ui-table tbody td {
    font-size: 0.875rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.ui-table tbody tr:last-child td {
    border-bottom: none;
}

/* Hover */
.ui-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Alignment helpers */
.ui-td-center {
    text-align: center;
}

.ui-td-right {
    text-align: right;
}

/* Checkbox */
.ui-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--bs-primary);
}

/* Empty state */
.ui-table-empty {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

.col-check {
    width: 10px;
    min-width: 10px;
}

/*card*/
.users-page {
    background-color: #f9fafb;
}

/* CARD */
.info-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    height: 220px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.25s ease;
}

.info-card:hover {
    transform: translateY(-4px);
}

/* IMAGE */
.info-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

/* CONTENT */
.info-card .card-body {
    position: relative;
    z-index: 2;
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 1.25rem;
}

/* TEXT */
.info-title {
    font-weight: 600;
}

.info-sub {
    font-size: 0.875rem;
    color: #6b7280;
}

/* HOVER */
.info-card:hover .info-title {
    color: #4b4cc0;
}

/* BACKGROUND FALLBACKS */
.bg-teachers,
.bg-students {
    background-size: cover;
    background-position: center;
}

/* 📱 MOBILE */
@media (max-width: 576px) {
    .info-card {
        height: 180px;
    }

    .info-title {
        font-size: 1rem;
    }

    .info-sub {
        font-size: 0.8rem;
    }
}

/* 💻 LARGE SCREENS */
@media (min-width: 992px) {
    .info-card {
        height: 260px;
    }
}

.user-status-border {
    border: 1px solid;
    padding: 2px; 
    box-sizing: border-box;
}

.user-status-border.approved {
    border-color: #28a745;
}

.user-status-border.for-approval {
    border-color: #ff4500;
}

/* Card 3 dots settings */
.card-settings {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.card-settings .btn {
    padding: 4px;
}

.card-settings .btn:focus {
    box-shadow: none;
}

.image-upload {
    cursor: pointer;
}

.upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease-in-out;
    font-size: 14px;
}

.image-upload:hover .upload-overlay {
    opacity: 1;
}

.btn-lg {
    min-height: 48px;
}

/*section subjects*/
.subject-ribbon {
    position: absolute;
    top: 7px;
    left: 8px;
    padding: 6px 18px 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    z-index: 2;
    line-height: 1.2;
}

.section-subject-card img.card-img-top {
    width: 100%;          /* full width */
    height: 200px;        /* fixed height */
    object-fit: cover;    /* crop if needed */
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

/*modal*/
.bg-soft {
    background: #f5f6fa;
}

.modal-content {
    border-radius: 20px;
}

.modal-header .close {
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 1.5rem;
    opacity: 1;
}

.modal-header .close:hover {
    opacity: 0.75;
}

/*auto-complete*/
.ui-autocomplete {
    z-index: 2000 !important;
}
.subject-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin: auto;
}

/*timer*/
.exam-timer {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.timer-title {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
    letter-spacing: .5px;
}

.timer-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.timer-box {
    flex: 1;
    background: #f8f9fc;
    border-radius: 10px;
    text-align: center;
    padding: 12px 6px;
    border: 1px solid #e6e8f2;
}

.timer-box h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #5d60ef;
}

.timer-box span {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .timer-box h2 {
        font-size: 18px;
    }

    .timer-box span {
        font-size: 9px;
    }
}

.timer-danger h2 {
    color: #dc3545 !important;
}

/*attendance*/
.attendance-date-btn {
    border: none; /* removed border */
    background: #f8faff;
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 110px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.1s ease;
}

.attendance-date-btn .date {
    font-weight: 600;
    font-size: 13px;
    color: var(--bs-primary);
}

.attendance-date-btn .time {
    font-size: 12px;
    color: #6c757d;
}

.attendance-date-btn:hover {
    background: var(--bs-primary);
    transform: translateY(-1px); /* subtle lift */
}

.attendance-date-btn:hover .date,
.attendance-date-btn:hover .time {
    color: #ffffff;
}