/* =========================================================
   DAILY MOTIVATION
   COMPLETE APPLICATION STYLESHEET
   ========================================================= */

/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #fffaf3;
    color: #2d241f;
    line-height: 1.6;
    min-height: 100vh;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}


/* =========================================================
   THEME VARIABLES
   ========================================================= */

:root {
    --bg: #fffaf3;
    --surface: #ffffff;
    --surface-soft: #fff5e8;

    --text: #2d241f;
    --text-soft: #766b64;
    --text-muted: #9b9189;

    --primary: #c85b2b;
    --primary-dark: #a94720;
    --primary-light: #f7dfd0;

    --accent: #e58b4c;

    --border: #eadfd5;

    --success: #4f8a62;
    --success-light: #e3f1e7;

    --danger: #c65353;
    --danger-light: #f9e2e2;

    --shadow-sm:
        0 4px 14px rgba(62, 42, 28, 0.06);

    --shadow:
        0 12px 35px rgba(62, 42, 28, 0.09);

    --sidebar-width: 250px;
    --header-height: 74px;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
}

html[data-theme="dark"] {
    --bg: #171310;
    --surface: #211c18;
    --surface-soft: #2a211b;

    --text: #f8eee6;
    --text-soft: #c4b7ae;
    --text-muted: #95877e;

    --primary: #e57943;
    --primary-dark: #f08a54;
    --primary-light: #3b281f;

    --accent: #efa36d;

    --border: #3b3029;

    --success: #76b587;
    --success-light: #233528;

    --danger: #e07878;
    --danger-light: #392323;

    --shadow-sm:
        0 4px 16px rgba(0, 0, 0, 0.18);

    --shadow:
        0 15px 40px rgba(0, 0, 0, 0.25);
}


/* =========================================================
   BODY / GLOBAL
   ========================================================= */

body {
    background: var(--bg);
    color: var(--text);
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

::selection {
    background: var(--primary-light);
    color: var(--primary);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);

    background: var(--surface);

    border-right: 1px solid var(--border);

    padding: 28px 18px;

    z-index: 100;

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 8px 12px 28px;

    font-size: 18px;
    font-weight: 800;

    color: var(--text);
}

.logo-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border-radius: 12px;

    background: var(--primary);
    color: #ffffff;

    font-size: 20px;

    box-shadow:
        0 7px 18px rgba(200, 91, 43, 0.25);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 12px 14px;

    border: none;
    border-radius: 12px;

    background: transparent;

    color: var(--text-soft);

    font-size: 14px;
    font-weight: 600;

    text-align: left;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.nav-item:hover {
    background: var(--surface-soft);
    color: var(--primary);

    transform: translateX(2px);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-icon {
    width: 24px;

    display: inline-flex;
    justify-content: center;

    font-size: 17px;
}


/* =========================================================
   APP SHELL
   ========================================================= */

.app-shell {
    margin-left: var(--sidebar-width);

    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    height: var(--header-height);

    position: sticky;
    top: 0;

    z-index: 80;

    background: color-mix(
        in srgb,
        var(--bg) 92%,
        transparent
    );

    backdrop-filter: blur(14px);

    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1180px;

    height: 100%;

    margin: 0 auto;

    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: none;

    align-items: center;
    gap: 9px;

    font-weight: 800;
}

.header-actions {
    margin-left: auto;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text-soft);

    padding: 9px 14px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 600;

    box-shadow: var(--shadow-sm);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);

    transform: translateY(-1px);
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
    width: 100%;
    flex: 1;
}

.app-section {
    display: none;

    min-height: calc(
        100vh - var(--header-height)
    );

    padding: 48px 28px 70px;
}

.app-section.active-section {
    display: block;

    animation: sectionFade 0.25s ease;
}

@keyframes sectionFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-container,
.section-container {
    width: 100%;
    max-width: 1080px;

    margin: 0 auto;
}


/* =========================================================
   DASHBOARD INTRO
   ========================================================= */

.dashboard-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 28px;
}

.section-label {
    display: inline-block;

    margin-bottom: 7px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.6px;

    text-transform: uppercase;
}

