* {
    box-sizing: border-box;
}


:root {

    --primary: #6750A4;

    --primary-dark: #4F378B;

    --background: #F7F7FB;

    --card: #FFFFFF;

    --text: #1D1B20;

    --muted: #6F6B76;

    --border: #E5E1EA;

    --success: #16803C;

    --danger: #C62828;

}


body {

    margin: 0;

    font-family:

        Inter,
        Arial,
        sans-serif;

    background: var(--background);

    color: var(--text);

}


.hidden {

    display: none !important;

}


button {

    font-family: inherit;

    cursor: pointer;

    border: none;

}


input,
textarea,
select {

    width: 100%;

    padding: 13px 15px;

    border: 1px solid var(--border);

    border-radius: 10px;

    font-size: 15px;

    outline: none;

    background: white;

}


input:focus,
textarea:focus,
select:focus {

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(103, 80, 164, 0.12);

}


textarea {

    resize: vertical;

}


.primary-button {

    background: var(--primary);

    color: white;

    padding: 12px 20px;

    border-radius: 10px;

    font-weight: 600;

}


.primary-button:hover {

    background: var(--primary-dark);

}


.secondary-button {

    background: white;

    color: var(--primary);

    border: 1px solid var(--primary);

    padding: 11px 18px;

    border-radius: 10px;

    font-weight: 600;

}


.danger-button {

    background: #FDECEC;

    color: var(--danger);

    padding: 10px 14px;

    border-radius: 8px;

    font-weight: 600;

}


/* LOGIN */

.login-section {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

}


.login-card {

    width: 100%;

    max-width: 420px;

    padding: 40px;

    background: white;

    border-radius: 22px;

    box-shadow:
        0 15px 50px
        rgba(0, 0, 0, 0.08);

    text-align: center;

}


.logo-circle {

    width: 75px;

    height: 75px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: auto;

    border-radius: 50%;

    background: #EEE8FF;

    font-size: 35px;

}


.login-card h1 {

    margin-bottom: 5px;

}


.subtitle {

    color: var(--muted);

    margin-top: 0;

}


#loginForm {

    display: flex;

    flex-direction: column;

    gap: 14px;

    margin-top: 25px;

}


.error-message {

    color: var(--danger);

    min-height: 20px;

}


/* ADMIN LAYOUT */

.admin-section {

    min-height: 100vh;

    display: flex;

}


.sidebar {

    width: 260px;

    min-height: 100vh;

    background: #211A2E;

    color: white;

    padding: 22px 15px;

    display: flex;

    flex-direction: column;

}


.sidebar-logo {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px;

    margin-bottom: 35px;

}


.sidebar-logo span {

    font-size: 30px;

}


.sidebar-logo strong {

    display: block;

    font-size: 19px;

}


.sidebar-logo small {

    color: #C7C0D1;

}


nav {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.nav-button {

    width: 100%;

    text-align: left;

    background: transparent;

    color: #DDD6E5;

    padding: 14px;

    border-radius: 10px;

    font-size: 15px;

}


.nav-button:hover,
.nav-button.active {

    background: #6750A4;

    color: white;

}


.logout-button {

    margin-top: auto;

    padding: 13px;

    border-radius: 10px;

    background: #3A3049;

    color: white;

}


/* MAIN */

.main-content {

    flex: 1;

    min-width: 0;

}


.top-bar {

    min-height: 80px;

    background: white;

    border-bottom: 1px solid var(--border);

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 18px 30px;

}


.top-bar h2 {

    margin: 0;

}


.top-bar p {

    margin: 4px 0 0;

    color: var(--muted);

    font-size: 13px;

}


.admin-avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    background: #EEE8FF;

    display: flex;

    align-items: center;

    justify-content: center;

}


.page {

    padding: 30px;

}


/* STATS */

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 25px;

}


.stat-card {

    background: white;

    padding: 22px;

    border-radius: 16px;

    display: flex;

    align-items: center;

    gap: 15px;

    border: 1px solid var(--border);

}


.stat-icon {

    font-size: 30px;

}


.stat-card h3 {

    margin: 0;

    font-size: 28px;

}


.stat-card p {

    margin: 4px 0 0;

    color: var(--muted);

}


/* CARDS */

.dashboard-card,
.editor-card {

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 25px;

    margin-bottom: 20px;

}


