* {
    box-sizing: border-box;
}

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

.reveal-anim {
    animation: revealUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.task-item.reveal-stagger {
    animation: revealUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", Arial, sans-serif;
    background: #EBEFF2;
    color: #111827;
    zoom: 1.1;
}

/* ── Login overlay ─────────────────────────────────────── */
.login-overlay {
    position: fixed;
    inset: 0;
    background: #e8ecf0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-overlay.hidden {
    display: none;
}

/* ── Left branding panel ── */
.login-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 64px;
    pointer-events: none;
}

.login-brand {
    margin-bottom: 20px;
    cursor: pointer !important;
    text-decoration: none;
    display: inline-block;
    pointer-events: all;
}

.login-logo {
    height: 18px;
    width: auto;
    display: block;
}

.login-tagline {
    font-family: "Inter", Arial, sans-serif;
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #2563eb;
    margin: 0;
}

.login-split-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #d1d5db;
}

/* ── Right login panel ── */
.login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
    padding: 32px 32px 28px;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Tabs ── */
.login-tabs {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 24px;
}

.login-tab {
    background: none;
    border: none;
    padding: 0;
    font-family: "Inter", Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
}

.login-tab.active {
    color: #111827;
}

.login-tab:not(.active):hover {
    color: #6b7280;
}

/* ── Form ── */
.login-email-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-input {
    width: 100%;
    padding: 10px 13px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: "Inter", Arial, sans-serif;
    color: #111827;
    background: #f3f4f6;
    outline: none;
    transition: background 0.15s;
    box-sizing: border-box;
}

.login-input:focus {
    background: #e9eaec;
}

.login-submit-btn {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: none;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

.login-submit-btn:hover {
    background: #1f2937;
}

/* ── Divider ── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    color: #9ca3af;
}

/* ── Google button ── */
.login-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.login-google-btn i {
    font-size: 17px;
    color: #EA4335;
}

.login-google-btn:hover {
    background: #1f2937;
}

.login-oauth-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.login-apple-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.login-apple-btn i {
    font-size: 18px;
}

.login-apple-btn:hover {
    background: #1f1f1f;
}

/* ── Error ── */
.login-error {
    font-size: 12px;
    color: #dc2626;
    margin: 12px 0 0;
    text-align: center;
    line-height: 1.5;
}

.login-error.hidden {
    display: none;
}

@media (max-width: 640px) {
    .login-left,
    .login-split-line {
        display: none;
    }
    .login-right {
        flex: 1;
        padding: 24px 20px;
    }
}

/* ── Onboarding card ── */
.onboarding-card {
    gap: 0;
}

.onboarding-back-btn {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    width: fit-content;
}

.onboarding-back-btn:hover {
    color: #111827;
}

.onboarding-title {
    font-family: "Inter", Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}

.onboarding-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 22px;
}

.onboarding-field {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 9px 13px 11px;
    margin-bottom: 20px;
    cursor: text;
}

.onboarding-label {
    display: block;
    font-size: 11px;
    font-family: "Inter", Arial, sans-serif;
    color: #6b7280;
    margin-bottom: 3px;
    pointer-events: none;
}

.onboarding-input {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    font-family: "Inter", Arial, sans-serif;
    color: #111827;
    padding: 0;
    box-sizing: border-box;
}

.onboarding-textarea {
    resize: none;
    line-height: 1.5;
}

.onboarding-textarea.hidden,
.onboarding-input.hidden {
    display: none;
}

.onboarding-actions {
    display: flex;
    gap: 10px;
}

.onboarding-skip-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.onboarding-skip-btn:hover {
    border-color: #9ca3af;
    color: #374151;
}

.onboarding-next-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.onboarding-next-btn:hover {
    background: #1f2937;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #EBEFF2;
    padding: 10px;
}

.main-content {
    display: flex;
    gap: 0;
    flex: 1;
    background: #EBEFF2;
    border-radius: 12px;
    overflow: hidden;
}

.column-resizer {
    position: relative;
    width: 10px;
    cursor: col-resize;
    flex: 0 0 10px;
    user-select: none;
    touch-action: none;
}

.column-resizer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: #bcc4cd;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar {
    flex: 0 0 25%;
    background: #EBEFF2;
    border-radius: 0;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.sidebar-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar h1 {
    margin: 0;
    line-height: 1;
}

.app-logo {
    height: 22px;
    width: auto;
    display: block;
    cursor: pointer;
}

.sidebar-label {
    color: #6b7280;
    font-size: 12px;
    margin: 2px 2px 0;
}

.sidebar-month-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-month-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 10px;
    padding: 6px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-month-label {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    flex: 1;
    text-align: center;
}

.sidebar-month-arrow {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 18px;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
    line-height: 1;
}

.sidebar-month-arrow:hover {
    background: #f3f4f6;
    color: #111827;
}

.customers-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customers-head button {
    border: none;
    background: transparent;
    color: #007BFF;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.customers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 0 0 auto;
    min-height: 0;
}

