body.dashboard-page {
    background: #000;
    color: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    --dash-control-height: 44px;
    --dash-control-padding: 10px 16px;
    --dash-control-radius: 5px;
    --dash-topbar-height: 62px;
    --dash-tabbar-height: 68px;
    --dash-slot-card-min-height: 320px;
}

body.dashboard-page *,
body.dashboard-page *::before,
body.dashboard-page *::after {
    box-sizing: border-box;
}

body.dashboard-page button {
    -webkit-tap-highlight-color: transparent;
}

.dash-shell {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
}

.dash-topbar {
    max-width: 1180px;
    margin: 0 auto;
    min-height: var(--dash-topbar-height);
    padding: max(10px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dash-brand img {
    width: 32px;
    height: 32px;
    filter: invert(1);
    flex-shrink: 0;
}

.dash-brand-text {
    min-width: 0;
}

.dash-brand-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.dash-brand-user,
.dash-brand-sub {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.dash-nav {
    display: none;
}

.dash-topbar-end {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

.dash-new-task {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #000;
    white-space: nowrap;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.dash-new-task:hover {
    transform: translateY(-1px);
}

.dash-user-menu {
    position: relative;
}

.dash-user-menu summary {
    list-style: none;
}

.dash-user-menu summary::-webkit-details-marker {
    display: none;
}

.dash-user-trigger {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.dash-user-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(12, 12, 12, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.dash-user-panel button,
.dash-user-panel a {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 0.88rem;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}

.dash-user-panel button:hover,
.dash-user-panel a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dash-user-logout {
    color: rgb(253, 120, 120) !important;
}

.dash-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 8px max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(16px);
    align-items: flex-end;
    justify-content: space-around;
    gap: 2px;
}

.dash-tabbar > .dash-tab,
.dash-tabbar > .dash-tab-more {
    flex: 1 1 0;
    min-width: 0;
    max-width: 88px;
}

.dash-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.48);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: 12px;
    cursor: pointer;
    min-height: 52px;
}

.dash-tab i {
    font-size: 1.15rem;
    line-height: 1;
}

.dash-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-tab:hover,
.dash-tab.is-active {
    color: #fff;
}

.dash-tab-primary {
    flex: 0 0 auto !important;
    width: 52px;
    max-width: 52px;
    min-height: 52px;
    margin-top: -14px;
    padding: 0;
    border-radius: 999px;
    color: #000;
    background: #fff;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
    justify-content: center;
    gap: 0;
}

.dash-tab-primary-icon {
    display: block;
    flex-shrink: 0;
}

.dash-tab-primary-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dash-tab-more {
    position: relative;
    display: block;
}

.dash-tab-more > summary.dash-tab {
    width: 100%;
}

.dash-tab-more summary {
    list-style: none;
}

.dash-tab-more summary::-webkit-details-marker {
    display: none;
}

.dash-tab-more-panel {
    position: absolute;
    right: 8px;
    bottom: calc(100% + 10px);
    min-width: 160px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(12, 12, 12, 0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.dash-tab-more-panel button {
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 0.88rem;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.dash-tab-more-panel button:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn-text {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 10px;
    cursor: pointer;
}

.btn-text:hover {
    color: rgba(255, 255, 255, 0.85);
}

.btn-header-secondary {
    font-size: 0.88rem;
}

.btn-compact {
    width: auto;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.section-action {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 4px 0;
    cursor: pointer;
}

.section-action:hover {
    color: #fff;
}

.billing-portal-link {
    text-decoration: none;
}

.hero-plan-link {
    margin-top: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-plan-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

.dash-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.accounts-section,
.tasks-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.billing-details {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.billing-summary-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    user-select: none;
}

.billing-summary-toggle::-webkit-details-marker {
    display: none;
}

.billing-summary-toggle::after {
    content: '+';
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.2rem;
    font-weight: 400;
    transition: transform 0.2s ease;
}

.billing-details[open] .billing-summary-toggle::after {
    content: '−';
}

.billing-summary-hint {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.42);
}

.billing-details .billing-section {
    margin-bottom: 0;
    padding: 0 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-section-head {
    min-height: 0;
    padding-top: 12px;
    justify-content: flex-end;
}

.account-meta {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.account-meta-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.account-meta-badge.is-managed {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.12);
    color: rgba(199, 201, 255, 0.95);
}

.account-run {
    align-self: flex-start;
    margin-top: auto;
}

.dash-modal.is-dismissed {
    display: none !important;
}

.activate-card {
    max-width: 560px;
}

.activate-footer {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.activate-footer .btn-primary {
    width: 100%;
}

.activate-feedback {
    min-height: 20px;
    margin: 4px 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.activate-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.activate-feedback.is-success {
    color: rgb(5, 248, 86);
}

.activate-feedback.is-error {
    color: rgb(253, 82, 82);
    animation: error-shake 0.4s ease;
}

.verify-step .verify-action {
    width: 100%;
}

.verify-step-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.verify-step-actions:has(#confirm-phone-btn) {
    grid-template-columns: 1fr 1fr;
}

.verify-step.is-complete .verify-action {
    opacity: 0.45;
    pointer-events: none;
}

.phone-phase {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-phase[hidden] {
    display: none !important;
}

.phone-input-row {
    display: grid;
    grid-template-columns: minmax(130px, 38%) 1fr;
    gap: 10px;
    width: 100%;
}

.form-stack .sec select,
.phone-input-row select {
    width: 100%;
    min-height: var(--dash-control-height);
    height: var(--dash-control-height);
    padding: 0 12px;
    border-radius: var(--dash-control-radius);
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    background: rgb(12, 12, 12);
    color: #fff;
    font-family: "Outfit", sans-serif;
    font-size: 0.92rem;
    box-sizing: border-box;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.55) 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.55) 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

.form-stack .sec select:focus,
.phone-input-row select:focus {
    border-color: rgba(255, 255, 255, 0.28);
}

.phone-code-hint {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.92rem;
    line-height: 1.45;
}

#phone-code {
    letter-spacing: 0.35em;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
}

.verify-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.verify-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgb(12, 12, 12);
}

.verify-step.is-complete {
    border-color: rgba(5, 248, 86, 0.35);
}

.verify-step-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.verify-step-head h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.verify-step-head p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
}

.verify-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.verify-step.is-complete .verify-icon {
    color: rgb(5, 248, 86);
    border-color: rgba(5, 248, 86, 0.35);
}

.modal-sub a {
    color: rgb(255, 201, 100);
    text-decoration: none;
}

.modal-sub a:hover {
    text-decoration: underline;
}

#phone-recaptcha {
    min-height: 0;
}

.btn-primary,
.btn-ghost,
.btn-danger,
.task-stop {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--dash-control-height);
    height: var(--dash-control-height);
    padding: var(--dash-control-padding);
    border-radius: var(--dash-control-radius);
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary:disabled,
.btn-ghost:disabled,
.task-stop:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    display: block;
    flex-shrink: 0;
}

.btn-primary {
    background: #fff;
    color: #000;
    border: none;
}

.btn-primary:hover:not(:disabled) {
    background: #ebebeb;
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgb(12, 12, 12);
    color: #fff;
    border: rgba(255, 255, 255, 0.1) 1px dashed;
}

.btn-ghost:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.btn-danger,
.task-stop {
    width: 100%;
    height: auto;
    min-height: var(--dash-control-height);
    white-space: normal;
    background: rgba(253, 82, 82, 0.15);
    color: rgb(253, 120, 120);
    border: rgba(253, 82, 82, 0.35) 1px dashed;
}

.btn-danger:hover:not(:disabled),
.task-stop:hover:not(:disabled) {
    background: rgba(253, 82, 82, 0.22);
}


.empty-state .btn-primary {
    min-width: 200px;
}

.dash-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dash-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.dash-hero-main {
    flex: 1;
    min-width: 0;
}

.dash-hero-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 6px;
}

.dash-hero-copy {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    max-width: 520px;
    line-height: 1.5;
    margin-top: 6px;
}

.copy-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45em;
}

.copy-sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: rgba(255, 255, 255, 0.35);
    transform: translateY(-0.04em);
}

.dash-hero-stats {
    display: flex;
    gap: 28px;
    align-items: flex-end;
    flex-shrink: 0;
}

.dash-hero h1 {
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    margin: 0;
    line-height: 1.1;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 88px;
}

.hero-stat span {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.hero-stat label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.billing-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}

.billing-summary-card,
.billing-plan-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.billing-plan-card-featured {
    border-color: rgba(99, 102, 241, 0.45);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(255, 255, 255, 0.02));
}

.billing-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
}

.billing-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.billing-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.billing-stat-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.billing-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-breakdown li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.72);
}

