/* =========================================
   FOCUS FOCUS
   Productivity OS
========================================= */


/* =========================================
   VARIABLES
========================================= */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f0f3f8;

    --text: #172033;
    --muted: #778196;

    --border: #e1e6ef;

    --primary: #635bff;
    --primary-dark: #5048e5;

    --green: #22a06b;
    --orange: #f59e0b;
    --red: #e5484d;
    --blue: #3b82f6;

    --sidebar: #ffffff;

    --shadow:
        0 10px 30px rgba(20, 30, 50, 0.06);

    --radius: 15px;
}


.dark {

    --bg: #0e1117;
    --surface: #151922;
    --surface-2: #1d2330;

    --text: #f2f4f8;
    --muted: #8c96a8;

    --border: #29303d;

    --sidebar: #12161e;

    --shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);
}


/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


button,
input,
select {

    font: inherit;
}


button {

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
}


button:focus-visible,
input:focus-visible,
select:focus-visible {

    outline: 2px solid var(--primary);
    outline-offset: 2px;
}


input,
select {

    color: var(--text);
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {

    position: fixed;

    left: 0;
    top: 0;

    width: 245px;
    height: 100vh;

    background: var(--sidebar);

    border-right:
        1px solid var(--border);

    padding: 24px 15px;

    display: flex;
    flex-direction: column;

    z-index: 50;

    transition:
        width 0.2s ease,
        background 0.2s ease;
}


/* BRAND */

.brand {

    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        0 10px 28px;
}


.brand-logo {

    width: 44px;
    height: 44px;

    border-radius: 12px;

    overflow: hidden;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    background: var(--primary);
}


.brand-logo img {

    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;
}


.brand-text h1 {

    margin: 0;

    font-size: 17px;

    line-height: 1.2;
}


.brand-text span {

    color: var(--muted);

    font-size: 11px;
}


/* NAVIGATION */

.navigation {

    display: flex;

    flex-direction: column;

    gap: 5px;
}


.nav-item {

    width: 100%;

    border: none;

    background: transparent;

    color: var(--muted);

    padding: 12px;

    border-radius: 10px;

    text-align: left;

    display: flex;

    align-items: center;

    gap: 12px;

    transition:
        background 0.15s,
        color 0.15s,
        transform 0.15s;
}


.nav-item span:first-child {

    width: 20px;

    text-align: center;

    flex-shrink: 0;
}


.nav-item:hover {

    background: var(--surface-2);

    color: var(--text);

}


.nav-item:active {

    transform: scale(0.98);
}


.nav-item.active {

    background:
        rgba(99, 91, 255, 0.12);

    color: var(--primary);

    font-weight: 700;
}


.sidebar-bottom {

    margin-top: auto;

    padding-top: 15px;

    border-top:
        1px solid var(--border);
}


/* =========================================
   MAIN
========================================= */

.main {

    margin-left: 245px;

    min-height: 100vh;

    padding: 30px;

    max-width: 1550px;

    transition:
        margin-left 0.2s ease;
}


/* =========================================
   TOPBAR
========================================= */

.topbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}


.topbar h2 {

    margin: 0;

    font-size: 28px;

    letter-spacing: -0.5px;
}


.eyebrow {

    margin:
        0 0 5px;

    color: var(--primary);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.2px;
}


/* =========================================
   BUTTONS
========================================= */

.primary-button,
.secondary-button {

    border: none;

    border-radius: 10px;

    padding: 12px 18px;

    font-weight: 700;

    transition:
        transform 0.15s,
        background 0.15s,
        box-shadow 0.15s;
}


.primary-button {

    background: var(--primary);

    color: white;

    box-shadow:
        0 5px 15px
        rgba(99, 91, 255, 0.18);
}


.primary-button:hover {

    background:
        var(--primary-dark);

    transform:
        translateY(-1px);
}


.primary-button:active,
.secondary-button:active {

    transform:
        translateY(1px);
}


.secondary-button {

    background: var(--surface-2);

    color: var(--text);
}


.secondary-button:hover {

    background: var(--border);
}


.text-button {

    border: none;

    background: transparent;

    color: var(--primary);

    font-weight: 700;

    padding: 5px;
}


.close-button {

    border: none;

    background: transparent;

    color: var(--muted);

    font-size: 26px;

    line-height: 1;

    padding: 3px;
}


.close-button:hover {

    color: var(--text);
}


.full {

    width: 100%;
}


/* =========================================
   PAGES
========================================= */

.page {

    display: none;

    animation:
        pageIn 0.2s ease;
}


.active-page {

    display: block;
}


