* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #111827;
}

a {
    text-decoration: none;
}

.header {
    background: #ffffff;
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 5px 25px rgba(0,0,0,0.06);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.nav a {
    margin-left: 18px;
    color: #111827;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background: #111827;
    color: #fff !important;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.btn-light {
    background: #eef2ff;
    color: #111827 !important;
}

.container {
    max-width: 1180px;
    margin: 40px auto;
    padding: 0 20px;
}

.card,
.premium-white-card {
    background: #ffffff;
    padding: 28px;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.login-box {
    max-width: 420px;
    margin: 70px auto;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px;
    margin: 8px 0 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

label {
    font-weight: 700;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.hero {
    padding: 70px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 44px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    color: #6b7280;
}

.footer {
    margin-top: 80px;
    padding: 25px;
    text-align: center;
    background: #111827;
    color: #fff;
}

/* HOME COURSE GRID */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.course-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.09);
    transition: 0.3s;
}

.course-card:hover {
    transform: translateY(-6px);
}

.course-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}

.course-body {
    padding: 24px;
}

.course-body h3 {
    font-size: 22px;
    margin: 0 0 8px;
    color: #0f172a;
}

.course-body h4 {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 16px;
}

.course-body p {
    color: #64748b;
    line-height: 1.6;
    min-height: 50px;
}

.price {
    font-size: 26px;
    font-weight: 900;
    color: #111827;
    margin: 18px 0;
}

.course-body .btn {
    margin-right: 8px;
    margin-top: 8px;
}

/* ADMIN LAYOUT */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.sidebar {
    width: 260px;
    background: #0f172a;
    padding: 28px 20px;
    color: white;
}

.sidebar .brand {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 35px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 700;
}

.sidebar a:hover,
.sidebar a.active {
    background: #ffffff;
    color: #0f172a;
}

.main-content {
    flex: 1;
    padding: 35px;
}

.topbar {
    background: white;
    padding: 26px 30px;
    border-radius: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    margin-bottom: 28px;
}

.topbar h1 {
    margin: 0;
    font-size: 34px;
}

.topbar p {
    margin: 8px 0 0;
    color: #64748b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.stat-card span {
    color: #64748b;
    font-weight: 800;
}

.stat-card h2 {
    font-size: 44px;
    margin: 15px 0 8px;
}

.stat-card p {
    color: #64748b;
    margin: 0;
}

.premium-card {
    margin-top: 28px;
    background: #111827;
    color: white;
    padding: 34px;
    border-radius: 26px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
}

.premium-card p {
    color: #cbd5e1;
}

.quick-actions {
    display: flex;
    gap: 14px;
    margin-top: 22px;
}

.quick-actions a {
    background: white;
    color: #111827;
    padding: 13px 18px;
    border-radius: 12px;
    font-weight: 800;
}

/* ADMIN TABLE */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-head h2 {
    margin: 0;
    font-size: 28px;
}

.section-head p {
    margin: 6px 0 0;
    color: #64748b;
}

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

.premium-table th {
    text-align: left;
    padding: 15px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}

.premium-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table-img {
    width: 80px;
    height: 55px;
    object-fit: cover;
    border-radius: 12px;
}

.badge {
    padding: 7px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
}

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

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

/* FORMS */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* COURSE DETAIL SIMPLE */

.course-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.simple-course-detail {
    background: #fff;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,.08);
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
    align-items: center;
}

.simple-course-image img {
    width: 100%;
    border-radius: 25px;
}

.simple-course-content h1 {
    font-size: 42px;
    margin: 0 0 10px;
}

.simple-course-content h3 {
    color: #666;
    margin-bottom: 20px;
}

.short-desc {
    line-height: 1.8;
    color: #555;
}

.full-desc {
    margin-top: 20px;
    line-height: 1.9;
    color: #444;
}

.course-info-row {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.course-info-row span {
    background: #f5f5f5;
    padding: 12px 18px;
    border-radius: 15px;
    font-weight: 600;
}

.course-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.buy-btn {
    background: #111827;
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: bold;
}

.cart-btn {
    background: #f3f4f6;
    color: #111827;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: bold;
}

/* RESPONSIVE */

@media(max-width: 1000px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .quick-actions {
        flex-direction: column;
    }

    .simple-course-detail {
        grid-template-columns: 1fr;
    }

    .simple-course-content h1 {
        font-size: 30px;
    }

    .course-buttons {
        flex-direction: column;
    }
}

@media(max-width: 800px) {
    .header {
        padding: 15px;
        flex-direction: column;
        gap: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 700px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