.greeting-area h1 {
    font-size: clamp(28px, 4vw, 42px);

    line-height: 1.15;

    letter-spacing: -1px;

    margin-bottom: 8px;
}

.intro-text {
    color: var(--text-soft);

    font-size: 15px;
}

.date-card {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 225px;

    padding: 14px 17px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);
}

.date-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border-radius: 12px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 21px;
}

.date-label {
    display: block;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.3px;
}

.date-card strong {
    display: block;

    margin-top: 2px;

    font-size: 13px;
}


/* =========================================================
   MOTIVATION CARD
   ========================================================= */

.motivation-card {
    display: flex;
    align-items: flex-start;

    gap: 18px;

    padding: 25px 27px;

    background:
        linear-gradient(
            135deg,
            var(--primary-light),
            var(--surface)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    margin-bottom: 28px;
}

.motivation-icon {
    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: var(--primary);

    color: #ffffff;

    font-size: 21px;

    box-shadow:
        0 8px 18px rgba(200, 91, 43, 0.2);
}

.motivation-content {
    flex: 1;
}

.motivation-label {
    display: block;

    margin-bottom: 8px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.motivation-card blockquote {
    color: var(--text);

    font-size: 19px;
    font-weight: 600;

    line-height: 1.55;
}


/* =========================================================
   PROGRESS SECTION
   ========================================================= */

.progress-section {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 25px 27px;

    box-shadow: var(--shadow-sm);

    margin-bottom: 28px;
}

.progress-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 17px;
}

.progress-header h2 {
    font-size: 20px;

    line-height: 1.3;
}

.progress-percentage {
    color: var(--primary);

    font-size: 28px;
    font-weight: 800;
}

.progress-track {
    width: 100%;
    height: 11px;

    overflow: hidden;

    background: var(--surface-soft);

    border-radius: 999px;

    border: 1px solid var(--border);
}

.progress-bar {
    width: 0;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--accent)
        );

    border-radius: inherit;

    transition: width 0.4s ease;
}

.progress-summary {
    display: flex;

    justify-content: space-between;

    margin-top: 13px;

    color: var(--text-soft);

    font-size: 13px;
}

.progress-summary strong {
    color: var(--text);

    font-weight: 800;
}


/* =========================================================
   TASKS SECTION
   ========================================================= */

.tasks-section {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 27px;

    box-shadow: var(--shadow-sm);
}

.tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.tasks-header h2 {
    font-size: 22px;

    line-height: 1.3;

    margin-bottom: 4px;
}

