:root {
    --main: #4f46e5;
    --main-dark: #3730a3;
    --accent: #06b6d4;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #64748b;
}   

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.10), transparent 34%), radial-gradient(circle at top right, rgba(6, 182, 212, 0.10), transparent 32%), linear-gradient(135deg, #f8fafc, #eef2ff);
}

.app-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-main {
    flex: 1;
    padding-top: 35px;
}

.app-footer {
    margin-top: auto;
    padding: 24px 0;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
}

.footer {
    position: static !important;
    width: 100%;
    line-height: normal !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.navbar {
    min-height: 68px;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(79, 70, 229, 0.10) !important;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.navbar-brand,
.campus-brand {
    font-weight: 900 !important;
    color: var(--main) !important;
    letter-spacing: -0.3px;
}

.nav-link {
    color: #334155 !important;
    font-weight: 700;
    border-radius: 14px;
    padding: 8px 14px !important;
    transition: 0.25s ease;
}

    .nav-link:hover {
        color: var(--main) !important;
        background: #eef2ff;
        transform: translateY(-1px);
    }

.container {
    animation: fadeUp 0.55s ease;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 900;
    letter-spacing: -0.4px;
}

.card {
    border: none;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
    animation: fadeUp 0.55s ease;
}

.card-body {
    padding: 28px;
}

.btn {
    border-radius: 14px;
    font-weight: 800;
    transition: 0.25s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--main), var(--accent));
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: none;
}

.btn-secondary {
    border: none;
    background: #64748b;
}

.btn-light {
    background: rgba(255, 255, 255, 0.85);
    border: none;
}

.table {
    border-radius: 18px;
    overflow: hidden;
}

    .table thead,
    .table-dark {
        background: #111827 !important;
        color: white !important;
    }

    .table tbody tr {
        transition: 0.2s ease;
    }

        .table tbody tr:hover {
            background: #eef2ff;
            transform: scale(1.005);
        }

.badge {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid #dbeafe;
    padding: 10px 14px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--main);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
    }

.alert {
    border: none;
    border-radius: 18px;
}

/* ===== HOME PAGE ===== */

.main-hero {
    min-height: calc(100vh - 220px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 45px;
    align-items: center;
    padding-top: 35px;
    padding-bottom: 55px;
}

.main-hero-content {
    animation: fadeUp 0.8s ease;
}

.hero-badge {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--main);
    font-weight: 900;
    margin-bottom: 22px;
}

.main-hero h1 {
    font-size: 58px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -1.4px;
}

    .main-hero h1 span {
        display: block;
        background: linear-gradient(135deg, var(--main), var(--accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.main-hero p {
    max-width: 650px;
    margin-top: 22px;
    font-size: 20px;
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.main-hero-panel {
    position: relative;
    min-height: 500px;
    animation: fadeUp 1s ease;
}

/* (ПРАВЫЙ БЛОК НА ГЛАВНОЙ) */

.dashboard-preview {
    position: absolute;
    top: 45px;
    left: 35px;
    right: 0;
    min-height: 500px;
    padding: 15px 38px;
    border-radius: 34px;
    background: #ffffff;
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.18);
    display: block;
    overflow: visible;
}

.preview-header {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}

    .preview-header span {
        width: 13px;
        height: 13px;
        border-radius: 50%;
        background: #cbd5e1;
    }

.dashboard-preview h4 {
    margin-bottom: 20px;
}

/* график */

.fake-chart {
    height: 180px;
    display: flex;
    align-items: end;
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, #eef2ff, #ecfeff);
}

    .fake-chart div {
        flex: 1;
        border-radius: 14px 14px 0 0;
        background: linear-gradient(180deg, #4f46e5, #06b6d4);
        animation: chartGrow 1.2s ease;
    }

/* список снизу */

.preview-list {
    margin-top: 25px;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .preview-list p {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding: 14px 16px;
        border-radius: 16px;
        background: #f8fafc;
        color: #1f2937;
    }

        .preview-list p b {
            flex: 1;
            min-width: 0;
        }

    .preview-list span {
        white-space: nowrap;
        font-weight: 900;
        color: #4f46e5;
    }

/* плавающие карточки */

.floating-card {
    position: absolute;
    z-index: 5;
    padding: 18px 24px;
    border-radius: 22px;
    background: white;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    animation: float 3s ease-in-out infinite;
}

    .floating-card span {
        display: block;
        color: #64748b;
        font-weight: 800;
    }

    .floating-card b {
        font-size: 32px;
        color: #4f46e5;
    }

.card-one {
    top: 20px;
    right: 10px;
}

.card-two {
    bottom: 35px;
    left: -25px;
    animation-delay: 0.5s;
}
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 80px 0 70px;
}

.feature-card {
    padding: 32px;
    border-radius: 30px;
    background: white;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

    .feature-card:hover {
        transform: translateY(-8px);
    }

.feature-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.6;
}

/* ===== AUTH PAGES ===== */

.auth-page {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px 0;
}

.auth-card {
    width: 100%;
    max-width: 1050px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    border-radius: 34px;
    overflow: hidden;
    background: white;
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.16);
    animation: fadeUp 0.7s ease;
}

.register-card {
    max-width: 1180px;
}

.auth-left {
    padding: 55px;
    color: white;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 35%), linear-gradient(135deg, var(--main), var(--accent));
}

.auth-logo {
    display: inline-block;
    padding: 15px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
    margin-bottom: 35px;
}

.auth-left h1 {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.auth-left p {
    font-size: 18px;
    opacity: 0.95;
    line-height: 1.7;
    margin-bottom: 30px;
}

.auth-feature {
    padding: 13px 0;
    font-weight: 800;
    font-size: 17px;
}

.auth-right {
    padding: 55px;
}

    .auth-right h2 {
        font-size: 34px;
        font-weight: 900;
    }

.auth-subtitle {
    color: var(--muted);
    margin-bottom: 30px;
}

.auth-btn {
    padding: 13px 18px;
    font-size: 17px;
}

.auth-link {
    margin-top: 22px;
    text-align: center;
    font-weight: 700;
}

    .auth-link a {
        color: var(--main);
        text-decoration: none;
    }

        .auth-link a:hover {
            text-decoration: underline;
        }

/* ===== STUDENT PAGE ===== */

.hero {
    margin-top: 10px;
    padding: 55px;
    border-radius: 34px;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.25), transparent 30%), linear-gradient(135deg, var(--main), var(--accent));
    color: white;
    box-shadow: 0 25px 60px rgba(79, 70, 229, 0.28);
    animation: fadeUp 0.7s ease;
}

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 18px;
        opacity: 0.95;
    }

