/* === Profile screen === */
#screen-profile {
    --profile-page-bg: #0e1015;
    --profile-card-bg: #16181f;
    --profile-inner-bg: #1e212b;
    --profile-border: rgba(255, 255, 255, 0.07);
    --profile-text: #f8fafc;
    --profile-text-secondary: #94a3b8;
    --profile-text-muted: #64748b;
    --profile-accent: #10b981;
    --profile-accent-soft: rgba(16, 185, 129, 0.15);
    --profile-danger: #f87171;
    --profile-danger-soft: rgba(248, 113, 113, 0.12);
    --profile-radius: 18px;
    --profile-surface: var(--profile-card-bg);
    --profile-surface-border: var(--profile-border);
    background: var(--profile-page-bg);
    color: var(--profile-text);
    overflow-x: clip;
    max-width: 100%;
    min-width: 0;
}

#screen-profile .profile-app-wrap {
    background: var(--profile-page-bg);
}

#screen-profile .profile-app-wrap,
#screen-profile .profile-screen-header {
    overflow-x: clip;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#screen-profile .screen-card--profile {
    gap: 0;
    padding-top: 12px;
    overflow-x: clip;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    --profile-block-gap: 12px;
}

#screen-profile .profile-main-card,
#screen-profile .profile-card--nearest,
#screen-profile .profile-card--split,
#screen-profile .profile-footer {
    background: var(--profile-surface);
    border-color: var(--profile-surface-border);
}

#screen-profile .profile-card,
#screen-profile .profile-main-card,
#screen-profile .profile-footer {
    background: var(--profile-card-bg) !important;
    border: 1px solid var(--profile-border) !important;
    border-radius: var(--profile-radius) !important;
    padding: 16px !important;
    width: 100%;
    box-sizing: border-box;
    animation: cardRise 0.35s var(--app-ease) backwards;
    margin-bottom: 12px !important;
}

#screen-profile .profile-main-card.profile-unified-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px !important;
    background: var(--profile-card-bg) !important;
    border: 1px solid var(--profile-border) !important;
    border-radius: var(--profile-radius) !important;
    font-family: var(--font-main, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    -webkit-font-smoothing: antialiased;
    animation-delay: 0s;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .user-header-block {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 8px 0 !important;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .user-header-avatar {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px !important;
    background: #14211f !important;
    border: 1.5px solid #205c54 !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .user-header-avatar svg,
#screen-profile .profile-unified-card .user-header-avatar img {
    width: 68px !important;
    height: 68px !important;
    object-fit: contain !important;
    display: block;
}

#screen-profile .profile-unified-card .user-header-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 7px !important;
    height: auto !important;
    padding: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .user-header-name,
#screen-profile .profile-unified-card #profileUserName.user-header-name {
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.15 !important;
    color: #ffffff !important;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    margin: 0 0 1px !important;
}

#screen-profile .profile-unified-card .user-header-role-wrap {
    position: relative !important;
    height: 32px !important;
    background: #232730 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100%;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .user-header-tab-chip,
#screen-profile .profile-unified-card #profileUserTab.user-header-tab-chip {
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    height: 28px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    border: 1px dashed rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    letter-spacing: 0.2px !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .profile-events-collapsible {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 1200px;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.28s ease;
}

#screen-profile .profile-unified-card .user-header-role-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    height: 100% !important;
    padding: 0 30px 0 12px !important;
    cursor: pointer !important;
    width: auto !important;
    max-width: 100%;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

#screen-profile .profile-unified-card .user-header-chevron {
    position: absolute !important;
    right: 8px !important;
    top: 50%;
    transform: translateY(-50%);
    width: 12px !important;
    height: 12px !important;
    pointer-events: none !important;
    stroke: #94a3b8 !important;
}

#screen-profile .profile-unified-card .profile-events-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

#screen-profile .profile-unified-card .profile-events-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 0 0;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .profile-event-item {
    appearance: none;
    width: 100%;
    margin: 0 0 8px;
    background: #22262f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

#screen-profile .profile-unified-card .profile-event-item:last-child {
    margin-bottom: 0;
}

#screen-profile .profile-unified-card .profile-event-item:hover {
    background: #272c36;
}

#screen-profile .profile-unified-card .profile-event-item:focus-visible {
    outline: 2px solid rgba(52, 211, 153, 0.45);
    outline-offset: 2px;
}

#screen-profile .profile-unified-card .event-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .event-item-icon-svg {
    display: block;
    flex-shrink: 0;
}

#screen-profile .profile-unified-card .icon-eb {
    color: #facc15;
    background: #302c1e;
    border: 1px solid rgba(250, 204, 21, 0.2);
}

#screen-profile .profile-unified-card .icon-prmo {
    color: #f472b6;
    background: #32202b;
    border: 1px solid rgba(244, 114, 182, 0.2);
}

#screen-profile .profile-unified-card .icon-quarter {
    color: #fb923c;
    background: #33261b;
    border: 1px solid rgba(251, 146, 60, 0.2);
}

#screen-profile .profile-unified-card .event-item-text {
    min-width: 0;
    flex: 1;
}

#screen-profile .profile-unified-card .event-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
}

#screen-profile .profile-unified-card .event-item-status {
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.25;
}

#screen-profile .profile-unified-card .event-item-aside {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    max-width: 42%;
}

#screen-profile .profile-unified-card .event-item-days-chip {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .text-muted { color: #64748b; }
#screen-profile .profile-unified-card .text-success { color: #34d399; font-weight: 500; }

#screen-profile .profile-unified-card .profile-bottom-actions {
    display: block;
    width: 100%;
    margin: 10px 0 0;
    padding: 0 14px 12px;
    box-sizing: border-box;
}

#screen-profile .profile-unified-card .profile-bottom-actions .profile-action-btn {
    width: 100%;
}

#screen-profile .profile-unified-card .profile-action-btn {
    height: 50px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    padding: 0 8px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .profile-unified-card .btn-dashed {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    color: #94a3b8;
}

#screen-profile .profile-unified-card .card-drag-handle {
    width: 40px !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 2px !important;
    margin: 12px auto 2px auto !important;
    cursor: pointer !important;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .profile-unified-card.profile-unified-card--events-collapsed .card-drag-handle {
    margin: 12px auto 2px auto !important;
}

/* ---------- Шапка сотрудника (legacy) ---------- */
#screen-profile .user-profile-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-profile .user-profile-header .user-avatar-wrap {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    flex-shrink: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#screen-profile .user-profile-header .user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#screen-profile .user-meta-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

#screen-profile .user-meta-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
}

#screen-profile .user-profile-header .user-name,
#screen-profile .user-profile-header #profileUserName {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    line-height: 1.2;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    text-align: left;
    letter-spacing: -0.02em;
}

#screen-profile .user-profile-header .user-tab-badge,
#screen-profile .user-profile-header #profileUserTab {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    flex-shrink: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#screen-profile .user-role-wrap {
    width: fit-content !important;
    max-width: 100%;
}

#screen-profile .user-profile-header .user-role-select {
    width: auto !important;
    max-width: 100% !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    appearance: auto;
    -webkit-appearance: menulist;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
}

#screen-profile .user-profile-header .user-role-select:focus-visible {
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
}

#screen-profile .profile-average-pay-field--compact {
    margin-top: 14px;
    padding-top: 0;
    border-top: none;
}

#screen-profile .profile-card--hero {
    display: none;
}

#screen-profile .profile-month-selector--embedded {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    animation: none;
}

#screen-profile .profile-month-selector {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

#screen-profile .profile-card--nearest {
    animation-delay: 0.08s;
}

#screen-profile .profile-average-pay-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    width: 100%;
}

#screen-profile .profile-average-pay-field--compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-profile .profile-average-pay-field--compact .profile-average-pay-field__label {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.25;
}

#screen-profile .profile-average-pay-field--compact .profile-average-pay-field__input {
    flex: 0 0 auto;
    width: 140px;
    height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    text-align: right;
    box-sizing: border-box;
}

#screen-profile .profile-average-pay-field__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}

#screen-profile .profile-average-pay-field__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
}

#screen-profile .profile-average-pay-field__hint {
    margin: 0;
    font-size: 10px;
    line-height: 1.35;
    color: var(--text-muted, #64748b);
}

#screen-profile .profile-card--payroll-settings {
    animation-delay: 0.16s;
    margin-top: 0;
    padding: 12px 14px;
    background: var(--profile-surface, #16181f);
    border: 1px solid var(--profile-border, rgba(255, 255, 255, 0.07));
    border-radius: var(--profile-radius, 18px);
    box-shadow: none;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
}

#screen-profile .payroll-settings-sheet {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#screen-profile .payroll-settings-sheet__summary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.28s var(--app-ease, ease);
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__summary {
    cursor: default;
    pointer-events: none;
}

#screen-profile .payroll-settings-sheet__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: #f1f5f9;
    letter-spacing: -0.01em;
}

#screen-profile .payroll-settings-sheet__handle {
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
    transition: transform 0.35s var(--app-ease, ease), opacity 0.28s ease, background 0.2s ease;
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__handle {
    background: rgba(255, 255, 255, 0.32);
}

#screen-profile .payroll-settings-sheet__expand {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 0.5s var(--app-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        opacity 0.4s var(--app-ease, ease);
    min-width: 0;
    will-change: grid-template-rows;
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__expand {
    grid-template-rows: 1fr;
    opacity: 1;
}

