@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0d1020;
    --panel: #171b30;
    --purple: #9075ff;
    --cyan: #62e5dc;
    --text: #f2f3ff;
    --muted: #9298b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.sidebar {
    width: 85px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #11152a;
    border-right: 1px solid #282d47;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 8px;
    z-index: 10;
}

.side-brand {
    font-size: 27px;
    font-weight: 800;
    margin-bottom: 45px;
    color: white;
}

.side-brand span {
    color: var(--purple);
}

.nav {
    width: 100%;
    padding: 17px 4px;
    margin-bottom: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #9198b3;
    font-size: 23px;
    cursor: pointer;
}

.nav span {
    display: none;
}

.nav:hover, .nav.active {
    background: #282449;
    color: var(--purple);
}

.side-bottom {
    margin-top: auto;
    color: #9298b3;
    text-align: center;
    font-size: 8px;
    line-height: 2;
    letter-spacing: 1px;
}

.app {
    margin-left: 85px;
    min-height: 100vh;
}

.topbar {
    height: 85px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #11152a;
    border-bottom: 1px solid #282d47;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.brand strong {
    font-size: 16px;
    letter-spacing: 2px;
}

.brand strong span {
    color: var(--purple);
}

.brand small {
    display: block;
    color: #858ca8;
    font-size: 8px;
    letter-spacing: 2px;
    margin-top: 5px;
}

.owner {
    font-size: 10px;
    letter-spacing: 1px;
    color: #c3c6dc;
    font-weight: 700;
}

main {
    max-width: 1150px;
    margin: auto;
    padding: 40px 5%;
}

.section {
    display: none;
}

.active-section {
    display: block;
    animation: appear .35s ease;
}

@keyframes appear {
    from {opacity: 0; transform: translateY(8px);}
    to {opacity: 1; transform: translateY(0);}
}

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 38px;
    border-radius: 18px;
    background: linear-gradient(110deg, #30275e, #25264a, #172e47);
    border: 1px solid #48436f;
    margin-bottom: 35px;
}

.eyebrow {
    color: var(--cyan);
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 800;
}

.welcome h1 {
    font-size: 32px;
    margin: 13px 0;
}

.welcome h1 span {
    color: var(--cyan);
}

.welcome p, .page-title p {
    font-size: 13px;
    color: #b3bad2;
}

.welcome-icon {
    font-size: 65px;
    opacity: .8;
}

.section-heading, .panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 23px;
    margin-top: 8px;
}

.live {
    color: var(--cyan);
    font-size: 9px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card, .panel {
    background: var(--panel);
    border: 1px solid #292e48;
    border-radius: 14px;
}

.stat-card {
    padding: 22px;
}

.stat-card > span {
    color: var(--purple);
    font-size: 23px;
}

.stat-card p {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
    margin: 15px 0 8px;
}

.stat-card strong {
    font-size: 30px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    padding: 23px;
    margin-bottom: 18px;
}

.panel-heading {
    margin-bottom: 20px;
}

.panel-heading h3, .panel h3 {
    font-size: 15px;
}

.panel-heading span {
    color: var(--muted);
    font-size: 9px;
}

.progress-circle {
    width: 155px;
    height: 155px;
    border-radius: 50%;
    margin: 25px auto;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--purple) 0%, #292d45 0%);
}

.progress-circle > div {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.progress-circle strong {
    font-size: 27px;
}

.progress-circle small {
    font-size: 8px;
    color: var(--muted);
}

.center-text {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
}

.quick-btn {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 10px;
    background: #20243d;
    color: white;
    border: 1px solid #343953;
    border-radius: 9px;
    cursor: pointer;
}

.quick-btn b {
    color: var(--cyan);
}

.text-btn {
    border: none;
    background: transparent;
    color: var(--cyan);
    cursor: pointer;
}

.page-title {
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 30px;
    margin: 12px 0;
}

input, select {
    width: 100%;
    padding: 14px;
    background: #101428;
    border: 1px solid #353b58;
    color: white;
    border-radius: 8px;
    margin: 12px 0;
    font-family: inherit;
}

input:focus, select:focus {
    outline: 1px solid var(--purple);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.primary-btn, .secondary-btn {
    border: none;
    padding: 13px 18px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    font-size: 10px;
}

.primary-btn {
    background: var(--purple);
    color: white;
}

.secondary-btn {
    background: #292e49;
    color: white;
}

#taskList, #recentTasks {
    display: grid;
    gap: 10px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #20243c;
    border: 1px solid #343952;
    border-radius: 9px;
}

.task-item.done {
    opacity: .55;
}

.task-item.done strong {
    text-decoration: line-through;
}

.task-item p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 7px;
}

.task-item strong {
    font-size: 12px;
    overflow-wrap: anywhere;
}

.task-actions {
    display: flex;
    gap: 6px;
}

.task-actions button {
    border: 0;
    border-radius: 6px;
    padding: 9px;
    background: #39345d;
    color: white;
    cursor: pointer;
}

.task-actions .remove {
    background: #71334a;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.subject-card {
    padding: 27px;
    background: var(--panel);
    border: 1px solid #303550;
    border-radius: 13px;
    font-size: 32px;
}

.subject-card h3 {
    font-size: 14px;
    margin: 15px 0 7px;
}

.subject-card p {
    font-size: 10px;
    color: var(--muted);
}

.timer-panel {
    max-width: 600px;
    text-align: center;
    padding: 45px 20px;
    margin: 30px auto;
    background: var(--panel);
    border: 1px solid #38365d;
    border-radius: 20px;
}

#clock {
    font-size: 75px;
    font-weight: 800;
    color: var(--purple);
    margin: 25px 0 10px;
}

#timerStatus {
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.timer-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.timer-tip {
    color: var(--muted);
    font-size: 11px;
    margin-top: 30px;
}

footer {
    text-align: center;
    color: #737b98;
    font-size: 9px;
    letter-spacing: 2px;
    padding: 25px;
    border-top: 1px solid #292e48;
}

@media(max-width: 750px) {
    .sidebar {
        width: 55px;
    }

    .app {
        margin-left: 55px;
    }

    .nav {
        font-size: 19px;
    }

    .topbar {
        padding: 0 12px;
    }

    .brand {
        gap: 6px;
    }

    .brand img {
        width: 32px;
        height: 32px;
    }

    .brand strong {
        font-size: 12px;
    }

    .brand small {
        font-size: 6px;
    }

    .owner {
        font-size: 7px;
        letter-spacing: 0;
    }

    main {
        padding: 25px 12px;
    }

    .welcome {
        padding: 25px 17px;
    }

    .welcome h1 {
        font-size: 23px;
    }

    .welcome-icon {
        font-size: 40px;
    }

    .stats {
        gap: 7px;
    }

    .stat-card {
        padding: 13px 8px;
    }

    .stat-card p {
        font-size: 7px;
    }

    .stat-card strong {
        font-size: 23px;
    }

    .content-grid, .subject-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .page-title h1 {
        font-size: 25px;
    }

    #clock {
        font-size: 55px;
    }
}