/* ===== Akademi - Base ===== */
:root {
    --ak-primary: #0081c5;
    --ak-primary-dark: #006b99;
    --ak-accent: #f5a623;
    --ak-bg: #f4f6fb;
    --ak-card: #ffffff;
    --ak-text: #1a1a2e;
    --ak-muted: #6c7a8d;
    --ak-border: #e3e8f0;
    --ak-radius: 12px;
    --ak-shadow: 0 4px 20px rgba(0,0,0,0.07);
    --ak-font: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--ak-font); background: var(--ak-bg); color: var(--ak-text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.ak-header {
    background: #fff;
    border-bottom: 1px solid var(--ak-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.ak-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.ak-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ak-logo img { height: 38px; }
.ak-logo-badge {
    background: var(--ak-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ak-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ak-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ak-text);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.ak-nav a:hover { background: var(--ak-bg); color: var(--ak-primary); }
.ak-nav a.ak-nav-logout { color: #e74c3c; }
.ak-nav a.ak-nav-logout:hover { background: #fdf2f2; }
.ak-btn-primary {
    background: var(--ak-primary) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}
.ak-btn-primary:hover { background: var(--ak-primary-dark) !important; }
.ak-btn-outline {
    border: 1.5px solid var(--ak-primary) !important;
    color: var(--ak-primary) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}
.ak-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ak-text);
}
@media (max-width: 768px) {
    .ak-mobile-toggle { display: block; }
    .ak-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--ak-border);
        gap: 4px;
    }
    .ak-nav.open { display: flex; }
    .ak-nav a { width: 100%; }
}

/* ===== Main / Container ===== */
.ak-main { min-height: calc(100vh - 68px - 60px); }
.ak-container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.ak-section { padding: 60px 0; }

/* ===== Hero ===== */
.ak-hero {
    background: linear-gradient(135deg, #0081c5 0%, #005f99 60%, #003f6b 100%);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
}
.ak-hero h1 { font-size: 2.6rem; font-weight: 700; margin-bottom: 14px; }
.ak-hero p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 30px; max-width: 560px; margin-left: auto; margin-right: auto; }
.ak-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ak-hero-btn {
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ak-hero-btn-white { background: #fff; color: var(--ak-primary); }
.ak-hero-btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.ak-hero-btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }
.ak-hero-btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ===== Stats Bar ===== */
.ak-stats-bar {
    background: #fff;
    border-bottom: 1px solid var(--ak-border);
    padding: 20px 24px;
}
.ak-stats-bar .ak-container { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.ak-stat { text-align: center; }
.ak-stat strong { display: block; font-size: 1.5rem; font-weight: 700; color: var(--ak-primary); }
.ak-stat span { font-size: 0.85rem; color: var(--ak-muted); font-weight: 500; }

/* ===== Section Header ===== */
.ak-section-header { text-align: center; margin-bottom: 40px; }
.ak-section-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.ak-section-header p { color: var(--ak-muted); font-size: 1rem; }

/* ===== Category Cards ===== */
.ak-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.ak-cat-card {
    background: var(--ak-card);
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 28px 16px;
    text-align: center;
    transition: all 0.25s;
    cursor: pointer;
    display: block;
}
.ak-cat-card:hover { transform: translateY(-4px); box-shadow: var(--ak-shadow); border-color: var(--ak-primary); }
.ak-cat-card i { font-size: 2rem; color: var(--ak-primary); margin-bottom: 10px; display: block; }
.ak-cat-card span { font-weight: 600; font-size: 0.9rem; }

/* ===== Course Cards ===== */
.ak-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.ak-course-card {
    background: var(--ak-card);
    border-radius: var(--ak-radius);
    box-shadow: var(--ak-shadow);
    overflow: hidden;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ak-border);
}
.ak-course-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.ak-course-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: linear-gradient(135deg, #0081c5, #003f6b);
}
.ak-course-cover-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #0081c5, #003f6b);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ak-course-cover-placeholder i { font-size: 3rem; color: rgba(255,255,255,0.4); }
.ak-course-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.ak-course-cat-tag {
    display: inline-block;
    background: #e8f4fc;
    color: var(--ak-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.ak-course-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.ak-course-body p { font-size: 0.85rem; color: var(--ak-muted); flex: 1; margin-bottom: 14px; }
.ak-course-meta { display: flex; gap: 14px; font-size: 0.8rem; color: var(--ak-muted); align-items: center; }
.ak-course-meta i { color: var(--ak-primary); }
.ak-course-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--ak-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ak-progress-bar {
    height: 5px;
    background: #e3e8f0;
    border-radius: 10px;
    flex: 1;
    margin-right: 12px;
    overflow: hidden;
}
.ak-progress-fill { height: 100%; background: var(--ak-primary); border-radius: 10px; transition: width 0.4s; }
.ak-progress-text { font-size: 0.75rem; font-weight: 600; color: var(--ak-primary); white-space: nowrap; }

/* ===== Auth Pages ===== */
.ak-auth-wrap {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: var(--ak-bg);
}
.ak-auth-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.ak-auth-logo { text-align: center; margin-bottom: 24px; }
.ak-auth-logo img { height: 40px; margin: 0 auto 8px; }
.ak-auth-logo .ak-logo-badge { display: inline-block; }
.ak-auth-box h2 { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.ak-auth-box .ak-auth-sub { text-align: center; color: var(--ak-muted); font-size: 0.9rem; margin-bottom: 28px; }
.ak-form-group { margin-bottom: 18px; }
.ak-form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #444; }
.ak-form-group input,
.ak-form-group select,
.ak-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--ak-border);
    border-radius: 8px;
    font-family: var(--ak-font);
    font-size: 0.9rem;
    transition: border-color 0.2s;
    outline: none;
    background: #fff;
}
.ak-form-group input:focus,
.ak-form-group select:focus,
.ak-form-group textarea:focus { border-color: var(--ak-primary); }
.ak-btn-full {
    width: 100%;
    padding: 13px;
    background: var(--ak-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--ak-font);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ak-btn-full:hover { background: var(--ak-primary-dark); transform: translateY(-1px); }
.ak-auth-link { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--ak-muted); }
.ak-auth-link a { color: var(--ak-primary); font-weight: 600; }
.ak-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ak-alert-error { background: #fdf2f2; color: #c0392b; border: 1px solid #f5c6cb; }
.ak-alert-success { background: #f0faf5; color: #1e7e34; border: 1px solid #c3e6cb; }
.ak-alert-info { background: #e8f4fc; color: #0062a3; border: 1px solid #bee5eb; }

/* ===== Course Detail ===== */
.ak-course-hero {
    background: linear-gradient(to right, #0a0f1e, #1a2a4a);
    color: #fff;
    padding: 50px 24px;
}
.ak-course-hero-inner { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: center; }
.ak-course-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.ak-course-hero p { opacity: 0.85; margin-bottom: 20px; }
.ak-course-hero-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; }
.ak-course-hero-meta span { display: flex; align-items: center; gap: 6px; opacity: 0.85; }
.ak-course-hero-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    aspect-ratio: 16/9;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ak-course-hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
    .ak-course-hero-inner { grid-template-columns: 1fr; }
    .ak-course-hero-img { display: none; }
}

/* ===== Curriculum ===== */
.ak-curriculum { background: #fff; border: 1px solid var(--ak-border); border-radius: var(--ak-radius); overflow: hidden; }
.ak-chapter { border-bottom: 1px solid var(--ak-border); }
.ak-chapter:last-child { border-bottom: none; }
.ak-chapter-header {
    padding: 16px 20px;
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.ak-chapter-header i { color: var(--ak-primary); }
.ak-lesson-list { list-style: none; }
.ak-lesson-item {
    padding: 12px 20px 12px 44px;
    border-top: 1px solid var(--ak-border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.ak-lesson-item:hover { background: #f0f7fd; }
.ak-lesson-item a { color: var(--ak-text); flex: 1; }
.ak-lesson-item a:hover { color: var(--ak-primary); }
.ak-lesson-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
.ak-lesson-icon.video { background: #e8f4fc; color: var(--ak-primary); }
.ak-lesson-icon.document { background: #fff3e0; color: #e67e22; }
.ak-lesson-icon.text { background: #f0faf5; color: #27ae60; }
.ak-lesson-icon.completed { background: #27ae60; color: #fff; }
.ak-lesson-duration { font-size: 0.78rem; color: var(--ak-muted); margin-left: auto; }

/* ===== Lesson Player ===== */
.ak-player-layout { display: grid; grid-template-columns: 1fr 340px; gap: 0; min-height: calc(100vh - 68px); }
.ak-player-main { background: #0a0f1e; }
.ak-video-wrap { width: 100%; aspect-ratio: 16/9; background: #000; position: relative; }
.ak-video-wrap iframe,
.ak-video-wrap video { width: 100%; height: 100%; border: none; }
.ak-player-info { padding: 24px; background: #fff; border-top: 1px solid var(--ak-border); }
.ak-player-info h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.ak-player-sidebar {
    background: #fff;
    border-left: 1px solid var(--ak-border);
    overflow-y: auto;
    max-height: calc(100vh - 68px);
}
.ak-player-sidebar-title {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--ak-border);
    background: #f8fafc;
    position: sticky;
    top: 0;
}
.ak-sidebar-lesson {
    padding: 12px 16px;
    border-bottom: 1px solid var(--ak-border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--ak-text);
}
.ak-sidebar-lesson:hover { background: #f0f7fd; }
.ak-sidebar-lesson.active { background: #e8f4fc; border-left: 3px solid var(--ak-primary); }
.ak-sidebar-lesson.done .ak-sl-icon { background: #27ae60; color: #fff; }
.ak-sl-icon { width: 26px; height: 26px; border-radius: 50%; background: #e3e8f0; color: var(--ak-muted); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
@media (max-width: 900px) {
    .ak-player-layout { grid-template-columns: 1fr; }
    .ak-player-sidebar { max-height: 400px; border-left: none; border-top: 1px solid var(--ak-border); }
}

/* ===== PDF Viewer ===== */
.ak-pdf-wrap { background: #fff; padding: 24px; }
.ak-pdf-wrap embed { width: 100%; height: 70vh; border-radius: 8px; border: 1px solid var(--ak-border); }

/* ===== Profile ===== */
.ak-profile-header {
    background: linear-gradient(135deg, #0081c5, #003f6b);
    color: #fff;
    padding: 40px 24px;
    text-align: center;
}
.ak-profile-avatar {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 auto 14px;
    border: 3px solid rgba(255,255,255,0.4);
}
.ak-profile-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.ak-profile-header span { opacity: 0.8; font-size: 0.95rem; }

/* ===== Enrolled Course Card ===== */
.ak-enrolled-card {
    background: #fff;
    border-radius: var(--ak-radius);
    border: 1px solid var(--ak-border);
    padding: 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: all 0.2s;
}
.ak-enrolled-card:hover { box-shadow: var(--ak-shadow); transform: translateY(-2px); }
.ak-enrolled-thumb {
    width: 80px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, #0081c5, #003f6b);
    flex-shrink: 0;
}
.ak-enrolled-info { flex: 1; }
.ak-enrolled-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }

/* ===== Complete Button ===== */
.ak-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--ak-font);
    transition: all 0.2s;
    margin-top: 12px;
}
.ak-complete-btn:hover { background: #219150; }
.ak-complete-btn.done { background: #aaa; cursor: default; }

/* ===== Footer ===== */
.ak-footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 20px 24px;
}
.ak-footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
}

/* ===== Utilities ===== */
.ak-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.ak-badge-blue { background: #e8f4fc; color: var(--ak-primary); }
.ak-badge-green { background: #f0faf5; color: #27ae60; }
.ak-badge-orange { background: #fff3e0; color: #e67e22; }
.ak-empty { text-align: center; padding: 60px 20px; color: var(--ak-muted); }
.ak-empty i { font-size: 3rem; margin-bottom: 14px; display: block; opacity: 0.3; }