.tasks-header p {
    color: var(--text-soft);

    font-size: 13px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.add-task-button,
.primary-button,
.secondary-button {
    border: none;

    border-radius: 10px;

    font-weight: 700;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.add-task-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 11px 17px;

    background: var(--primary);

    color: #ffffff;

    white-space: nowrap;

    box-shadow:
        0 7px 16px rgba(200, 91, 43, 0.18);
}

.add-task-button span {
    font-size: 19px;

    line-height: 1;
}

.add-task-button:hover,
.primary-button:hover {
    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow:
        0 9px 20px rgba(200, 91, 43, 0.22);
}

.primary-button {
    padding: 11px 18px;

    background: var(--primary);

    color: #ffffff;
}

.secondary-button {
    padding: 8px 12px;

    background: transparent;

    color: var(--text-soft);

    border: 1px solid var(--border);
}

.secondary-button:hover {
    color: var(--primary);

    border-color: var(--primary);

    background: var(--primary-light);

    transform: translateY(-1px);
}


/* =========================================================
   TASK LIST
   ========================================================= */

.task-list {
    display: flex;
    flex-direction: column;

    gap: 11px;
}

.task-item {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 16px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 14px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.task-item:hover {
    transform: translateY(-2px);

    border-color: var(--primary);

    box-shadow: var(--shadow-sm);
}

.task-item.completed {
    opacity: 0.65;
}

.task-item.completed .task-details h3 {
    text-decoration: line-through;
    color: var(--text-muted);
}


/* =========================================================
   CUSTOM CHECKBOX
   ========================================================= */

.task-checkbox {
    position: relative;

    flex: 0 0 auto;

    width: 24px;
    height: 24px;

    margin-top: 1px;

    cursor: pointer;
}

.task-checkbox input {
    position: absolute;

    opacity: 0;

    width: 1px;
    height: 1px;
}

.custom-checkbox {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border: 2px solid var(--border);

    border-radius: 7px;

    color: transparent;

    font-size: 14px;
    font-weight: 900;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.task-checkbox input:checked + .custom-checkbox {
    background: var(--success);

    border-color: var(--success);

    color: #ffffff;
}

.task-checkbox input:focus-visible + .custom-checkbox {
    outline: 3px solid var(--primary-light);
}


/* =========================================================
   TASK DETAILS
   ========================================================= */

.task-details {
    min-width: 0;

    flex: 1;
}

.task-details h3 {
    margin-bottom: 3px;

    font-size: 15px;

    line-height: 1.4;

    word-break: break-word;
}

.task-details p {
    color: var(--text-soft);

    font-size: 12px;

    margin-bottom: 8px;

    word-break: break-word;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
}

.task-tag {
    display: inline-flex;

    align-items: center;

    padding: 4px 8px;

    border-radius: 999px;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 10px;
    font-weight: 700;
}

.priority-high {
    background: var(--danger-light);

    color: var(--danger);
}

.priority-medium {
    background: var(--primary-light);

    color: var(--primary);
}

.priority-low {
    background: var(--success-light);

    color: var(--success);
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty-task-state,
.feature-placeholder {
    text-align: center;

    padding: 55px 25px;

    border: 1px dashed var(--border);

    border-radius: var(--radius);

    background: var(--surface-soft);
}

.empty-icon,
.placeholder-icon {
    width: 55px;
    height: 55px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 17px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 23px;
}

.empty-task-state h3,
.feature-placeholder h2 {
    margin-bottom: 5px;

    font-size: 18px;
}

.empty-task-state p,
.feature-placeholder p {
    color: var(--text-soft);

    font-size: 13px;
}


/* =========================================================
   PAGE HEADINGS
   ========================================================= */

.page-heading {
    margin-bottom: 28px;
}

.page-heading h1 {
    font-size: clamp(30px, 5vw, 42px);

    line-height: 1.15;

    letter-spacing: -1px;

    margin-bottom: 8px;
}

.page-heading p {
    max-width: 620px;

    color: var(--text-soft);

    font-size: 15px;
}


/* =========================================================
   SECTION CARD
   ========================================================= */

.section-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 27px;

    box-shadow: var(--shadow-sm);
}

.section-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.section-card-header h2 {
    font-size: 21px;

    margin-bottom: 3px;
}

.section-card-header p {
    color: var(--text-soft);

    font-size: 13px;
}


/* =========================================================
   CALENDAR
   ========================================================= */

#calendar .section-container {
    max-width: 1080px;
}

.calendar-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.calendar-header h2 {
    font-size: 20px;
}

.calendar-nav {
    display: flex;
    gap: 7px;
}

.calendar-nav button {
    width: 38px;
    height: 38px;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    border-radius: 10px;
}

.calendar-nav button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-grid {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 6px;
}

.calendar-day {
    min-height: 52px;

    border: 1px solid transparent;

    border-radius: 10px;

    background: var(--surface);

    color: var(--text);

    font-weight: 600;
}

.calendar-day:hover {
    background: var(--surface-soft);

    border-color: var(--border);
}

.calendar-day.today {
    border-color: var(--primary);

    color: var(--primary);
}

.calendar-day.selected {
    background: var(--primary);

    color: #ffffff;

    border-color: var(--primary);
}

.calendar-day.other-month {
    color: var(--text-muted);

    opacity: 0.55;
}

.calendar-day.has-tasks::after {
    content: "";

    display: block;

    width: 5px;
    height: 5px;

    margin: 3px auto 0;

    border-radius: 50%;

    background: var(--accent);
}


/* =========================================================
   GOALS
   ========================================================= */

.goals-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.goal-card {
    padding: 21px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);
}

.goal-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 12px;
}

.goal-card h3 {
    font-size: 18px;

    margin-bottom: 7px;
}

