:root {
    --ym-bg: #edf2f8;
    --ym-surface: rgba(255, 255, 255, 0.96);
    --ym-surface-strong: #ffffff;
    --ym-ink: #0f172a;
    --ym-muted: #64748b;
    --ym-line: rgba(15, 23, 42, 0.1);
    --ym-brand: #1d4ed8;
    --ym-brand-deep: #1e3a8a;
    --ym-brand-soft: #e8efff;
    --ym-accent: #0f172a;
    --ym-info: #2563eb;
    --ym-warning: #b7791f;
    --ym-danger: #dc2626;
    --ym-success: #059669;
    --ym-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
    --ym-radius-xl: 28px;
    --ym-radius-lg: 20px;
    --ym-radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--ym-ink);
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.14), transparent 24%),
        linear-gradient(180deg, #f7f9fc 0%, #e9eef5 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.ym-shell {
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 16px 104px;
}

.ym-main {
    display: grid;
    gap: 18px;
}

.ym-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0 16px;
    backdrop-filter: blur(12px);
}

.ym-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ym-brand-mark,
.ym-avatar,
.ym-feed-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ym-brand-mark {
    background: linear-gradient(135deg, var(--ym-brand), var(--ym-brand-deep));
    color: #fff;
    box-shadow: var(--ym-shadow);
}

.ym-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ym-brand-copy strong {
    font-size: 1rem;
}

.ym-brand-copy small {
    color: var(--ym-muted);
}

.ym-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ym-avatar {
    background: rgba(24, 33, 43, 0.08);
}

.ym-counter {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(208, 90, 68, 0.16);
    color: var(--ym-danger);
    font-weight: 700;
}

.ym-card,
.ym-hero-card,
.ym-auth-card,
.ym-session-strip,
.ym-stat-card,
.ym-task-card {
    background: var(--ym-surface);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--ym-shadow);
    backdrop-filter: blur(16px);
}

.ym-auth-page .ym-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 32px;
}

.ym-auth-hero,
.ym-card,
.ym-hero-card,
.ym-auth-card,
.ym-session-strip {
    border-radius: var(--ym-radius-xl);
}

.ym-auth-hero,
.ym-card,
.ym-hero-card,
.ym-auth-card {
    padding: 24px;
}

.ym-auth-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.96)),
        #0f172a;
    color: #fff;
}

.ym-auth-hero::after {
    content: "";
    position: absolute;
    inset: auto -20px -20px auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.ym-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 700;
}

.ym-auth-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ym-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 10px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ym-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: inherit;
    opacity: 0.82;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ym-auth-hero h1,
.ym-hero-card h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.08;
}

.ym-auth-hero p,
.ym-hero-card p,
.ym-auth-copy p,
.ym-task-address,
.ym-task-note,
.ym-feed-copy p {
    margin: 0;
    color: inherit;
    line-height: 1.55;
}

.ym-chip-row,
.ym-task-tags,
.ym-hero-actions,
.ym-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ym-chip,
.ym-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 0.88rem;
}

.ym-stepper {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.ym-step {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(24, 33, 43, 0.06);
    color: var(--ym-muted);
    font-weight: 800;
}

.ym-step.is-active {
    background: var(--ym-brand-soft);
    color: var(--ym-brand-deep);
}

.ym-auth-copy {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.ym-auth-copy h2,
.ym-section-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.ym-form-stack {
    display: grid;
    gap: 12px;
}

.is-hidden,
.ym-form-stack.is-hidden,
.ym-inline-notice:not(.is-visible) {
    display: none;
}

.ym-form-stack label {
    font-weight: 700;
    font-size: 0.92rem;
}

.ym-pin-fieldset {
    display: grid;
    gap: 12px;
}

.ym-pin-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ym-form-stack input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--ym-line);
    border-radius: var(--ym-radius-md);
    background: var(--ym-surface-strong);
    color: var(--ym-ink);
}