.stat-card {
    padding: 25px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

    .stat-card:hover {
        transform: translateY(-5px);
    }

.stat-value {
    font-size: 34px;
    font-weight: 900;
    color: var(--main);
}

.stat-label {
    color: var(--muted);
    font-weight: 700;
}

.rating-place {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--main);
    font-weight: 900;
}

    .rating-place.top-1 {
        background: linear-gradient(135deg, #facc15, #f97316);
        color: white;
    }

    .rating-place.top-2 {
        background: linear-gradient(135deg, #cbd5e1, #64748b);
        color: white;
    }

    .rating-place.top-3 {
        background: linear-gradient(135deg, #fb923c, #b45309);
        color: white;
    }

.current-user-row {
    background: #ecfeff !important;
    font-weight: 800;
}

.chart-box {
    height: 360px;
}

/* ===== ADMIN / TEACHER ===== */

.admin-page {
    animation: fadeUp 0.6s ease-in-out;
}

.admin-header {
    margin-bottom: 25px;
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

    .admin-header h2 {
        margin-bottom: 8px;
        font-weight: 900;
    }

    .admin-header p {
        margin: 0;
        color: var(--muted);
    }

.admin-page form {
    margin-bottom: 6px;
}

.admin-page select {
    border-radius: 10px;
}

/* ===== ANIMATIONS ===== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

@keyframes chartGrow {
    from {
        height: 0;
    }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 992px) {
    .main-hero {
        grid-template-columns: 1fr;
    }

        .main-hero h1 {
            font-size: 42px;
        }

    .main-hero-panel {
        min-height: 430px;
    }

    .features-section {
        grid-template-columns: 1fr;
    }

    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-left,
    .auth-right {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .app-main {
        padding-top: 20px;
    }

    .main-hero h1 {
        font-size: 34px;
    }

    .main-hero p {
        font-size: 17px;
    }

    .dashboard-preview {
        inset: 40px 0 0 0;
    }

    .hero {
        padding: 30px;
    }

        .hero h1 {
            font-size: 30px;
        }

    .card-body {
        padding: 18px;
        overflow-x: auto;
    }

    .table {
        min-width: 850px;
    }

    .auth-page {
        padding: 20px 0;
    }
}
/* ===== ГОРИЗОНТАЛЬНЫЙ ЖУРНАЛ ===== */

.subject-row {
    padding: 18px 20px;
    border-radius: 22px;
    background: #f8fafc;
}

.subject-title {
    font-weight: 800;
    margin-bottom: 12px;
}

/* контейнер оценок */
.grades-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

/* сами оценки */
.grade-chip {
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    transition: 0.2s;
}

    /* ховер */
    .grade-chip:hover {
        transform: translateY(-3px) scale(1.05);
    }

    /* цвета по оценкам */
    .grade-chip:has(:not(*)) {
    }
    /* чтобы не ругался */

    .grade-chip[data-value="5"] {
        background: #22c55e;
    }

    .grade-chip[data-value="4"] {
        background: #3b82f6;
    }

    .grade-chip[data-value="3"] {
        background: #f59e0b;
    }

    .grade-chip[data-value="2"] {
        background: #ef4444;
    }

.campus-alert {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 18px;
    font-weight: 800;
    box-shadow: 0 18px 45px rgba(34, 197, 94, 0.16);
    animation: fadeUp 0.55s ease;
}