/* =====================================================
   Internship India - Custom Styles
   =====================================================  */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* =====================================================
   CSS Variables
   ===================================================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-hero: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   Reset & Base
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #334155;
    overflow-x: hidden;
    background: #f8fafc;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =====================================================
   Glassmorphism Card
   ===================================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* =====================================================
   Animated Background
   ===================================================== */
.animated-bg {
    position: relative;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5%, 5%) rotate(5deg); }
    50% { transform: translate(-3%, 8%) rotate(-3deg); }
    75% { transform: translate(7%, -5%) rotate(7deg); }
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero-section {
    background: var(--gradient-hero);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* =====================================================
   Navigation
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn-primary {
    background: var(--gradient-2);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary-light {
    background: transparent;
    color: #475569;
    border: 2px solid #cbd5e1;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary-light:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

/* =====================================================
   Feature Cards
   ===================================================== */
.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* =====================================================
   Course Cards
   ===================================================== */
.course-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.course-card:hover img {
    transform: scale(1.08);
}

/* =====================================================
   Form Styling
   ===================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: white;
    color: #1e293b;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: white;
    color: #1e293b;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* =====================================================
   Photo Upload
   ===================================================== */
.photo-upload {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    margin: 0 auto 1.5rem;
}

.photo-upload:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.photo-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload .upload-placeholder {
    text-align: center;
    color: #9ca3af;
}

.photo-upload .upload-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* =====================================================
   Admin Sidebar
   ===================================================== */
.admin-sidebar {
    width: 230px;
    min-height: 100vh;
    background: #0b0f19;
    color: #f1f5f9;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar .sidebar-brand img,
.admin-sidebar .sidebar-brand .w-10 {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.admin-sidebar .sidebar-brand h2 {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.admin-sidebar .sidebar-brand span {
    font-size: 10px !important;
    color: #64748b !important;
}

.sidebar-nav {
    padding: 0.75rem 0.5rem;
}

.sidebar-nav .nav-section {
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #475569;
    margin-top: 1rem;
    font-weight: 700;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    border-radius: 10px;
    margin: 4px 0;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

/* =====================================================
   Admin Main Content
   ===================================================== */
.admin-main {
    margin-left: 230px;
    min-height: 100vh;
    background: #f1f5f9;
}

.admin-topbar {
    background: white;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-content {
    padding: 1.5rem;
}

/* =====================================================
   Stat Cards
   ===================================================== */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    opacity: 0.04;
    border-radius: 50%;
    transform: translateX(30%);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.08), 0 8px 8px -6px rgba(99, 102, 241, 0.03);
    border-color: rgba(99, 102, 241, 0.15);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: white;
    margin-bottom: 0;
    flex-shrink: 0;
    transition: all 0.3s;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08) rotate(3deg);
}

.stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-info h3 {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.stat-card .stat-info p {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 0;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* =====================================================
   Data Table
   ===================================================== */
.data-table-wrapper {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

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

/* =====================================================
   Status Badge
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-completed {
    background: #dbeafe;
    color: #1e40af;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* =====================================================
   Modal
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

.modal-lg {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: #1e293b;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
    color: #64748b;
}

.modal-close:hover {
    background: #fee2e2;
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem 1.5rem 0.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8fafc;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* =====================================================
   Login Page
   ===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 1.5rem;
}

.login-card .login-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* =====================================================
   Certificate
   ===================================================== */
.certificate-wrapper {
    width: 900px;
    min-height: 636px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
    background: white;
    border: 3px solid #d4af37;
    box-shadow: var(--shadow-lg);
}

.certificate-wrapper::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid #d4af37;
    pointer-events: none;
}

.certificate-header {
    text-align: center;
    margin-bottom: 2rem;
}

.certificate-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a365d;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.certificate-subtitle {
    font-size: 1rem;
    color: #4a5568;
    margin-top: 0.5rem;
}

.certificate-body {
    text-align: center;
    padding: 1rem 3rem;
}

.certificate-name {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    border-bottom: 2px solid #d4af37;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin: 1rem 0;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 3rem;
    padding: 0 2rem;
}

/* =====================================================
   Animations
   ===================================================== */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* =====================================================
   Pulse animation for stats
   ===================================================== */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* =====================================================
   Loading Spinner
   ===================================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 20px;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.4s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.toast-info { background: linear-gradient(135deg, #6366f1, #4f46e5); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =====================================================
   Search Bar
   ===================================================== */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
    background: #ffffff;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* =====================================================
   Scrollbar
   ===================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .data-table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal {
        margin: 1rem;
    }
    
    .certificate-wrapper {
        width: 100%;
        padding: 20px;
    }
}

/* =====================================================
   Print Certificate
   ===================================================== */
@media print {
    body * {
        visibility: hidden;
    }
    
    .certificate-wrapper, .certificate-wrapper * {
        visibility: visible;
    }
    
    .certificate-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
}

/* =====================================================
   Photo Preview in Table
   ===================================================== */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.avatar-md {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

.avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
}

/* =====================================================
   Empty State
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* =====================================================
   Credential Display Box
   ===================================================== */
.credential-box {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid #86efac;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem 0;
}

.credential-box .credential-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.credential-box .credential-label {
    font-weight: 600;
    color: #166534;
    min-width: 100px;
}

.credential-box .credential-value {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #14532d;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 12px;
    border-radius: 6px;
}

/* =====================================================
   Filter Bar
   ===================================================== */
.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select {
    padding: 8px 36px 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 18px;
    transition: var(--transition);
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary);
}

/* =====================================================
   Action Buttons in Table
   ===================================================== */
.action-btns {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.85rem;
}

.action-btn-view {
    background: #dbeafe;
    color: #2563eb;
}

.action-btn-view:hover {
    background: #2563eb;
    color: white;
}

.action-btn-edit {
    background: #fef3c7;
    color: #d97706;
}

.action-btn-edit:hover {
    background: #d97706;
    color: white;
}

.action-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn-delete:hover {
    background: #dc2626;
    color: white;
}

.action-btn-cert {
    background: #d1fae5;
    color: #059669;
}

.action-btn-cert:hover {
    background: #059669;
    color: white;
}

/* =====================================================
   Responsive Padding & Spacing Enhancements
   ===================================================== */
.hero-section {
    padding-top: 100px;
    padding-bottom: 50px;
}

/* Admin header area title styles */
.admin-content h2 {
    margin-bottom: 0;
}

/* Ensure text-truncation for long table cell content */
.data-table tbody td {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table tbody td:last-child,
.data-table tbody td:has(.action-btns) {
    max-width: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

/* Utility: no-underline for anchor tags inside admin pages */
.admin-main a {
    text-decoration: none;
}

/* Better spacing for grid stat cards */
.stat-card + .stat-card {
    /* gaps handled by tailwind grid gap */
}

/* Data table filter bar header improvements */
.data-table-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* Improved scrollbar for data tables */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* Credential box improvements */
.credential-box {
    margin-top: 1.5rem;
}

/* Modal form group last child remove bottom margin */
.modal-body .form-group:last-child {
    margin-bottom: 0.5rem;
}

/* Reveal animation initial state */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 90px;
        padding-bottom: 40px;
    }
    
    .admin-content {
        padding: 1rem !important;
    }
    
    .admin-topbar {
        padding: 0.75rem 1rem !important;
    }
    
    .stat-card {
        padding: 1.25rem !important;
    }
    
    .data-table thead th,
    .data-table tbody td {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }
    
    .avatar-sm {
        width: 32px !important;
        height: 32px !important;
    }
    
    .action-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.75rem !important;
    }
    
    .filter-bar {
        gap: 0.5rem !important;
        width: 100%;
    }
    
    .filter-bar form {
        width: 100%;
    }
    
    .search-box {
        max-width: 100% !important;
        width: 100% !important;
    }

    .modal {
        max-width: calc(100vw - 2rem);
    }

    .modal-body {
        padding: 1rem 1rem 0.5rem;
    }

    .btn-primary,
    .btn-secondary-light {
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .admin-content {
        padding: 0.75rem !important;
    }

    .data-table-header {
        padding: 1rem !important;
    }

    .stat-card .stat-value {
        font-size: 1.5rem !important;
    }

    .stat-card .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }
}

/* =====================================================
   Text Visibility & Contrast Fixes
   Ensures text is always readable against backgrounds
   ===================================================== */

/* --- Hero Section Text --- */
.hero-section h1 {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    color: rgba(255, 255, 255, 0.85);
}

.hero-section .text-white\/80,
.hero-section .text-white\/70,
.hero-section .text-white\/60,
.hero-section .text-white\/50 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-section .text-white {
    color: #ffffff !important;
}

/* --- Navbar Text --- */
.navbar a {
    color: #ffffff;
}

.navbar .text-white\/80 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar .text-white\/80:hover {
    color: #ffffff !important;
}

/* --- CTA Section Text --- */
section[style*="linear-gradient(135deg, #6366f1, #0ea5e9)"] h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
}

section[style*="linear-gradient(135deg, #6366f1, #0ea5e9)"] p {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

section[style*="linear-gradient(135deg, #6366f1, #0ea5e9)"] .text-white\/80 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* CTA buttons */
section[style*="linear-gradient(135deg, #6366f1, #0ea5e9)"] a.bg-white {
    background-color: #ffffff !important;
    color: #4f46e5 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

section[style*="linear-gradient(135deg, #6366f1, #0ea5e9)"] a.border-2 {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* --- Stats Section Text --- */
section[style*="linear-gradient(135deg, #0f172a, #1e293b)"] h2 {
    color: #ffffff !important;
}

section[style*="linear-gradient(135deg, #0f172a, #1e293b)"] p,
section[style*="linear-gradient(135deg, #0f172a, #1e293b)"] .text-gray-400 {
    color: #94a3b8 !important;
}

section[style*="linear-gradient(135deg, #0f172a, #1e293b)"] .text-white {
    color: #ffffff !important;
}

/* --- Footer Text --- */
footer[style*="background: #0f172a"] {
    color: #cbd5e1;
}

footer[style*="background: #0f172a"] .text-white,
footer[style*="background: #0f172a"] h4 {
    color: #ffffff !important;
}

footer[style*="background: #0f172a"] .text-gray-400 {
    color: #94a3b8 !important;
}

footer[style*="background: #0f172a"] .text-gray-400:hover {
    color: #ffffff !important;
}

footer[style*="background: #0f172a"] .text-gray-500 {
    color: #64748b !important;
}

footer[style*="background: #0f172a"] a {
    color: #94a3b8;
    transition: color 0.3s ease;
}

footer[style*="background: #0f172a"] a:hover {
    color: #ffffff;
}

footer[style*="background: #0f172a"] li {
    color: #94a3b8;
}

/* --- Glass card text on dark background --- */
.glass .text-white,
.glass-dark .text-white {
    color: #ffffff !important;
}

.glass .text-white\/60,
.glass .text-white\/80,
.glass-dark .text-white\/60,
.glass-dark .text-white\/80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* --- Registration badge text --- */
.hero-section .inline-flex {
    color: rgba(255, 255, 255, 0.9);
}