.goal-card > p {
    color: var(--text-soft);

    font-size: 13px;

    margin-bottom: 17px;
}

.goal-progress-track {
    height: 9px;

    background: var(--surface-soft);

    border-radius: 999px;

    overflow: hidden;

    border: 1px solid var(--border);
}

.goal-progress-bar {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--accent)
        );

    border-radius: inherit;
}

.goal-card-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 16px;

    color: var(--text-muted);

    font-size: 11px;
}

.goal-actions {
    display: flex;
    gap: 7px;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.settings-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 8px 25px;

    box-shadow: var(--shadow-sm);
}

.setting-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 22px 0;

    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row h3 {
    margin-bottom: 4px;

    font-size: 16px;
}

.setting-row p {
    color: var(--text-soft);

    font-size: 13px;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(30, 20, 14, 0.55);

    backdrop-filter: blur(5px);
}

.task-modal,
.goal-modal {
    position: relative;

    width: 100%;

    max-width: 520px;

    max-height: calc(100vh - 40px);

    overflow-y: auto;

    padding: 30px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 22px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.2);

    animation: modalIn 0.22s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;

    top: 17px;
    right: 17px;

    width: 36px;
    height: 36px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--surface);

    color: var(--text-soft);

    font-size: 22px;

    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);

    border-color: var(--danger);
}

.task-modal h2,
.goal-modal h2 {
    margin-bottom: 5px;

    font-size: 25px;

    line-height: 1.25;
}

.modal-description {
    color: var(--text-soft);

    font-size: 13px;

    margin-bottom: 23px;
}


/* =========================================================
   FORMS
   ========================================================= */

#taskForm,
#goalForm {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.form-label {
    margin-top: 7px;

    color: var(--text);

    font-size: 12px;

    font-weight: 700;
}

.task-input {
    width: 100%;

    padding: 12px 13px;

    background: var(--bg);

    color: var(--text);

    border: 1px solid var(--border);

    border-radius: 10px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.task-input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px var(--primary-light);
}

.task-notes {
    resize: vertical;

    min-height: 100px;
}

.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 17px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--border);

    background: var(--surface);
}

.footer-container {
    max-width: 1080px;

    margin: 0 auto;

    padding: 22px 28px;

    text-align: center;

    color: var(--text-muted);

    font-size: 12px;
}


/* =========================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================= */

