/* =========================================================
   AQELIO
   Complete Style
   ========================================================= */

:root {

    --aqua: #078b91;
    --aqua-dark: #06777c;
    --aqua-light: #e8f7f7;

    --ink: #202c31;
    --muted: #718489;
    --soft-text: #91a1a5;

    --border: #d7e3e5;
    --border-light: #e9eff0;

    --white: #ffffff;
    --page: #f7fafb;

    --shadow:
        0 12px 35px rgba(31, 55, 60, 0.08);

    --radius-large: 24px;
    --radius-medium: 18px;
    --radius-small: 13px;

    --nav-height: 82px;
}


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

* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {

    margin: 0;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #f8fbfc 0%,
            #f4f9fa 100%
        );

    color: var(--ink);

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

    -webkit-font-smoothing: antialiased;
}


button,
input,
select {

    font: inherit;
}


button {

    cursor: pointer;
}


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

    outline:
        3px solid rgba(
            7,
            139,
            145,
            0.18
        );

    outline-offset: 2px;
}


/* =========================================================
   APP SHELL
   ========================================================= */

.app-shell {

    min-height: 100vh;

    display: flex;

    justify-content: center;

    padding:
        0 18px;
}


.app {

    width: 100%;

    max-width: 980px;

    min-height: 100vh;

    padding:
        42px
        0
        calc(
            var(--nav-height) +
            42px
        );
}


/* =========================================================
   SCREENS
   ========================================================= */

.screen {

    display: none;
}


.screen.active {

    display: block;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

.brand {

    color: var(--aqua);

    font-size: 18px;

    font-weight: 800;

    letter-spacing:
        -0.03em;

    margin-bottom: 8px;
}


.brand.small {

    font-size: 15px;

    margin-bottom: 5px;
}


h1,
h2,
h3,
p {

    margin-top: 0;
}


h1 {

    margin-bottom: 7px;

    font-size:
        clamp(
            30px,
            4vw,
            42px
        );

    line-height: 1.05;

    letter-spacing:
        -0.045em;

    font-weight: 800;
}


h2 {

    margin-bottom: 0;

    font-size: 24px;

    line-height: 1.15;

    letter-spacing:
        -0.035em;

    font-weight: 800;
}


h3 {

    margin-bottom: 0;

    font-size: 17px;

    line-height: 1.25;

    font-weight: 750;

    letter-spacing:
        -0.02em;
}


p {

    color: var(--muted);

    line-height: 1.55;
}


.eyebrow {

    display: inline-block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1;

    font-weight: 800;

    letter-spacing:
        0.12em;
}


/* =========================================================
   HOME HEADER
   ========================================================= */

.home-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}


.home-header > div:first-child {

    min-width: 0;
}


#current-date {

    margin: 0;

    color: var(--muted);

    font-size: 15px;
}


.avatar {

    width: 46px;

    height: 46px;

    flex:
        0 0 46px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #dff6f6,
            #c9eeee
        );

    color: var(--aqua);

    font-weight: 800;
}


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

.progress-card {

    position: relative;

    display: grid;

    grid-template-columns:
        1fr
        auto;

    gap: 10px;

    padding: 25px;

    margin-bottom: 36px;

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

    border-radius:
        var(--radius-large);

    background: var(--white);

    box-shadow:
        var(--shadow);

    overflow: hidden;
}


.progress-copy h2 {

    font-size: 21px;
}


.progress-right {

    display: flex;

    align-items: center;
}


.progress-right strong {

    color: var(--aqua);

    font-size: 24px;

    letter-spacing:
        -0.04em;
}


.progress-track {

    grid-column:
        1 / -1;

    height: 8px;

    margin-top: 8px;

    border-radius: 999px;

    background:
        #edf2f3;

    overflow: hidden;
}


#progress-fill {

    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #078b91,
            #3db7bb
        );

    transition:
        width 0.3s ease;
}


/* =========================================================
   SECTION HEADER
   ========================================================= */

.section-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin:
        0 0
        16px;
}


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

.link-button {

    padding: 4px 0;

    border: none;

    background:
        transparent;

    color: var(--aqua);

    font-weight: 750;

    font-size: 14px;
}


.link-button:hover {

    color:
        var(--aqua-dark);
}