#screen-profile .payroll-settings-sheet__body {
    overflow: hidden;
    min-height: 0;
    margin-top: 0;
    padding-top: 10px;
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__body {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-ui-section {
    animation: payrollSheetSectionIn 0.42s var(--app-ease, ease) backwards;
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-ui-section--extra {
    animation-delay: 0.07s;
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__save-block {
    animation: payrollSheetSectionIn 0.42s var(--app-ease, ease) 0.12s backwards;
}

@keyframes payrollSheetSectionIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#screen-profile .payroll-settings-sheet__handle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 2px 0 0;
    padding: 8px 0 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: margin-top 0.5s var(--app-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__handle-btn {
    margin-top: 10px;
}

#screen-profile .payroll-settings-sheet__handle-btn:active .payroll-settings-sheet__handle {
    transform: scaleX(0.88);
}

@media (prefers-reduced-motion: reduce) {
    #screen-profile .payroll-settings-sheet__expand,
    #screen-profile .payroll-settings-sheet__handle,
    #screen-profile .payroll-settings-sheet__handle-btn,
    #screen-profile .payroll-settings-sheet.is-expanded .payroll-ui-section,
    #screen-profile .payroll-settings-sheet.is-expanded .payroll-settings-sheet__save-block {
        transition-duration: 0.01ms !important;
        animation: none !important;
    }
}

#screen-profile .payroll-settings-sheet__save-block {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

#screen-profile .payroll-settings-sheet__save-hint {
    margin: 0;
    min-height: 1.25em;
    font-size: 12px;
    line-height: 1.35;
    color: #94a3b8;
    text-align: center;
}

#screen-profile .payroll-settings-sheet__save-hint.is-ok {
    color: #6ee7b7;
}

#screen-profile .payroll-settings-sheet__save-hint.is-warn {
    color: #fbbf24;
}

#screen-profile .payroll-settings-sheet__save-hint.is-error {
    color: #f87171;
}

#screen-profile .payroll-settings-sheet__actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

#screen-profile .payroll-settings-sheet__save {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: var(--brand-grad);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease, transform 0.12s ease;
    white-space: nowrap;
}

#screen-profile .payroll-settings-sheet__save:disabled {
    opacity: 0.55;
    cursor: default;
}

#screen-profile .payroll-settings-sheet__save:active:not(:disabled) {
    transform: scale(0.98);
}

#screen-profile .payroll-settings-sheet__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0 12px;
    height: 44px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6, 199, 133, 0.12), rgba(2, 76, 78, 0.18));
    color: #6ee7b7;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
    white-space: nowrap;
}

#screen-profile .payroll-settings-sheet__cta:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, rgba(6, 199, 133, 0.18), rgba(2, 76, 78, 0.26));
}

#screen-profile .profile-payroll-settings__hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

#screen-profile .payroll-live-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #252833;
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
}

#screen-profile .payroll-live-card__role {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
}

#screen-profile .payroll-live-card__rate {
    flex: 1 1 auto;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #34d399;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#screen-profile .payroll-live-card__shift {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
    #screen-profile .payroll-ui-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #screen-profile .payroll-ui-row__ctrl .payroll-seg--row4 {
        max-width: none;
    }

    #screen-profile .payroll-live-card__rate {
        font-size: 14px;
    }
}

#screen-profile .payroll-ui-section {
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #1e2129;
}

#screen-profile .payroll-ui-section__head {
    margin: 0;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    color: #d8d4e8;
}

#screen-profile .payroll-ui-section--main .payroll-ui-section__head {
    background: #3f3d56;
}

#screen-profile .payroll-ui-section--extra .payroll-ui-section__head {
    background: #563f3d;
    color: #e8d0d0;
}

#screen-profile .payroll-ui-section__body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#screen-profile .payroll-ui-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

#screen-profile .payroll-ui-row--tools {
    align-items: center;
}

#screen-profile .payroll-ui-row__text {
    min-width: 0;
}

#screen-profile .payroll-ui-row__ctrl {
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

#screen-profile .payroll-ui-row__ctrl .payroll-seg {
    min-width: 168px;
    max-width: 220px;
}

#screen-profile .payroll-ui-row__ctrl--income {
    justify-content: flex-start;
}

#screen-profile .payroll-ui-row__ctrl--income .payroll-inline-input {
    max-width: 100%;
}

#screen-profile .payroll-ui-row__ctrl--toggles {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    min-width: 148px;
    max-width: 220px;
    width: 100%;
    flex-shrink: 0;
}

#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact {
    display: flex;
    width: 100%;
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 0;
}

#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact .payroll-switch__track {
    width: 30px;
    height: 17px;
    box-sizing: border-box;
}

#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact.is-on .payroll-switch__track,
#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact .payroll-switch__input:checked + .payroll-switch__track {
    border: none;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.32);
}

#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact .payroll-switch__thumb {
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
}

#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact.is-on .payroll-switch__thumb,
#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact .payroll-switch__input:checked + .payroll-switch__track .payroll-switch__thumb {
    transform: translateX(13px);
}

#screen-profile .payroll-ui-row__ctrl--toggles .payroll-switch--compact .payroll-switch__text {
    flex: 1 1 auto;
    margin-left: 0;
    text-align: right;
    font-size: 11px;
    font-weight: 500;
    color: #cbd5e1;
    white-space: nowrap;
}

#screen-profile .payroll-ui-hint {
    margin: 4px 0 0;
    font-size: 10px;
    line-height: 1.35;
    color: #64748b;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

#screen-profile .payroll-inline-input {
    width: 100%;
    min-width: 120px;
    max-width: 200px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #252833;
    color: #f1f5f9;
    font-size: 12px;
    font-family: inherit;
    box-sizing: border-box;
}

#screen-profile .payroll-inline-input::placeholder {
    color: #64748b;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.04em;
}

#screen-profile .payroll-inline-input--num::placeholder {
    text-transform: none;
    font-size: 11px;
    letter-spacing: 0;
}

#screen-profile .payroll-inline-input-wrap {
    display: inline-flex;
    align-items: center;
    max-width: 200px;
    width: 100%;
}

#screen-profile .payroll-inline-input-wrap--suffix .payroll-inline-input {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

#screen-profile .payroll-inline-input__suffix {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 10px;
    border-radius: 0 10px 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: none;
    background: #1e2129;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    box-sizing: border-box;
}

#screen-profile .payroll-ui-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#screen-profile .payroll-seg {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 3px;
    border-radius: 12px;
    background: #1c222b;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#screen-profile .payroll-seg--cols3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#screen-profile .payroll-seg--row4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

#screen-profile .payroll-seg--compact .payroll-seg__btn {
    font-size: 12px;
    padding: 6px 4px;
    min-height: 36px;
}

#screen-profile .payroll-seg--row4 .payroll-seg__btn {
    min-height: 36px;
    padding: 6px 4px;
    font-size: 12px;
}

#screen-profile .payroll-seg__btn {
    margin: 0;
    padding: 6px 4px;
    min-height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

#screen-profile .payroll-seg__btn small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 500;
    opacity: 0.85;
}

#screen-profile .payroll-ui-section--main .payroll-seg__btn.is-active,
#screen-profile .payroll-seg__btn.is-active {
    background: rgba(52, 211, 153, 0.22);
    color: #ecfdf5;
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: none;
}

#screen-profile .payroll-seg--accent-warn .payroll-seg__btn.is-active {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.45);
}

#screen-profile .payroll-seg__btn:not(.is-active) {
    border: 1px solid transparent;
}

#screen-profile .payroll-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
    cursor: pointer;
    user-select: none;
}

#screen-profile .payroll-switch--compact .payroll-switch__text {
    font-size: 12px;
    font-weight: 600;
}

#screen-profile .payroll-switch__track {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #3f4a59;
    transition: background 0.2s;
}

#screen-profile .payroll-switch.is-on .payroll-switch__track,
#screen-profile .payroll-switch__input:checked + .payroll-switch__track {
    background: rgba(16, 80, 72, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-sizing: border-box;
}

#screen-profile .payroll-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e8eef7;
    box-shadow: none;
    transition: transform 0.2s;
}

#screen-profile .payroll-switch.is-on .payroll-switch__thumb,
#screen-profile .payroll-switch__input:checked + .payroll-switch__track .payroll-switch__thumb {
    transform: translateX(18px);
}

#screen-profile .payroll-switch__text {
    font-size: 12px;
    color: #e8eef7;
    line-height: 1.2;
    min-width: 0;
}

#screen-profile .payroll-switch__text small {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    color: #64748b;
}

#screen-profile .profile-card--split {
    animation-delay: 0.12s;
}

/* === Payroll screen === */
#screen-payroll {
    --profile-page-bg: #0e1015;
    background: var(--profile-page-bg);
    color: #f8fafc;
    overflow-x: clip;
}

#screen-payroll .phone-screen,
#screen-payroll .payroll-app-wrap {
    background: var(--profile-page-bg);
    padding: 0;
    min-height: auto;
    border: none;
    border-radius: 0;
}

#screen-payroll .payroll-screen-header {
    width: 100%;
    box-sizing: border-box;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(22, 24, 31, 0.98) 0%, rgba(14, 16, 21, 0.92) 100%);
}

#screen-payroll .payroll-header-bar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 4px 0 10px;
    min-height: 0;
    box-sizing: border-box;
}

#screen-payroll .payroll-screen-back {
    position: absolute;
    left: 0;
    top: 2px;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #e8eef7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

#screen-payroll .payroll-screen-back:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.07);
}

#screen-payroll .payroll-screen-head {
    width: 100%;
    min-width: 0;
    padding: 0 44px;
    text-align: center;
    box-sizing: border-box;
}

#screen-payroll .payroll-screen-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #f1f5f9;
}

#screen-payroll .payroll-month-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#screen-payroll .payroll-month-chip__btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

