
/* --- INTEGRATED CSS (Based on original colors) --- */
:root {
    --csc-blue: #0077b6;
    --csc-gold: #f5a623;
    --csc-blue-light: #48cae4;
    --csc-blue-dark: #023e8a;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --border-color: #cbd5e0;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    position: relative;
    background: var(--bg-light);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Original Background Implementation */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 77, 112, 0.92), rgba(0, 119, 182, 0.92), rgba(72, 202, 228, 0.88));
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url('../../../assets/img/cscbglogin.jpg') no-repeat center center / cover;
    z-index: -2;
}

/* Layout Architecture */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- Header --- */
.header-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 1.25rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    animation: fadeInDown 0.5s ease;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-text h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.header-text p { font-size: 0.85rem; margin: 0; opacity: 0.9; }

.btn-header-back {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.3s;
}
.btn-header-back:hover {
    background: var(--white);
    color: var(--csc-blue);
}

/* --- Sticky Sidebar (Search) --- */
.search-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    position: sticky;
    top: 2rem;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.search-card h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-card h5 i { color: var(--csc-blue); }

/* FIX: Better Input Groups */
.custom-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.custom-input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--csc-blue);
    z-index: 10;
    font-size: 1.1rem;
}

.custom-input-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.8rem; /* Left padding ensures text doesn't touch icon */
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: #f8fafc;
}

.custom-input-group input:focus {
    outline: none;
    border-color: var(--csc-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.btn-verify {
    width: 100%;
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--csc-blue), var(--csc-blue-light));
    border: none;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-qr {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 2px solid var(--csc-blue);
    color: var(--csc-blue);
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-qr:hover {
    background: var(--csc-blue);
    color: var(--white);
}

/* --- Right Column: Results --- */
.result-container {
    animation: fadeInUp 0.5s ease 0.2s both;
}

.certificate-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.certificate-header {
    background: linear-gradient(135deg, var(--csc-blue-dark), var(--csc-blue));
    color: var(--white);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.certificate-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--csc-gold), #ffd700, var(--csc-gold));
}

.verified-badge {
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(5px);
    color: #d1fae5;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.certificate-body { padding: 2.5rem; }

.participant-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.participant-details {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--csc-blue);
}

.info-item .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- How To Card (Default State) --- */
.how-to-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.how-to-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--csc-blue), var(--csc-blue-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

/* --- Error Card --- */
.error-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--error);
    animation: fadeInDown 0.4s ease;
}

.error-icon i { font-size: 2.5rem; color: var(--error); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Print Media */
@media print {
    body::before, body::after, .header-section, .search-card, .btn, .qr-section { display: none !important; }
    .verification-container, .dashboard-container { padding: 0; max-width: 100%; margin: 0; }
    .col-lg-4 { display: none; }
    .col-lg-8 { width: 100%; flex: 0 0 100%; }
    .certificate-card { box-shadow: none; border: 1px solid #ddd; }
    body { background: white; }
}

@media (max-width: 991px) {
    .header-section { flex-direction: column; gap: 1rem; text-align: center; }
    .search-card { position: static; margin-bottom: 2rem; }
    .how-to-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
}