.primary-button,
.secondary-button {

    min-height: 44px;

    padding:
        0 18px;

    border-radius:
        var(--radius-small);

    font-weight: 750;

    border: none;

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


.primary-button {

    background:
        var(--aqua);

    color:
        var(--white);

    box-shadow:
        0 7px 18px
        rgba(
            7,
            139,
            145,
            0.18
        );
}


.primary-button:hover {

    background:
        var(--aqua-dark);

    transform:
        translateY(-1px);
}


.secondary-button {

    background:
        #eef3f4;

    color:
        var(--ink);
}


.secondary-button:hover {

    background:
        #e4ebed;
}


/* =========================================================
   TASK LIST
   ========================================================= */

.task-list {

    display: flex;

    flex-direction: column;

    gap: 11px;

    margin-bottom: 32px;
}


.task-card {

    display: grid;

    grid-template-columns:
        auto
        1fr
        auto;

    align-items: center;

    gap: 14px;

    min-width: 0;

    padding:
        15px 16px;

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

    border-radius:
        var(--radius-medium);

    background:
        var(--white);

    box-shadow:
        0 5px 18px
        rgba(
            35,
            60,
            65,
            0.045
        );

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}


.task-card:hover {

    border-color:
        #cbdcde;

    box-shadow:
        0 8px 24px
        rgba(
            35,
            60,
            65,
            0.075
        );
}


.task-card.completed {

    opacity: 0.58;
}


.task-card.completed h3 {

    text-decoration:
        line-through;

    text-decoration-thickness:
        1.5px;
}


.task-check {

    width: 28px;

    height: 28px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    flex:
        0 0 28px;

    border:
        2px solid
        #cbd9db;

    border-radius: 50%;

    background:
        var(--white);

    color:
        var(--aqua);

    font-size: 14px;

    font-weight: 900;
}


.task-card.completed
.task-check {

    border-color:
        var(--aqua);

    background:
        var(--aqua);

    color:
        var(--white);
}


.task-main {

    min-width: 0;
}


.task-main h3 {

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;
}


.task-meta {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 6px;

    color:
        var(--soft-text);

    font-size: 12px;

    line-height: 1.4;
}


.task-category {

    display: inline-flex;

    align-items: center;

    min-height: 22px;

    padding:
        3px 8px;

    border-radius:
        999px;

    background:
        color-mix(
            in srgb,
            var(--category-color) 10%,
            white
        );

    color:
        var(--category-color);

    font-weight: 750;
}


.task-actions {

    position: relative;
    z-index: 2;
    display: flex;

    align-items: center;

    gap: 4px;
}


.task-focus-trigger,
.task-edit-trigger,
.task-delete-trigger,
.task-edit,
.task-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.task-focus-trigger:hover,
.task-edit-trigger:hover,
.task-edit:hover {
    background: #f1f5f6;
    color: var(--ink);
    border-color: var(--border-light);
}

.task-delete-trigger,
.task-delete {
    color: #a9b5b7;
    font-size: 21px;
    line-height: 1;
}

.task-delete-trigger:hover,
.task-delete:hover {
    color: #b75d66;
    background: #fff1f2;
    border-color: #f8dfe2;
}

.task-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.task-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {

    padding:
        34px 20px;

    text-align:
        center;

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

    border-radius:
        var(--radius-medium);

    background:
        rgba(
            255,
            255,
            255,
            0.6
        );
}


.empty-state h3 {

    margin-bottom: 7px;
}


.empty-state p {

    margin-bottom: 0;

    font-size: 14px;
}


/* =========================================================
   HOME FOCUS CARD
   ========================================================= */

.home-focus-card {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    padding:
        25px;

    margin-top: 12px;

    border-radius:
        var(--radius-large);

    background:
        linear-gradient(
            135deg,
            #edf9f9,
            #f6fbfb
        );

    border:
        1px solid
        #dceff0;
}


.home-focus-card h2 {

    font-size: 21px;

    margin-bottom: 7px;
}


.home-focus-card p {

    margin-bottom: 0;

    max-width: 560px;

    font-size: 14px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}


.month-controls {

    display: flex;

    gap: 7px;
}


.square-button {

    width: 40px;

    height: 40px;

    padding: 0;

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

    border-radius:
        12px;

    background:
        var(--white);

    color:
        var(--ink);

    font-size: 24px;

    line-height: 1;
}


.square-button:hover {

    border-color:
        #b8cfd2;

    background:
        #f5f9fa;
}


/* =========================================================
   CALENDAR
   ========================================================= */

.calendar-card {

    padding:
        18px;

    margin-bottom:
        34px;

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

    border-radius:
        var(--radius-large);

    background:
        var(--white);

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


.weekdays,
.calendar-grid {

    display: grid;

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


.weekdays {

    margin-bottom:
        8px;
}


.weekdays span {

    text-align:
        center;

    color:
        var(--soft-text);

    font-size: 11px;

    font-weight: 800;

    letter-spacing:
        0.04em;
}


.calendar-day {

    position: relative;

    min-height:
        68px;

    padding:
        9px;

    border:
        1px solid
        transparent;

    border-radius:
        13px;

    background:
        transparent;

    color:
        var(--ink);

    text-align:
        left;
}


.calendar-day:hover {

    background:
        #f2f8f8;
}


.calendar-day.outside {

    color:
        #c1ccce;

    cursor:
        default;
}


.calendar-day.selected {

    background:
        var(--aqua-light);

    border-color:
        rgba(
            7,
            139,
            145,
            0.35
        );
}


.calendar-day.today
.calendar-day-number {

    color:
        var(--aqua);

    font-weight:
        900;
}


.calendar-day-number {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        26px;

    height:
        26px;

    border-radius:
        50%;

    font-size:
        13px;
}


.calendar-task-dot {

    position:
        absolute;

    left:
        50%;

    bottom:
        7px;

    width:
        5px;

    height:
        5px;

    transform:
        translateX(-50%);

    border-radius:
        50%;

    background:
        var(--aqua);
}


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

.modal {

    position:
        fixed;

    inset:
        0;

    z-index:
        1000;

    display:
        none;

    align-items:
        flex-end;

    justify-content:
        center;
}


.modal.active {

    display:
        flex;
}


.modal-overlay {

    position:
        absolute;

    z-index: 0;

    inset:
        0;

    background:
        rgba(
            19,
            31,
            35,
            0.32
        );

    backdrop-filter:
        blur(4px);
}


.modal-panel {

    position:
        relative;

    z-index: 1;

    width:
        min(
            100%,
            720px
        );

    max-height:
        92vh;

    overflow-y:
        auto;

    padding:
        28px;

    border-radius:
        28px
        28px
        0
        0;

    background:
        var(--white);

    box-shadow:
        0 -20px
        50px
        rgba(
            25,
            50,
            55,
            0.16
        );
}


.modal-header {

    display:
        flex;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        24px;
}


.modal-header h2 {

    font-size:
        28px;
}


.modal-close {

    width:
        38px;

    height:
        38px;

    padding:
        0;

    border:
        none;

    border-radius:
        50%;

    background:
        #f1f5f6;

    color:
        var(--muted);

    font-size:
        25px;

    line-height:
        1;
}


.modal-close:hover {

    background:
        #e8edef;

    color:
        var(--ink);
}


/* =========================================================
   FORM
   ========================================================= */

.modal-panel > label,
.form-section > label {

    display:
        block;

    margin-bottom:
        8px;

    color:
        var(--ink);

    font-size:
        14px;

    font-weight:
        750;
}


.modal-panel input[type="text"],
.modal-panel input[type="date"],
.modal-panel input[type="time"],
.modal-panel input[type="number"],
.modal-panel select {

    width:
        100%;

    min-height:
        48px;

    padding:
        0 14px;

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

    border-radius:
        14px;

    background:
        #fbfcfc;

    color:
        var(--ink);

    font-size:
        15px;

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


.modal-panel input:focus,
.modal-panel select:focus {

    border-color:
        rgba(
            7,
            139,
            145,
            0.55
        );

    box-shadow:
        0 0 0 4px
        rgba(
            7,
            139,
            145,
            0.08
        );

    outline:
        none;
}


.modal-panel
input::placeholder {

    color:
        #a2afb2;
}


.form-section {

    margin-top:
        22px;
}


.form-help {

    margin:
        7px 0
        0;

    color:
        var(--soft-text);

    font-size:
        12px;
}


/* =========================================================
   REPEAT SYSTEM
   ========================================================= */

/*
   Hide the original repeat select visually
   but keep it in the DOM for the app.
*/

.aqelio-repeat-type-select {

    appearance:
        none;

    display:
        block;
}


/*
   The original select remains the main
   repeat type selector.
*/

#task-repeat {

    margin-bottom:
        4px;
}


/*
   Custom weekly controls
*/

.repeat-custom-controls {

    display:
        none;

    margin-top:
        12px;

    padding:
        15px;

    border:
        1px solid
        #dce8e9;

    border-radius:
        16px;

    background:
        #f7fbfb;
}


.repeat-custom-controls.visible {

    display:
        block;
}


.repeat-schedule-row {

    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        9px;
}


.repeat-prefix {

    color:
        var(--ink);

    font-size:
        15px;

    font-weight:
        650;

    white-space:
        nowrap;
}


.repeat-on {

    margin-left:
        2px;
}


.repeat-control-select {

    width:
        auto !important;

    min-width:
        168px;

    min-height:
        44px !important;

    padding:
        0 38px
        0 13px !important;

    border:
        1px solid
        #cfdfe1 !important;

    border-radius:
        12px !important;

    background:
        var(--white) !important;

    color:
        var(--ink) !important;

    font-size:
        14px !important;

    font-weight:
        700;

    cursor:
        pointer;
}


.repeat-control-select:hover {

    border-color:
        #aac7ca !important;
}


.repeat-day-select {

    min-width:
        135px;
}


@media (
    max-width: 560px
) {

    .repeat-schedule-row {

        align-items:
            flex-start;

    }


    .repeat-control-select {

        width:
            100% !important;

    }


    .repeat-on {

        width:
            100%;

        margin:
            2px 0 0;

    }

}


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

.form-section-header {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    margin-bottom:
        10px;
}


.form-section-header label {

    margin:
        0;

    color:
        var(--ink);

    font-size:
        14px;

    font-weight:
        750;
}


.category-list {

    display:
        flex;

    flex-direction:
        column;

    gap:
        8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.category-item .category-button {
    flex: 1 1 auto;
    min-width: 0;
}

.category-item .category-delete {
    border: 0;
    background: transparent;
    cursor: pointer;
}


/*
   Category is now one clean rectangle.
*/

.category-button {

    width:
        100%;

    min-height:
        50px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        10px;

    padding:
        0 10px
        0 15px;

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

    border-radius:
        15px;

    background:
        var(--white);

    color:
        var(--ink);

    text-align:
        left;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}


.category-button:hover {

    border-color:
        #b8d1d3;

    background:
        #fbfdfd;
}


.category-button.selected {

    border-color:
        var(--aqua);

    background:
        #f1fafa;

    box-shadow:
        0 0 0 1px
        rgba(
            7,
            139,
            145,
            0.05
        );
}


.category-button-main {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    min-width:
        0;
}


.category-dot {

    width:
        12px;

    height:
        12px;

    flex:
        0 0 12px;

    border-radius:
        50%;
}


.category-name-text {

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        14px;

    font-weight:
        750;
}


/*
   Subtle delete button INSIDE the rectangle.
*/

.category-delete {

    width:
        30px;

    height:
        30px;

    flex:
        0 0 30px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        9px;

    color:
        #c1ccce;

    font-size:
        18px;

    font-weight:
        500;

    opacity:
        0.65;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        opacity 0.15s ease;
}


.category-delete:hover,
.category-delete:focus {

    color:
        #a8666d;

    background:
        #fff1f2;

    opacity:
        1;

    outline:
        none;
}


/*
   Category creation form
*/

.category-form {

    margin-top:
        10px;

    padding:
        14px;

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

    border-radius:
        15px;

    background:
        #f9fbfb;
}


.category-form.hidden {

    display:
        none;
}


.category-form
input[type="text"] {

    width:
        100%;

    margin-bottom:
        12px;
}


/*
   New category color picker.
   It only exists/appears while the
   new-category form is open.
*/

.category-color-row {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    margin-bottom:
        14px;

    padding:
        11px 12px;

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

    border-radius:
        12px;

    background:
        var(--white);
}


.category-color-row label {

    color:
        var(--ink);

    font-size:
        13px;

    font-weight:
        750;
}


.category-color-input-wrap {

    display:
        flex;

    align-items:
        center;

    gap:
        9px;
}


#new-category-color {

    width:
        34px;

    height:
        34px;

    padding:
        2px;

    border:
        1px solid
        #d2dfe1;

    border-radius:
        9px;

    background:
        var(--white);

    cursor:
        pointer;
}


#new-category-color-value {

    min-width:
        68px;

    color:
        var(--muted);

    font-size:
        11px;

    font-weight:
        750;

    letter-spacing:
        0.03em;
}


.category-form-actions {

    display:
        flex;

    justify-content:
        flex-end;

    gap:
        8px;
}


.empty-category-state {

    padding:
        15px;

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

    border-radius:
        13px;

    color:
        var(--muted);

    text-align:
        center;

    font-size:
        13px;
}


/* =========================================================
   DURATION
   ========================================================= */

.duration-grid {

    display:
        grid;

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

    gap:
        8px;

    margin-bottom:
        9px;
}


.duration-button {

    min-height:
        48px;

    padding:
        0 8px;

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

    border-radius:
        14px;

    background:
        var(--white);

    color:
        var(--ink);

    font-weight:
        750;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}


.duration-button:hover {

    border-color:
        #b8d0d2;
}


.duration-button.selected {

    border-color:
        var(--aqua);

    background:
        #e8f7f7;

    color:
        var(--aqua);
}


.save-task-button {

    width:
        100%;

    margin-top:
        24px;
}


/* =========================================================
   FOCUS
   ========================================================= */

.focus-screen-card {

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    padding:
        55px 30px;

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

    border-radius:
        30px;

    background:
        var(--white);

    box-shadow:
        var(--shadow);

    text-align:
        center;
}


.timer-ring {

    width:
        230px;

    height:
        230px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin-bottom:
        28px;

    border:
        8px solid
        #dff1f2;

    border-top-color:
        var(--aqua);

    border-radius:
        50%;
}


#focus-time {

    color:
        var(--ink);

    font-size:
        45px;

    font-weight:
        800;

    letter-spacing:
        -0.05em;
}


.focus-screen-card h2 {

    margin-bottom:
        8px;
}


.focus-screen-card p {

    margin-bottom:
        24px;
}


.focus-buttons {

    display:
        flex;

    gap:
        9px;
}


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

.stats-grid {

    display:
        grid;

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

    gap:
        13px;
}


.stat-card {

    padding:
        23px;

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

    border-radius:
        var(--radius-medium);

    background:
        var(--white);

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


.stat-card strong {

    display:
        block;

    margin:
        5px 0 3px;

    font-size:
        34px;

    line-height:
        1;

    letter-spacing:
        -0.05em;
}


.stat-card p {

    margin:
        0;

    font-size:
        13px;
}


/* =========================================================
   BOTTOM NAV
   ========================================================= */

.bottom-nav {

    position:
        fixed;

    left:
        50%;

    bottom:
        18px;

    z-index:
        900;

    width:
        min(
            calc(
                100% -
                28px
            ),
            650px
        );

    height:
        var(--nav-height);

    transform:
        translateX(-50%);

    display:
        grid;

    grid-template-columns:
        1fr
        1fr
        76px
        1fr
        1fr;

    align-items:
        center;

    padding:
        7px;

    border:
        1px solid
        rgba(
            211,
            225,
            227,
            0.9
        );

    border-radius:
        24px;

    background:
        rgba(
            255,
            255,
            255,
            0.94
        );

    box-shadow:
        0 15px 45px
        rgba(
            27,
            55,
            60,
            0.13
        );

    backdrop-filter:
        blur(18px);
}


.nav-item {

    height:
        100%;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    gap:
        3px;

    border:
        none;

    border-radius:
        15px;

    background:
        transparent;

    color:
        #8a999d;

    font-size:
        10px;

    font-weight:
        700;
}


.nav-symbol {

    font-size:
        20px;

    line-height:
        1;
}


.nav-item:hover {

    background:
        #f3f8f8;

    color:
        var(--ink);
}


.nav-item.active {

    color:
        var(--aqua);

    background:
        #edf8f8;
}


.main-add-button {

    width:
        58px;

    height:
        58px;

    justify-self:
        center;

    padding:
        0;

    border:
        none;

    border-radius:
        19px;

    background:
        var(--aqua);

    color:
        var(--white);

    font-size:
        30px;

    line-height:
        1;

    box-shadow:
        0 9px 22px
        rgba(
            7,
            139,
            145,
            0.25
        );

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


.main-add-button:hover {

    background:
        var(--aqua-dark);

    transform:
        translateY(-2px);
}


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

@media (
    max-width: 700px
) {

    .app {

        padding:
            28px
            0
            calc(
                var(--nav-height) +
                32px
            );

    }


    .home-header {

        margin-bottom:
            24px;

    }


    .progress-card {

        padding:
            21px;

    }


    .task-card {

        grid-template-columns:
            auto
            1fr;

        align-items:
            start;

    }


    .task-actions {

        grid-column:
            2;

        justify-content:
            flex-start;

        margin-top:
            -3px;

    }


    .task-delete-trigger,
    .task-delete {
        margin-left: auto;
    }

    .task-actions {
        width: 100%;
        gap: 8px;
    }


    .home-focus-card {

        flex-direction:
            column;

        align-items:
            flex-start;

    }


    .home-focus-card
    .primary-button {

        width:
            100%;

    }


    .calendar-card {

        padding:
            12px;

    }


    .calendar-day {

        min-height:
            54px;

        padding:
            6px;

    }


    .stats-grid {

        grid-template-columns:
            1fr;

    }


    .modal-panel {

        padding:
            23px;

    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (
    max-width: 480px
) {

    .app-shell {

        padding:
            0 12px;

    }


    .app {

        padding-top:
            22px;

    }


    h1 {

        font-size:
            31px;

    }


    .duration-grid {

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

    }


    .focus-screen-card {

        padding:
            40px 20px;

    }


    .timer-ring {

        width:
            190px;

        height:
            190px;

    }


    #focus-time {

        font-size:
            38px;

    }


    .focus-buttons {

        width:
            100%;

        flex-direction:
            column;

    }


    .focus-buttons button {

        width:
            100%;

    }


    .bottom-nav {

        bottom:
            10px;

        width:
            calc(
                100% -
                18px
            );

    }


    .main-add-button {

        width:
            52px;

        height:
            52px;

        border-radius:
            17px;

    }

}


/* =========================================================
   SCROLLBARS
   ========================================================= */

.modal-panel::-webkit-scrollbar {

    width:
        7px;
}


.modal-panel::-webkit-scrollbar-thumb {

    background:
        #d6e2e4;

    border-radius:
        999px;
}


.modal-panel::-webkit-scrollbar-track {

    background:
        transparent;
}

/* =========================================================
   AQELIO REMINDER CARD
   ========================================================= */

.aqelio-reminder-card {
    position: fixed;
    right: 28px;
    bottom: 28px;

    width: min(380px, calc(100vw - 40px));

    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 18px 18px 18px 18px;

    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #d7e5e8;
    border-left: 5px solid #0d929d;

    border-radius: 18px;

    box-shadow:
        0 14px 40px rgba(25, 55, 65, 0.18),
        0 4px 12px rgba(25, 55, 65, 0.08);

    z-index: 99999;

    opacity: 0;
    transform: translateY(18px) scale(0.97);

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.aqelio-reminder-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);

    pointer-events: auto;
}

.aqelio-reminder-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #e5f5f6;

    font-size: 20px;
}

.aqelio-reminder-content {
    min-width: 0;
    flex: 1;
}

.aqelio-reminder-title {
    margin-bottom: 3px;

    font-size: 14px;
    font-weight: 700;

    color: #0d929d;
}

.aqelio-reminder-task {
    font-size: 17px;
    font-weight: 700;

    color: #202d32;

    overflow-wrap: anywhere;
}

.aqelio-reminder-subtitle {
    margin-top: 3px;

    font-size: 13px;

    color: #718388;
}

.aqelio-reminder-close {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    border: none;
    border-radius: 9px;

    background: transparent;

    color: #829398;

    font-size: 23px;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

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

.aqelio-reminder-close:hover {
    background: #eef4f5;
    color: #27363b;
}

@media (max-width: 600px) {
    .aqelio-reminder-card {
        right: 14px;
        bottom: 14px;

        width: calc(100vw - 28px);
    }
}

/* =========================================================
   PROFILE CUSTOMIZATION
   ========================================================= */

.avatar {
    border: none;
    padding: 0;
    background: color-mix(in srgb, var(--profile-color, var(--aqua)) 16%, var(--white));
    color: var(--profile-color, var(--aqua));
    cursor: pointer;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color, var(--aqua)) 18%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--profile-color, var(--aqua)) 18%, transparent);
}

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.profile-modal.active {
    display: flex;
}