.latest-invoices-section {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.latest-invoices-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.latest-invoices-head h3 {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.latest-invoices-head button {
    border: none;
    background: transparent;
    color: #007BFF;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.latest-invoices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.latest-invoice-card {
    border: 1px solid #93aec7;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.latest-invoice-date {
    font-size: 10px;
    color: rgb(75, 85, 99);
    margin-bottom: 6px;
}

.latest-invoice-project {
    font-size: 11px;
    color: rgb(75, 85, 99);
    margin-bottom: 2px;
}

.latest-invoice-amount {
    font-size: 11px;
    font-weight: 700;
    color: rgb(75, 85, 99);
}

.latest-invoice-actions {
    display: flex;
    gap: 8px;
}

.latest-invoice-action {
    border: none;
    background: transparent;
    color: #111;
    font-size: 18px;
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-footer-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

.customer-item {
    background: #fff;
    border-radius: 10px;
    padding: 11px 76px 11px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: none;
    color: #222;
    text-align: left;
    position: relative;
    transition: box-shadow 0.18s ease;
}

.customer-item:not(.selected):hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
}

.customer-item.selected {
    background: #111;
    color: #fff;
}

.customer-item .amount {
    font-size: 12px;
    font-weight: 400;
    color: #374151;
}

.customer-item.selected .amount {
    color: #d1d5db;
}

.customer-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.customer-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-name-input {
    all: unset;
    min-width: 0;
    flex: 1;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background: transparent;
    border-bottom: 1px solid currentColor;
    outline: none;
    padding: 0 2px;
    cursor: text;
}

.customer-archive-hover-btn {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: #9ca3af;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, color 0.12s ease, background-color 0.12s ease;
}

.customer-archive-hover-btn:hover {
    color: #b45309;
    background: #fffbeb;
}

.customer-item:hover .customer-archive-hover-btn,
.customer-item:focus-within .customer-archive-hover-btn,
.customer-item:hover .project-settings-icon,
.customer-item:focus-within .project-settings-icon {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
    .customer-archive-hover-btn,
    .project-settings-icon {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.customer-item.selected .customer-archive-hover-btn {
    color: #d1d5db;
}

.customer-item.selected .customer-archive-hover-btn:hover {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
}

.project-settings-icon {
    color: #9ca3af;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, color 0.12s ease, background-color 0.12s ease;
}

.project-settings-icon:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.customer-item.selected .project-settings-icon {
    color: #d1d5db;
}

.customer-item.selected .project-settings-icon:hover {
    color: #f3f4f6;
    background: rgba(255, 255, 255, 0.12);
}

.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 16px;
}

.header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
    background: transparent;
    border-radius: 0;
    margin-bottom: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 200;
}

.header .dropdown {
    font-weight: 700;
    color: #111;
    cursor: pointer;
    text-decoration: none !important;
}

.header .dropdown.selected {
    text-decoration: none !important;
}

#active-project-name,
#active-project-name *,
#month-display-btn,
#month-display-btn *,
.month-dropdown-btn,
.month-dropdown-btn * {
    text-decoration: none !important;
}

.month-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 200;
}

.month-dropdown-btn {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: none;
}

.month-dropdown-btn.selected {
    text-decoration: none;
}

.month-dropdown-btn i {
    font-size: 0.95rem;
    color: #007BFF;
}

.month-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 224px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
    overflow: hidden;
    z-index: 200;
    padding: 8px;
}

.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 2px 8px;
}

.month-picker-header span {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111;
}