#screen-payroll .payroll-month-chip__btn:hover {
    color: #e8eef7;
    background: rgba(255, 255, 255, 0.06);
}

#screen-payroll .payroll-month-chip__btn:active {
    transform: scale(0.94);
}

#screen-payroll .payroll-screen-month {
    min-width: 108px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #e8eef7;
    white-space: nowrap;
}

#screen-payroll .screen-card--payroll {
    width: calc(100% - 32px);
    max-width: none;
    margin: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    padding: 4px 0 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

#screen-payroll .payroll-live-card--screen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #252833;
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
    flex-shrink: 0;
}

#screen-payroll .payroll-live-card__role {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
}

#screen-payroll .payroll-live-card__rate {
    flex: 1 1 auto;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #34d399;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#screen-payroll .payroll-live-card__shift {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#screen-payroll .payroll-screen-body {
    min-width: 0;
    flex: 1 1 auto;
}

#screen-payroll .payroll-sheet {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

#screen-payroll .payroll-empty {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}

#screen-payroll .payroll-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

#screen-payroll .payroll-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 76px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #16181f;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

#screen-payroll .payroll-card--primary {
    grid-column: 1 / -1;
    min-height: 84px;
    background: #1c222b;
    border-color: rgba(255, 255, 255, 0.1);
}

#screen-payroll .payroll-card--primary .payroll-card__value {
    font-size: 22px;
    color: #34d399;
}

#screen-payroll .payroll-card__label {
    display: block;
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

#screen-payroll .payroll-card__value {
    display: block;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

#screen-payroll .payroll-card__sub {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.2;
    color: #64748b;
}

#screen-payroll .payroll-block {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #16181f;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

#screen-payroll .payroll-block__title {
    margin: 0 0 4px;
    padding: 0 2px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

#screen-payroll .payroll-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
    border: none;
    font-size: 13px;
    box-sizing: border-box;
}

#screen-payroll .payroll-lines > * + * {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-payroll .payroll-line__label {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 10px;
    color: var(--text-muted, #94a3b8);
    line-height: 1.35;
}

#screen-payroll .payroll-line__value {
    color: #e8eef7;
    font-variant-numeric: tabular-nums;
    text-align: right;
    flex: 0 0 auto;
    white-space: nowrap;
}

#screen-payroll .payroll-accrual-fold {
    width: 100%;
    margin: 0;
    border: none;
}

#screen-payroll .payroll-accrual-fold__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 6px 0 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #a7f3d0;
    cursor: pointer;
    list-style: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(6, 199, 133, 0.14), rgba(2, 76, 78, 0.22));
    border: 1px solid rgba(52, 211, 153, 0.28);
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
}

#screen-payroll .payroll-accrual-fold__summary::-webkit-details-marker {
    display: none;
}

#screen-payroll .payroll-accrual-fold__summary-text {
    flex: 1 1 auto;
    text-align: left;
}

#screen-payroll .payroll-accrual-fold__chev {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

#screen-payroll .payroll-accrual-fold[open] .payroll-accrual-fold__chev {
    transform: rotate(-135deg);
    margin-top: 2px;
}

#screen-payroll .payroll-accrual-fold[open] .payroll-accrual-fold__summary {
    border-color: rgba(52, 211, 153, 0.4);
    background: linear-gradient(135deg, rgba(6, 199, 133, 0.2), rgba(2, 76, 78, 0.3));
}

#screen-payroll .payroll-lines--nested > .payroll-line {
    padding: 8px 0 8px 8px;
    font-size: 12px;
}

#screen-payroll .payroll-lines--nested > * + * {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-payroll .payroll-accrual-fold[open] .payroll-lines--nested {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-payroll .payroll-refs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

#screen-payroll .payroll-ref {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #16181f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted, #94a3b8);
    box-sizing: border-box;
}

#screen-profile .profile-footer {
    animation-delay: 0.16s;
}

/* profile-footer--actions uses transparent shell; see footer block below */
#screen-profile .profile-footer.profile-footer--actions {
    animation: none;
}

#screen-profile .profile-month-nav {
    width: 36px;
    height: 36px;
    padding: 8px;
    border: none;
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease, background 0.15s ease;
}

#screen-profile .profile-month-nav:hover:not(:disabled):not(.is-disabled) {
    background: rgba(255, 255, 255, 0.12);
}

#screen-profile .profile-month-nav:active:not(:disabled):not(.is-disabled) {
    opacity: 0.65;
}

#screen-profile .profile-month-nav:disabled,
#screen-profile .profile-month-nav.is-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

#screen-profile .profile-month-label {
    font-size: var(--font-base);
    font-weight: 700;
    color: var(--app-text-bright);
    text-align: center;
    letter-spacing: -0.02em;
    user-select: none;
}

#screen-profile .profile-main-card .profile-hero-tab-line {
    margin-bottom: 0;
}

#screen-profile .profile-hero-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

#screen-profile .profile-hero-tab-line {
    margin: 0 0 12px;
    padding-left: 0;
    font-size: 13px;
    font-weight: 500;
    color: #7a8596;
    line-height: 1.3;
    text-align: left;
    align-self: flex-start;
    width: 100%;
}

#screen-profile .profile-identity {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

#screen-profile .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 11px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(180deg, #243538 0%, #203133 48%, #1c292c 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#screen-profile .profile-brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    object-position: center center;
    display: block;
    flex-shrink: 0;
}

#screen-profile .profile-card--hero .profile-identity-text {
    min-width: 0;
    flex: 1;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding-top: 4px;
    text-align: left;
}

#screen-profile .profile-text-fit {
    white-space: nowrap;
    overflow: hidden;
    word-break: keep-all;
    overflow-wrap: normal;
    max-width: 100%;
    min-width: 0;
}

#screen-profile #profileUserName {
    font-weight: 700;
    font-size: var(--font-2xl);
    letter-spacing: -0.03em;
    color: var(--app-text-bright);
    text-align: left;
    width: 100%;
}

#screen-profile .profile-user-meta {
    font-size: 12px;
    font-weight: 400;
    color: var(--app-muted-soft);
    line-height: 1.3;
}

#screen-profile #profileUserTab {
    font-variant-numeric: tabular-nums;
}

#screen-profile .profile-position-combobox {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    align-self: stretch;
}

#screen-profile .profile-position-combobox .route-combobox-field {
    width: 100%;
}

#screen-profile .profile-position-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    padding: 6px 28px 6px 10px;
    border: none;
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b97ab' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") no-repeat right 10px center;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--app-muted);
    line-height: 1.3;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

#screen-profile #profilePositionLabel {
    text-align: left;
    width: 100%;
}

#screen-profile .profile-position-trigger:hover,
#screen-profile .profile-position-combobox.is-open .profile-position-trigger {
    background-color: rgba(255, 255, 255, 0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b8c4d8' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--app-text);
}

#screen-profile .profile-position-trigger:focus-visible {
    outline: 2px solid rgba(23, 128, 56, 0.45);
    outline-offset: 2px;
}

#screen-profile .profile-position-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 120px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--app-radius);
    background: rgba(14, 20, 30, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

#screen-profile .profile-position-list[hidden] {
    display: none !important;
}

#screen-profile .profile-position-list .route-combobox-option {
    padding: 8px 10px;
    border-radius: var(--app-radius);
    font-size: var(--font-xs);
    font-weight: 500;
    color: var(--app-text);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

#screen-profile .profile-position-list .route-combobox-option:hover,
#screen-profile .profile-position-list .route-combobox-option.is-selected {
    background: rgba(23, 128, 56, 0.16);
    color: #fff;
}

#screen-profile .profile-hours-ring {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

#screen-profile .profile-hours-ring--compact {
    width: 72px;
    height: 72px;
    margin: 0 auto;
}

#screen-profile .profile-hours-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

#screen-profile .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 8;
}

#screen-profile .ring-fill {
    fill: none;
    stroke: url(#profileRingGrad);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.7s var(--app-ease);
    filter: drop-shadow(0 0 4px var(--app-green-glow));
}

#screen-profile .ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.1;
    gap: 0;
    padding: 0 8px;
    box-sizing: border-box;
    overflow: hidden;
}

#screen-profile #profileHoursValue {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile #profileHoursValue.is-compact {
    font-size: 13px;
    letter-spacing: -0.02em;
}

#screen-profile #profileHoursValue.is-tight {
    font-size: 13px;
    letter-spacing: -0.03em;
}

#screen-profile #profileHoursNorm {
    font-size: 10px;
    font-weight: 400;
    color: #8e8e93;
    margin-top: 2px;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile .profile-hours-ring--stats .ring-bg,
#screen-profile .profile-hours-ring--stats .ring-fill {
    stroke-width: 6;
}

#screen-profile .profile-hours-ring--stats #profileHoursValue {
    font-size: 14px;
}

#screen-profile .profile-hours-ring--stats #profileHoursValue.is-compact,
#screen-profile .profile-hours-ring--stats #profileHoursValue.is-tight {
    font-size: 13px;
}

#screen-profile .profile-hours-ring--stats #profileHoursNorm {
    font-size: 10px;
}

#screen-profile .profile-hours-ring--stats #profileHoursNorm.is-compact {
    font-size: 9px;
    letter-spacing: -0.02em;
}

#screen-profile .profile-card--split {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
}

#screen-profile .profile-stats-unified {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    min-width: 0;
    padding: 16px !important;
    margin: 0;
    box-sizing: border-box;
    background: var(--profile-card-bg) !important;
    border: 1px solid var(--profile-border) !important;
    border-radius: var(--profile-radius) !important;
}

#screen-profile .profile-stats-unified__body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
}

#screen-profile .profile-stats-unified > .profile-subtle-divider {
    margin: 10px 0 12px;
}

