* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cream-bg: #faf7f0;
    --cream-light: #fdfaf5;
    --cream-card: #fffdf9;

    --brown-dark: #4a3b31;
    --brown: #725b49;
    --brown-light: #9a806a;

    --olive: #68734b;
    --olive-dark: #56613d;
    --olive-light: #e6eadb;

    --green: #718b68;
    --green-light: #e8eee3;

    --sand: #d8c7b2;
    --sand-light: #eee5d9;

    --border: #e5dbce;

    --text: #3f352e;
    --muted: #817369;

    --danger: #9a5b55;
    --danger-light: #f3e4e1;

    --shadow:
        0 8px 28px rgba(75, 59, 45, 0.07);
}


/* =========================
   GENERAL
========================= */

body {
    font-family:
        Tahoma,
        Arial,
        sans-serif;

    direction: rtl;

    background:
        var(--cream-bg);

    color:
        var(--text);

    min-height: 100vh;

    cursor: default;
}


h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
strong,
small,
label,
.brand,
.welcome-content,
.stat-card,
.stat-card *,
.section-header,
.section-header *,
.section-title,
.section-title *,
.task-description,
.task-meta,
.task-meta *,
.reminder-message,
.reminder-info,
.reminder-info *,
.empty-state,
.empty-state *,
.modal-header,
.modal-header *,
.form-group label,
.form-group small {
    cursor: default;
}


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

.topbar {
    width: 100%;

    padding:
        18px 6%;

    background:
        rgba(255, 253, 248, 0.97);

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

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}

.brand {
    display: flex;

    align-items: center;

    gap: 13px;
}

.brand-icon {
    width: 46px;
    height: 46px;

    border-radius: 13px;

    background:
        var(--olive);

    color:
        white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 23px;

    font-weight: bold;

    box-shadow:
        0 5px 15px
        rgba(104, 115, 75, 0.2);

    cursor: default;
}

.brand h1 {
    font-size: 23px;

    color:
        var(--brown-dark);

    margin-bottom: 3px;
}

.brand p {
    color:
        var(--brown-light);

    font-size: 12px;
}

.user-area {
    display: flex;

    align-items: center;

    gap: 9px;
}

.user-box {
    padding:
        9px 14px;

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

    border-radius: 11px;

    color:
        var(--brown);

    background:
        var(--cream-card);

    font-size: 13px;

    cursor: default;
}

.user-icon {
    margin-left: 6px;
}

.header-button {
    padding:
        9px 15px;

    border-radius: 10px;

    background:
        var(--olive-light);

    color:
        var(--olive-dark);

    cursor: pointer;

    font-family: inherit;

    font-size: 13px;
}

.header-button:hover {
    background:
        #dce3cd;
}

.logout-button {
    background:
        var(--danger-light);

    color:
        var(--danger);
}


/* =========================
   CONTAINER
========================= */

.container {
    width:
        min(1180px, 92%);

    margin:
        32px auto 55px;
}


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

.welcome {
    position: relative;

    overflow: hidden;

    min-height: 205px;

    padding:
        25px 28px;

    margin-bottom: 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background:
        var(--olive);

    color:
        var(--cream-light);

    border-radius: 20px;

    box-shadow:
        0 10px 25px
        rgba(75, 82, 52, 0.13);

    cursor: default;
}

.welcome-content {
    flex: 1;

    min-width: 0;

    position: relative;

    z-index: 3;
}

.welcome-label,
.section-label {
    display: inline-block;

    font-size: 11px;

    font-weight: bold;

    color:
        #d9dfc9;

    margin-bottom: 7px;
}

.welcome h2 {
    font-size: 28px;

    margin-bottom: 8px;
}

.welcome p {
    color:
        #edf0e5;

    font-size: 14px;

    line-height: 1.9;
}

.welcome-line {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 15px;

    color:
        #dce3cf;

    font-size: 12px;
}

.welcome-line span {
    width: 25px;

    height: 2px;

    background:
        #d3dcc1;

    display: block;
}


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

.welcome-image {
    position: relative;

    width: 430px;

    height: 205px;

    flex:
        0 0 430px;

    margin-left: -70px;

    overflow: hidden;

    background:
        transparent;

    z-index: 1;

    cursor: default;
}

.welcome-image img {
    position: absolute;

    top: 0;

    right: 0;

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    transform:
        scale(1.08);

    cursor: default;
}