.month-picker-year-btn {
    border: none;
    background: none;
    cursor: pointer;
    color: #374151;
    padding: 2px 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.month-picker-year-btn:hover {
    background: #f3f4f6;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.month-cell {
    border: none;
    background: none;
    border-radius: 8px;
    padding: 7px 4px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    text-align: center;
    transition: background 0.12s ease;
}

.month-cell:hover {
    background: #f3f4f6;
}

.month-cell.current-month {
    background: #111;
    color: #fff;
}

.month-cell.current-month:hover {
    background: #333;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 auto;
    overflow: visible;
}

.task-add-btn {
    margin-top: 8px;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.task-add-btn span {
    font-size: 12px;
    line-height: 1;
}

.task-add-btn i {
    font-size: 15px;
    line-height: 1;
}

.task-add-btn:hover {
    background: #111827;
    color: #fff;
}

.center-invoices-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#center-invoices-view .settings-topbar-label {
    font-size: 19px;
    color: #111827;
    font-weight: 600;
}

.invoice-overview {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #f8fafc;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 4px;
}

.invoice-overview-block {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
}

.invoice-overview-divider {
    width: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

.invoice-overview-content {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.invoice-overview-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.invoice-overview-amount {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-arrow {
    border: none;
    background: transparent;
    color: #9ca3af;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.overview-arrow:hover {
    color: #111827;
    background: #e5e7eb;
}

.overview-arrow i {
    font-size: 18px;
    line-height: 1;
}

.center-invoices-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.center-invoice-month {
    margin: 4px 0 2px;
    font-size: 13px;
    color: rgb(75, 85, 99);
    font-weight: 700;
}

.center-invoice-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.center-invoice-left {
    min-width: 0;
}

.center-invoice-heading {
    font-size: 12px;
    color: #535D68;
    margin-bottom: 10px;
}

.center-invoice-heading strong {
    color: #111827;
    font-weight: 700;
}

.center-invoice-amount {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 8px;
}

.center-invoice-for {
    font-size: 13px;
    color: #111827;
    line-height: 1.25;
}

.center-invoice-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.center-invoice-status-btn {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.center-invoice-status-btn.unpaid {
    border: 1px solid #16a34a;
    background: transparent;
    color: #16a34a;
}

.center-invoice-status-btn.paid {
    border: 1px solid #16a34a;
    background: #16a34a;
    color: #fff;
}

.center-invoice-action {
    border: none;
    background: transparent;
    width: 30px;
    height: 30px;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.center-invoice-action i {
    font-size: 22px;
    line-height: 1;
}

.center-invoice-action.delete {
    color: #e11d48;
}

.tasks-empty-state {
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #6b7280;
    text-align: center;
}

.tasks-empty-text {
    margin: 0;
    font-size: 1.05rem;
    color: #6b7280;
}

.task-item {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: none;
    box-sizing: border-box;
}

.task-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.task-item-main--with-toolbar {
    padding-right: 118px;
}

.task-mobile-swipe-rail {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.task-mobile-swipe-track {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.task-mobile-swipe-track > .task-toolbar {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 10px;
    margin-left: -4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 18%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
    .task-item:not(.task-locked):hover .task-toolbar {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .task-item.task-timer-running:not(.task-locked) .task-toolbar {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .task-item.task-timer-running:not(.task-locked) .task-item-main--with-toolbar.task-mobile-swipe-face {
        padding-right: 38px;
    }
}

.task-item:not(.task-locked):focus-within .task-toolbar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
    .app-container:not(.mobile-layout) .task-item:not(.task-locked) .task-toolbar {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* While this task's timer is running: only pause/control in the toolbar (every layout). */
.task-item.task-timer-running:not(.task-locked) .task-toolbar .task-tool-btn:not(.task-tool-play) {
    display: none;
}

.task-item.task-timer-running:not(.task-locked) .task-toolbar {
    background: transparent;
}

.task-tool-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.task-tool-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.task-tool-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.task-tool-btn i {
    font-size: 1.15rem;
    line-height: 1;
}

.task-tool-btn.task-tool-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.task-tool-delete.task-delete-armed {
    width: auto;
    min-width: 76px;
    padding: 0 8px;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    color: #b91c1c;
}

.task-tool-delete.task-delete-armed:hover {
    color: #991b1b;
    background: #fef2f2;
}

.task-delete-prompt[hidden] {
    display: none !important;
}

.task-delete-prompt:not([hidden]) {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

.task-delete-timer {
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
}

.task-next-month-prompt[hidden] {
    display: none !important;
}

.task-next-month-prompt:not([hidden]) {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

.task-tool-next-month.task-next-month-armed {
    width: auto;
    min-width: 138px;
    max-width: min(200px, 42vw);
    padding: 0 8px;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    color: #1d4ed8;
}

.task-tool-next-month.task-next-month-armed:hover {
    color: #1e40af;
    background: #eff6ff;
}

.task-next-month-q {
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-next-month-timer {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
}

.task-note-prompt[hidden] {
    display: none !important;
}

.task-note-prompt:not([hidden]) {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

.task-tool-note.task-note-armed {
    width: auto;
    min-width: 108px;
    max-width: min(220px, 44vw);
    padding: 0 8px;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    color: #b45309;
}

.task-tool-note.task-note-armed:hover {
    color: #92400e;
    background: #fffbeb;
}

.task-note-q {
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-note-timer {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
}

.task-tool-btn.task-tool-play.is-running,
.task-tool-btn.task-tool-play.is-running i {
    color: #2563eb;
}

@keyframes play-btn-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.45); }
    65%  { transform: scale(0.88); }
    85%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.play-btn-pop {
    animation: play-btn-pop 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.task-item.task-locked {
    background: #fcfcfd;
    box-shadow: none;
    color: #9ca3af;
}

.task-item.task-locked:hover {
    background: #fcfcfd;
    box-shadow: none;
}

.task-item.task-locked .task-name-input {
    color: #9ca3af;
    -webkit-text-fill-color: #9ca3af;
}

.task-item.task-locked .task-meta,
.task-item.task-locked .task-meta-dot,
.task-item.task-locked .task-time,
.task-item.task-locked .task-wage,
.task-item.task-locked .task-amount {
    color: #9ca3af !important;
}

.task-item.task-locked .task-note-divider {
    border-top-color: #e5e7eb;
}

.task-item.task-locked .task-note-label {
    color: #b4bcc6;
}

.task-item.task-locked .task-note-input {
    color: #9ca3af;
    -webkit-text-fill-color: #9ca3af;
}

.task-item.task-locked .task-note-input::placeholder {
    color: #c4ccd4;
}

.task-item.task-locked .task-name-input[readonly] {
    cursor: default;
    caret-color: transparent;
}

.task-item.task-locked .task-meta .task-meta-no-edit {
    cursor: default;
}

.task-item.task-locked .task-note-input[readonly] {
    cursor: default;
}

.task-invoiced-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 19px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    user-select: none;
}

.task-invoiced-badge i {
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.92;
}

.task-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.task-name-input {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
    border: none;
    outline: none;
    background: transparent;
    color: #111827;
    width: 100%;
}

.task-note-panel {
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
}

.task-note-divider {
    border: none;
    border-top: 1px dashed #d1d5db;
    margin: 12px 0 10px;
}

.task-note-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
    margin: 0 0 6px;
}

.task-note-input {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    overflow-y: hidden;
    min-height: 2.75rem;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
    background: transparent;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    field-sizing: content;
}

.task-note-input::placeholder {
    color: #adb5bd;
}

.task-details .task-meta {
    font-size: 12px;
    font-weight: 400;
    color: #111827;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 7px;
    row-gap: 4px;
}

.task-wage {
    color: #2563eb;
    font-weight: 500;
    white-space: nowrap;
}

.task-wage-editable {
    cursor: pointer;
    border-radius: 4px;
}

.task-wage-editable:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.task-meta-wage-input {
    width: 4.5rem;
    min-width: 0;
}

.task-time,
.task-amount {
    cursor: pointer;
}

.task-time {
    display: inline-block;
    box-sizing: border-box;
    min-width: 8ch;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-variant-numeric: tabular-nums;
    text-align: left;
}

.task-time:hover,
.task-amount:hover {
    color: #111;
}

.task-meta-inline-input {
    width: 110px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 2px 6px;
    font: inherit;
    color: inherit;
}

.invoice-panel {
    flex: 0 0 25%;
    background: #EBEFF2;
    border-radius: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.panel-caption-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.panel-caption-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.mobile-my-information-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.mobile-my-information-close-btn:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.05);
}

.invoice-panel-my-info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#invoice-panel-my-info-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-caption {
    font-size: 12px;
    color: rgb(75, 85, 99);
}

.logout-btn {
    border: none;
    background: transparent;
    color: #e11d48;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.15s;
}

.logout-btn:hover {
    opacity: 0.7;
}

.invoice-panel > .panel-caption {
    margin-top: 24px;
}

.panel-settings-btn {
    border: none;
    background: transparent;
    color: rgb(75, 85, 99);
    width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.panel-settings-btn i {
    font-size: 20px;
    line-height: 1;
}

#invoice-summary-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-invoice-roll-toggle {
    display: none;
}

.mobile-invoice-roll-content {
    display: contents;
}

.settings-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    background: #EBEFF2;
    border-radius: 0;
    padding: 12px 16px;
    overflow-y: auto;
}

.settings-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 12px;
}

.settings-topbar-label {
    font-size: 15px;
    color: rgb(75, 85, 99);
    font-weight: 500;
}

.settings-project-pill {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #111827;
    font-weight: 700;
    font-size: 15px;
    padding: 0;
    cursor: pointer;
}


.settings-section-title {
    margin: 2px 0 6px;
    font-size: 19px;
    color: #111827;
    font-weight: 600;
}

.settings-customer-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.settings-customer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: #f8fafc;
    border-radius: 8px;
    padding: 11px 10px;
    color: #4b5563;
    font-size: 11px;
}

.settings-customer-label {
    white-space: nowrap;
}

.settings-customer-row input,
.settings-customer-row textarea {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 11px;
    color: #111827;
    flex: 1;
    min-width: 0;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.settings-customer-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.settings-delete-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #e11d48;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.settings-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.archived-customers-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.archived-customers-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 4px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    width: 100%;
    border-radius: 6px;
    transition: color 0.15s;
}

.archived-customers-toggle:hover {
    color: #6b7280;
}

.archived-customers-toggle i {
    font-size: 16px;
}

.archived-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    margin-left: 5px;
}

.archived-customers-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.customer-item.archived {
    opacity: 0.55;
    background: #f9fafb;
}

.invoice-details {
    background: #fff;
    border-radius: 10px;
    padding: 11px 12px;
    box-shadow: none;
}

#supplier-name-card .row {
    position: relative;
}

#supplier-name-card #supplier-display-name {
    transition: opacity 0.2s ease;
}

#supplier-name-card:hover #supplier-display-name {
    opacity: 0;
}

#supplier-name-card .row::after {
    content: "Edit info";
    position: absolute;
    right: 0;
    color: #007BFF;
    font-weight: 500;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

#supplier-name-card:hover .row::after {
    opacity: 1;
}

.invoice-details .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.invoice-details .row:last-child {
    margin-bottom: 0;
}

.invoice-details .row span:first-child {
    font-weight: 500;
    color: #111827;
}

.invoice-details .row span:last-child {
    font-weight: 600;
    color: #111827;
    text-align: right;
    min-width: 110px;
}

.invoice-number-input {
    all: unset;
    color: #535D68;
    font-weight: 500;
    font-size: 13px;
    text-align: right;
    margin-left: auto;
    width: 80px;
    cursor: text;
}

.invoice-number-input:focus {
    border-bottom: 1px solid #535D68;
}

.invoice-details .row select {
    border: none;
    background: transparent;
    color: #535D68;
    font-weight: 500;
    font-size: 13px;
    text-align: right;
    text-align-last: right;
    min-width: 110px;
    margin-left: auto;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.invoice-divider {
    border-top: 1px solid #a9b6c5;
    margin: 12px 0 14px;
}

#due-days-display {
    cursor: text;
    outline: none;
    min-width: 24px;
}

.invoice-details .total-row span {
    color: #111827;
    font-weight: 700;
    font-size: 15px;
}

.invoice-details .total-row {
    margin-top: 2px;
}

.invoice-details .total-row span:first-child,
#total-display {
    font-weight: 700;
}

#total-display {
    color: #007BFF;
}

.invoice-details .row:not(.total-row) span {
    color: #535D68;
    font-weight: 500;
}

.invoice-details .total {
    color: #007BFF;
    font-weight: 700;
}

.create-invoice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    align-self: flex-end;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
}