#screen-profile .profile-stats-unified__money {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    text-align: left;
    gap: 0;
}

#screen-profile .profile-stats-fact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

#screen-profile .profile-stats-fact--open-sheet {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease;
}

#screen-profile .profile-stats-fact--open-sheet:active {
    opacity: 0.88;
}

#screen-profile .profile-stats-fact__label {
    font-size: 11px;
    font-weight: 400;
    color: #8e8e93;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

#screen-profile .profile-stats-fact__value {
    font-size: clamp(20px, 5.2vw, 24px);
    font-weight: 700;
    color: #34d399;
    line-height: 1.12;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@keyframes profile-money-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

#screen-profile #profileEarnedFact.is-loading,
#screen-profile #profileSchedulePay.is-loading {
    animation: profile-money-pulse 1.1s ease-in-out infinite;
    will-change: opacity;
}

#screen-profile .profile-subtle-divider {
    width: 100%;
    height: 1px;
    margin: 10px 0 9px;
    background: rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

#screen-profile .profile-stats-compare {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    min-width: 0;
}

#screen-profile .profile-stats-compare__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    min-width: 0;
}

#screen-profile .profile-stats-compare__row dt {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #8e8e93;
    line-height: 1.3;
    flex-shrink: 0;
}

#screen-profile .profile-stats-compare__row dd {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile .profile-stats-unified__hours {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 92px;
    width: 92px;
    min-width: 92px;
}

#screen-profile .profile-stats-unified__hours-ring-wrap {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#screen-profile .profile-stats-unified__hours-ring-wrap .profile-hours-ring--compact {
    width: 76px;
    height: 76px;
    margin: 0;
    flex-shrink: 0;
}

#screen-profile .profile-stats-hours-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 8px;
    width: 100%;
    min-width: 0;
    text-align: center;
}

#screen-profile .profile-stats-hours-meta__norm,
#screen-profile .profile-stats-hours-meta__status {
    margin: 0;
    width: 100%;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
}

#screen-profile .profile-stats-hours-meta__norm {
    font-size: 11px;
    font-weight: 400;
    color: #8e8e93;
}

#screen-profile .profile-stats-hours-meta__status {
    font-size: 12px;
    font-weight: 600;
}

#screen-profile .profile-stats-hours-meta__status.is-deficit {
    color: #ff6b6b;
}

#screen-profile .profile-stats-hours-meta__status.is-surplus {
    color: #8ee4a8;
}

#screen-profile .profile-stats-hours-meta__status.is-neutral {
    color: rgba(255, 255, 255, 0.88);
}

#screen-profile .profile-mini-block--qr {
    grid-column: 1 / -1;
}

#screen-profile .profile-mini-block {
    padding: 16px !important;
    border-radius: 22px !important;
    background: #181a20 !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    margin: 0;
}

#screen-profile .profile-stat-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 76px;
    margin-bottom: 0;
}

#screen-profile .profile-stat-hero-value {
    font-size: clamp(11px, 3.4vw, var(--font-lg));
    font-weight: 700;
    color: #8ee4a8;
    line-height: 1.15;
    text-align: center;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#screen-profile .profile-stat-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

#screen-profile .profile-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    font-size: clamp(9px, 2.6vw, var(--font-xs));
    line-height: 1.35;
    min-width: 0;
}

#screen-profile .profile-stat-row dt {
    margin: 0;
    color: var(--app-caption);
    font-weight: 400;
    flex-shrink: 0;
}

#screen-profile .profile-stat-row dd {
    margin: 0;
    font-weight: 600;
    color: var(--app-text-bright);
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile .profile-scheduled-line {
    margin: 0;
    padding-top: 2px;
    font-size: clamp(9px, 2.5vw, var(--font-xs));
    font-weight: 400;
    color: rgba(159, 176, 204, 0.82);
    text-align: center;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

#screen-profile .profile-mini-block--qr {
    grid-column: 1 / -1;
    justify-content: flex-start;
    min-height: 0;
    position: relative;
    align-items: stretch;
}

#screen-profile .profile-mini-block--qr.has-image {
    padding-bottom: 16px !important;
}

#screen-profile .profile-qr-upload--empty {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: #22262f !important;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

#screen-profile .profile-qr-upload--empty:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: #252a34 !important;
}

#screen-profile .profile-qr-event-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
}

#screen-profile .profile-qr-event-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-sizing: border-box;
}

#screen-profile .profile-qr-event-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#screen-profile .profile-qr-event-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

#screen-profile .profile-qr-event-sub {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.25;
}

#screen-profile .profile-qr-upload--empty[hidden] {
    display: none !important;
}

#screen-profile .profile-qr-loaded-title {
    margin: 0 0 12px;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.01em;
}

#screen-profile .profile-qr-loaded {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#screen-profile .profile-qr-loaded[hidden] {
    display: none !important;
}

#screen-profile .profile-qr-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 260px;
    margin: 0 auto 16px auto;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: #22262f;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

#screen-profile .profile-qr-frame:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#screen-profile .profile-qr-frame:active {
    transform: scale(0.98);
}

#screen-profile .profile-qr-preview {
    display: block;
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    border-radius: 10px;
    background: transparent;
}

#screen-profile .profile-qr-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

#screen-profile .profile-qr-action-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--app-text);
    font-size: clamp(10px, 2.6vw, var(--font-xs));
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

#screen-profile .profile-qr-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#screen-profile .profile-qr-action-btn--primary {
    background: rgba(23, 128, 56, 0.18);
    border-color: rgba(23, 128, 56, 0.35);
    color: #dff7e8;
}

#screen-profile .profile-qr-action-btn--primary:hover {
    background: rgba(23, 128, 56, 0.28);
}

#screen-profile .profile-qr-action-btn--muted {
    flex: 0 0 100%;
    background: transparent;
    color: var(--app-caption);
    border-color: transparent;
    font-weight: 500;
}

#screen-profile .profile-qr-action-btn--muted:hover {
    color: #ffb4b4;
    background: rgba(255, 255, 255, 0.04);
}

#screen-profile .profile-qr-action-btn--delete {
    flex: 0 0 100%;
    margin-top: 10px;
    background: transparent;
    border-color: transparent;
    color: #f87171;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
}

#screen-profile .profile-qr-action-btn--delete:hover {
    opacity: 1;
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.08);
}

#screen-profile .profile-qr-placeholder {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
}

#screen-profile .profile-qr-placeholder-visual {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--app-green);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#screen-profile .profile-qr-placeholder-visual svg {
    width: 26px;
    height: 26px;
}

#screen-profile .profile-qr-placeholder-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#screen-profile .profile-qr-placeholder-title {
    font-size: clamp(12px, 3.2vw, var(--font-sm));
    font-weight: 600;
    color: var(--app-text);
    line-height: 1.25;
}

#screen-profile .profile-qr-placeholder-text {
    font-size: clamp(10px, 2.6vw, var(--font-xs));
    font-weight: 400;
    color: var(--app-caption);
    line-height: 1.35;
}

#screen-profile .profile-qr-input {
    display: none;
}

.profile-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: rgba(4, 8, 14, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.profile-qr-modal[hidden] {
    display: none !important;
}

.profile-qr-modal.is-open {
    display: flex;
}

.profile-qr-modal-close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.profile-qr-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: min(96vw, 960px);
    max-height: calc(100vh - 140px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 8px;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

.profile-qr-modal-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: calc(100vh - 140px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    object-fit: contain;
}

.profile-qr-modal-actions {
    display: flex;
    gap: 10px;
    width: min(92vw, 420px);
}

.profile-qr-modal-actions .profile-qr-action-btn {
    flex: 1;
    padding: 12px 14px;
    font-size: var(--font-sm);
}

#screen-profile .profile-card--nearest {
    position: relative;
    overflow: hidden;
    padding: 16px !important;
    padding-left: 22px !important;
    background: #181a20 !important;
    border-radius: 22px !important;
}

#screen-profile .profile-card--nearest #nearestShiftBlock,
#screen-profile .profile-card--nearest .profile-mini-block--nearest {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-orange {
    border: 1px solid rgba(249, 115, 22, 0.45) !important;
    box-shadow: none;
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-green {
    border-color: rgba(34, 197, 94, 0.45) !important;
    box-shadow: none;
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-red {
    border-color: rgba(248, 113, 113, 0.45) !important;
    box-shadow: none;
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-active {
    border-color: rgba(96, 165, 250, 0.45) !important;
    box-shadow: none;
}

#screen-profile .profile-card--nearest::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-green::before {
    background: rgba(34, 197, 94, 0.92);
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-orange::before {
    background: rgba(249, 115, 22, 0.92);
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-red::before {
    background: rgba(248, 113, 113, 0.92);
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-active::before {
    background: rgba(96, 165, 250, 0.88);
}

#screen-profile .profile-card--nearest.profile-card--nearest-phase-active .nearest-shift-meta-row--report dd {
    color: #bfdbfe;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.28);
}

#screen-profile .nearest-shift-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

#screen-profile .nearest-shift-head--empty {
    margin-bottom: 6px;
}

#screen-profile .nearest-shift-section-label {
    margin-bottom: 0;
}

#screen-profile .nearest-shift-badge {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #8e8e93;
    background: rgba(255, 255, 255, 0.06);
}

#screen-profile .nearest-shift-badge--today {
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

#screen-profile .nearest-shift-route {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile .nearest-shift-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
}

#screen-profile .nearest-shift-meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#screen-profile .nearest-shift-meta-row dt {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #8e8e93;
    text-transform: none;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