.billing-breakdown strong {
    color: #fff;
}

.billing-breakdown-note {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.48);
}

.billing-breakdown-note span {
    display: block;
}

.billing-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.billing-plan-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.billing-slot-kind {
    margin: 4px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.billing-price {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-price span {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

.billing-plan-copy {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.92rem;
    line-height: 1.45;
}

.billing-note {
    margin: 0 0 12px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.55);
}

.billing-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(253, 82, 82, 0.35);
    border-radius: 8px;
    background: rgba(253, 82, 82, 0.08);
    color: rgba(255, 220, 220, 0.95);
    font-size: 0.88rem;
    line-height: 1.45;
}

.billing-notice.hidden {
    display: none;
}

.billing-manage-btn {
    white-space: nowrap;
}

.billing-note code {
    font-size: 0.8rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 16px;
    width: 100%;
}

.tasks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

#accounts-empty {
    grid-column: 1 / -1;
    padding: 48px 24px;
    border-style: dashed;
}

#accounts-loading {
    display: contents;
}

#accounts-loading.hidden {
    display: none;
}

.account-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgb(12, 12, 12);
}

.skeleton-line,
.skeleton-block {
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.35s ease-in-out infinite;
}

.skeleton-line-title {
    width: 55%;
    height: 16px;
}

