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

body {
    font-family: 'Inter', sans-serif;
    background: #dee2e6;
    color: #212529;
}

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER FULL-WIDTH */
.main-header.full-width {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #ced4da;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 20px;
        flex-direction: column;
    }
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #0d47a1;
    text-decoration: none;
}

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

.main-nav a {
    text-decoration: none;
    color: #0d47a1;
    font-weight: 500;
    transition: 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: #007bff;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.user-greeting {
    font-size: 14px;
    font-weight: 500;
    color: #0d47a1;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 32px 48px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
}

/* HERO SECTION (на главной) */
.hero-section {
    background: linear-gradient(135deg, #ffffff, #dee2e6);
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 40px;
}
.hero-content h1 {
    font-size: 48px;
    color: #0d47a1;
}
.hero-subtitle {
    font-size: 18px;
    margin: 16px 0 24px;
}
.btn-large {
    padding: 14px 36px;
    font-size: 18px;
}

/* SLIDER */
.slider-container {
    position: relative;
    margin: 32px 0;
    border-radius: 24px;
    overflow: hidden;
}
.slider {
    display: flex;
    transition: transform 0.5s;
}
.slider img {
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,123,255,0.8);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 60px;
    font-size: 24px;
    cursor: pointer;
}
.prev { left: 16px; }
.next { right: 16px; }

/* FEATURES */
.features-section {
    margin: 48px 0;
    text-align: center;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 32px;
}
.feature-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid #ced4da;
}
.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* COURSES GRID */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 24px;
}
.course-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #ced4da;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.course-card h3 {
    color: #0d47a1;
    margin-bottom: 12px;
    font-size: 18px;
}
.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
    font-size: 14px;
}
.course-type, .course-duration, .course-price {
    background: #f1f3f5;
    padding: 4px 12px;
    border-radius: 30px;
    color: #0d47a1;
}
.course-actions {
    margin-top: auto;
    padding-top: 16px;
}

/* FORMS */
.form-card {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 32px;
    padding: 32px;
    border: 1px solid #ced4da;
}
.full-width {
    width: 100%;
}
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0 16px;
    border: 1px solid #ced4da;
    border-radius: 16px;
    font-size: 16px;
}
input:focus, select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
}
label {
    font-weight: 500;
    color: #0d47a1;
}
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 40px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary {
    background: #007bff;
    color: white;
}
.btn-primary:hover {
    background: #0d47a1;
}
.btn-secondary {
    background: #ced4da;
    color: #0d47a1;
}
.btn-secondary:hover {
    background: #b0b8c0;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* CARDS (заявки) */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.application-card {
    background: white;
    border-radius: 24px;
    border-left: 6px solid #007bff;
    overflow: hidden;
}
.card-header {
    padding: 16px 20px 8px;
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
}
.card-body {
    padding: 16px 20px;
}
.card-footer {
    padding: 12px 20px 20px;
}
.status-badge {
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 12px;
}
.status-new { background: #fff3cd; color: #856404; }
.status-learning { background: #cfe2ff; color: #004085; }
.status-done { background: #d4edda; color: #155724; }

/* ADMIN */
.admin-row {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #ced4da;
}
.row-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.row-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 8px;
    font-size: 14px;
}
.row-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

/* FOOTER */
.main-footer {
    background: #ffffff;
    border-top: 1px solid #ced4da;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #6c757d;
    margin-top: auto;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #007bff;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    z-index: 2000;
    animation: fadein 0.3s;
}
@keyframes fadein {
    from { opacity: 0; bottom: 0; }
    to { opacity: 1; bottom: 24px; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    .courses-grid, .applications-grid {
        grid-template-columns: 1fr;
    }
}