#screen-profile .nearest-shift-meta-row dd {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile .nearest-shift-meta-row--report dd {
    font-weight: 700;
    color: #8ee4a8;
}

#screen-profile .nearest-shift-trains-block {
    margin-top: 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: #22262f !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-sizing: border-box;
}

#screen-profile .nearest-shift-trains-label {
    font-size: 12px;
    font-weight: 400;
    color: #8e8e93;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 8px;
}

#screen-profile .profile-mini-block--nearest {
    width: 100%;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: none;
    justify-content: flex-start;
}

#screen-profile .profile-mini-label {
    font-size: clamp(10px, 2.8vw, var(--font-xs));
    font-weight: 500;
    color: var(--app-caption);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#screen-profile .nearest-shift-empty {
    color: var(--app-caption);
    font-size: var(--font-sm);
    text-align: center;
    line-height: 1.45;
}

#screen-profile .profile-footer,
#screen-profile .profile-footer.profile-footer--actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: border-box;
}

#screen-profile .profile-footer-action {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: opacity 0.2s ease, background 0.2s ease;
}

#screen-profile .profile-footer-action--feedback {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

#screen-profile .profile-footer-action--logout,
#screen-profile .profile-footer .profile-logout-btn {
    background: #181a20;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0 16px;
    margin: 0;
}

#screen-profile .profile-footer-action:hover {
    opacity: 0.9;
}

#screen-profile .profile-footer-action:active {
    opacity: 0.75;
}

#screen-profile .app-community-footer .app-feedback-wrap {
    display: none !important;
}

/* =========================================================
   Плановые события — панель в hero личного кабинета
   ========================================================= */
:root {
    --pe-panel-bg: rgba(0, 0, 0, 0.12);
    --pe-panel-border: rgba(255, 255, 255, 0.06);
    --pe-tile-bg: rgba(255, 255, 255, 0.04);
    --pe-tile-border: rgba(255, 255, 255, 0.08);
    --pe-tile-border-hover: rgba(6, 199, 133, 0.35);
    --pe-text: var(--app-text);
    --pe-muted: var(--app-muted);
    --pe-accent: var(--brand-grad-light);
    --pe-accent-line: var(--brand-grad-dark);
    --pe-cyan: #38c8de;
    --pe-green: #2ea874;
    --pe-orange: #dd6b20;
    --pe-red: #e53e3e;
    --pe-sheet-bg: #1c212a;
    --pe-sheet-card: #141820;
    --pe-sheet-soft: #212630;
}

#screen-profile .events-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 14px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#screen-profile .events-panel--embedded {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#screen-profile .profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

#screen-profile .profile-section-header .section-title {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: -0.01em;
}

#screen-profile .section-collapse-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#screen-profile .section-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
}

#screen-profile .chevron-icon {
    transition: transform 0.2s ease;
}

#screen-profile .chevron-icon.is-flipped {
    transform: rotate(-180deg);
}

#screen-profile .profile-events-collapse {
    overflow: hidden;
    max-height: 1200px;
    opacity: 1;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

#screen-profile .profile-events-collapse.is-collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

#screen-profile .profile-events-panel-head,
#screen-profile .panel-pill-header,
#screen-profile .panel-drag-handle {
    display: none !important;
}

#screen-profile .grid-collapse-wrapper {
    overflow: hidden;
    max-height: 900px;
    opacity: 1;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

#screen-profile .grid-collapse-wrapper.collapsed {
    max-height: 0;
    opacity: 0;
}

#screen-profile .grid-3x2 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

/* ---------- Плановые события: карточки списка ---------- */
#screen-profile .plan-events-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
}

#screen-profile .event-card {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0 0 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#screen-profile .event-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

#screen-profile .event-card:active {
    transform: scale(0.995);
}

#screen-profile .event-card:focus-visible {
    outline: 2px solid var(--pe-cyan);
    outline-offset: 2px;
}

#screen-profile .event-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

#screen-profile .event-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
}

#screen-profile .icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

#screen-profile .icon-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

#screen-profile .icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

#screen-profile .event-info {
    min-width: 0;
    flex: 1;
}

#screen-profile .event-title {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

#screen-profile .event-sub {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 1px;
    line-height: 1.2;
    white-space: normal;
}

#screen-profile .event-sub.status-ok {
    color: #34d399;
}

#screen-profile .event-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 46%;
}

#screen-profile .event-right-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 0;
}

#screen-profile .event-right-date {
    font-size: 12px;
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.2;
    white-space: nowrap;
    text-align: right;
}

#screen-profile .event-set-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    pointer-events: none;
}

#screen-profile .event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

#screen-profile .event-chip-add {
    display: none;
}

#screen-profile .event-add-btn {
    appearance: none;
    width: 100%;
    height: 38px;
    min-height: 38px;
    margin: 8px 0 0;
    padding: 0 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .event-add-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
}

#screen-profile .event-add-btn:focus-visible {
    outline: 2px solid var(--pe-cyan);
    outline-offset: 2px;
}

#screen-profile .badge-normal {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

#screen-profile .badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

#screen-profile .badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

#screen-profile .badge-empty {
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 420px) {
    #screen-profile .event-card {
        padding: 8px 10px;
        align-items: flex-start;
    }

    #screen-profile .event-right {
        max-width: 42%;
    }

    #screen-profile .profile-average-pay-field--compact .profile-average-pay-field__label {
        white-space: normal;
        font-size: 12px;
    }

    #screen-profile .profile-average-pay-field--compact .profile-average-pay-field__input {
        width: 120px;
    }
}

@media (max-width: 340px) {
    #screen-profile .event-title {
        font-size: 13px;
    }

    #screen-profile .event-date {
        font-size: 12px;
    }

    #screen-profile .event-badge {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* legacy table rows — скрыты, если остались в кэше */
#screen-profile .plan-events-table,
#screen-profile .plan-events-row {
    display: none !important;
}

/* ---------- Плитка ---------- */
#screen-profile .tile-card,
#screen-profile .tile-placeholder {
    appearance: none;
    width: 100%;
    min-width: 0;
    min-height: 160px;
    margin: 0;
    padding: 0;
    background: var(--pe-tile-bg);
    border: 1.5px solid var(--pe-tile-border);
    border-radius: 16px;
    color: var(--pe-text);
    font: inherit;
    box-sizing: border-box;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .tile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 9px 6px 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

#screen-profile .tile-card:hover {
    border-color: var(--pe-tile-border-hover);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

#screen-profile .tile-card:active {
    transform: scale(0.96);
}

#screen-profile .tile-card:focus-visible,
#screen-profile .tile-placeholder:focus-visible,
#screen-profile .panel-pill-header:focus-visible {
    outline: 2px solid var(--pe-cyan);
    outline-offset: 2px;
}

#screen-profile .badge-compound {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 88%;
    max-width: 100%;
    min-width: 0;
}

#screen-profile .badge-top,
#screen-profile .badge-bottom {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#screen-profile .badge-top {
    padding: 4px 5px 3px;
    background: #2c2533;
    border-radius: 10px 10px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

#screen-profile .badge-bottom {
    padding: 3px 5px 4px;
    background: var(--pe-green);
    color: #fff;
    border-radius: 0 0 10px 10px;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: 0 3px 8px rgba(46, 168, 116, 0.25);
}

#screen-profile .badge-ot .badge-top { background: #172c36; color: var(--pe-cyan); }
#screen-profile .badge-prmo .badge-top { background: #472234; color: #fca5d5; }
#screen-profile .badge-quarter .badge-top { background: #3c2a1a; color: #f6ad55; }
#screen-profile .badge-quarter .badge-bottom { background: #d69e2e; color: #171b22; box-shadow: 0 3px 8px rgba(214, 158, 46, 0.25); }
#screen-profile .badge-exam .badge-top { background: #182c40; color: #63b3ed; }
#screen-profile .badge-trans .badge-top { background: #3e1f26; color: #feb2b2; }
#screen-profile .badge-trans .badge-bottom { background: var(--pe-red); color: #fff; box-shadow: 0 3px 8px rgba(229, 62, 62, 0.25); }

#screen-profile .tile-card-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 4px 0;
}

#screen-profile .tile-date-label,
#screen-profile .tile-date-underline {
    display: block;
    width: 100%;
    font-size: 9.5px;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#screen-profile .tile-date-label {
    font-weight: 500;
    color: var(--pe-muted);
}

#screen-profile .tile-date-underline {
    font-weight: 600;
    color: var(--pe-accent);
    text-decoration: underline;
    text-decoration-color: var(--pe-accent-line);
    text-decoration-thickness: 1.2px;
    text-underline-offset: 3px;
}

/* ---------- Пустая плитка / Добавить ---------- */
#screen-profile .tile-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

#screen-profile .tile-placeholder:hover {
    border-color: var(--pe-tile-border-hover);
    background: #262c37;
}

#screen-profile .tile-placeholder:active {
    transform: scale(0.96);
}

#screen-profile .tile-placeholder--empty {
    cursor: default;
    pointer-events: none;
    border-style: dashed;
    opacity: 0.7;
}

#screen-profile .tile-placeholder__icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
}

#screen-profile .tile-placeholder__label {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
}

/* ---------- Ручка снизу ---------- */
#screen-profile .panel-drag-handle {
    appearance: none;
    display: block;
    width: 72px;
    height: 20px;
    margin: 6px auto 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
}

#screen-profile .panel-drag-handle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38px;
    height: 4px;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    background: #687385;
    transition: background 0.2s ease;
}

#screen-profile .panel-drag-handle:hover::before {
    background: var(--pe-cyan);
}

/* =========================================================
   Капсулы счётчика (глобально: и в плитке, и в листах)
   ========================================================= */