.skeleton-line-meta {
    width: 42%;
    height: 12px;
}

.skeleton-car {
    min-height: 90px;
    border-radius: 8px;
}

.skeleton-button {
    height: 40px;
    border-radius: 8px;
}

.account-skeleton:nth-child(2) .skeleton-line-title {
    width: 48%;
}

.account-skeleton:nth-child(2) .skeleton-line-meta {
    width: 36%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.account-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    min-height: var(--dash-slot-card-min-height);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgb(12, 12, 12);
}

.account-card-captcha {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.08);
}

.account-card.is-running {
    opacity: 0.58;
    border-color: rgba(255, 201, 100, 0.28);
    background: rgba(255, 201, 100, 0.04);
}

.account-card.is-running .account-run,
.account-card.is-running .account-edit,
.account-card.is-running .account-remove {
    opacity: 0.45;
    cursor: not-allowed;
}

.account-running-note {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgb(255, 201, 100);
}

.account-running-note.hidden {
    display: none;
}

.account-slot-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.account-slot-label.is-captcha {
    color: rgba(196, 181, 253, 0.92);
}

.account-slot-empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    min-height: var(--dash-slot-card-min-height);
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.account-slot-empty-captcha {
    border-color: rgba(167, 139, 250, 0.55);
    background: rgba(124, 58, 237, 0.06);
}

.account-slot-empty-captcha:hover,
.account-slot-empty-captcha:focus-visible {
    border-color: rgba(196, 181, 253, 0.85);
    background: rgba(124, 58, 237, 0.12);
}

.account-slot-empty-captcha .account-slot-empty-icon {
    border-color: rgba(167, 139, 250, 0.45);
    color: rgba(196, 181, 253, 0.9);
}

.account-slot-empty-captcha .account-slot-empty-title {
    color: rgba(237, 233, 254, 0.95);
}

.account-slot-empty-captcha .account-slot-empty-copy {
    color: rgba(196, 181, 253, 0.72);
}

.account-slot-empty:hover,
.account-slot-empty:focus-visible {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.92);
    outline: none;
}

.account-slot-empty-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    padding: 12px 8px;
}

.account-slot-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.55);
}

.account-slot-empty-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
}

.account-slot-empty-copy {
    margin: 0;
    max-width: 16rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.52);
}

.section-action.hidden {
    display: none;
}

