* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f0f4fe;
    min-height: 100vh;
}
.search-hero {
    position: relative;
    background: linear-gradient(135deg, #0a2a66 0%, #1a4a8a 50%, #2d6bcb 100%);
    padding: 40px 0 80px;
    overflow: hidden;
}
.search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.03) 0%, transparent 40%);
    animation: drift 20s ease-in-out infinite;
}
@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}
.search-hero .container {
    position: relative;
    z-index: 1;
}
.search-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.search-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 520px;
}
.search-hero .hero-icon {
    font-size: 7rem;
    opacity: 0.12;
    position: absolute;
    right: 10%;
    bottom: -20px;
}
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 6px 18px 6px 14px;
    font-size: 0.85rem;
    color: #fff;
}
.stat-chip i { font-size: 1rem; }

.search-card-elevated {
    margin-top: -60px;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(10,42,102,0.15), 0 4px 20px rgba(0,0,0,0.05);
    padding: 40px 36px 36px;
    border: 1px solid rgba(255,255,255,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.search-card-elevated:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 70px rgba(10,42,102,0.18);
}
.search-card-elevated .form-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #0a2a66;
}
.search-card-elevated .form-control {
    border-radius: 14px;
    padding: 14px 18px 14px 46px;
    font-size: 1rem;
    border: 2px solid #eef1f5;
    background: #f8f9fc;
    transition: all 0.25s ease;
}
.search-card-elevated .form-control:focus {
    border-color: #0a2a66;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(10,42,102,0.1);
}
.search-card-elevated .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.25s ease;
}
.search-card-elevated .form-control:focus ~ .input-icon {
    color: #0a2a66;
}
.search-card-elevated .input-wrapper {
    position: relative;
}
.searching-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    border-radius: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.searching-overlay.active { display: flex; }
.search-card-elevated { position: relative; }

.btn-gradient {
    background: linear-gradient(135deg, #0a2a66 0%, #1a4a8a 100%);
    border: none;
    border-radius: 14px;
    padding: 14px 32px;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    transition: all 0.3s ease;
    width: 100%;
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10,42,102,0.3);
    color: #fff;
}

.results-card {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    animation: fadeUp 0.5s ease;
    margin-top: 32px;
    margin-bottom: 48px;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.results-card .card-header {
    background: linear-gradient(135deg, #0a2a66, #1a4a8a);
    padding: 18px 28px;
}
.results-card .card-header h5 {
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.results-card .card-header .badge {
    font-size: 0.8rem;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
}
.student-detail-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}
.student-detail-table td {
    padding: 12px 16px;
    font-size: 0.92rem;
    vertical-align: middle;
    border: none;
}
.student-detail-table td:first-child {
    width: 50%;
    background-color: #f0f4fe;
    color: #0a2a66;
    font-weight: 600;
    white-space: nowrap;
}
.student-detail-table td:last-child {
    background-color: #fff;
    color: #212529;
    border-left: 2px solid #0a2a66;
}
.student-detail-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}
.student-detail-table tbody tr:last-child {
    border-bottom: none;
}
.student-detail-table tbody tr:hover td:first-child {
    background-color: #e4ebf9;
}
.student-detail-table tbody tr:hover td:last-child {
    background-color: #f8f9ff;
}
.index-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #eef2f9;
    color: #0a2a66;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
}
.no-results-icon {
    font-size: 4rem;
    color: #d0d7e3;
}
/* Toast notifications */
.toast-container-custom {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}
.toast-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    border-left: 4px solid #0a2a66;
    pointer-events: auto;
    animation: toastIn 0.35s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a2e;
}
.toast-custom.toast-error {
    border-left-color: #e74c3c;
}
.toast-custom.toast-success {
    border-left-color: #2ecc71;
}
.toast-custom .toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.toast-custom.toast-error .toast-icon {
    color: #e74c3c;
}
.toast-custom.toast-success .toast-icon {
    color: #2ecc71;
}
.toast-custom .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #adb5bd;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
}
.toast-custom .toast-close:hover {
    color: #495057;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 767.98px) {
    .search-hero { padding: 30px 0 65px; }
    .search-hero h1 { font-size: 1.8rem; }
    .search-card-elevated { padding: 28px 20px; margin-top: -50px; }
    .search-card-elevated .form-control { padding-left: 40px; }

    .student-detail-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    .student-detail-table td:first-child {
        width: 42%;
        white-space: normal;
        font-size: 0.82rem;
    }
}
