:root {
    --orange: #f46b21;
    --orange-dark: #d94f12;
    --ink: #202329;
    --muted: #777d87;
    --line: #eee9e4;
    --cream: #fff8f2;
    --green: #25844d;
    --surface: #fffdfb
}

body[data-theme="dark"] {
    --ink: #edf0f5;
    --muted: #a2a9b5;
    --line: #343943;
    --cream: #292d35;
    --green: #67c58b;
    --surface: #252932;
    background: #171a20;
    color: var(--ink)
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .card,
body[data-theme="dark"] .user-menu-panel { background: #20242c; border-color: var(--line) }
body[data-theme="dark"] .topbar { border-bottom-color: var(--line) }
body[data-theme="dark"] .user-menu-panel { box-shadow: 0 12px 35px #0006 }
body[data-theme="dark"] .topbar .user-menu-panel a,
body[data-theme="dark"] .topbar .user-menu-panel .nav-button,
body[data-theme="dark"] .topbar nav a,
body[data-theme="dark"] .nav-button,
body[data-theme="dark"] .topbar-user { color: #d8dce4 }
body[data-theme="dark"] .topbar .user-menu-panel a:hover,
body[data-theme="dark"] .topbar .user-menu-panel .nav-button:hover { color: #ff9a62 }
body[data-theme="dark"] .user-avatar,
body[data-theme="dark"] .core-values-strip strong,
body[data-theme="dark"] .section-number,
body[data-theme="dark"] .icon-badge { background: #3b2c27; color: #ff9a62 }
body[data-theme="dark"] .label,
body[data-theme="dark"] label { color: #d5d9e1 }
body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select { background: #1b1e25; border-color: #3a404b; color: var(--ink); color-scheme: dark }
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder { color: #858d9a }
body[data-theme="dark"] .textile-toolbar button { background: linear-gradient(#343943,#272b33); border-color: #505661; color: #e4e7ec }
body[data-theme="dark"] .toolbar-divider { background: #505661 }
body[data-theme="dark"] .textile-preview,
body[data-theme="dark"] .create-task-page .workflow-section,
body[data-theme="dark"] .account-details,
body[data-theme="dark"] .appearance-settings,
body[data-theme="dark"] .configured-url { background: #252932; border-color: var(--line); color: #d5d9e1 }
body[data-theme="dark"] .textile-preview th { background: #30353f }
body[data-theme="dark"] .textile-preview th,
body[data-theme="dark"] .textile-preview td { border-color: #505661 }
body[data-theme="dark"] .login-value strong { color: #e1e4ea }
body[data-theme="dark"] .login-value { border-bottom-color: var(--line) }
body[data-theme="dark"] .microsoft-login { background: #252932; border-color: #505661; color: #edf0f5 }
body[data-theme="dark"] .microsoft-login:hover { background: #30353f }
body[data-theme="dark"] .hint { background: #332b27; color: #d8ad92 }
body[data-theme="dark"] .status.online { background: #22352a }
body[data-theme="dark"] .status.offline { background: #3b2c27 }
body[data-theme="dark"] .alert.error { background: #3a2726; color: #ffaaa0; border-color: #62403d }
body[data-theme="dark"] .alert.success { background: #22352a; color: #91d5a9; border-color: #365742 }
body[data-theme="dark"] footer { color: #777f8d }

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #fffaf6;
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px
}

.topbar {
    height: 78px;
    padding: 0 max(calc((100vw - 1120px)/2), 24px);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f3eee9
}

.core-values-strip {
    max-width: 1120px;
    min-height: 31px;
    margin: 0 auto;
    padding: 6px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 4px;
    color: #777d87;
    font-size: 10px;
    line-height: 1.3
}

.core-values-strip span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap
}

.core-values-strip strong {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff0e5;
    color: var(--orange-dark);
    font-size: 9px;
    font-weight: 800;
    line-height: 1
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
    min-width: 0
}

.brand-logo {
    display: block;
    width: 116px;
    height: 55px;
    object-fit: contain
}

.brand-product {
    color: #92949a;
    font: 700 9px 'DM Sans', sans-serif;
    letter-spacing: 1.6px;
    white-space: nowrap
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 26px
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 22px
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px 8px 17px;
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    list-style: none
}

.topbar-user::-webkit-details-marker { display: none }
.user-menu { position: relative }
.menu-chevron { color: var(--muted); font-size: 12px; transition: transform .15s ease }
.user-menu[open] .menu-chevron { transform: rotate(180deg) }
.user-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    min-width: 190px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 35px #3020161c
}
.topbar .user-menu-panel { display: grid; align-items: stretch; gap: 0 }
.topbar .user-menu-panel a, .topbar .user-menu-panel .nav-button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #545760;
    text-align: left;
    text-decoration: none;
    font: 600 13px 'DM Sans', sans-serif;
    cursor: pointer
}
.topbar .user-menu-panel a:hover, .topbar .user-menu-panel .nav-button:hover { background: var(--cream); color: var(--orange-dark) }
.topbar .user-menu-panel form { margin: 0 }
.topbar .user-menu-panel .menu-divider { height: 1px; margin: 5px 8px; background: var(--line) }

.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff0e5;
    color: var(--orange-dark);
    font-size: 13px;
    font-weight: 800
}

.topbar nav a,
.nav-button {
    color: #545760;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px
}

.topbar nav a:hover {
    color: var(--orange)
}

nav form {
    margin: 0
}

.nav-button {
    border: 0;
    background: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer
}

.page-shell {
    max-width: 1000px;
    margin: 0 auto;
    padding: 57px 24px 28px
}

.create-task-page .hero {
    display: none
}

.create-task-page .page-shell {
    max-width: 1280px;
    padding: 18px 24px 10px
}

.create-task-page footer {
    display: none
}

.hero {
    margin-bottom: 30px
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.55px;
    color: #a26a48;
    display: flex;
    align-items: center;
    gap: 8px
}

.eyebrow span {
    width: 7px;
    height: 7px;
    background: var(--orange);
    border-radius: 50%
}

h1,
h2,
p {
    margin-top: 0
}

.hero h1 {
    font: 800 clamp(32px, 5vw, 44px)/1.13 Manrope, sans-serif;
    letter-spacing: -1.6px;
    margin: 13px 0 8px
}

.hero>p {
    font-size: 16px;
    color: var(--muted);
    margin: 0
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 13px 45px #48210b0b
}

.task-form {
    padding: 31px 36px
}

.form-section {
    padding: 0 0 30px;
    margin-bottom: 27px;
    border-bottom: 1px solid var(--line)
}

.form-section.last {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 12px
}

.section-title,
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px
}

.section-title {
    justify-content: flex-start;
    gap: 14px
}

.section-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: #fff0e5;
    border-radius: 12px;
    color: var(--orange-dark);
    font: 800 12px Manrope
}

.section-title h2,
.card-head h2 {
    font: 700 18px Manrope;
    margin: 0 0 3px
}

.section-title p {
    font-size: 12px;
    color: var(--muted);
    margin: 0
}

.grid {
    display: grid;
    gap: 18px 20px
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.span-two {
    grid-column: span 2
}

.span-three {
    grid-column: span 3
}

.span-four {
    grid-column: span 4
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #444750;
    font-size: 12px;
    font-weight: 700
}

label small {
    font-size: 11px;
    color: #9397a0;
    font-weight: 400;
    margin-top: -4px
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #e9e5e1;
    border-radius: 9px;
    background: #fff;
    padding: 12px 13px;
    font: 500 13px 'DM Sans';
    color: var(--ink);
    outline: none;
    transition: .2s
}

input::placeholder,
textarea::placeholder {
    color: #b4b5ba;
    font-weight: 400
}

input:focus,
textarea:focus,
select:focus {
    border-color: #f39b68;
    box-shadow: 0 0 0 3px #f46b2115
}

textarea {
    resize: vertical;
    min-height: 84px
}

.textile-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: -10px
}

.textile-toolbar button {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    background: linear-gradient(#fff, #f4f4f4);
    color: #303238;
    font: 600 12px Arial, sans-serif;
    cursor: pointer
}

.textile-toolbar button:hover {
    border-color: #aaa;
    background: #ececec
}

.textile-toolbar button:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 1px
}

.textile-toolbar button.preview-toggle {
    margin-left: auto;
    width: auto;
    padding: 0 10px;
    border-radius: 6px;
    font: 600 11px 'DM Sans', sans-serif
}

.toolbar-divider {
    width: 1px;
    height: 23px;
    margin: 0 3px;
    background: #ddd
}

.toolbar-glyph {
    font: 700 15px Arial, sans-serif;
    line-height: 1
}

.textile-toolbar button:nth-of-type(6),
.textile-toolbar button:nth-of-type(7),
.textile-toolbar button:nth-of-type(8) {
    min-width: 34px;
    font-size: 10px
}

.textile-toolbar button:disabled {
    cursor: wait;
    opacity: .65
}

.textile-preview {
    min-height: 48px;
    margin-top: -9px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fffdfb;
    color: #444750;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere
}

.textile-preview[hidden] {
    display: none
}

.textile-preview > :first-child {
    margin-top: 0
}

.textile-preview > :last-child {
    margin-bottom: 0
}

.textile-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0
}

.textile-preview th,
.textile-preview td {
    border: 1px solid #d9d9d9;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top
}

.textile-preview th {
    background: #f6f4f2;
    font-weight: 700
}

.submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
    border-top: 1px solid var(--line)
}

.submit-row p {
    margin: 0;
    color: #858790;
    font-size: 12px
}

.submit-row p span {
    color: var(--orange);
    margin-right: 5px
}

.primary {
    border: 0;
    border-radius: 9px;
    background: var(--orange);
    color: white;
    padding: 13px 18px;
    font: 700 13px 'DM Sans';
    cursor: pointer;
    box-shadow: 0 5px 12px #f46b2130;
    transition: .2s
}

.primary:hover {
    background: var(--orange-dark);
    transform: translateY(-1px)
}

.primary span {
    font-size: 17px;
    margin-left: 13px
}

.auth-card,
.settings-card {
    max-width: 520px;
    padding: 30px 34px;
    margin: 0 auto
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .85fr);
    gap: 56px;
    align-items: center
}

.login-layout .auth-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 26px
}

.microsoft-login {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    background: #fff;
    color: #242424;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease
}

.microsoft-login:hover { background: #f7f7f7; border-color: #999 }
.microsoft-mark { display: grid; width: 16px; height: 16px; grid-template-columns: repeat(2, 1fr); gap: 2px }
.microsoft-mark i:nth-child(1) { background: #f25022 }
.microsoft-mark i:nth-child(2) { background: #7fba00 }
.microsoft-mark i:nth-child(3) { background: #00a4ef }
.microsoft-mark i:nth-child(4) { background: #ffb900 }
.auth-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5 }

.login-values-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px
}

.login-value {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 48px;
    padding: 5px 0;
    border-bottom: 1px solid #f0e4dc
}

.login-value:last-child {
    border-bottom: 0
}

.login-value > span {
    display: block;
    flex: 0 0 34px;
    color: var(--orange-dark);
    font: 800 27px/1 Manrope, sans-serif
}

.login-value strong {
    color: #3d3e43;
    font-size: 17px;
    font-weight: 600
}

.create-task-page .task-form {
    padding: 17px 24px
}

.create-task-page .form-section {
    padding-bottom: 12px;
    margin-bottom: 12px
}

.create-task-page .form-section.last {
    padding-bottom: 4px;
    margin-bottom: 0
}

.create-task-page .section-title {
    gap: 10px;
    margin-bottom: 10px
}

.create-task-page .section-number {
    display: none
}

.create-task-page .section-title h2 {
    font-size: 15px
}

.create-task-page .section-title p {
    font-size: 10px
}

.create-task-page .grid {
    gap: 8px 14px
}

.create-task-page .task-side-fields {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0
}

.create-task-page label {
    gap: 4px;
    font-size: 11px
}

.create-task-page label small {
    font-size: 9px
}

.create-task-page input,
.create-task-page select {
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px
}

.create-task-page input.auto-filled {
    animation: suggested-hours-highlight 1.1s ease-out
}

@keyframes suggested-hours-highlight {
    0% {
        border-color: var(--orange);
        background-color: #fff0e5;
        box-shadow: 0 0 0 3px rgb(248 100 24 / 18%)
    }
    100% {
        border-color: var(--line);
        background-color: #fff;
        box-shadow: none
    }
}

@media(prefers-reduced-motion:reduce) {
    .create-task-page input.auto-filled {
        animation: none;
        border-color: var(--orange);
        background-color: #fff0e5
    }
}

.create-task-page textarea {
    min-height: 68px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px
}

.create-task-page .textile-toolbar {
    margin-top: -3px
}

.create-task-page .textile-preview {
    min-height: 32px;
    margin-top: -3px;
    padding: 8px 10px;
    font-size: 12px
}

.create-task-page .submit-row {
    padding-top: 12px
}

.create-task-page .submit-row .primary {
    padding: 10px 15px
}

.workflow-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px
}

.create-task-page .workflow-section,
.create-task-page .workflow-section.last {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fffdfb
}

.create-task-page .workflow-section .section-title {
    align-items: flex-start;
    gap: 8px;
    min-height: 30px;
    margin-bottom: 12px
}

.create-task-page .workflow-section .section-title h2 {
    font-size: 13px;
    line-height: 1.25
}

.create-task-page .workflow-section .section-title p {
    font-size: 9px;
    line-height: 1.3
}

.create-task-page .workflow-section .section-number {
    flex: 0 0 29px
}

.create-task-page .workflow-section .grid.two {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.auth-card form,
.settings-card form {
    display: grid;
    gap: 17px
}

.card-head {
    margin-bottom: 22px
}

.icon-badge {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff0e5;
    color: var(--orange);
    font-size: 20px
}

.step {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--orange);
    font-weight: 800;
    display: block;
    margin-bottom: 7px
}

.auth-foot {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 20px 0 0
}

.auth-foot a {
    color: var(--orange-dark);
    font-weight: 700;
    text-decoration: none
}

.hint {
    display: flex;
    gap: 10px;
    background: #fff8f2;
    border-radius: 10px;
    padding: 12px;
    color: #8f654d
}

.hint p {
    font-size: 11px;
    line-height: 1.55;
    margin: 0
}

.status {
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 8px 11px
}

.status i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    background: currentColor
}

.status.online {
    color: var(--green);
    background: #eef8f1
}

.status.offline {
    color: #b45a2a;
    background: #fff2e9
}

.alert {
    border-radius: 9px;
    padding: 12px 14px;
    margin: 0 0 17px;
    font-size: 12px;
    line-height: 1.5
}

.alert.error {
    color: #9d361f;
    background: #fff0ec;
    border: 1px solid #ffe0d7
}

.alert.success {
    color: #287849;
    background: #edf8f0;
    border: 1px solid #d9efdf
}

.messages {
    max-width: 720px;
    margin: 0 auto 18px
}

.messages:empty {
    display: none
}

footer {
    text-align: center;
    color: #a4a0a0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    padding: 31px 0 0
}

footer span {
    color: var(--orange);
    padding: 0 5px
}

@media(max-width:700px) {
    .login-page .hero {
        display: none
    }

    .page-shell {
        padding: 38px 16px 22px
    }

    .login-page .page-shell {
        padding-top: 20px
    }

    .login-layout {
        grid-template-columns: 1fr;
        gap: 26px
    }

    .login-layout .auth-card {
        order: 2
    }

    .login-layout .login-values {
        order: 1
    }

    .login-values-list {
        gap: 0
    }

    .login-value {
        min-height: 25px;
        gap: 8px;
        padding: 1px 0;
        border-bottom: 0
    }

    .login-value > span {
        flex-basis: 20px;
        font-size: 16px
    }

    .login-value strong {
        font-size: 12px
    }

    .topbar {
        height: 68px;
        padding: 0 16px
    }

    .core-values-strip {
        padding: 7px 16px;
        row-gap: 3px;
        font-size: 9px
    }

    .topbar nav {
        gap: 14px
    }

    .topbar-right {
        gap: 12px
    }

    .topbar-user {
        gap: 6px;
        padding-left: 10px;
        font-size: 11px
    }

    .user-avatar {
        width: 30px;
        height: 30px
    }

    .topbar nav a,
    .nav-button {
        font-size: 12px
    }

    .task-form {
        padding: 24px 19px
    }

    .workflow-sections {
        grid-template-columns: 1fr
    }

    .create-task-page .workflow-section .grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .grid.three,
    .grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .span-three,
    .span-four {
        grid-column: span 2
    }

    .auth-card,
    .settings-card {
        padding: 25px 21px
    }
}

@media(max-width:1050px) and (min-width:701px) {
    .workflow-sections {
        grid-template-columns: 1fr
    }

    .grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .span-four {
        grid-column: span 2
    }

    .create-task-page .workflow-section .grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:460px) {

    .login-values-list {
        grid-template-columns: 1fr
    }

    .grid.two,
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr
    }

    .create-task-page .workflow-section .grid.two {
        grid-template-columns: 1fr
    }

    .span-two {
        grid-column: auto
    }

    .span-three {
        grid-column: auto
    }

    .span-four {
        grid-column: auto
    }

    .submit-row {
        align-items: stretch;
        flex-direction: column;
        gap: 15px
    }

    .submit-row .primary {
        width: 100%
    }

    .brand-logo {
        width: 100px;
        height: 47px
    }

    .topbar-right {
        gap: 8px
    }

    .topbar-user {
        padding-left: 7px;
        border-left: 0
    }

}

/* Keep the create-task workflow rows integrated with the dark form surface. */
body[data-theme="dark"].create-task-page .workflow-section,
body[data-theme="dark"] .create-task-page .workflow-section,
body[data-theme="dark"] .create-task-page .workflow-section.last {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #343943;
    border-radius: 0;
    padding: 10px 0
}

body[data-theme="dark"].create-task-page .workflow-section.last,
body[data-theme="dark"] .create-task-page .workflow-section.last {
    border-bottom: 0
}

body[data-theme="dark"] .create-task-page .workflow-section label { color: #c5cbd5 }
body[data-theme="dark"] .create-task-page .workflow-section input:disabled,
body[data-theme="dark"] .create-task-page .workflow-section select:disabled {
    background: #252932;
    border-color: #343943;
    color: #a2a9b5;
    opacity: 1
}
