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

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent: #06b6d4;
    --accent-hover: #0891b2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #334155;
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-sans: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Light Theme overrides for public pages if desired, but a sleek dark-themed institute website looks premium! Let's build a unified slate dark/glass dashboard and a matching dark public site, which stands out and looks extremely state-of-the-art. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* --- Layout Structure --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header / Navigation --- */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

nav a:hover, nav a.active {
    color: var(--text-primary);
}

.btn-nav-login {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--primary);
    color: var(--text-primary) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
}

.btn-nav-login:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

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

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

/* --- Stats Grid --- */
.stats-bar {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.stat-item {
    border-right: 1px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Section Formatting --- */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Course Card Grid --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: auto;
}

.card-code {
    font-family: monospace;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.card-duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- About Page Details --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.about-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 3px;
}

/* --- Login Form Page --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Forms styling --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: #4b5563;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* --- Alert Messages --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: #f87171;
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid var(--accent);
    color: #22d3ee;
}

/* --- Admin Panel Layout --- */
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    margin-bottom: 3rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: #fff;
}

.sidebar-link.active {
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.admin-main {
    padding: 2.5rem;
    background: #090d16;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.admin-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.admin-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Admin Dashboard Cards --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
}

.dash-card-info h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.dash-card-info p {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.2rem;
}

/* --- Data Table Container --- */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.table-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.table-search {
    width: 300px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Pagination --- */
.pagination-container {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pagination-links {
    display: flex;
    gap: 0.5rem;
}

/* Pagination formatting for Laravel default */
.pagination {
    display: flex;
    list-style: none;
    gap: 5px;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
}

.page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Category Filter Chips on public page --- */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.filter-chip {
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.filter-chip:hover, .filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--primary-glow);
}

/* --- Footer --- */
footer.public-footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

/* --- Admin Profile Widget --- */
.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.admin-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

/* Responsive adjustments */
@media(max-width: 991px) {
    .hero-grid, .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .hero-btns {
        justify-content: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* In production a toggle menu would go here */
    }
    .stats-bar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .stat-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1.5rem;
    }
    .stat-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}
