* { 
    box-sizing: border-box; 
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: #f4f7fb;
    color: #222;
    line-height: 1.7;
}

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

.topbar {
    background: linear-gradient(135deg, #1769e0, #1db7a6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

.brand { 
    font-weight: 800; 
    font-size: 24px; 
    letter-spacing: .5px; 
}

.brand a {
    color: #fff;
}

.nav { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
}

.nav a {
    padding: 8px 11px;
    border-radius: 10px;
    background: rgba(255,255,255,.14);
    transition: background .2s ease, transform .2s ease;
}

.nav a:hover { 
    background: rgba(255,255,255,.25); 
    transform: translateY(-1px);
}

.nav a.active {
    background: #fff;
    color: #1769e0;
    font-weight: 800;
}

.container { 
    max-width: 1100px; 
    margin: 28px auto; 
    padding: 0 16px; 
}

.footer { 
    text-align: center; 
    color: #667; 
    padding: 24px 12px; 
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
    margin-bottom: 18px;
}

.hero {
    background: #fff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    text-align: center;
}

.hero h1 { 
    margin: 0 0 12px; 
    font-size: 32px; 
    color: #1769e0; 
}

.hero p { 
    color: #566; 
    font-size: 18px; 
    margin: 0 auto 20px; 
    max-width: 760px; 
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); 
    gap: 16px; 
}

.btn, button {
    display: inline-block;
    border: 0;
    cursor: pointer;
    background: #1769e0;
    color: #fff;
    border-radius: 12px;
    padding: 11px 16px;
    font-weight: 700;
    font-size: 15px;
}

.btn:hover, button:hover { 
    filter: brightness(.95); 
}

.btn.secondary { 
    background: #1db7a6; 
}

.btn.gray { 
    background: #64748b; 
}

.btn.danger { 
    background: #dc2626; 
}

.btn.block { 
    display: block; 
    text-align: center; 
    width: 100%; 
}

.form { 
    max-width: 520px; 
    margin: 0 auto; 
}

.form-group { 
    margin-bottom: 14px; 
}

label { 
    display: block; 
    font-weight: 700; 
    margin-bottom: 6px; 
}

input, select, textarea {
    width: 100%;
    border: 1px solid #d5dce8;
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    background: #fff;
}

textarea { 
    min-height: 120px; 
    resize: vertical; 
    direction: ltr; 
    text-align: left; 
}

.alert { 
    padding: 12px 14px; 
    border-radius: 12px; 
    margin-bottom: 14px; 
}

.alert.error { 
    background: #ffe7e7; 
    color: #8a1111; 
}

.alert.success { 
    background: #e7fff3; 
    color: #0b6b3a; 
}

.table-wrap { 
    overflow-x: auto; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    border-radius: 16px; 
    overflow: hidden; 
}

th, td { 
    padding: 12px; 
    border-bottom: 1px solid #eef2f7; 
    text-align: right; 
    vertical-align: top; 
}

th { 
    background: #f8fafc; 
    color: #344; 
}

.actions { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.badge { 
    display: inline-block; 
    padding: 4px 9px; 
    border-radius: 999px; 
    font-size: 13px; 
    font-weight: 700; 
}

.badge.success { 
    background: #dcfce7; 
    color: #166534; 
}

.badge.muted { 
    background: #e5e7eb; 
    color: #374151; 
}

.program-card h3 { 
    margin-top: 0; 
    color: #1769e0; 
}

.lesson-button {
    background: #fff;
    border: 1px solid #dce6f3;
    border-radius: 16px;
    padding: 16px;
    display: block;
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}

.lesson-button:hover { 
    border-color: #1769e0; 
    transform: translateY(-1px); 
}

.video-box { 
    position: relative; 
    padding-top: 56.25%; 
    border-radius: 18px; 
    overflow: hidden; 
    background: #000; 
}

.video-box iframe { 
    position: absolute; 
    top: 0; 
    right: 0; 
    width: 100%; 
    height: 100%; 
    border: 0; 
}

.small { 
    color: #667; 
    font-size: 14px; 
}

.stats { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 14px; 
}

.stat { 
    background: #fff; 
    border-radius: 16px; 
    padding: 18px; 
    box-shadow: 0 5px 18px rgba(0,0,0,.06); 
}

.stat strong { 
    display: block; 
    font-size: 28px; 
    color: #1769e0; 
}

@media (max-width: 700px) {
    .topbar { 
        align-items: flex-start; 
        flex-direction: column; 
    }

    .hero { 
        padding: 24px 16px; 
    }

    .hero h1 { 
        font-size: 25px; 
    }
}