@keyframes pageIn {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================
   WELCOME
========================================= */

.welcome {

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: 18px;

    padding: 25px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    box-shadow: var(--shadow);

    margin-bottom: 20px;
}


.welcome h2 {

    margin:
        0 0 5px;

    font-size: 25px;

    letter-spacing: -0.5px;
}


.welcome p:last-child {

    margin: 0;

    color: var(--muted);
}


.streak-box {

    display: flex;

    align-items: center;

    gap: 10px;

    background: var(--surface-2);

    padding: 12px 18px;

    border-radius: 12px;

    flex-shrink: 0;
}


.streak-box > span {

    font-size: 25px;
}


.streak-box strong {

    display: block;

    font-size: 20px;
}


.streak-box small {

    color: var(--muted);
}


/* =========================================
   STATS
========================================= */

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-bottom: 20px;
}


.stat-card {

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

    box-shadow: var(--shadow);

    min-width: 0;
}


.stat-card > div:last-child {

    min-width: 0;
}


.stat-card span {

    display: block;

    color: var(--muted);

    font-size: 13px;

    margin-bottom: 2px;
}


.stat-card strong {

    font-size: 25px;

    line-height: 1;
}


.stat-icon {

    width: 45px;
    height: 45px;

    display: grid;

    place-items: center;

    border-radius: 12px;

    flex-shrink: 0;
}


.blue {

    background: #e8edff;
}


.purple {

    background: #eeeaff;
}


.orange {

    background: #fff1d6;
}


.green {

    background: #def8eb;
}


/* =========================================
   PANELS
========================================= */

.panel {

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    padding: 22px;

    margin-bottom: 20px;

    box-shadow: var(--shadow);
}


.panel-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-bottom: 18px;
}


.panel-header h3,
.panel > h3 {

    margin:
        0 0 5px;

    font-size: 17px;
}


.panel-header p {

    margin: 0;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================
   PROGRESS
========================================= */

.progress-bar {

    height: 10px;

    background: var(--surface-2);

    border-radius: 20px;

    overflow: hidden;
}


.progress-bar div {

    height: 100%;

    width: 0%;

    background: var(--primary);

    border-radius: inherit;

    transition:
        width 0.4s ease;
}


/* =========================================
   TASK ITEMS
========================================= */

.task-item {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 13px;

    border:
        1px solid var(--border);

    border-radius: 11px;

    margin-bottom: 8px;

    background: var(--surface);

    transition:
        background 0.15s,
        border 0.15s,
        transform 0.15s;
}


.task-item:hover {

    background: var(--surface-2);

    transform:
        translateY(-1px);
}


.task-left {

    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;
}


.task-check {

    width: 22px;
    height: 22px;

    border-radius: 50%;

    border:
        2px solid var(--border);

    background: transparent;

    color: white;

    display: grid;

    place-items: center;

    padding: 0;

    flex-shrink: 0;

    transition:
        background 0.15s,
        border 0.15s;
}


.task-check.done {

    background: var(--green);

    border-color: var(--green);
}


.task-name {

    font-weight: 650;

    overflow-wrap: anywhere;
}


.task-done {

    text-decoration: line-through;

    color: var(--muted);
}


.task-meta {

    color: var(--muted);

    font-size: 12px;

    margin-top: 3px;
}


/* =========================================
   TOOLBAR
========================================= */

.toolbar {

    display: flex;

    gap: 10px;

    margin-bottom: 20px;

    flex-wrap: wrap;
}


.search,
.toolbar select,
form label input,
form label select {

    padding: 12px;

    border:
        1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    border-radius: 9px;

    outline: none;

    transition:
        border 0.15s,
        box-shadow 0.15s;
}


.search {

    width: 100%;

    max-width: 400px;
}


.toolbar select {

    min-width: 170px;
}


.search:focus,
.toolbar select:focus,
form label input:focus,
form label select:focus {

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(99, 91, 255, 0.10);
}


/* =========================================
   CATEGORY OVERVIEW
========================================= */

.category-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 12px;
}


.category-card {

    border:
        1px solid var(--border);

    background: var(--surface-2);

    border-radius: 13px;

    padding: 17px;

    transition:
        transform 0.15s,
        border 0.15s;
}


.category-card:hover {

    transform:
        translateY(-2px);

    border-color:
        var(--primary);
}


.category-card-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 10px;
}


.category-card-icon {

    font-size: 23px;
}


.category-card strong {

    font-size: 22px;
}


.category-card span {

    display: block;

    color: var(--muted);

    font-size: 12px;
}


.category-card h4 {

    margin:
        0 0 3px;

    font-size: 14px;
}


/* =========================================
   CATEGORY TASK GRID
========================================= */

.category-task-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.category-task-box {

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: 15px;

    padding: 18px;

    box-shadow: var(--shadow);

    min-height: 150px;
}