.profile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(19, 31, 35, 0.38);
    backdrop-filter: blur(5px);
}

.profile-panel {
    position: relative;
    width: min(100%, 480px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    border: 1px solid var(--border-light);
    border-radius: 24px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(20, 45, 50, 0.2);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.profile-header h2 {
    font-size: 26px;
}

.profile-preview-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 22px;
    border: 1px solid var(--border-light);
    border-radius: 17px;
    background: var(--page);
}

.profile-preview {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--profile-color, var(--aqua)) 16%, var(--white));
    color: var(--profile-color, var(--aqua));
    font-weight: 800;
    font-size: 19px;
}

.profile-preview-row strong {
    display: block;
    margin-bottom: 3px;
}

.profile-preview-row p {
    margin: 0;
    font-size: 13px;
}

.profile-field {
    margin-top: 18px;
}

.profile-field > label,
.profile-theme-row label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
}

.profile-field input[type="text"] {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--input-bg);
    color: var(--ink);
    font-size: 15px;
}

.profile-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-color-row input[type="color"] {
    width: 52px;
    height: 44px;
    padding: 3px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--input-bg);
    cursor: pointer;
}

#profile-color-value {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.profile-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.profile-theme-row p {
    margin: -3px 0 0;
    font-size: 12px;
}

.theme-toggle {
    position: relative;
    width: 52px;
    height: 30px;
    flex: 0 0 52px;
    padding: 3px;
    border: none;
    border-radius: 999px;
    background: var(--border);
    transition: background 0.2s ease;
}