.create-invoice-btn .icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.right-settings-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.right-settings-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 10px;
    color: #535D68;
    font-size: 13px;
}

.right-settings-label {
    white-space: nowrap;
}

.supplier-display-email {
    font-size: 13px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.right-settings-email-row {
    opacity: 0.7;
    pointer-events: none;
}

.multiline-row {
    align-items: flex-start;
}

.right-settings-row input,
.right-settings-row textarea {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 13px;
    color: #111827;
    flex: 1;
    min-width: 0;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.bank-card {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.bank-title {
    padding: 10px;
    font-size: 13px;
    color: #535D68;
    border-bottom: 1px solid #c8ced6;
}

.bank-fields {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bank-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #535D68;
    font-size: 11px;
}

.bank-label {
    white-space: nowrap;
}

.bank-row input {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 11px;
    color: #111827;
    flex: 1;
    min-width: 0;
    outline: none;
}

.right-settings-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.panel {
    padding: 14px;
}

.panel h3,
.tasks-head h3 {
    margin: 0 0 10px 0;
}

.inline-form {
    display: flex;
    gap: 8px;
}

.inline-form input,
.form-grid input,
.form-grid select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 10px;
    font-size: 0.92rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.form-grid .form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
}

.settings-inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-inline-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #1f2937;
    font-size: 14px;
}

.settings-inline-label {
    font-weight: 600;
    white-space: nowrap;
}

.settings-inline-row input,
.settings-inline-row select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    background: #fff;
    color: #111827;
}

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

.btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.btn:hover {
    background: #333;
}

.btn.ghost {
    background: #e5e7eb;
    color: #111;
}

.btn.ghost:hover {
    background: #d1d5db;
}

.btn.danger {
    background: #b91c1c;
}

.btn.danger:hover {
    background: #991b1b;
}

.btn.small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.btn.active {
    background: #111;
    color: #fff;
}

.btn.icon {
    padding: 6px 8px;
}

.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.invoice-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.invoice-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.invoice-meta {
    color: #6b7280;
    font-size: 0.8rem;
}

.invoice-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.empty {
    color: #6b7280;
    background: transparent;
    border-radius: 10px;
    padding: 12px;
    border: 1px dashed #c7cdd5;
    font-size: 11px;
}

.hidden {
    display: none !important;
}

.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Above invoice preview / lightbox (2500) and other overlays */
    z-index: 10000;
}

.toast {
    background: #2563eb;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    font-size: 12px;
    white-space: nowrap;
    animation: pill-rise 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes toast-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.toast-fade-out {
    animation: toast-fade-out 0.4s ease forwards;
}

.toast.warning {
    background: #92400e;
    box-shadow: 0 2px 8px rgba(146, 64, 14, 0.35);
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes printSlideUp {
    0%   { transform: translateY(110vh) rotate(0deg); }
    6%   { transform: translateY(110vh) rotate(0deg); }
    18%  { transform: translateY(72vh)  rotate(-0.4deg); }
    24%  { transform: translateY(72vh)  rotate(-0.4deg); }
    38%  { transform: translateY(38vh)  rotate(0.3deg); }
    43%  { transform: translateY(38vh)  rotate(0.3deg); }
    58%  { transform: translateY(10vh)  rotate(-0.2deg); }
    63%  { transform: translateY(10vh)  rotate(-0.2deg); }
    76%  { transform: translateY(-6px)  rotate(0deg); }
    86%  { transform: translateY(3px)   rotate(0deg); }
    100% { transform: translateY(0)     rotate(0deg); }
}

.invoice-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 30, 0.45);
    backdrop-filter: blur(2px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.invoice-preview-overlay.animating {
    animation: overlayFadeIn 0.5s ease both;
}

.invoice-preview-overlay.animating .invoice-preview-modal {
    animation: printSlideUp 3s linear both;
}

.invoice-preview-modal {
    width: min(740px, 92vw);
    height: min(860px, 92vh);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

.invoice-preview-frame-wrap {
    flex: 1;
    min-height: 0;
    background: #f5f6f8;
    overflow: auto;
}

#invoice-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #f5f6f8;
    display: none;
}

.invoice-preview-canvas-wrap {
    width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

#invoice-preview-canvas {
    display: block;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.invoice-preview-footer {
    background: #070707;
    color: #fff;
    padding: 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#invoice-preview-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.invoice-preview-word {
    color: #9EB6CA;
    font-weight: 400;
}

.invoice-preview-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-preview-actions button {
    border: none;
    background: transparent;
    color: #fff;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

#invoice-preview-delete-btn {
    color: #e11d48;
}

.invoice-preview-actions i {
    font-size: 18px;
}

@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar,
    .invoice-panel,
    .settings-view {
        flex: none;
        width: 100%;
    }

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

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

    .settings-tabs {
        flex-wrap: wrap;
    }
}

/* ── Mobile shell (≤768px) ───────────────────────────────── */
.mobile-app-header {
    display: none;
}

.mobile-sidebar-backdrop {
    display: none !important;
}

@media (max-width: 768px) {
    html {
        font-size: 108%;
        -webkit-text-size-adjust: 100%;
    }

    .app-container {
        padding: 0;
        min-height: 100dvh;
    }

    .sidebar-label {
        font-size: 13px;
    }

    .sidebar-month-picker {
        padding: 8px 10px;
    }

    .sidebar-month-label {
        font-size: 15px;
    }

    .sidebar-month-arrow {
        font-size: 20px;
        padding: 4px;
    }

    .customers-head button {
        font-size: 14px;
        padding: 4px 0;
    }

    .customer-item {
        font-size: 14px;
        padding: 14px 86px 14px 14px;
        border-radius: 12px;
    }

    .customer-item .amount {
        font-size: 14px;
    }

    .customer-archive-hover-btn {
        width: 28px;
        height: 28px;
        right: 50px;
        font-size: 20px;
    }

    .project-settings-icon {
        width: 28px;
        height: 28px;
        right: 14px;
        font-size: 22px;
    }

    .latest-invoices-head h3,
    .latest-invoices-head button {
        font-size: 13px;
    }

    .latest-invoice-card {
        padding: 12px;
        border-radius: 12px;
    }

    .latest-invoice-date {
        font-size: 11px;
    }

    .latest-invoice-project,
    .latest-invoice-amount {
        font-size: 13px;
    }

    .latest-invoice-action {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .center-panel {
        padding: 14px 18px;
    }

    .header {
        font-size: 17px;
    }

    .task-item {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .task-name-input {
        font-size: 14px;
    }

    .task-add-btn {
        padding: 9px 17px;
    }

    .task-add-btn,
    .task-add-btn span {
        font-size: 14px;
    }

    .task-add-btn i {
        font-size: 17px;
    }

    .settings-view {
        padding: 14px 18px;
    }

    .settings-topbar-label,
    .settings-project-pill {
        font-size: 17px;
    }

    .settings-section-title {
        font-size: 21px;
    }

    .settings-customer-row {
        font-size: 13px;
        padding: 13px 12px;
    }

    .settings-delete-btn {
        width: 40px;
        height: 40px;
    }

    .settings-save-btn {
        height: 40px;
        font-size: 14px;
        padding: 0 16px;
    }

    .archived-customers-toggle {
        font-size: 12px;
        padding: 8px 4px;
    }

    #center-invoices-view .settings-topbar-label {
        font-size: 21px;
    }

    .center-invoice-heading {
        font-size: 13px;
    }

    .center-invoice-amount {
        font-size: 17px;
    }

    .center-invoice-for {
        font-size: 14px;
    }

    .center-invoice-action {
        width: 34px;
        height: 34px;
    }

    .center-invoice-action i {
        font-size: 24px;
    }

    .invoice-details.card {
        font-size: 15px;
    }

    .invoice-details.card .row span {
        font-size: 15px;
    }

    .panel-caption {
        font-size: 13px;
    }

    .right-settings-form {
        font-size: 14px;
    }

    .right-settings-row .right-settings-label {
        font-size: 13px;
    }

    .bank-card .bank-title {
        font-size: 14px;
    }

    .logout-btn {
        font-size: 13px;
    }

    .create-invoice-btn {
        font-size: 15px;
    }

    #left-resizer,
    #right-resizer {
        display: none !important;
    }

    .mobile-app-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        padding: 14px 16px 10px;
        background: #ebeff2;
        position: sticky;
        top: 0;
        z-index: 120;
    }

    .mobile-app-header .app-logo {
        height: 26px;
    }

    .mobile-logo-btn,
    .mobile-menu-btn {
        border: none;
        background: transparent;
        padding: 6px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #111827;
    }

    .mobile-menu-btn {
        font-size: 28px;
        line-height: 1;
    }

    .app-container.mobile-layout.mobile-home-view .sidebar-head {
        display: none;
    }

    .app-container.mobile-layout .sidebar-month-arrow {
        color: #007bff;
    }

    .app-container.mobile-layout .sidebar-month-arrow:hover {
        background: rgba(0, 123, 255, 0.08);
        color: #0066dd;
    }

    .app-container.mobile-layout .latest-invoice-card {
        background: #e4eef6;
        border-color: #b8cad9;
    }

    .main-content {
        border-radius: 0;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .app-container.mobile-layout.mobile-home-view .center-panel,
    .app-container.mobile-layout.mobile-home-view:not(.mobile-my-information-open) .invoice-panel,
    .app-container.mobile-layout.mobile-home-view #left-resizer,
    .app-container.mobile-layout.mobile-home-view #right-resizer {
        display: none !important;
    }

    .app-container.mobile-layout.mobile-home-view .invoice-panel #invoice-summary-view,
    .app-container.mobile-layout.mobile-home-view .create-invoice-btn {
        display: none !important;
    }

    .app-container.mobile-layout.mobile-home-view .sidebar {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        overflow-y: auto;
    }

    .app-container.mobile-layout.mobile-settings-view .sidebar,
    .app-container.mobile-layout.mobile-invoices-view .sidebar {
        display: none !important;
    }

    .app-container.mobile-layout.mobile-project-view:not(.mobile-drawer-open) .sidebar {
        display: none !important;
    }

    .app-container.mobile-layout.mobile-project-view.mobile-drawer-open .sidebar {
        display: flex !important;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(320px, 88vw);
        max-width: 100%;
        z-index: 500;
        overflow-y: auto;
        box-shadow: 4px 0 28px rgba(15, 23, 42, 0.18);
        border-radius: 0;
    }

    .app-container.mobile-layout.mobile-project-view.mobile-drawer-open .sidebar-head {
        display: flex;
    }

    .app-container.mobile-layout.mobile-project-view.mobile-drawer-open .mobile-sidebar-backdrop {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.38);
        z-index: 498;
        pointer-events: auto;
    }

    .mobile-customer-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 4px 0 14px;
    }

    .mobile-back-btn {
        border: none;
        background: transparent;
        padding: 6px;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        color: #111827;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-customer-title {
        margin: 0;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: -0.02em;
        color: #111827;
        flex: 1;
        min-width: 0;
    }

    .tasks-section-heading {
        color: #6b7280;
        font-size: 13px;
        margin: 0 2px 8px;
        font-weight: 400;
    }

    .app-container.mobile-layout.mobile-project-view:not(.mobile-invoices-view) #center-main-header.header {
        display: none !important;
    }

    .app-container.mobile-layout.mobile-project-view .center-panel {
        flex: 1 1 auto;
        min-height: 0;
        padding-bottom: 8px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .app-container.mobile-layout.mobile-project-view .invoice-panel {
        flex: 0 0 auto;
        width: 100%;
        margin-top: auto;
        min-height: 0;
        padding-top: 0;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
        overflow-y: visible;
    }

    .app-container.mobile-layout.mobile-project-view #invoice-details-caption {
        display: none;
    }

    .app-container.mobile-layout.mobile-project-view .mobile-invoice-roll-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 16px 18px;
        border: none;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
        font-size: 16px;
        font-weight: 600;
        font-family: "Inter", Arial, sans-serif;
        color: #111827;
        cursor: pointer;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease;
    }

    .app-container.mobile-layout.mobile-project-view .mobile-invoice-roll-toggle:active {
        background: #f3f4f6;
    }

    .app-container.mobile-layout.mobile-project-view .mobile-invoice-roll-label {
        letter-spacing: -0.02em;
    }

    .app-container.mobile-layout.mobile-project-view .mobile-invoice-roll-chevron {
        font-size: 22px;
        color: #6b7280;
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }

    .app-container.mobile-layout.mobile-project-view #invoice-summary-view.mobile-invoice-expanded .mobile-invoice-roll-chevron {
        transform: rotate(180deg);
    }

    .app-container.mobile-layout.mobile-project-view .mobile-invoice-roll-content {
        display: none;
        flex-direction: column;
        gap: 12px;
    }

    .app-container.mobile-layout.mobile-project-view #invoice-summary-view.mobile-invoice-expanded .mobile-invoice-roll-content {
        display: flex;
    }

    .app-container.mobile-layout.mobile-project-view #total-display,
    .app-container.mobile-layout.mobile-project-view .invoice-details .total {
        color: #111827;
    }

    .app-container.mobile-layout.mobile-project-view #invoice-summary-view {
        padding-bottom: 0;
    }

    .app-container.mobile-layout.mobile-project-view .create-invoice-btn {
        position: static;
        right: auto;
        bottom: auto;
        margin-top: 4px;
        z-index: auto;
        width: 100%;
        align-self: stretch;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
        box-shadow: 0 4px 18px rgba(17, 24, 39, 0.12);
    }

    .timer-running-pill {
        font-size: 14px;
        height: 40px;
        padding: 0 16px 0 6px;
    }

    .timer-pill-pause {
        font-size: 30px;
    }

    .annul-inactive-pill {
        font-size: 14px;
        height: 40px;
        padding: 0 16px;
    }

    .app-container.mobile-layout.mobile-invoices-view #center-main-header {
        display: none !important;
    }
}