.ym-pin-input {
    min-height: 68px !important;
    padding: 0 !important;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0;
    border-radius: 18px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ym-pin-input:focus {
    outline: none;
    border-color: rgba(29, 78, 216, 0.5);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.ym-pin-input.is-filled {
    border-color: rgba(29, 78, 216, 0.4);
    background: var(--ym-brand-soft);
    color: var(--ym-brand-deep);
}

.ym-button {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--ym-radius-md);
    background: linear-gradient(135deg, var(--ym-brand), var(--ym-brand-deep));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.ym-button--ghost {
    background: rgba(24, 33, 43, 0.06);
    color: var(--ym-ink);
}

.ym-inline-notice {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(15, 140, 118, 0.12);
    color: var(--ym-brand-deep);
    line-height: 1.5;
}

.ym-inline-notice.is-warning {
    background: rgba(241, 170, 65, 0.16);
    color: #8a5a07;
}

.ym-inline-notice.is-error {
    background: rgba(208, 90, 68, 0.14);
    color: var(--ym-danger);
}

.ym-otp-summary {
    padding: 16px;
    border-radius: 16px;
    background: var(--ym-brand-soft);
}

.ym-hero-card {
    display: grid;
    gap: 18px;
}

.ym-session-strip {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    align-items: center;
}

.ym-session-strip strong,
.ym-feed-copy strong {
    display: block;
    margin-bottom: 4px;
}

.ym-session-strip span,
.ym-session-strip small,
.ym-feed-copy span,
.ym-task-meta,
.ym-task-note,
.ym-link-inline,
.ym-empty-state {
    color: var(--ym-muted);
}

.ym-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ym-stat-card {
    padding: 18px;
    border-radius: 22px;
}

.ym-stat-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--ym-muted);
}

.ym-stat-card strong {
    font-size: 1.8rem;
}

.ym-section,
.ym-dual-grid {
    display: grid;
    gap: 14px;
}

.ym-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ym-task-list,
.ym-feed-list {
    display: grid;
    gap: 12px;
}

.ym-task-card {
    padding: 18px;
    border-radius: 22px;
}

.ym-task-head,
.ym-task-meta,
.ym-task-actions,
.ym-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ym-task-meta,
.ym-task-tags,
.ym-task-actions {
    margin-top: 12px;
}

.ym-task-card h3 {
    margin: 12px 0 8px;
    font-size: 1.06rem;
}

.ym-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
}

.ym-pill--brand {
    background: rgba(15, 140, 118, 0.12);
    color: var(--ym-brand-deep);
}

.ym-pill--info {
    background: rgba(45, 125, 184, 0.12);
    color: var(--ym-info);
}

.ym-pill--warning {
    background: rgba(201, 138, 24, 0.14);
    color: var(--ym-warning);
}

.ym-pill--danger {
    background: rgba(208, 90, 68, 0.14);
    color: var(--ym-danger);
}

.ym-pill--success {
    background: rgba(45, 142, 98, 0.14);
    color: var(--ym-success);
}

.ym-pill--accent,
.ym-feed-icon--accent {
    background: rgba(241, 170, 65, 0.16);
    color: #915c09;
}

.ym-pill--neutral,
.ym-feed-icon--neutral {
    background: rgba(24, 33, 43, 0.08);
    color: var(--ym-ink);
}

.ym-link-button,
.ym-link-inline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 14px;
    background: rgba(15, 140, 118, 0.12);
    color: var(--ym-brand-deep);
    font-weight: 700;
}

.ym-link-button.is-disabled {
    background: rgba(24, 33, 43, 0.06);
    color: var(--ym-muted);
    cursor: default;
}

.ym-link-button--ghost {
    background: rgba(24, 33, 43, 0.06);
    color: var(--ym-ink);
}

.ym-status-inline {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(241, 170, 65, 0.16);
    color: #915c09;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ym-feed-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--ym-line);
    align-items: flex-start;
}

.ym-feed-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ym-feed-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex: 0 0 42px;
}

.ym-feed-icon--brand {
    background: rgba(15, 140, 118, 0.12);
    color: var(--ym-brand-deep);
}

.ym-feed-copy {
    flex: 1;
}

.ym-dual-grid {
    grid-template-columns: 1fr;
}

.ym-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ym-action-card {
    min-height: 112px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(15, 140, 118, 0.08);
    display: grid;
    align-content: space-between;
    gap: 8px;
}

.ym-action-card span {
    color: var(--ym-muted);
    font-size: 0.88rem;
}

.ym-action-card.is-disabled em {
    font-style: normal;
    color: #915c09;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
}

.ym-empty-state {
    padding: 18px;
    border-radius: 18px;
    background: rgba(24, 33, 43, 0.04);
}

.ym-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 500px);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    border-radius: 24px;
    background: rgba(255, 253, 249, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--ym-shadow);
    backdrop-filter: blur(18px);
}

.ym-nav-item {
    min-height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    color: var(--ym-muted);
    font-size: 0.85rem;
}

.ym-nav-item.is-active {
    background: rgba(15, 140, 118, 0.12);
    color: var(--ym-brand-deep);
}

.ym-nav-item.is-disabled {
    opacity: 0.55;
}

.ym-nav-item small {
    font-size: 0.68rem;
    text-transform: uppercase;
}

@media (min-width: 700px) {
    .ym-shell {
        padding-top: 28px;
    }

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