.theme-toggle span {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.14);
    transition: transform 0.2s ease;
}

.theme-toggle.active {
    background: var(--aqua);
}

.theme-toggle.active span {
    transform: translateX(22px);
}

.profile-save-button {
    width: 100%;
    margin-top: 24px;
}

/* =========================================================
   DARK MODE
   ========================================================= */

:root {
    --input-bg: #fbfcfc;
}

html[data-theme="dark"] {
    --aqua: #49c4c8;
    --aqua-dark: #38aeb3;
    --aqua-light: #173c3f;
    --ink: #edf5f6;
    --muted: #a9bfc2;
    --soft-text: #849c9f;
    --border: #2d4448;
    --border-light: #24373b;
    --white: #172326;
    --page: #111a1c;
    --input-bg: #1c2a2d;
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] body {
    background: linear-gradient(180deg, #121c1e 0%, #0e1618 100%);
}

html[data-theme="dark"] .progress-track {
    background: #26383b;
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .square-button {
    background: #223235;
    color: var(--ink);
}

html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .modal-close:hover,
html[data-theme="dark"] .square-button:hover {
    background: #2a3d40;
}

html[data-theme="dark"] .task-card,
html[data-theme="dark"] .progress-card,
html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .focus-screen-card,
html[data-theme="dark"] .modal-panel,
html[data-theme="dark"] .profile-panel {
    background: var(--white);
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

html[data-theme="dark"] .home-focus-card {
    background: linear-gradient(135deg, #183437, #172a2d);
    border-color: #294b4e;
}

html[data-theme="dark"] .calendar-day:hover {
    background: #1c3033;
}

html[data-theme="dark"] .calendar-day.outside {
    color: #52686b;
}

html[data-theme="dark"] .modal-panel input[type="text"],
html[data-theme="dark"] .modal-panel input[type="date"],
html[data-theme="dark"] .modal-panel input[type="time"],
html[data-theme="dark"] .modal-panel input[type="number"],
html[data-theme="dark"] .modal-panel select,
html[data-theme="dark"] .profile-field input[type="text"] {
    background: var(--input-bg);
    color: var(--ink);
}

html[data-theme="dark"] .repeat-custom-controls {
    background: #152628;
    border-color: #294447;
}

html[data-theme="dark"] .repeat-control-select {
    background: #1c2a2d !important;
    color: var(--ink) !important;
    border-color: #355155 !important;
}

html[data-theme="dark"] .category-button {
    background: var(--white);
    color: var(--ink);
    border-color: var(--border);
}

html[data-theme="dark"] .category-button:hover {
    background: #1d2c2f;
}

html[data-theme="dark"] .category-button.selected {
    background: #183638;
}

html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .profile-preview-row {
    background: #152224;
    border-color: var(--border);
}

html[data-theme="dark"] .task-check {
    background: var(--white);
    border-color: #466064;
}

html[data-theme="dark"] .task-focus-trigger:hover,
html[data-theme="dark"] .task-edit-trigger:hover,
html[data-theme="dark"] .task-edit:hover {
    background: #223538;
    color: var(--ink);
}

html[data-theme="dark"] .task-delete-trigger:hover,
html[data-theme="dark"] .task-delete:hover {
    background: #3a2428;
}

html[data-theme="dark"] .aqelio-reminder-card {
    background: rgba(23, 35, 38, 0.98);
    border-color: #30484c;
}

html[data-theme="dark"] .aqelio-reminder-task {
    color: var(--ink);
}

html[data-theme="dark"] .aqelio-reminder-close:hover {
    background: #25383b;
    color: var(--ink);
}


/* =========================================================
   AQELIO PLUS — natural language, scheduling and data tools
   ========================================================= */
.premium-tools-card {
    margin: 26px 0 34px;
    padding: 22px;
    border: 1px solid var(--border-color, rgba(120, 135, 150, .2));
    border-radius: 22px;
    background: var(--card-bg, var(--surface, #fff));
    box-shadow: 0 8px 26px rgba(18, 45, 52, .045);
}
.premium-tools-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:22px; }
.premium-tools-heading h2 { margin:5px 0 7px; }
.premium-tools-heading p, .smart-schedule-block p, .premium-export-grid p, .integration-notice p { margin:0; color:var(--muted, #6b7880); line-height:1.55; font-size:.92rem; }
.premium-pill { flex-shrink:0; padding:6px 9px; border-radius:999px; background:rgba(15,146,157,.12); color:#0b858e; font-size:.68rem; font-weight:800; letter-spacing:.08em; }
.natural-task-form label, .schedule-controls label { display:flex; flex-direction:column; gap:7px; font-size:.84rem; font-weight:700; }
.natural-task-row { display:flex; gap:9px; margin-top:9px; }
.natural-task-row input { min-width:0; flex:1; width:100%; padding:13px 14px; border:1px solid var(--border-color, #dfe5e8); border-radius:12px; color:var(--text, #17252b); background:var(--input-bg, transparent); font:inherit; }
.natural-task-row .primary-button { flex-shrink:0; white-space:nowrap; }
.form-help { margin:9px 0 0; font-size:.8rem; line-height:1.5; color:var(--muted, #748087); }
.premium-feedback { min-height:0; margin:8px 0 0; font-size:.84rem; line-height:1.5; color:var(--accent, #0f929d); }
.premium-divider { height:1px; margin:21px 0; background:var(--border-color, rgba(120,135,150,.2)); }
.smart-schedule-block h3, .premium-export-grid h3 { margin:0 0 6px; font-size:1rem; }
.schedule-controls { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:10px; margin:15px 0; }
.schedule-controls input { width:100%; min-width:0; padding:10px 8px; border:1px solid var(--border-color, #dfe5e8); border-radius:10px; background:var(--input-bg, transparent); color:var(--text, #17252b); font:inherit; }
.premium-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.premium-actions .secondary-button, .smart-schedule-block > .secondary-button { font-size:.84rem; padding:10px 13px; }
.integration-notice { margin-top:22px; padding:14px 15px; border-radius:13px; background:rgba(120,135,150,.09); }
.integration-notice strong { display:block; margin-bottom:5px; font-size:.88rem; }
.integration-notice p { font-size:.81rem; }
@media (max-width:520px) {
    .premium-tools-card { padding:17px; border-radius:18px; }
    .natural-task-row { flex-direction:column; }
    .natural-task-row .primary-button { width:100%; }
    .schedule-controls { grid-template-columns:1fr 1fr; }
    .schedule-controls label:first-child { grid-column:1 / -1; }
    .premium-actions { flex-direction:column; }
    .premium-actions button { width:100%; }
}

/* =========================================================
   AQELIO PREMIUM PAYWALL
   ========================================================= */
[hidden] { display: none !important; }
.premium-locked-screen {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0 3px;
}
.premium-lock-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: rgba(15, 146, 157, .12);
    color: var(--accent, #0f929d);
    font-size: 1.7rem;
    font-weight: 800;
}
.premium-locked-screen h3 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    letter-spacing: -.025em;
}
.premium-locked-screen > p:not(.premium-small-print) {
    max-width: 560px;
    margin: 0;
    color: var(--muted, #6b7880);
    line-height: 1.6;
}
.premium-benefit-list {
    display: grid;
    gap: 11px;
    width: 100%;
    margin: 5px 0 8px;
    padding: 0;
    list-style: none;
}
.premium-benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
    color: var(--text, var(--ink, #17252b));
}
.premium-benefit-list li span {
    flex: 0 0 21px;
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: rgba(15, 146, 157, .12);
    color: var(--accent, #0f929d);
    font-weight: 800;
    font-size: .8rem;
}
.premium-cta { width: 100%; max-width: 360px; min-height: 46px; }
.premium-small-print { margin: 0; color: var(--muted, #6b7880); font-size: .8rem; line-height: 1.5; }
.premium-paywall-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.premium-paywall-modal.active { display: flex; }
.premium-paywall-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(12, 24, 29, .62);
    cursor: default;
}
.premium-paywall-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 450px);
    max-height: min(90vh, 780px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid var(--border-color, rgba(120, 135, 150, .2));
    border-radius: 24px;
    background: var(--card-bg, var(--surface, #fff));
    color: var(--text, var(--ink, #17252b));
    box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
    outline: none;
}
.premium-paywall-close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-size: 1.7rem;
    cursor: pointer;
}
.premium-paywall-close:hover { background: rgba(120, 135, 150, .12); }
.premium-lock-icon-modal { margin-bottom: 18px; }
.premium-paywall-panel h2 { margin: 7px 0 8px; font-size: clamp(1.6rem, 5vw, 2rem); letter-spacing: -.035em; }
.premium-paywall-subtitle { margin: 0 0 20px; color: var(--muted, #6b7880); line-height: 1.55; }
.premium-modal-benefits { margin-bottom: 22px; }
.premium-price { display: flex; align-items: baseline; gap: 7px; margin: 0 0 5px; }
.premium-price strong { font-size: 2rem; letter-spacing: -.04em; }
.premium-price span { color: var(--muted, #6b7880); font-size: .92rem; }
.premium-payment-note { margin: 0 0 15px; color: var(--muted, #6b7880); font-size: .78rem; line-height: 1.5; }
.premium-later-button { display: block; width: 100%; margin-top: 8px; }
body.premium-paywall-open { overflow: hidden; }
html[data-theme="dark"] .premium-paywall-panel { background: var(--card-bg, #20292c); }
@media (max-width: 520px) {
    .premium-paywall-panel { padding: 25px 21px; border-radius: 20px; }
    .premium-locked-screen .premium-cta { max-width: none; }
}