.pill-counter,
.pill-counter-warn,
.pill-counter-danger {
    display: inline-block;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 9999px;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    box-sizing: border-box;
}

.pill-counter {
    background: var(--pe-green, #2ea874);
    box-shadow: 0 2px 8px rgba(46, 168, 116, 0.3);
}

.pill-counter-warn {
    background: var(--pe-orange, #dd6b20);
    box-shadow: 0 2px 8px rgba(221, 107, 32, 0.3);
}

.pill-counter-danger {
    background: var(--pe-red, #e53e3e);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

/* =========================================================
   Bottom sheets (детали карточки, настройки сетки)
   ========================================================= */
body.plan-sheet-open {
    overflow: hidden;
}

.plan-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.plan-sheet-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.plan-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 11, 16, 0.82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.plan-sheet-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    max-height: 88dvh;
    transform: translate(-50%, 100%);
    background: var(--pe-sheet-bg, #1c212a);
    border-top: 1.5px solid #3d4758;
    border-radius: 28px 28px 0 0;
    box-sizing: border-box;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.plan-sheet-overlay.is-open .plan-sheet-body {
    transform: translate(-50%, 0);
}

.plan-sheet-scroll {
    padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    color: var(--pe-text, #f1f5f9);
    -webkit-overflow-scrolling: touch;
}

.plan-sheet-scroll::-webkit-scrollbar {
    width: 4px;
}

.plan-sheet-scroll::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 99px;
}

.plan-detail-grab {
    width: 40px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #6b7280;
}

.plan-detail-head,
.plan-settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.plan-detail-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #34d399;
}

.plan-detail-title,
.plan-settings-title {
    margin: 2px 0 0;
    font-family: 'Inter', var(--font-main, -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.2px;
    overflow-wrap: anywhere;
}

.plan-detail-title small {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}

.plan-settings-sub {
    margin: 4px 0 0;
    font-size: 11px;
    color: #9ca3af;
}

.plan-detail-close {
    appearance: none;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.plan-detail-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.plan-detail-card {
    margin-bottom: 12px;
    padding: 4px 14px;
    background: #22262f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.plan-detail-card .plan-detail-row {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-detail-card .plan-detail-row:last-child {
    border-bottom: none;
}

.plan-detail-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 12px;
}

.plan-detail-row--status {
    align-items: center;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-detail-row__label {
    flex-shrink: 0;
    color: #9ca3af;
}

.plan-detail-row__value {
    min-width: 0;
    text-align: right;
    font-weight: 500;
    color: #e5e7eb;
    overflow-wrap: anywhere;
}

.plan-detail-row__value--strong {
    font-weight: 700;
    color: #fff;
}

.plan-detail-row__value--accent {
    font-weight: 700;
    color: var(--pe-accent, #34d399);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.plan-detail-days-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.plan-detail-note {
    margin: 0 0 12px;
    padding: 12px;
    background: var(--pe-sheet-soft, #212630);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.45;
    color: #d1d5db;
}

.plan-detail-note:empty {
    display: none;
}

.plan-detail-memo {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #151921;
    border: 1px solid #303746;
    border-radius: 14px;
}

.plan-detail-memo__title {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--pe-accent, #34d399);
}

.plan-detail-memo ul {
    margin: 0;
    padding-left: 16px;
    font-size: 11px;
    line-height: 1.45;
    color: #cbd5e1;
}

.plan-detail-edit {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: var(--pe-sheet-card, #141820);
    border: 1px solid #303746;
    border-radius: 16px;
}

.plan-detail-edit__heading {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
}

.plan-detail-edit__hint {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.45;
    color: #94a3b8;
}

.plan-detail-edit__label {
    display: block;
    margin: 10px 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.plan-detail-edit__label:first-of-type {
    margin-top: 0;
}

.plan-detail-edit__row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.plan-detail-edit__input--full {
    flex: none;
    width: 100%;
    margin-bottom: 2px;
}

.plan-detail-edit__input,
.plan-settings-input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    box-sizing: border-box;
    background: #202530;
    border: 1px solid #374151;
    border-radius: 12px;
    color: #fff;
    font: inherit;
    font-size: 12px;
    color-scheme: dark;
    transition: border-color 0.15s ease;
}

.plan-detail-edit__input:focus,
.plan-settings-input:focus {
    outline: none;
    border-color: var(--pe-green, #2ea874);
}

.plan-detail-edit__input {
    flex: 1;
}

.plan-detail-edit__row .plan-detail-edit__save {
    width: 100%;
}

.plan-detail-edit__save {
    appearance: none;
    min-height: 38px;
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    background: var(--pe-green, #2ea874);
    color: #0f172a;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.plan-settings-add__btn {
    appearance: none;
    min-height: 38px;
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    background: #10b981;
    color: #ffffff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.plan-detail-edit__save:hover {
    background: #289265;
}

.plan-settings-add__btn:hover {
    background: #0d9668;
}

.plan-detail-edit__save:active,
.plan-settings-add__btn:active {
    transform: scale(0.98);
}

.plan-detail-actions {
    display: flex;
    gap: 8px;
}

.plan-detail-btn {
    appearance: none;
    flex: 1;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.plan-detail-btn:active {
    transform: scale(0.98);
}

.plan-detail-btn--danger {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fda4af;
}

.plan-detail-btn--danger:hover {
    background: rgba(244, 63, 94, 0.2);
}

.plan-detail-btn--muted {
    background: #2b313d;
    color: #fff;
}

.plan-detail-btn--muted:hover {
    background: #343b49;
}

/* ---------- Компактный bottom sheet (события профиля) ---------- */
.plan-sheet-head {
    align-items: center;
    margin-bottom: 12px;
}

.plan-sheet-head__title {
    margin: 0;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}

.plan-sheet-head__close,
.plan-detail-head .plan-sheet-head__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #22262f !important;
    color: #94a3b8;
    font-size: 16px;
}

.plan-sheet-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.plan-sheet-status--ok {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #6ee7b7;
}

.plan-sheet-status--warn {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #fcd34d;
}

.plan-sheet-status--danger {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fca5a5;
}

.plan-sheet-status__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.2);
}

.plan-sheet-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-sheet-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-sheet-field__label {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
}

.plan-sheet-field__hint {
    margin: -4px 0 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}

.plan-sheet-field__control {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #16181f;
    color: #f8fafc;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.plan-sheet-field__control:focus {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.plan-sheet-field__control--date {
    color-scheme: dark;
}

.plan-sheet-segment {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px;
    gap: 3px;
    border-radius: 10px;
    background: #1e212b;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-sheet-segment__btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
}

.plan-sheet-segment__btn.is-active {
    background: #2a2f3d;
    color: #10b981;
    font-weight: 600;
}

.plan-sheet-save {
    width: 100%;
    height: 46px;
    margin-top: 4px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #042f2e;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.plan-sheet-save:active {
    opacity: 0.9;
    transform: scale(0.99);
}

.plan-sheet-hide-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 0 4px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
}

.plan-sheet-hide-link:hover {
    color: #94a3b8;
}

.profile-plan-detail-sheet .plan-detail-card,
.profile-plan-detail-sheet .plan-detail-note,
.profile-plan-detail-sheet .plan-detail-memo,
.profile-plan-detail-sheet .plan-detail-edit,
.profile-plan-detail-sheet .plan-detail-actions,
.profile-plan-detail-sheet .plan-detail-kicker {
    display: none !important;
}

/* ---------- Настройки: список карточек ---------- */
.profile-plan-settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-plan-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    background: var(--pe-sheet-soft, #212630);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.profile-plan-settings-row__main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-plan-settings-row__text {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-plan-settings-row__muted {
    font-weight: 400;
    color: #9ca3af;
}

.profile-plan-settings-row__sub {
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* iOS-переключатель */
.plan-switch {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
}

.plan-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.plan-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #3a4252;
    border: 1px solid #4b5563;
    transition: background 0.2s ease, border-color 0.2s ease;
    pointer-events: none;
}

.plan-switch__dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.plan-switch input:checked + .plan-switch__track {
    background: var(--pe-green, #2ea874);
    border-color: var(--pe-green, #2ea874);
}

.plan-switch input:checked + .plan-switch__track .plan-switch__dot {
    transform: translateX(18px);
}

.plan-switch input:focus-visible + .plan-switch__track {
    outline: 2px solid var(--pe-cyan, #38c8de);
    outline-offset: 2px;
}

/* ---------- Настройки: форма добавления ---------- */
.plan-settings-add {
    margin-top: 16px;
    padding: 14px;
    background: #151921;
    border: 1px solid #303746;
    border-radius: 16px;
}

.plan-settings-add__title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pe-cyan, #38c8de);
}

.plan-settings-input {
    margin-bottom: 8px;
}

.plan-settings-input::placeholder {
    color: #6b7280;
}

.plan-settings-add__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}

.plan-settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    font-size: 10px;
    color: #9ca3af;
}

.plan-settings-field .plan-settings-input {
    margin-bottom: 0;
}

.plan-settings-add__btn {
    width: 100%;
    margin-top: 8px;
    padding: 11px;
}

.plan-settings-add__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.plan-settings-error {
    margin: 6px 0 0;
    font-size: 11px;
    color: #fda4af;
    min-height: 14px;
}

.profile-email-bind {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #22262f;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-email-bind[hidden] {
    display: none !important;
}

.profile-email-bind__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #cbd5e1;
}

.profile-email-bind__btn {
    align-self: flex-start;
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #042f2e;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* === Profile premium layout (header, events, QR, menu) === */
#screen-profile .profile-header-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 16px;
    margin: -16px -16px 0;
    width: calc(100% + 32px);
    box-sizing: border-box;
}

#screen-profile .profile-header-card__avatar,
#screen-profile .profile-avatar-container {
    position: relative !important;
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    padding: 10px !important;
    border-radius: 24px !important;
    background: #181a20 !important;
    border: 1.5px solid #10b981 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible;
    flex-shrink: 0;
    cursor: pointer !important;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#screen-profile .profile-header-card__avatar:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

#screen-profile .profile-header-card__avatar:active {
    transform: scale(0.98);
}

#screen-profile .profile-header-card__avatar img,
#screen-profile .profile-avatar-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
    pointer-events: none;
    border-radius: 0;
}

#screen-profile .profile-header-card__avatar.has-photo,
#screen-profile .profile-avatar-container.has-photo {
    overflow: hidden;
    padding: 0 !important;
}

#screen-profile .profile-header-card__avatar.has-photo img,
#screen-profile .profile-avatar-container.has-photo img {
    object-fit: cover !important;
    border-radius: 14px !important;
}

#screen-profile .profile-header-card__avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #16181f;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
}

#screen-profile .profile-header-card__avatar-badge svg {
    width: 12px;
    height: 12px;
}

#screen-profile .profile-header-card__avatar-input {
    display: none;
}