.image-overlay {
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 2;

    background:
        linear-gradient(
            to right,
            rgba(104, 115, 75, 0) 0%,
            rgba(104, 115, 75, 0) 38%,
            rgba(104, 115, 75, 0.06) 48%,
            rgba(104, 115, 75, 0.16) 58%,
            rgba(104, 115, 75, 0.35) 68%,
            rgba(104, 115, 75, 0.58) 78%,
            rgba(104, 115, 75, 0.82) 88%,
            var(--olive) 100%
        );
}


/* =========================
   DASHBOARD
========================= */

.dashboard {
    display: grid;

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

    gap: 14px;

    margin-bottom: 22px;
}

.stat-card {
    background:
        var(--cream-card);

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

    border-radius: 16px;

    padding: 18px;

    display: flex;

    align-items: center;

    gap: 13px;

    min-height: 98px;

    cursor: default;

    transition: none;
}

.stat-card:hover {
    transform: none;

    box-shadow: none;
}

.stat-card * {
    cursor: default;
}

.stat-icon {
    width: 44px;

    height: 44px;

    flex-shrink: 0;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 19px;

    cursor: default;
}

.stat-icon.olive {
    background:
        var(--olive-light);

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

.stat-icon.brown {
    background:
        var(--sand-light);

    color:
        var(--brown);
}

.stat-icon.green {
    background:
        var(--green-light);

    color:
        var(--green);
}

.stat-icon.cream {
    background:
        #eee7da;

    color:
        var(--brown);
}

.stat-card span {
    display: block;

    color:
        var(--muted);

    font-size: 12px;

    margin-bottom: 5px;
}

.stat-card strong {
    font-size: 25px;

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


/* =========================
   SECTIONS
========================= */

.task-section,
.reminder-section {
    background:
        var(--cream-card);

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

    border-radius: 20px;

    padding: 23px;

    margin-bottom: 22px;
}

.section-header,
.section-title {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.section-header h2,
.section-title h2 {
    font-size: 20px;

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

.section-label {
    color:
        var(--olive);
}


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

button {
    font-family: inherit;

    cursor: pointer;

    border: none;
}

.add-button {
    background:
        var(--olive);

    color: white;

    border-radius: 10px;

    padding:
        11px 17px;

    font-size: 13px;

    font-weight: bold;

    transition:
        0.2s ease;
}

.add-button:hover {
    background:
        var(--olive-dark);

    transform:
        translateY(-1px);
}

.add-button span {
    font-size: 18px;

    margin-left: 4px;
}


/* =========================
   FILTERS
========================= */

.filters {
    display: grid;

    grid-template-columns:
        2fr 1fr 1fr 1fr 1fr;

    gap: 9px;

    margin-bottom: 20px;

    align-items: center;
}

.search-wrapper {
    position: relative;

    width: 100%;
}

.search-wrapper input {
    padding-right: 40px;
}

.search-icon {
    position: absolute;

    right: 13px;

    top: 50%;

    transform:
        translateY(-50%);

    color:
        var(--brown-light);

    font-size: 19px;

    pointer-events: none;

    z-index: 2;

    cursor: default;
}

input,
textarea,
select {
    width: 100%;

    font-family: inherit;

    border:
        1px solid #d9cdbd;

    border-radius: 10px;

    background:
        #fffefa;

    color:
        var(--text);

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;

    cursor: text;
}

select {
    cursor: pointer;
}

input,
select {
    height: 44px;

    padding:
        0 12px;
}

textarea {
    padding: 11px;

    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color:
        var(--olive);

    box-shadow:
        0 0 0 3px
        rgba(104, 115, 75, 0.1);
}

::placeholder {
    color:
        #a18f81;
}


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

.task-list {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.task-card {
    border:
        1px solid var(--border);

    border-radius: 15px;

    padding: 18px;

    background:
        #fffefa;

    transition:
        0.2s ease;

    cursor: default;
}

.task-card:hover {
    border-color:
        #c8b9a7;

    box-shadow:
        0 7px 20px
        rgba(83, 65, 50, 0.05);
}

.task-card * {
    cursor: default;
}

.task-title-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 9px;
}

.task-title-row h3 {
    font-size: 16px;

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

.task-description {
    color:
        #786c62;

    font-size: 13px;

    line-height: 1.8;

    margin-bottom: 14px;

    min-height: 20px;
}

.task-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 14px;
}


/* =========================
   STATUS
========================= */

.status-badge {
    padding:
        5px 9px;

    border-radius: 18px;

    font-size: 11px;

    white-space: nowrap;

    cursor: default;
}

.status-pending {
    background:
        #f2e9dc;

    color:
        #866846;
}

.status-progress {
    background:
        var(--sand-light);

    color:
        var(--brown);
}

.status-completed {
    background:
        var(--green-light);

    color:
        var(--green);
}


/* =========================
   TASK META
========================= */

.task-meta span {
    background:
        #f5f0e8;

    border:
        1px solid #e9ded1;

    color:
        #796b61;

    padding:
        6px 9px;

    border-radius: 8px;

    font-size: 11px;

    cursor: default;
}


/* =========================
   TASK ACTIONS
========================= */

.task-actions {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;
}

.task-actions button {
    padding:
        8px 12px;

    border-radius: 8px;

    font-size: 11px;
}

.status-task-button {
    background:
        var(--olive-light);

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

.edit-task-button {
    background:
        var(--sand-light);

    color:
        var(--brown);
}

.delete-task-button {
    background:
        var(--danger-light);

    color:
        var(--danger);
}

.task-actions button:hover {
    opacity: 0.78;
}


/* =========================
   REMINDERS
========================= */

.reminder-section {
    border-color:
        #ded4c7;

    background:
        #faf7f0;
}

.reminder-message {
    min-height: 18px;

    color:
        var(--muted);

    font-size: 11px;

    text-align: left;

    transition:
        opacity 0.2s ease;
}

.reminder-list {
    display: grid;

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

    gap: 11px;
}

.reminder-card {
    display: flex;

    align-items: center;

    gap: 11px;

    padding: 14px;

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

    border-radius: 13px;

    background:
        #fffefa;

    cursor: default;
}

.reminder-card * {
    cursor: default;
}

.reminder-icon {
    width: 40px;

    height: 40px;

    flex-shrink: 0;

    border-radius: 11px;

    background:
        var(--olive-light);

    color:
        var(--olive-dark);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 17px;

    cursor: default;
}

.reminder-info {
    display: flex;

    flex-direction: column;

    gap: 4px;
}

.reminder-info strong {
    font-size: 13px;

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

.reminder-info span {
    font-size: 11px;

    color:
        var(--muted);
}

.no-reminders {
    padding: 24px;

    text-align: center;

    color:
        var(--muted);
}

.no-reminders span {
    display: block;

    font-size: 28px;

    margin-bottom: 7px;
}

.no-reminders p {
    font-size: 12px;
}


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

.empty-state {
    text-align: center;

    padding:
        50px 20px;

    color:
        var(--muted);
}

.empty-icon {
    font-size: 40px;

    margin-bottom: 11px;

    opacity: 0.75;
}

.empty-state h3 {
    color:
        var(--brown-dark);

    margin-bottom: 7px;

    font-size: 17px;
}

.empty-state p {
    font-size: 12px;
}


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

.modal {
    display: none;

    position: fixed;

    inset: 0;

    background:
        rgba(55, 47, 38, 0.52);

    z-index: 1000;

    align-items: center;

    justify-content: center;

    padding: 20px;

    backdrop-filter:
        blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    width:
        min(560px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    background:
        var(--cream-card);

    border-radius: 20px;

    padding: 24px;

    box-shadow:
        0 25px 70px
        rgba(50, 40, 30, 0.18);

    animation:
        modalIn 0.2s ease;
}

@keyframes modalIn {

    from {
        opacity: 0;

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

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

.modal-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 23px;
}

.modal-header h2 {
    font-size: 20px;

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

.close-button {
    width: 37px;

    height: 37px;

    border-radius: 9px;

    background:
        #eee8de;

    color:
        var(--brown);

    font-size: 23px;

    line-height: 1;
}

.close-button:hover {
    background:
        #e4dbce;
}


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

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 12px;

    font-weight: bold;

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

.form-group small {
    display: block;

    margin-top: 5px;

    color:
        #9a897c;

    font-size: 10px;
}

.ai-category-section {
    margin:
        19px 0;
}

.ai-button {
    width: 100%;

    padding: 11px;

    border-radius: 10px;

    background:
        var(--olive-light);

    color:
        var(--olive-dark);

    font-weight: bold;

    font-size: 12px;
}

.ai-button:hover {
    background:
        #dce3cf;
}

.category-result {
    margin-top: 9px;

    padding: 10px;

    border-radius: 9px;

    background:
        #edf0e5;

    color:
        var(--olive-dark);

    font-size: 12px;

    text-align: center;
}

.hidden {
    display:
        none !important;
}

.form-actions {
    display: flex;

    gap: 9px;

    margin-top: 23px;
}

.submit-button,
.cancel-button {
    flex: 1;

    padding: 11px;

    border-radius: 10px;

    font-family: inherit;

    font-weight: bold;

    font-size: 12px;
}

.submit-button {
    background:
        var(--olive);

    color:
        white;
}

.submit-button:hover {
    background:
        var(--olive-dark);
}

.cancel-button {
    background:
        #eee9e1;

    color:
        var(--brown);
}

.cancel-button:hover {
    background:
        #e3dbd0;
}


/* =========================
   AUTH
========================= */

.auth-modal-content {
    width:
        min(460px, 100%);
}

.auth-tabs {
    display: flex;

    gap: 7px;

    margin-bottom: 21px;

    background:
        #eee9e0;

    padding: 5px;

    border-radius: 11px;
}

.auth-tab {
    flex: 1;

    background:
        transparent;

    padding: 9px;

    border-radius: 8px;

    color:
        var(--muted);

    cursor: pointer;
}

.auth-tab.active {
    background:
        var(--cream-card);

    color:
        var(--olive-dark);

    box-shadow:
        0 2px 7px
        rgba(70, 60, 45, 0.06);
}

.auth-form {
    display: flex;

    flex-direction: column;
}

.auth-submit {
    width: 100%;

    margin-top: 7px;
}

.guest-button {
    width: 100%;

    margin-top: 9px;

    padding: 10px;

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

    border-radius: 9px;

    background:
        var(--cream-card);

    color:
        var(--brown);

    font-family: inherit;

    cursor: pointer;
}

.guest-button:hover {
    background:
        #f5f0e8;
}

.auth-message {
    min-height: 20px;

    margin:
        4px 0 7px;

    font-size: 12px;

    color:
        var(--danger);
}

.auth-message.success {
    color:
        var(--green);
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .dashboard {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .filters {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .search-wrapper {
        grid-column:
            1 / -1;
    }

    .reminder-list {
        grid-template-columns:
            1fr;
    }

    .welcome-image {
        width: 350px;

        flex-basis: 350px;

        margin-left: -50px;
    }
}


@media (max-width: 700px) {

    .user-area {
        flex-direction: column;

        align-items: stretch;
    }

    .user-box {
        text-align: center;
    }

    .header-button {
        width: 100%;
    }
}


@media (max-width: 600px) {

    .topbar {
        padding:
            17px 4%;
    }

    .container {
        width: 94%;

        margin-top: 19px;
    }

    .welcome {
        min-height: auto;

        padding: 22px;

        flex-direction: column;

        align-items: stretch;

        gap: 10px;
    }

    .welcome h2 {
        font-size: 24px;
    }

    .welcome-image {
        width:
            calc(100% + 44px);

        height: 145px;

        flex-basis: 145px;

        margin-right: -22px;

        margin-left: -22px;

        border-radius:
            0 0 15px 15px;
    }

    .welcome-image img {
        transform:
            scale(1.03);
    }

    .image-overlay {
        background:
            linear-gradient(
                to bottom,
                rgba(104, 115, 75, 0) 20%,
                rgba(104, 115, 75, 0.08) 38%,
                rgba(104, 115, 75, 0.25) 55%,
                rgba(104, 115, 75, 0.55) 72%,
                var(--olive) 100%
            );
    }

    .dashboard {
        grid-template-columns:
            1fr;
    }

    .filters {
        grid-template-columns:
            1fr;
    }

    .search-wrapper {
        grid-column: auto;
    }

    .section-header {
        align-items:
            flex-start;

        flex-direction:
            column;
    }

    .add-button {
        width: 100%;
    }

    .task-title-row {
        align-items:
            flex-start;

        flex-direction:
            column;
    }

    .modal-content {
        padding: 20px;
    }

    .form-actions {
        flex-direction:
            column;
    }

    .section-title {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 8px;
    }

    .reminder-message {
        text-align:
            right;
    }
}