.mobile-bottom-nav {
    display: none;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 900px) {

    :root {
        --sidebar-width: 210px;
    }

    .sidebar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .sidebar-logo {
        font-size: 15px;
    }

    .nav-item {
        font-size: 13px;
    }

    .app-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .header-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .dashboard-intro {
        align-items: flex-start;

        flex-direction: column;
    }

    .date-card {
        width: 100%;
    }

    .goals-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    :root {
        --header-height: 64px;
    }

    body {
        padding-bottom: 72px;
    }

    /* Hide desktop sidebar */

    .sidebar {
        display: none;
    }

    /* Reset app shell */

    .app-shell {
        margin-left: 0;
    }

    /* Mobile header */

    .site-header {
        height: var(--header-height);
    }

    .header-container {
        padding: 0 16px;
    }

    .mobile-logo {
        display: inline-flex;
    }

    .mobile-logo .logo-icon {
        width: 32px;
        height: 32px;

        font-size: 17px;

        border-radius: 10px;
    }

    .mobile-logo span:last-child {
        font-size: 14px;
    }

    .theme-toggle {
        padding: 8px 10px;
    }

    .theme-toggle span:last-child {
        display: none;
    }

    /* Main sections */

    .app-section {
        min-height: auto;

        padding: 30px 15px 45px;
    }

    /* Dashboard */

    .dashboard-intro {
        margin-bottom: 21px;

        gap: 17px;
    }

    .greeting-area h1 {
        font-size: 30px;
    }

    .intro-text {
        font-size: 13px;
    }

    .date-card {
        min-width: 0;

        padding: 12px 14px;
    }

    .date-icon {
        width: 36px;
        height: 36px;
    }

    /* Motivation */

    .motivation-card {
        padding: 19px;

        gap: 13px;

        border-radius: 17px;
    }

    .motivation-icon {
        width: 38px;
        height: 38px;

        border-radius: 11px;
    }

    .motivation-card blockquote {
        font-size: 15px;
    }

    /* Progress */

    .progress-section {
        padding: 19px;

        margin-bottom: 20px;
    }

    .progress-header h2 {
        font-size: 17px;
    }

    .progress-percentage {
        font-size: 23px;
    }

    .progress-summary {
        font-size: 12px;
    }

    /* Tasks */

    .tasks-section {
        padding: 19px;

        border-radius: 18px;
    }

    .tasks-header {
        flex-direction: column;

        align-items: stretch;

        gap: 14px;
    }

    .tasks-header h2 {
        font-size: 19px;
    }

    .add-task-button {
        width: 100%;
    }

    .task-item {
        padding: 13px;

        gap: 10px;
    }

    .task-item > .secondary-button {
        align-self: center;

        padding: 7px 9px;

        font-size: 11px;
    }

    /* Page headings */

    .page-heading {
        margin-bottom: 21px;
    }

    .page-heading h1 {
        font-size: 31px;
    }

    .page-heading p {
        font-size: 13px;
    }

    /* Section card */

    .section-card {
        padding: 18px;

        border-radius: 18px;
    }

    .section-card-header {
        flex-direction: column;

        align-items: stretch;
    }

    /* Calendar */

    .calendar-container {
        padding: 17px;
    }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 43px;

        font-size: 12px;
    }

    /* Goals */

    .goals-grid {
        grid-template-columns: 1fr;
    }

    .goal-card {
        padding: 17px;
    }

    .goal-card-footer {
        align-items: flex-start;

        flex-direction: column;
    }

    .goal-actions {
        width: 100%;
    }

    .goal-actions button {
        flex: 1;
    }

    /* Settings */

    .settings-card {
        padding: 5px 18px;
    }

    .setting-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }

    .setting-row .primary-button {
        width: 100%;
    }

    /* Modals */

    .modal-overlay {
        align-items: flex-end;

        padding: 10px;
    }

    .task-modal,
    .goal-modal {
        max-height: calc(100vh - 20px);

        padding: 23px 18px;

        border-radius: 20px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
    }

    /* Footer */

    .footer-container {
        padding: 18px 15px;

        font-size: 11px;
    }

    /* Mobile navigation */

    .mobile-bottom-nav {
        position: fixed;

        display: grid;

        grid-template-columns:
            repeat(7, 1fr);

        left: 0;
        right: 0;
        bottom: 0;

        height: 70px;

        z-index: 500;

        background: var(--surface);

        border-top: 1px solid var(--border);

        box-shadow:
            0 -7px 25px rgba(40, 25, 15, 0.08);

        padding:
            7px 4px
            env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        display: flex;

        flex-direction: column;

        align-items: center;
        justify-content: center;

        gap: 2px;

        border: none;

        background: transparent;

        color: var(--text-muted);

        border-radius: 10px;

        min-width: 0;

        transition:
            color 0.2s ease,
            background 0.2s ease;
    }

    .mobile-nav-item span {
        font-size: 16px;

        line-height: 1.2;
    }

    .mobile-nav-item small {
        max-width: 100%;

        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;

        font-size: 8px;

        font-weight: 700;
    }

    .mobile-nav-item.active {
        color: var(--primary);

        background: var(--primary-light);
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .mobile-logo span:last-child {
        display: none;
    }

    .greeting-area h1 {
        font-size: 27px;
    }

    .section-label {
        font-size: 9px;
    }

    .motivation-card {
        padding: 16px;
    }

    .motivation-card blockquote {
        font-size: 14px;
    }

    .progress-percentage {
        font-size: 20px;
    }

    .task-details h3 {
        font-size: 14px;
    }

    .task-details p {
        font-size: 11px;
    }

    .calendar-day {
        min-height: 38px;

        font-size: 11px;
    }

    .mobile-nav-item span {
        font-size: 14px;
    }

    .mobile-nav-item small {
        font-size: 7px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-light);

    outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}