.account-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-username {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.account-edit {
    height: 32px;
    padding: 0 10px;
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    border-radius: 5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.account-edit:hover {
    border-color: rgba(255, 255, 255, 0.28);
    color: rgb(255, 255, 255);
}

.account-remove {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    border-radius: 5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.account-remove:hover {
    border-color: rgba(253, 82, 82, 0.45);
    color: rgb(253, 120, 120);
}

.platform-captcha-row {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    background: rgba(99, 102, 241, 0.08);
}

.platform-captcha-hint {
    margin-top: 6px;
    margin-bottom: 12px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
}

.checkbox-row span {
    flex: 1;
    min-width: 0;
}

.account-car {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    border: rgba(255, 255, 255, 0.08) 1px dashed;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.account-car img {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
}

.account-meta {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
}

.account-run {
    width: 100%;
}

#create-task .btn-primary,
#add-account .modal-actions .btn-primary {
    width: 100%;
    background: rgb(12, 12, 12);
    color: #fff;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

#create-task .btn-primary:hover:not(:disabled) {
    background: rgb(18, 18, 18);
    transform: none;
}

#create-task .btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid transparent;
    box-sizing: border-box;
    animation: rotation 0.65s linear infinite;
    flex-shrink: 0;
}

.loader-dark {
    border-top-color: rgb(255, 255, 255);
    border-left-color: rgba(255, 255, 255, 0.2);
}

.btn-loading-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

@keyframes rotation {
    to {
        transform: rotate(360deg);
    }
}

.task-slot-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.task-slot-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgb(12, 12, 12);
    color: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.task-slot-option:hover,
.task-slot-option:focus-visible {
    border-color: rgba(255, 255, 255, 0.28);
    outline: none;
}

.task-slot-option.is-selected {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.task-slot-option.is-captcha {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(124, 58, 237, 0.08);
}

.task-slot-option.is-captcha.is-selected {
    border-color: rgba(196, 181, 253, 0.95);
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.55);
}

.task-slot-option-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.task-slot-option.is-captcha .task-slot-option-label {
    color: rgba(196, 181, 253, 0.92);
}

.task-slot-option-user {
    font-size: 0.92rem;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-slot-option-car {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.section-head h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgb(12, 12, 12);
}

.tasks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    min-height: var(--dash-slot-card-min-height);
    padding: 36px 28px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.tasks-empty.hidden {
    display: none;
}

.tasks-empty i {
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.28);
}

.tasks-empty h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.tasks-empty p {
    margin: 0;
    max-width: 280px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    line-height: 1.5;
}

.empty-state.hidden {
    display: none;
}

.empty-state i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 4px;
}

.empty-state h3 {
    font-size: 1.2rem;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.55);
    max-width: 360px;
    margin-bottom: 8px;
}

#empty-state p {
    max-width: none;
    font-size: 0.88rem;
    line-height: 1.45;
}

.task-card {
    grid-column: 1 / -1;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: linear-gradient(180deg, rgb(14, 14, 14) 0%, rgb(8, 8, 8) 100%);
    animation: auth-fade-up 0.35s ease;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.task-card.is-live {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.35);
}

.task-card.is-racing {
    border-color: rgba(255, 255, 255, 0.22);
}

.task-card.is-racing .task-status-pill[data-status="1"] {
    animation: task-pulse 1.4s ease-in-out infinite;
}

.task-details {
    display: block;
    flex: 1;
    min-width: 0;
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}

.task-card:has(.task-details[open]) .task-card-header {
    align-items: stretch;
    padding-bottom: 0;
}

.task-card:has(.task-details[open]) .task-head-meta {
    display: none;
}

.task-card:has(.task-details[open]) .task-card-head {
    justify-content: center;
}

.task-card:has(.task-details[open]) .task-head-main {
    flex: 1;
    justify-content: center;
}

.task-card-header .task-head-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 5.75rem;
    padding-bottom: 0;
}

.task-details[open] > summary {
    padding-bottom: 10px;
}

.task-details > summary {
    list-style: none;
    cursor: pointer;
}

.task-details > summary::-webkit-details-marker {
    display: none;
}

.task-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    user-select: none;
}

.task-head-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.task-head-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.task-card-header .task-races-compact {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

.task-races-compact.is-bump {
    animation: task-stat-bump 0.35s ease;
}

@keyframes task-stat-bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.08); color: #fff; }
    100% { transform: scale(1); }
}

