/* =====================
   GLOBAL RESET & BASE
===================== */

.progress-bar-fill {
    width: var(--progress-width);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f4f6f9;
    color: #1f2933;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #2563eb;
}

a:hover {
    text-decoration: underline;
}

/* =====================
   LAYOUT
===================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

/* =====================
   TOP BAR
===================== */
.topbar {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 0;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

nav a {
    color: #e5e7eb;
    margin-left: 20px;
    font-weight: 500;
}

nav a:hover {
    color: #ffffff;
}

/* =====================
   HEADINGS
===================== */
h2 {
    font-size: 26px;
    margin-bottom: 16px;
}

h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* =====================
   FLASH MESSAGES
===================== */
.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 500;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.warning {
    background: #fef3c7;
    color: #92400e;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

/* =====================
   FORMS (LOGIN / SIGNUP)
===================== */
.form-card {
    max-width: 420px;
    margin: 40px auto;
    background: #ffffff;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.form-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-card input {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    margin-bottom: 16px;
    font-size: 15px;
}

.form-card button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.form-card button:hover {
    background: #1e40af;
}

.form-footer {
    text-align: center;
    margin-top: 12px;
}

/* =====================
   DASHBOARD
===================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.week-section {
    margin-top: 14px;
}

.week-section ul {
    list-style: none;
    margin-top: 8px;
}

.lesson-item {
    margin-bottom: 8px;
    font-size: 15px;
}

.lesson-item.locked {
    color: #9ca3af;
}

.completed {
    color: #16a34a;
    font-weight: 600;
    margin-left: 6px;
}

/* =====================
   ADMIN PANEL
===================== */
.admin-panel {
    background: #ffffff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.admin-panel ul {
    list-style: none;
}

.admin-panel li {
    margin-bottom: 10px;
}

/* =====================
   VIDEO PAGE
===================== */
.video-wrapper {
    margin: 20px 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* =====================
   LINKS SECTION
===================== */
.links {
    margin-top: 30px;
    text-align: center;
}

.links a {
    margin: 0 10px;
    font-weight: 600;
}

/* =====================
   PROGRESS BAR
===================== */
.progress-wrapper {
    margin: 12px 0 18px;
}

.progress-label {
    font-size: 14px;
    margin-bottom: 6px;
    color: #475569;
}

.progress-bar-bg {
    background: #e5e7eb;
    border-radius: 8px;
    height: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}
/* =====================
   OVERALL COURSE PROGRESS
===================== */
.course-progress {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}

.course-progress h3 {
    margin-bottom: 10px;
}

.course-progress .progress-bar-bg {
    height: 12px;
}
/* =====================
   CERTIFICATE
===================== */
.certificate-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 18px;
    background: #16a34a;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
}

.certificate-btn:hover {
    background: #15803d;
}
/* ===== Admin Tables ===== */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* vertical spacing between rows */
    margin-top: 1rem;
}

.admin-table thead th {
    text-align: left;
    font-weight: 600;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table tbody tr {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.admin-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

.admin-table tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.admin-table tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ===== Buttons ===== */
.btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* ===== Status Badge ===== */
.status-badge {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 999px;
    font-weight: 500;
}

.status-badge.success {
    background: #dcfce7;
    color: #166534;
}

/* ===== Page Structure ===== */
.page-title {
    margin-bottom: 1.5rem;
}

.section-title {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.section-divider {
    margin: 3rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.muted {
    color: #6b7280;
}

.back-link {
    margin-top: 2rem;
}
.admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.admin-filters input,
.admin-filters select {
    padding: 8px;
}
/* ===== Dashboard Layout ===== */
.dashboard-header {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

.progress-ring {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    margin-top: 0.5rem;
}

/* ===== Progress Section ===== */
.progress-section {
    margin-bottom: 2.5rem;
}

/* ===== Certificate Cards ===== */
.certificate-panel {
    margin-bottom: 3rem;
}

.certificate-card {
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.certificate-card.success {
    background: #ecfdf5;
    border-left: 6px solid #16a34a;
}

.certificate-card.warning {
    background: #fff7ed;
    border-left: 6px solid #f97316;
}

.certificate-card.info {
    background: #eff6ff;
    border-left: 6px solid #2563eb;
}

.certificate-card.muted {
    background: #f9fafb;
    border-left: 6px solid #9ca3af;
}

/* ===== Buttons ===== */
.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
}

/* ===== Curriculum ===== */
.module-card {
    margin-bottom: 2rem;
}

.week-card {
    margin-top: 0.75rem;
    padding-left: 1rem;
    border-left: 3px solid #e5e7eb;
}

.lesson-list {
    margin-top: 0.5rem;
}

/* ===== Support Links ===== */
.support-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ===== Hero ===== */
.hero {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.2;
}

.hero .highlight {
    color: #38bdf8;
}

.hero .subtitle {
    max-width: 700px;
    margin: 1.5rem auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.secondary-link {
    color: #38bdf8;
    text-decoration: underline;
}

.hero-note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.stat h3 {
    font-size: 1.8rem;
    color: #2563eb;
}

/* ===== Sections ===== */
.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ===== CTA ===== */
.cta-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}