#screen-profile .profile-header-card__info {
    margin-left: 16px;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    flex: 1;
    width: 0;
}

#screen-profile .profile-header-card__name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#screen-profile .profile-header-card__name-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    field-sizing: content;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    letter-spacing: -0.2px;
    padding: 2px 0;
    margin: 0;
    outline: none;
    font-family: inherit;
}

#screen-profile .profile-header-card__name-input::placeholder {
    color: var(--profile-text-muted);
    font-weight: 500;
    font-size: 18px;
}

#screen-profile .profile-header-card__name-input:focus {
    border-bottom-color: rgba(16, 185, 129, 0.4);
}

#screen-profile .profile-header-card__name-edit {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--profile-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

#screen-profile .profile-header-card__name-edit:hover {
    color: var(--profile-text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

#screen-profile .role-switcher {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: center;
    background: var(--profile-inner-bg);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    gap: 3px;
    margin-top: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#screen-profile .role-switcher .role-btn {
    position: relative;
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: var(--profile-text-secondary);
    font-size: 12.5px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    line-height: 1.25;
    white-space: nowrap;
}

#screen-profile .role-switcher .role-btn:hover {
    color: var(--profile-text);
}

#screen-profile .role-switcher .role-btn.active {
    background: #2a2f3d;
    color: var(--profile-accent);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#screen-profile .profile-header-card__role-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 28px;
    background: transparent;
    border: none;
}

#screen-profile .profile-header-card__role-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--profile-text-secondary);
    padding: 0 22px 0 0;
    cursor: pointer;
    max-width: 100%;
}

#screen-profile .profile-header-card__role-chevron {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    stroke: var(--profile-text-secondary);
}

#screen-profile .profile-header-card__email,
#screen-profile #profileAccountEmail.profile-header-card__email {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.35;
    color: #94a3b8;
    word-break: break-all;
}

#screen-profile .profile-header-card__email[data-state="loading"] {
    opacity: 0.55;
}

#screen-profile .profile-header-card__tab-badge,
#screen-profile #profileUserTab.profile-header-card__tab-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12px;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    box-sizing: border-box;
}

#screen-profile .events-card {
    background: var(--profile-card-bg);
    border-radius: var(--profile-radius);
    border: 1px solid var(--profile-border);
    overflow: hidden;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
}

#screen-profile .events-card .profile-events-list {
    padding: 0;
    margin: 0;
}

#screen-profile .events-card .profile-event-item {
    margin: 0;
    padding: 12px 14px;
    gap: 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#screen-profile .events-card .profile-event-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

#screen-profile .events-card .profile-event-item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#screen-profile .aspozh-compact-card {
    background: var(--profile-card-bg);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
}

#screen-profile .aspozh-compact-card__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    cursor: pointer;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .aspozh-compact-card__empty[hidden],
#screen-profile .aspozh-compact-card__loaded[hidden] {
    display: none !important;
}

#screen-profile .aspozh-compact-card__loaded {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

#screen-profile .aspozh-compact-card__preview {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    background: #fff;
    padding: 3px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

#screen-profile .aspozh-compact-card__preview--placeholder {
    color: var(--profile-text-muted);
    background: var(--profile-inner-bg);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

#screen-profile .aspozh-compact-card__preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#screen-profile .aspozh-compact-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

#screen-profile .aspozh-compact-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

#screen-profile .aspozh-compact-card__subtitle {
    font-size: 12px;
    color: var(--profile-text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

#screen-profile .aspozh-compact-card__hint {
    color: var(--profile-text-muted);
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

#screen-profile .aspozh-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

#screen-profile .aspozh-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s ease, transform 0.12s ease;
}

#screen-profile .aspozh-btn:active {
    transform: scale(0.96);
}

#screen-profile .aspozh-btn--expand {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

#screen-profile .aspozh-btn--delete {
    background: var(--profile-danger-soft);
    color: var(--profile-danger);
}

#screen-profile .aspozh-compact-card__input {
    display: none;
}

#screen-profile a.menu-list__item.menu-list__item--doc {
    text-decoration: none;
    color: #f1f5f9;
}

#screen-profile .profile-menu-block {
    margin: 12px 0 0;
    width: 100%;
    box-sizing: border-box;
}

#screen-profile .profile-menu-block:last-of-type {
    margin-bottom: 10px;
}

#screen-profile .profile-menu-block__title {
    margin: 0 0 8px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: -0.01em;
}

#screen-profile .profile-menu-list.menu-list {
    background: #12171a;
    border-radius: var(--profile-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

#screen-profile .profile-menu-block .profile-menu-list.menu-list {
    margin-bottom: 0;
}

#screen-profile .menu-list__item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #f1f5f9;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

#screen-profile .menu-list__label {
    color: #f1f5f9;
}

#screen-profile .menu-list__item:last-child {
    border-bottom: none;
}

#screen-profile .menu-list__item--value .menu-list__label {
    flex: 1;
    min-width: 0;
    text-align: left;
}

#screen-profile .menu-list__value {
    flex-shrink: 1;
    min-width: 0;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    color: var(--profile-text-muted);
}

#screen-profile .menu-list__value.is-active,
#screen-profile .menu-list__value[data-sub-tone="ok"] {
    color: #00e59b;
}

#screen-profile .menu-list__value[data-sub-tone="warn"] {
    color: #f59e0b;
}

#screen-profile .menu-list__value[data-sub-tone="danger"] {
    color: #f87171;
}

#screen-profile .profile-menu-list__editor {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 16px;
    border-bottom: 0 solid rgba(255, 255, 255, 0.08);
    background: #0d1113;
    transition:
        max-height 0.28s ease,
        opacity 0.22s ease,
        padding 0.28s ease,
        border-bottom-width 0.28s ease;
}

#screen-profile .profile-menu-list__editor.is-open {
    max-height: 72px;
    opacity: 1;
    padding: 0 16px 12px;
    border-bottom-width: 1px;
}

#screen-profile .profile-menu-list__editor--cards.is-open {
    max-height: 280px;
}

#screen-profile .profile-bound-cards {
    list-style: none;
    margin: 0;
    padding: 8px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#screen-profile .profile-bound-cards__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0e10;
}

#screen-profile .profile-bound-cards__main {
    flex: 1;
    min-width: 0;
}

#screen-profile .profile-bound-cards__title {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
}

#screen-profile .profile-bound-cards__meta {
    margin-top: 2px;
    font-size: 12px;
    color: var(--profile-text-muted);
}

#screen-profile .profile-bound-cards__unbind {
    flex-shrink: 0;
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

#screen-profile .profile-bound-cards__unbind:hover,
#screen-profile .profile-bound-cards__unbind:active {
    background: rgba(248, 113, 113, 0.22);
}

#screen-profile .profile-bound-cards__unbind:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#screen-profile .profile-bound-cards__demo {
    margin: 8px 0 4px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--profile-text-muted);
}

#screen-profile .profile-bound-cards__empty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0 4px;
}

#screen-profile .profile-bound-cards__empty-row[hidden] {
    display: none !important;
}

#screen-profile .profile-bound-cards__empty-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--profile-text-muted);
}

#screen-profile .profile-bound-cards__bind {
    flex-shrink: 0;
    min-width: 108px;
}

#screen-profile .profile-menu-list__editor-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

#screen-profile .profile-menu-list__email-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0a0e10;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

#screen-profile .profile-menu-list__email-input:focus {
    outline: none;
    border-color: #00e59b;
    box-shadow: none;
}

#screen-profile .profile-menu-list__save {
    flex-shrink: 0;
    height: 40px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: #00e59b;
    color: #05130e;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(0, 229, 155, 0.16);
}

#screen-profile .profile-menu-list__save:active {
    transform: scale(0.98);
}

#screen-profile .menu-list__item--value[aria-expanded="true"] .menu-list__chevron {
    transform: rotate(90deg);
}

#screen-profile .menu-list__item:hover {
    background: rgba(255, 255, 255, 0.03);
}

#screen-profile .menu-list__item--accent {
    color: #34d399;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#screen-profile .profile-menu-list .profile-logout-btn,
#screen-profile .profile-account-menu .profile-logout-btn,
#screen-profile .profile-menu-list .profile-logout-btn .menu-list__label,
#screen-profile .profile-account-menu .profile-logout-btn .menu-list__label {
    color: #f1f5f9;
}

#screen-profile .menu-list__item--delete {
    color: #ef4444;
}