.task-chevron {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.45);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.45);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.task-details[open] .task-chevron {
    transform: rotate(45deg);
}

.task-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 8px 18px 18px;
}

.task-card:has(.task-details[open]) .task-card-body {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.task-username {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    box-sizing: border-box;
}

.task-status-pill[data-status="-1"] {
    color: rgb(255, 201, 100);
    border-color: rgba(255, 201, 100, 0.35);
}

.task-status-pill[data-status="1"] {
    color: rgb(255, 255, 255);
}

.task-status-pill[data-status="2"] {
    color: rgb(5, 248, 86);
    border-color: rgba(5, 248, 86, 0.35);
}

.task-status-pill[data-status="3"] {
    color: rgb(251, 255, 0);
    border-color: rgba(251, 255, 0, 0.35);
}

.task-car {
    display: none;
}

.task-live-panel {
    display: grid;
    gap: 12px;
    width: 100%;
}

.task-road {
    position: relative;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.04) 0,
            rgba(255, 255, 255, 0.04) 2px,
            transparent 2px,
            transparent 28px
        );
}

.task-road-track {
    position: absolute;
    inset: 50% 0 auto;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.task-road-car {
    position: absolute;
    top: 50%;
    left: -18%;
    translate: 0 -50%;
    animation: task-road-race 3.8s linear infinite;
    animation-play-state: paused;
}

.task-card.is-racing .task-road-car {
    animation-play-state: running;
}

.task-road-car img {
    display: block;
    width: 64px;
    height: auto;
    transform: scaleX(-1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
    animation: task-road-bob 0.7s ease-in-out infinite alternate;
}

@keyframes task-road-race {
    from { left: -18%; }
    to { left: 92%; }
}

@keyframes task-road-bob {
    from { transform: scaleX(-1) translateY(-2px); }
    to { transform: scaleX(-1) translateY(2px); }
}

@keyframes task-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15); }
    50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); }
}

.task-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.task-stat {
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.task-stat-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    margin-bottom: 4px;
}

.task-stat strong {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.task-stop {
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
}

.task-progress {
    display: flex;
    flex-direction: column;
}

.progress-bar {
    position: relative;
    padding-top: 2px;
}

.progress-line {
    position: absolute;
    top: 5px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    pointer-events: none;
}

.progress-line::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: rgba(255, 255, 255, 0.32);
    border-radius: inherit;
    transition: width 0.8s ease;
}

.task-progress[data-step="0"] .progress-line::after { width: 0%; }
.task-progress[data-step="1"] .progress-line::after { width: 33.333%; }
.task-progress[data-step="2"] .progress-line::after { width: 66.666%; }
.task-progress[data-step="3"] .progress-line::after { width: 100%; }

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    margin: 0;
    padding: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.progress-node {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.progress-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    line-height: 1.2;
    transition: color 0.35s ease;
}

.task-progress[data-step="0"] .progress-step[data-step="0"] .progress-node,
.task-progress[data-step="1"] .progress-step[data-step="1"] .progress-node,
.task-progress[data-step="2"] .progress-step[data-step="2"] .progress-node,
.task-progress[data-step="3"] .progress-step[data-step="3"] .progress-node {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    transform: scale(1.15);
}

.task-progress[data-step="0"] .progress-step[data-step="0"] .progress-label,
.task-progress[data-step="1"] .progress-step[data-step="1"] .progress-label,
.task-progress[data-step="2"] .progress-step[data-step="2"] .progress-label,
.task-progress[data-step="3"] .progress-step[data-step="3"] .progress-label {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.task-progress[data-step="2"] .progress-step[data-step="2"] .progress-node {
    background: rgb(5, 248, 86);
    border-color: rgba(5, 248, 86, 0.8);
    box-shadow: 0 0 10px rgba(5, 248, 86, 0.4);
}

.task-progress[data-step="2"] .progress-step[data-step="2"] .progress-label {
    color: rgb(5, 248, 86);
}

.task-progress[data-step="3"] .progress-step[data-step="3"] .progress-node {
    background: rgb(251, 255, 0);
    border-color: rgba(251, 255, 0, 0.8);
    box-shadow: 0 0 10px rgba(251, 255, 0, 0.35);
}

.task-progress[data-step="3"] .progress-step[data-step="3"] .progress-label {
    color: rgb(251, 255, 0);
}

.task-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.72);
}