.category-task-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 15px;

    padding-bottom: 12px;

    border-bottom:
        1px solid var(--border);
}


.category-task-title {

    display: flex;

    align-items: center;

    gap: 9px;
}


.category-task-title span {

    font-size: 21px;
}


.category-task-title h3 {

    margin: 0;

    font-size: 15px;
}


.category-task-header > b {

    background: var(--surface-2);

    color: var(--muted);

    padding: 4px 8px;

    border-radius: 7px;

    font-size: 11px;
}


.empty-category {

    color: var(--muted);

    font-size: 13px;

    padding: 15px 0;
}


/* =========================================
   EISENHOWER INTRO
========================================= */

.section-intro {

    margin-bottom: 20px;
}


.section-intro h2 {

    margin:
        0 0 6px;

    font-size: 25px;
}


.section-intro p:last-child {

    margin: 0;

    color: var(--muted);

    max-width: 650px;
}


/* =========================================
   EISENHOWER MATRIX
========================================= */

.matrix {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.matrix-quadrant {

    min-height: 350px;

    border-radius: 17px;

    padding: 20px;

    border:
        1px solid var(--border);

    background: var(--surface);

    box-shadow: var(--shadow);

    overflow: hidden;
}


.do-first {

    border-top:
        4px solid var(--red);
}


.schedule {

    border-top:
        4px solid var(--orange);
}


.delegate {

    border-top:
        4px solid var(--blue);
}


.eliminate {

    border-top:
        4px solid var(--muted);
}


.matrix-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}


.matrix-header > div {

    display: flex;

    align-items: center;

    gap: 12px;
}


.matrix-icon {

    width: 42px;
    height: 42px;

    display: grid;

    place-items: center;

    background: var(--surface-2);

    border-radius: 11px;

    font-size: 20px;

    flex-shrink: 0;
}


.matrix-header h3 {

    margin: 0 0 3px;

    font-size: 16px;
}


.matrix-header p {

    margin: 0;

    color: var(--muted);

    font-size: 11px;
}


.matrix-header > b {

    background: var(--surface-2);

    padding: 5px 9px;

    border-radius: 7px;

    color: var(--muted);

    font-size: 12px;
}


.matrix-tasks {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.matrix-tasks .task-item {

    margin-bottom: 0;
}


/* =========================================
   POMODORO
========================================= */

.pomodoro-container {

    max-width: 750px;

    margin:
        20px auto;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: 22px;

    padding:
        45px 35px;

    text-align: center;

    box-shadow: var(--shadow);
}


.pomodoro-container h2 {

    margin:
        0 0 5px;

    font-size: 27px;
}


.pomodoro-description {

    margin:
        0 0 28px;

    color: var(--muted);
}


/* TIMER MODE */

.timer-mode {

    display: inline-flex;

    justify-content: center;

    gap: 5px;

    padding: 5px;

    background: var(--surface-2);

    border-radius: 11px;

    margin-bottom: 20px;
}


.mode {

    border: none;

    background: transparent;

    color: var(--muted);

    padding:
        9px 15px;

    border-radius: 8px;

    font-weight: 650;

    transition:
        background 0.15s,
        color 0.15s;
}


.mode:hover {

    color: var(--text);
}


.mode.active {

    background: var(--primary);

    color: white;

    box-shadow:
        0 3px 10px
        rgba(99, 91, 255, 0.2);
}


/* TIMER */

.timer {

    font-size: clamp(70px, 12vw, 105px);

    font-weight: 800;

    letter-spacing: -5px;

    line-height: 1;

    margin:
        20px 0 25px;

    font-variant-numeric:
        tabular-nums;
}


/* TIMER PROGRESS */

.timer-progress {

    max-width: 500px;

    height: 8px;

    margin:
        0 auto 28px;

    background: var(--surface-2);

    border-radius: 20px;

    overflow: hidden;
}


#timerProgress {

    height: 100%;

    width: 100%;

    background: var(--primary);

    border-radius: inherit;

    transition:
        width 1s linear;
}


/* TIMER BUTTONS */

.timer-controls {

    display: flex;

    justify-content: center;

    gap: 10px;
}


/* FOCUS STATS */

.focus-stats {

    display: flex;

    justify-content: center;

    gap: 60px;

    margin-top: 35px;

    padding-top: 25px;

    border-top:
        1px solid var(--border);
}