#screen-profile .menu-list__item--delete .menu-list__label {
    color: #ef4444;
    text-decoration: none;
}

#screen-profile .menu-list__chevron {
    display: inline-block;
    color: rgba(255, 255, 255, 0.25);
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

#screen-profile .app-community-block {
    gap: 8px;
}

#screen-profile .app-community-block .app-release-list {
    margin: 0;
    padding: 12px 14px;
    background: var(--profile-card-bg);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
}

#screen-profile .app-community-block .app-release-list li {
    color: var(--profile-text-secondary);
    font-size: 12px;
}

#screen-profile .app-community-block .app-community-text {
    margin: 0;
    font-size: 12px;
    color: var(--profile-text-muted);
    line-height: 1.45;
}

#screen-profile .app-community-block .app-community-link {
    color: var(--profile-accent);
    font-weight: 600;
}

#screen-profile .profile-mini-block {
    background: var(--profile-card-bg) !important;
    border: 1px solid var(--profile-border) !important;
    border-radius: var(--profile-radius) !important;
}

#screen-profile .profile-card--nearest {
    background: var(--profile-card-bg) !important;
    border: 1px solid var(--profile-border) !important;
    border-radius: var(--profile-radius) !important;
}

#screen-profile .profile-card--nearest.profile-card--nearest {
    padding: 16px !important;
}

#screen-profile .profile-menu-list__editor--brake-transit.is-open {
    max-height: 220px;
}

#screen-profile .profile-brake-transit {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 4px;
}

#screen-profile .profile-brake-transit__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#screen-profile .profile-brake-transit__title {
    font-size: 13px;
    font-weight: 500;
    color: var(--profile-text-secondary);
}

#screen-profile .profile-brake-transit__switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .profile-brake-transit__switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

#screen-profile .profile-brake-transit__switch-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #273038;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    transition: background 0.24s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.24s ease;
}

#screen-profile .profile-brake-transit__switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1), width 0.16s ease;
}

#screen-profile .profile-brake-transit__switch-input:checked + .profile-brake-transit__switch-track {
    background: #00e59b;
    border-color: #00e59b;
}

#screen-profile .profile-brake-transit__switch-input:checked + .profile-brake-transit__switch-track .profile-brake-transit__switch-thumb {
    transform: translateX(18px);
}

#screen-profile .profile-brake-transit__switch:active .profile-brake-transit__switch-thumb {
    width: 22px;
}

#screen-profile .profile-brake-transit__switch:active .profile-brake-transit__switch-input:checked + .profile-brake-transit__switch-track .profile-brake-transit__switch-thumb {
    transform: translateX(14px);
}

#screen-profile .profile-brake-transit__interval-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#screen-profile .profile-brake-transit__interval-group[hidden] {
    display: none !important;
}

#screen-profile .profile-brake-transit__stepper {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 10px;
    background: #0a0e10;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 2px;
    transition: border-color 0.15s ease;
}

#screen-profile .profile-brake-transit__stepper:focus-within {
    border-color: rgba(0, 229, 155, 0.45);
}

#screen-profile .profile-brake-transit__step-btn {
    width: 30px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--profile-text-secondary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#screen-profile .profile-brake-transit__step-btn:active:not(:disabled) {
    background: rgba(0, 229, 155, 0.22);
    color: #00e59b;
}

#screen-profile .profile-brake-transit__step-btn:disabled {
    opacity: 0.32;
    cursor: default;
}

#screen-profile .profile-brake-transit__step-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    padding: 0 8px;
    min-width: 68px;
    cursor: text;
}

#screen-profile .profile-brake-transit__step-input {
    width: 24px;
    padding: 2px 0;
    border: none;
    background: transparent;
    color: var(--profile-text-primary, #eef3f1);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    outline: none;
    box-shadow: none;
    -moz-appearance: textfield;
    appearance: textfield;
    -webkit-tap-highlight-color: transparent;
}

#screen-profile .profile-brake-transit__step-input::selection {
    background: rgba(0, 229, 155, 0.28);
    color: #eef3f1;
}

#screen-profile .profile-brake-transit__step-input::-webkit-inner-spin-button,
#screen-profile .profile-brake-transit__step-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#screen-profile .profile-brake-transit__step-unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--profile-text-muted);
    user-select: none;
}

#screen-profile .profile-menu-block {
    scroll-margin-top: 84px;
}

#screen-profile .menu-list__label-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

#screen-profile .menu-list__item--brake-transit .profile-brake-transit__switch {
    flex-shrink: 0;
}

#screen-profile .menu-list__item.is-new .menu-list__label::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    vertical-align: middle;
    border-radius: 50%;
    background: var(--sub-neon, #00e59b);
    box-shadow: 0 0 0 2px rgba(0, 229, 155, 0.22), 0 0 8px rgba(0, 229, 155, 0.45);
}

/* Полноэкранная модалка «Настройка таймера» с интерактивным макетом */
.da-timer-modal-overlay[hidden] {
    display: none !important;
}

.da-timer-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1320;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(6, 10, 18, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.da-timer-modal-overlay.is-open {
    opacity: 1;
}

.da-timer-modal {
    width: 100%;
    max-width: 410px;
    max-height: 100%;
    overflow-y: auto;
    padding: 20px 18px 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, #131a29 0%, #0d121d 100%);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    transform: scale(0.96);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.da-timer-modal-overlay.is-open .da-timer-modal {
    transform: scale(1);
}

.da-timer-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.da-timer-modal__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.da-timer-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.55);
    color: #cbd5e1;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.da-timer-modal__close:hover {
    background: rgba(51, 65, 85, 0.7);
    color: #ffffff;
}

.da-timer-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(10, 14, 23, 0.85);
}

.da-timer-tab {
    min-width: 0;
    padding: 9px 6px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.da-timer-tab.is-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.da-timer-tab--soon {
    color: rgba(148, 163, 184, 0.45);
    font-size: 11.5px;
    font-weight: 500;
    padding: 9px 4px;
}

@media (max-width: 380px) {
    .da-timer-tab {
        font-size: 11.5px;
        padding: 8px 4px;
    }

    .da-timer-tab--soon {
        font-size: 10.5px;
    }
}

.da-timer-tab--soon:hover {
    color: rgba(148, 163, 184, 0.72);
}

.da-timer-modal__toast[hidden] {
    display: none !important;
}

.da-timer-modal__toast {
    margin: -4px 0 12px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(20, 27, 40, 0.95);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.da-timer-modal__toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.da-timer-preview-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 14px 24px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: radial-gradient(circle at 50% 55%, rgba(16, 185, 129, 0.08), rgba(8, 11, 18, 0.94));
    box-sizing: border-box;
}

.da-timer-states {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(14, 20, 32, 0.85);
}

.da-timer-state-btn {
    padding: 5px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, color 0.16s ease;
}

.da-timer-state-btn.is-active {
    background: rgba(52, 211, 153, 0.16);
    color: #34d399;
}

.da-timer-preview-el.is-accent-dwell {
    color: #38bdf8;
}

.da-timer-preview-el.is-accent-ok {
    color: #94a3b8;
}

.da-timer-preview-el.is-unavailable,
.da-timer-preview-reset.is-unavailable {
    opacity: 0.22 !important;
}

.da-timer-preview-capsule {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 14px;
    background: rgba(14, 20, 32, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.da-timer-preview-capsule__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 18px;
    min-width: 170px;
}

.da-timer-preview-clock {
    font-size: 1.48rem;
    font-weight: 700;
    line-height: 1.05;
    color: #34d399;
    font-variant-numeric: tabular-nums;
    user-select: none;
    margin-bottom: 2px;
}

.da-timer-preview-el {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.18s ease, background 0.16s ease, transform 0.14s ease;
}

.da-timer-preview-el:hover {
    background: rgba(255, 255, 255, 0.06);
}

.da-timer-preview-el:active {
    transform: scale(0.96);
}

.da-timer-preview-el.is-switching {
    opacity: 0.45;
    transform: translateY(2px);
}

.da-timer-preview-el--motion {
    color: #cbd5e1;
}

.da-timer-preview-el--pt {
    color: #fbbf24;
}

.da-timer-preview-el.is-off {
    opacity: 0.34;
    color: #64748b;
    text-decoration: line-through;
}

.da-timer-preview-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(52, 211, 153, 0.07);
    color: #34d399;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.18s ease, background 0.16s ease, color 0.16s ease;
}

.da-timer-preview-reset:hover {
    background: rgba(52, 211, 153, 0.16);
}

.da-timer-preview-reset.is-off {
    opacity: 0.3;
    color: #64748b;
    background: rgba(148, 163, 184, 0.03);
}

.da-timer-modal__hint {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.78);
    text-align: center;
}

.da-timer-toggle-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 13px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 24, 38, 0.9);
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.da-timer-toggle-all__label {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
}

.da-timer-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 28px;
}

.da-timer-switch__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.da-timer-switch__track {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #1e293b;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.da-timer-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.da-timer-switch__input:checked + .da-timer-switch__track {
    background: #10b981;
    border-color: #34d399;
}

.da-timer-switch__input:checked + .da-timer-switch__track .da-timer-switch__thumb {
    transform: translateX(20px);
}

.da-timer-row-dot {
    margin-left: 8px;
    margin-right: auto;
    flex-shrink: 0;
    animation: daTimerDotPulse 2s ease-in-out infinite;
}

.da-timer-row-dot[hidden],
.da-timer-tab-dot[hidden] {
    display: none !important;
}

@keyframes daTimerDotPulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.24), 0 0 8px rgba(16, 185, 129, 0.55);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.36), 0 0 12px rgba(52, 211, 153, 0.75);
    }
}