.dash-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: rgba(0, 0, 0, 0.84);
    z-index: 100;
    overflow: hidden;
}

body.dash-modal-open {
    overflow: hidden;
}

body.dash-modal-open .dash-tabbar {
    opacity: 0;
    pointer-events: none;
}

.dash-modal.is-open {
    display: flex;
}

.dash-modal-card {
    position: relative;
    width: min(100%, 520px);
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: #000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    --auth-control-height: var(--dash-control-height);
    --auth-control-padding: var(--dash-control-padding);
    --auth-control-radius: var(--dash-control-radius);
    animation: modal-card-in 0.3s ease;
}

.dash-modal-card > .btn-primary {
    width: 100%;
}

.dash-modal-card h2 {
    font-size: 1.35rem;
    padding-right: calc(var(--dash-control-height) + 8px);
}

.modal-sub {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.92rem;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: var(--dash-control-height);
    height: var(--dash-control-height);
    min-height: unset;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    border-radius: var(--dash-control-radius);
    background: rgb(12, 12, 12);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.modal-close:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgb(18, 18, 18);
}

.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.form-stack .sec {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.form-stack label:not(.checkbox-row) {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.78);
}

.field-hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.4;
}

.label-muted {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.form-stack .sec input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    width: 100%;
    min-width: 0;
    min-height: var(--dash-control-height);
    height: var(--dash-control-height);
    padding: var(--dash-control-padding);
    border-radius: var(--dash-control-radius);
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    background: rgb(12, 12, 12);
    color: #fff;
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}

.form-stack .sec input[readonly] {
    opacity: 0.85;
    cursor: default;
}

.form-stack .sec input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus {
    border-color: rgba(255, 255, 255, 0.28);
}

.form-stack .sec input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.time-window {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.time-window input[type="time"] {
    width: 100%;
    min-height: var(--dash-control-height);
    height: var(--dash-control-height);
    padding: var(--dash-control-padding);
    border-radius: var(--dash-control-radius);
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    background: rgb(12, 12, 12);
    color: #fff;
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    color-scheme: dark;
}

.form-stack .sec select {
    width: 100%;
    min-height: var(--dash-control-height);
    height: var(--dash-control-height);
    padding: var(--dash-control-padding);
    padding-right: 36px;
    border-radius: var(--dash-control-radius);
    border: rgba(255, 255, 255, 0.1) 1px dashed;
    background: rgb(12, 12, 12);
    color: #fff;
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-stack .sec select:hover,
.form-stack .sec select:focus {
    border-color: rgba(255, 201, 100, 0.35);
    outline: none;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.select-wrap:focus-within::after {
    transform: translateY(-35%) rotate(225deg);
}

.schedule-sec {
    gap: 10px;
}

.schedule-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.24s ease,
        transform 0.24s ease;
}

.schedule-panel.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: translateY(0);
}

.schedule-panel-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding-top: 0;
    transition: padding-top 0.28s ease;
}

.schedule-panel.is-open .schedule-panel-inner {
    padding-top: 4px;
}

.dual-range-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.dual-range-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    transition: color 0.15s ease, transform 0.15s ease;
    margin-left: auto;
}

.dual-range {
    --thumb-size: 18px;
    position: relative;
    height: 44px;
    margin-top: 6px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.dual-range-rail {
    position: absolute;
    left: calc(var(--thumb-size) / 2);
    right: calc(var(--thumb-size) / 2);
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
}

.dual-range-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.dual-range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.42));
    pointer-events: none;
}

.dual-range.is-dragging .dual-range-thumb {
    transition: none;
    will-change: left, transform;
}

.dual-range.is-dragging .dual-range-fill {
    will-change: left, right;
}