.focus-stats div {

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.focus-stats strong {

    font-size: 23px;
}


.focus-stats span {

    color: var(--muted);

    font-size: 12px;
}


/* =========================================
   ANALYTICS
========================================= */

.analytics-grid {

    display: grid;

    grid-template-columns:
        2fr 1fr;

    gap: 20px;
}


.chart {

    height: 230px;

    display: flex;

    align-items: flex-end;

    justify-content: space-around;

    gap: 10px;

    padding:
        20px 10px 30px;

    border-bottom:
        1px solid var(--border);
}


.chart-bar {

    width: 100%;

    max-width: 50px;

    min-height: 5px;

    background: var(--primary);

    border-radius:
        7px 7px 0 0;

    position: relative;

    transition:
        height 0.3s ease;
}


.chart-bar:hover {

    opacity: 0.8;
}


.chart-bar span {

    position: absolute;

    bottom: -25px;

    left: 50%;

    transform:
        translateX(-50%);

    font-size: 11px;

    color: var(--muted);

    white-space: nowrap;
}


.breakdown > div {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding:
        15px 0;

    border-bottom:
        1px solid var(--border);
}


.breakdown > div:last-child {

    border-bottom: none;
}


.breakdown span {

    color: var(--muted);

    font-size: 13px;
}


.breakdown strong {

    font-size: 17px;
}


/* =========================================
   MODAL
========================================= */

.modal {

    position: fixed;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.5);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 100;

    backdrop-filter:
        blur(3px);
}


.modal.show {

    display: flex;
}


.modal-box {

    background: var(--surface);

    width: 100%;

    max-width: 500px;

    max-height: 90vh;

    overflow-y: auto;

    border-radius: 18px;

    padding: 25px;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.25);

    animation:
        modalIn 0.18s ease;
}


@keyframes modalIn {

    from {

        opacity: 0;

        transform:
            translateY(10px)
            scale(0.98);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


.modal-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 15px;

    margin-bottom: 25px;
}


.modal-header h2 {

    margin: 0;

    font-size: 23px;
}


/* =========================================
   FORMS
========================================= */

form label {

    display: block;

    font-size: 13px;

    font-weight: 650;

    margin-bottom: 16px;
}


form label input,
form label select {

    display: block;

    width: 100%;

    margin-top: 7px;
}


form label input::placeholder {

    color: var(--muted);
}


form label select {

    cursor: pointer;
}


/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {

    width: 8px;
    height: 8px;
}


::-webkit-scrollbar-track {

    background: transparent;
}


::-webkit-scrollbar-thumb {

    background: var(--border);

    border-radius: 20px;
}


::-webkit-scrollbar-thumb:hover {

    background: var(--muted);
}


/* =========================================
   MOBILE / TABLET
========================================= */

@media (max-width: 1100px) {

    .stats-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .analytics-grid {

        grid-template-columns: 1fr;

    }

}


@media (max-width: 900px) {

    .sidebar {

        width: 72px;

        padding:
            18px 8px;

    }


    .brand {

        justify-content: center;

        padding:
            0 0 25px;

    }


    .brand-text {

        display: none;

    }


    .nav-item {

        justify-content: center;

        padding: 12px 8px;

    }


    .nav-item span:last-child {

        display: none;

    }


    .sidebar-bottom .nav-item span:last-child {

        display: none;

    }


    .main {

        margin-left: 72px;

    }


    .category-task-grid {

        grid-template-columns: 1fr;

    }


    .matrix {

        grid-template-columns: 1fr;

    }


    .matrix-quadrant {

        min-height: 250px;

    }

}


@media (max-width: 600px) {

    .main {

        padding: 15px;

    }


    .topbar {

        align-items: flex-start;

    }


    .topbar h2 {

        font-size: 23px;

    }


    .topbar .primary-button {

        padding:
            10px 12px;

        font-size: 12px;

    }


    .stats-grid {

        grid-template-columns: 1fr;

    }


    .welcome {

        flex-direction: column;

        align-items: flex-start;

    }


    .streak-box {

        width: 100%;

    }


    .toolbar {

        flex-direction: column;

    }


    .search {

        max-width: none;

    }


    .toolbar select {

        width: 100%;

    }


    .pomodoro-container {

        padding:
            30px 15px;

    }


    .timer {

        font-size: 70px;

        letter-spacing: -3px;

    }


    .timer-mode {

        display: flex;

        width: 100%;

        flex-direction: column;

    }


    .mode {

        width: 100%;

    }


    .timer-controls {

        flex-direction: column;

    }


    .timer-controls button {

        width: 100%;

    }


    .focus-stats {

        gap: 35px;

    }


    .panel {

        padding: 17px;

    }


    .category-grid {

        grid-template-columns: 1fr 1fr;

    }


    .modal {

        padding: 10px;

    }


    .modal-box {

        padding: 20px;

    }

}


@media (max-width: 400px) {

    .category-grid {

        grid-template-columns: 1fr;

    }


    .timer {

        font-size: 60px;

    }

}