/* ── App settings panel ─────────────────────────────────── */
.app-settings-panel {
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    width: 380px;
    z-index: 300;
    overflow: hidden;
}

.app-settings-panel.hidden {
    display: none;
}

.app-settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px 13px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #f0f0f0;
}

.app-settings-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color 0.15s;
}

.app-settings-close-btn:hover {
    color: #111827;
}

.app-settings-body {
    padding: 14px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-settings-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
}

.app-settings-row + .app-settings-row {
    border-top: 1px solid #f3f4f6;
}

.app-settings-row-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.app-settings-row-label {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.app-settings-row-sub {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.notif-sub-settings {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #f3f4f6;
    margin-top: 2px;
}

.notif-sub-settings.hidden {
    display: none;
}

.notif-sub-settings .app-settings-row-label {
    color: #374151;
}

.app-settings-default-wages {
    border-top: 1px solid #f3f4f6;
    margin-top: 10px;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-settings-default-wages-intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-settings-wage-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-settings-wage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}

.app-settings-wage-code {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #6b7280;
    min-width: 2rem;
}

.app-settings-wage-input {
    width: 118px;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111827;
    box-sizing: border-box;
}

.app-settings-wage-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.account-email-login-section {
    border-top: 1px solid #f3f4f6;
    margin-top: 10px;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-email-login-section.hidden {
    display: none;
}

.account-email-login-intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.link-password-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-password-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
}

.link-password-form .login-input {
    width: 100%;
    box-sizing: border-box;
}

.link-password-submit {
    margin-top: 4px;
    align-self: flex-start;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    cursor: pointer;
    margin-top: 1px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.toggle-switch input:checked + .toggle-slider {
    background: #111827;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}


/* ── Bottom pills container ────────────────────────────── */
.bottom-pills-container {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 200;
}

/* ── Timer running pill ────────────────────────────────── */
@keyframes pill-rise {
    0%   { opacity: 0; transform: translateY(72px) scale(0.88); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0)    scale(1); }
}

.timer-running-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px 0 4px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: background 0.15s, box-shadow 0.15s;
    max-width: 300px;
    white-space: nowrap;
    animation: pill-rise 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.timer-running-pill.hidden {
    display: none;
}

.timer-running-pill:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.timer-pill-pause {
    font-size: 28px;
    color: #0f1f4d;
    flex-shrink: 0;
}

.timer-pill-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.timer-pill-time {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: #0f1f4d;
    flex-shrink: 0;
}

/* ── Annul inactive time pill ──────────────────────────── */
.annul-inactive-pill {
    display: flex;
    align-items: center;
    padding: 0 14px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #fff7ed;
    color: #c2410c;
    font-size: 13px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    transition: background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.annul-inactive-pill.hidden {
    display: none;
}

.annul-inactive-pill:hover {
    background: #ffedd5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

/* ── Settings FAB ──────────────────────────────────────── */
.settings-fab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.settings-fab i {
    font-size: 16px;
}

.settings-fab:hover {
    background: #f3f4f6;
    color: #111827;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

@media (max-width: 768px) {
    .bottom-pills-container .settings-fab {
        display: none !important;
    }
}

.mobile-burger-menu-backdrop {
    display: none;
}

.mobile-burger-menu {
    display: none;
}

@media (max-width: 768px) {
    .mobile-burger-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 380;
        background: rgba(15, 23, 42, 0.4);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s ease, visibility 0.28s;
    }

    .app-container.mobile-nav-sheet-open .mobile-burger-menu-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-burger-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        z-index: 385;
        background: #ebeff2;
        box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
        transform: translateX(100%);
        pointer-events: none;
        transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .app-container.mobile-nav-sheet-open .mobile-burger-menu {
        transform: translateX(0);
        pointer-events: auto;
    }

    .mobile-burger-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px 10px;
        flex-shrink: 0;
    }

    .mobile-burger-menu-title {
        font-size: 24px;
        font-weight: 600;
        font-family: "Inter", Arial, sans-serif;
        color: #111827;
        letter-spacing: -0.03em;
    }

    .mobile-burger-menu-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        border: none;
        border-radius: 12px;
        background: #fff;
        color: #374151;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: background 0.15s, color 0.15s;
    }

    .mobile-burger-menu-close-btn:hover {
        background: #f3f4f6;
        color: #111827;
    }

    .mobile-burger-menu-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 12px 16px 32px;
    }

    .mobile-burger-menu-items {
        background: #fff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    }

    .mobile-burger-menu-item {
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
        padding: 19px 20px;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #f3f4f6;
        background: transparent;
        font-size: 17px;
        font-family: "Inter", Arial, sans-serif;
        font-weight: 500;
        color: #111827;
        cursor: pointer;
        text-align: left;
        transition: background 0.15s;
    }

    .mobile-burger-menu-item:last-child {
        border-bottom: none;
    }

    .mobile-burger-menu-secondary {
        margin-top: 16px;
    }

    .mobile-burger-menu-item-logout {
        color: #e11d48;
    }

    .mobile-burger-menu-item-logout i {
        color: #e11d48;
    }

    .mobile-burger-menu-item-logout:hover,
    .mobile-burger-menu-item-logout:active {
        background: #fff1f2;
    }

    .app-container.mobile-layout #logout-btn {
        display: none !important;
    }

    .mobile-burger-menu-item i {
        font-size: 24px;
        color: #6b7280;
        flex-shrink: 0;
    }

    .mobile-burger-menu-item:hover,
    .mobile-burger-menu-item:active {
        background: #f9fafb;
    }

    .app-container.mobile-layout:not(.mobile-my-information-open) .invoice-panel-my-info-section {
        display: none !important;
    }

    .app-container.mobile-layout.mobile-my-information-open .invoice-panel-my-info-section {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 450;
        overflow-y: auto;
        background: #ebeff2;
        padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px));
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
        gap: 12px;
    }

    .app-container.mobile-layout.mobile-my-information-open .mobile-my-information-close-btn {
        display: inline-flex;
    }

    .app-container.mobile-layout.mobile-my-information-open .create-invoice-btn {
        display: none;
    }

    .app-container.mobile-layout.mobile-my-information-open .invoice-panel #invoice-summary-view {
        display: none !important;
    }

    .app-container.mobile-layout .task-mobile-swipe-rail {
        overflow: hidden;
        touch-action: pan-y pinch-zoom;
    }

    .app-container.mobile-layout .task-mobile-swipe-track {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: max-content;
        min-width: 100%;
        transition: transform 0.24s cubic-bezier(0.25, 0.9, 0.35, 1);
        will-change: transform;
    }

    .app-container.mobile-layout .task-mobile-swipe-track.task-swipe-no-transition {
        transition: none !important;
    }

    .app-container.mobile-layout .task-item-main--with-toolbar.task-mobile-swipe-face {
        padding-right: 10px;
        flex: 0 0 auto;
        min-width: 0;
        align-self: center;
    }

    .app-container.mobile-layout .task-mobile-swipe-track > .task-toolbar {
        position: static;
        transform: none;
        padding-left: 0;
        margin-left: 0;
        margin-top: 0;
        width: auto;
        justify-content: flex-end;
        align-self: center;
        background: transparent;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        flex-shrink: 0;
    }

    .app-container.mobile-layout .task-tool-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 10px;
    }

    .app-container.mobile-layout .task-tool-btn i {
        font-size: 1.45rem;
    }

    .app-container.mobile-layout .task-tool-btn.task-delete-armed {
        width: auto;
        min-width: 88px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .app-container.mobile-layout .task-tool-btn.task-next-month-armed {
        width: auto;
        min-width: 140px;
        max-width: calc(100vw - 48px);
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-container.mobile-layout .task-tool-btn.task-note-armed {
        width: auto;
        min-width: 112px;
        max-width: calc(100vw - 48px);
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-container.mobile-layout .task-item .task-invoiced-badge {
        width: 40px;
        min-width: 40px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        font-size: 9px;
        line-height: 1.15;
        text-align: center;
    }

    .app-container.mobile-layout .task-item .task-invoiced-badge i {
        font-size: 1.35rem;
    }

    /* iOS: long-press must not promote selection into parent/document; inputs editable only when focused */
    .app-container.mobile-layout .tasks-list {
        touch-action: pan-y;
    }

    .app-container.mobile-layout .tasks-list,
    .app-container.mobile-layout .tasks-list * {
        -webkit-touch-callout: none !important;
        -webkit-user-drag: none;
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none !important;
        user-select: none !important;
    }

    .app-container.mobile-layout .tasks-list input:focus,
    .app-container.mobile-layout .tasks-list textarea:focus {
        -webkit-user-select: text !important;
        user-select: text !important;
    }
}

.mobile-task-context-backdrop,
.mobile-task-context-menu {
    display: none;
}

@media (max-width: 768px) {
    .mobile-task-context-backdrop:not(.hidden) {
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: 360;
        background: rgba(15, 23, 42, 0.38);
    }

    .mobile-task-context-menu:not(.hidden) {
        display: block !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 365;
    }

    .mobile-task-context-sheet {
        background: #fff;
        border-radius: 18px 18px 0 0;
        padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
        max-height: 70dvh;
        overflow-y: auto;
    }

    .mobile-task-context-heading {
        font-size: 12px;
        font-weight: 600;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 12px 20px 8px;
        font-family: "Inter", Arial, sans-serif;
    }

    .mobile-task-context-item {
        display: block;
        width: 100%;
        border: none;
        background: transparent;
        text-align: left;
        padding: 16px 20px;
        font-size: 17px;
        font-family: "Inter", Arial, sans-serif;
        font-weight: 500;
        color: #111827;
        cursor: pointer;
        transition: background 0.15s;
    }

    .mobile-task-context-item:hover,
    .mobile-task-context-item:active {
        background: #f3f4f6;
    }

    .mobile-task-context-item-danger {
        color: #e11d48;
    }

    .mobile-task-context-item-cancel {
        color: #6b7280;
        margin-top: 4px;
        padding-top: 18px;
        border-top: 1px solid #f3f4f6;
    }
}