.section-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

}


.section-header h3 {

    margin: 0;

}


.section-header p {

    color: var(--muted);

}


.progress-container {

    margin-top: 25px;

}


.progress-bar {

    height: 13px;

    background: #EDEAF2;

    border-radius: 20px;

    overflow: hidden;

}


.progress-fill {

    height: 100%;

    width: 0%;

    background: var(--primary);

    transition: width 0.4s ease;

}


#progressText {

    color: var(--muted);

}


/* DAYS */

.days-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(280px, 1fr));

    gap: 18px;

    margin-top: 25px;

}


.day-card {

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 20px;

}


.day-card-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

}


.day-number {

    color: var(--primary);

    font-size: 13px;

    font-weight: bold;

}


.day-card h3 {

    margin: 8px 0;

}


.day-card p {

    color: var(--muted);

    min-height: 42px;

}


.status-badge {

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: bold;

}


.status-published {

    background: #E4F6EA;

    color: var(--success);

}


.status-draft {

    background: #FFF4D6;

    color: #8A6500;

}


.day-actions {

    display: flex;

    gap: 8px;

    margin-top: 16px;

}


.day-actions button {

    flex: 1;

}


/* EDITOR */

.editor-header {

    display: flex;

    align-items: center;

    gap: 20px;

    margin-bottom: 25px;

}


.editor-header h3 {

    margin: 0;

}


.editor-header p {

    margin: 5px 0;

    color: var(--muted);

}


.form-grid {

    display: grid;

    grid-template-columns:
        180px 1fr;

    gap: 18px;

}


.form-group {

    margin-top: 18px;

}


.form-group label {

    display: block;

    margin-bottom: 7px;

    font-weight: 600;

}


.form-group small {

    display: block;

    margin-top: 6px;

    color: var(--muted);

}


.video-preview {

    margin-top: 20px;

    width: 100%;

    max-width: 700px;

    aspect-ratio: 16 / 9;

}


.video-preview iframe {

    width: 100%;

    height: 100%;

    border: none;

    border-radius: 12px;

}


/* QUESTIONS */

.question-card {

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 20px;

    margin-top: 18px;

    background: #FCFBFE;

}


.question-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.question-header h4 {

    margin: 0;

}


.options-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 12px;

    margin-top: 15px;

}


.correct-answer {

    margin-top: 15px;

}


.publish-card {

    display: flex;

    justify-content: space-between;

    align-items: center;

}


/* SWITCH */

.switch {

    position: relative;

    width: 54px;

    height: 30px;

}


.switch input {

    display: none;

}


.slider {

    position: absolute;

    inset: 0;

    border-radius: 20px;

    background: #CCC;

    transition: 0.3s;

}


.slider:before {

    content: "";

    position: absolute;

    width: 22px;

    height: 22px;

    left: 4px;

    bottom: 4px;

    background: white;

    border-radius: 50%;

    transition: 0.3s;

}


.switch input:checked + .slider {

    background: var(--primary);

}


.switch input:checked + .slider:before {

    transform: translateX(24px);

}


.form-actions {

    display: flex;

    justify-content: flex-end;

    gap: 12px;

}


/* TOAST */

.toast {

    position: fixed;

    right: 25px;

    bottom: 25px;

    background: #211A2E;

    color: white;

    padding: 14px 20px;

    border-radius: 10px;

    transform: translateY(120px);

    transition: 0.3s;

    z-index: 999;

}


.toast.show {

    transform: translateY(0);

}


/* MOBILE */

@media (max-width: 850px) {

    .sidebar {

        width: 75px;

    }


    .sidebar-logo div,
    .nav-button,
    .logout-button {

        font-size: 0;

    }


    .sidebar-logo strong,
    .sidebar-logo small {

        display: none;

    }


    .nav-button {

        text-align: center;

    }


    .stats-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

}


@media (max-width: 600px) {

    .page {

        padding: 18px;

    }


    .stats-grid {

        grid-template-columns: 1fr;

    }


    .form-grid {

        grid-template-columns: 1fr;

    }


    .options-grid {

        grid-template-columns: 1fr;

    }


    .section-header {

        align-items: flex-start;

        flex-direction: column;

    }


    .editor-header {

        align-items: flex-start;

        flex-direction: column;

    }

}