.dual-range-thumb {
    position: absolute;
    top: 50%;
    width: var(--thumb-size);
    height: var(--thumb-size);
    margin-left: calc(var(--thumb-size) / -2);
    margin-top: calc(var(--thumb-size) / -2);
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: #000;
    cursor: grab;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
    z-index: 2;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dual-range-thumb-max {
    z-index: 3;
}

.dual-range-thumb:hover {
    box-shadow: 0 0 0 6px rgba(255, 201, 100, 0.16);
}

.dual-range-thumb:active,
.dual-range-thumb.is-dragging {
    cursor: grabbing;
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(255, 201, 100, 0.2);
}

.input-range-sep {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.nested-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-left: 26px;
}

.nested-fields[hidden] {
    display: none !important;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-actions .btn-primary,
.modal-actions .btn-ghost {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1100px) {
    .dash-main {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 900px) {
    body.dashboard-page {
        padding-bottom: calc(var(--dash-tabbar-height) + env(safe-area-inset-bottom, 0px) + 8px);
    }

    body.dashboard-page.dash-modal-open {
        padding-bottom: 0;
    }

    .dash-tabbar {
        display: flex;
    }

    .dash-topbar {
        justify-content: flex-start;
    }

    .dash-new-task,
    .dash-user-menu,
    .dash-topbar-end {
        display: none;
    }

    .dash-main {
        padding: 18px 16px 24px;
        gap: 18px;
    }

    .dash-hero {
        flex-direction: column;
        padding: 18px 16px;
        gap: 14px;
    }

    .dash-hero-stats {
        width: 100%;
        justify-content: space-between;
        padding-top: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hero-stat {
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
    }

    .hero-stat span {
        font-size: 1.5rem;
    }

    .accounts-grid,
    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .dash-workspace {
        grid-template-columns: 1fr;
    }

    .billing-summary-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dash-modal {
        align-items: flex-end;
        padding: 0;
    }

    .dash-modal-card {
        width: 100%;
        max-width: none;
        max-height: min(92dvh, 720px);
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    #create-task.dash-modal {
        align-items: stretch;
        background: #000;
    }

    #create-task .dash-modal-card {
        flex: 1;
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100dvh;
        border: none;
        border-radius: 0;
        padding:
            max(20px, env(safe-area-inset-top, 0px))
            max(16px, env(safe-area-inset-right, 0px))
            max(20px, env(safe-area-inset-bottom, 0px))
            max(16px, env(safe-area-inset-left, 0px));
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .modal-actions .btn-ghost {
        white-space: normal;
        height: auto;
        min-height: var(--dash-control-height);
        text-align: center;
    }

    .task-slot-picker {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: flex-start;
    }

    .billing-section-head {
        justify-content: stretch;
    }

    .billing-manage-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 760px) {
    .hero-stat span {
        font-size: 1.6rem;
    }

    .dual-range-label {
        white-space: normal;
        text-align: right;
        max-width: 55%;
        line-height: 1.25;
    }

    .form-stack .sec input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .form-stack .sec select,
    .time-window input[type="time"] {
        font-size: 16px;
    }

    .time-window {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .time-window .input-range-sep {
        text-align: left;
        padding: 2px 0;
    }

    .account-card-head {
        align-items: flex-start;
    }

    .account-card-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .empty-state {
        padding: 36px 18px;
    }

    #empty-state {
        padding: 16px;
    }

    .empty-state .btn-primary {
        width: 100%;
        max-width: none;
    }

    .task-card {
        padding: 16px;
    }

    .task-card-head {
        align-items: center;
        flex-wrap: nowrap;
    }

    .task-head-meta {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .progress-label {
        font-size: 0.62rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .dual-range {
        --thumb-size: 26px;
        height: 52px;
    }

    .dual-range-rail {
        height: 8px;
    }

    .dual-range-thumb {
        box-shadow: 0 0 0 5px rgba(255, 201, 100, 0.14);
    }
}

@media (max-width: 420px) {
    .dash-hero h1 {
        font-size: 1.35rem;
    }

    .dash-hero-copy {
        font-size: 0.88rem;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .verify-step-actions:has(#confirm-phone-btn) {
        grid-template-columns: 1fr;
    }

    .phone-input-row {
        grid-template-columns: 1fr;
    }

    .task-status-pill {
        flex-shrink: 0;
        font-size: 0.68rem;
        padding: 4px 8px;
    }

    .dual-range-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dual-range-label {
        max-width: none;
        text-align: left;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .task-road-car,
    .task-road-car img,
    .task-status-pill[data-status="1"] {
        animation: none !important;
    }
}
