.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ===== WorkTracker App Layout ===== */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a1a;
}

.wt-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wt-topbar {
    background: #0078d4;
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.wt-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.wt-topbar a, .wt-topbar button {
    color: white;
}

.wt-main {
    flex: 1;
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* ===== Login Page ===== */

.wt-login-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.wt-user-name {
    display: none;
}

.wt-logout-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.wt-logout-btn:hover {
    background: rgba(255,255,255,0.25);
}

.wt-login-link {
    color: white;
    text-decoration: none;
}

@media (min-width: 600px) {
    .wt-user-name {
        display: inline;
    }
}

.wt-login-page {
    text-align: center;
    padding: 3rem 1rem;
}

.wt-login-page h1 {
    font-size: 2rem;
    color: #0078d4;
}

.wt-login-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    border-radius: 8px;
}

/* ===== Dashboard ===== */

.wt-dashboard {
    padding: 0.5rem 0;
}

.wt-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.wt-welcome {
    text-align: center;
    margin-bottom: 0;
    font-size: 1.4rem;
    color: #333;
}

.wt-gear-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.15s;
    line-height: 1;
}

.wt-gear-btn:hover {
    background: rgba(0,0,0,0.06);
}

.wt-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.wt-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    min-height: 140px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.wt-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.wt-tile:active {
    transform: scale(0.97);
}

.wt-tile-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.wt-tile-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* ===== Page Layout ===== */

.wt-page {
    padding: 0.5rem 0;
}

.wt-page-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.wt-page-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.wt-back-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: #0078d4;
    white-space: nowrap;
}

.wt-back-btn:hover {
    background: #e8f0fe;
}

/* ===== Placeholder (Coming Soon) ===== */

.wt-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 16px;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.wt-placeholder-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.wt-placeholder h3 {
    margin: 0 0 0.5rem;
    color: #666;
}

/* ===== Common Components ===== */

.wt-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.wt-error {
    background: #fde8e8;
    color: #c62828;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.wt-muted {
    color: #888;
    font-style: italic;
}

.wt-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.wt-section h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: #333;
}

/* ===== Buttons ===== */

.wt-btn {
    background: #0078d4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.wt-btn:hover:not(:disabled) {
    background: #005a9e;
}

.wt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wt-btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.wt-btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

.wt-btn-primary {
    background: #0078d4;
}

.wt-btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
}

.wt-btn-danger:hover {
    color: #c62828;
}

/* ===== Form Controls ===== */

.wt-input, .wt-textarea, .wt-select, .wt-date-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

.wt-textarea {
    resize: vertical;
}

/* ===== Daily Scrum ===== */

.wt-date-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wt-date-nav .wt-date-input {
    flex: 1;
    min-width: 140px;
}

.wt-scrum-status {
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.wt-status-submitted {
    background: #e8f5e9;
    color: #2e7d32;
}

.wt-status-draft {
    background: #fff3e0;
    color: #ef6c00;
}

.wt-quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.wt-timeslots {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.wt-timeslot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.wt-slot-active {
    background: #e3f2fd;
}

.wt-slot-off {
    background: #f5f5f5;
    opacity: 0.7;
}

.wt-slot-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    flex-shrink: 0;
}

.wt-slot-time {
    white-space: nowrap;
    min-width: 130px;
    font-size: 0.85rem;
}

.wt-slot-location {
    flex: 1;
    padding: 0.2rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.8rem;
    min-width: 0;
}

/* ===== Task List ===== */

.wt-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wt-task-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    gap: 0.5rem;
}

.wt-task-added {
    opacity: 0.6;
}

.wt-task-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.wt-task-info strong {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-task-desc {
    font-size: 0.85rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-task-meta {
    font-size: 0.75rem;
    color: #888;
}

.wt-added-badge {
    font-size: 0.75rem;
    color: #2e7d32;
    font-weight: 600;
    white-space: nowrap;
}

.wt-add-task {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.wt-add-task .wt-input {
    flex: 1;
}

.wt-submit-section {
    text-align: center;
}

/* ===== Checklists ===== */

.wt-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wt-filter-row .wt-select {
    flex: 1;
    max-width: 250px;
}

.wt-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wt-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.wt-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.wt-card-header strong {
    font-size: 0.95rem;
}

.wt-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.wt-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wt-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.wt-badge-notstarted { background: #e0e0e0; color: #555; }
.wt-badge-workinprogress { background: #fff3e0; color: #ef6c00; }
.wt-badge-underreview { background: #e3f2fd; color: #1565c0; }
.wt-badge-complete { background: #e8f5e9; color: #2e7d32; }
.wt-badge-draft { background: #fff3e0; color: #ef6c00; }
.wt-badge-pendingapproval { background: #e3f2fd; color: #1565c0; }
.wt-badge-approved { background: #e8f5e9; color: #2e7d32; }
.wt-badge-closed { background: #e0e0e0; color: #555; }
.wt-badge-qboload { background: #f3e5f5; color: #7b1fa2; }

.wt-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.wt-progress-sm {
    height: 6px;
}

.wt-progress-fill {
    height: 100%;
    background: #4caf50;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.wt-progress-text {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
}

.wt-checklist-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.wt-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wt-checklist-item {
    padding: 0.6rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.wt-item-completed {
    background: #f1f8e9;
    border-color: #c5e1a5;
}

.wt-check-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.wt-check-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.wt-check-text {
    font-size: 0.9rem;
}

.wt-text-strike {
    text-decoration: line-through;
    color: #888;
}

.wt-item-meta {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
    padding-left: 1.75rem;
}

.wt-item-notes {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.25rem;
    padding-left: 1.75rem;
    font-style: italic;
}

/* ===== Responsive ===== */

@media (min-width: 600px) {
    .wt-button-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .wt-tile {
        min-height: 160px;
        padding: 2rem 1.5rem;
    }

    .wt-tile-icon {
        font-size: 3rem;
    }

    .wt-tile-label {
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    .wt-tile {
        min-height: 110px;
        padding: 1rem 0.75rem;
    }

    .wt-tile-icon {
        font-size: 2rem;
    }

    .wt-tile-label {
        font-size: 0.85rem;
    }
}

/* ===== Blazor Infrastructure ===== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===== Timesheet ===== */

.wt-ts-month-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wt-ts-month-title {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
}

.wt-ts-calendar {
    overflow-x: auto;
}

.wt-ts-cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.wt-ts-cal-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.wt-ts-cal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.2rem;
    transition: background 0.15s;
    font-size: 0.85rem;
}

.wt-ts-cal-cell:hover:not(.wt-ts-cal-empty) {
    background: #e3f2fd;
}

.wt-ts-cal-empty {
    cursor: default;
}

.wt-ts-cal-selected {
    background: #0078d4 !important;
    color: white;
}

.wt-ts-cal-selected .wt-ts-cal-hours {
    color: rgba(255,255,255,0.85);
}

.wt-ts-cal-today {
    outline: 2px solid #0078d4;
    outline-offset: -2px;
}

.wt-ts-cal-submitted {
    background: #e8f5e9;
}

.wt-ts-cal-day {
    font-weight: 600;
    font-size: 0.8rem;
}

.wt-ts-cal-hours {
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
}

.wt-ts-hours-full {
    color: #2e7d32;
    font-weight: 700;
}

.wt-ts-day-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wt-ts-day-header h3 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 1rem;
}

.wt-ts-week-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.wt-ts-entries {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wt-ts-entry {
    padding: 0.65rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.wt-ts-entry-approved {
    border-left: 3px solid #4caf50;
}

.wt-ts-entry-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wt-ts-entry-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.wt-ts-entry-info strong {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-ts-entry-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.wt-ts-hours-display {
    font-weight: 700;
    font-size: 1rem;
    color: #0078d4;
    min-width: 3rem;
    text-align: right;
}

.wt-ts-hours-input {
    width: 5rem !important;
    text-align: center;
}

.wt-ts-common-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wt-ts-common-card {
    cursor: pointer;
}

.wt-ts-common-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wt-ts-add-form {
    border: 2px solid #0078d4;
}

.wt-ts-form-info {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.wt-ts-form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.wt-ts-form-row label {
    min-width: 4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.wt-ts-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* --- Timesheet Action Buttons --- */

.wt-ts-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.wt-ts-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f0f6ff;
    color: #0078d4;
    border: 2px solid #cce0f5;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.wt-ts-action-btn:hover {
    background: #dbeafe;
    border-color: #0078d4;
}

.wt-ts-action-icon {
    font-size: 1.5rem;
}

@media (max-width: 500px) {
    .wt-ts-action-buttons {
        grid-template-columns: 1fr;
    }
}

/* --- Timesheet Picker Panel --- */

.wt-ts-picker {
    border: 2px solid #0078d4;
    max-height: 60vh;
    overflow-y: auto;
}

.wt-ts-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.wt-ts-picker-header h3 {
    margin: 0;
}

.wt-ts-picker-subhead {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin: 0.75rem 0 0.4rem;
}

/* --- Search Bar --- */

.wt-ts-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.wt-ts-search-bar .wt-input {
    flex: 1;
    min-width: 150px;
}

.wt-ts-search-old {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
}

/* --- Overtime Badge & Toggle --- */

.wt-ts-entry-overtime {
    border-left: 3px solid #ef6c00;
}

.wt-ts-ot-badge {
    color: #ef6c00;
    font-weight: 700;
    font-size: 0.8rem;
}

.wt-ts-ot-active {
    color: #ef6c00 !important;
    font-weight: 700;
}

.wt-ts-ot-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.wt-ts-ot-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* ===== Project Lookup ===== */

.wt-proj-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

.wt-proj-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
    border: 1px solid #e0e0e0;
}

.wt-proj-list-item:hover {
    background: #e3f2fd;
    border-color: #0078d4;
}

.wt-proj-list-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0078d4;
    min-width: 80px;
    flex-shrink: 0;
}

.wt-proj-list-desc {
    font-size: 0.9rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-proj-direct-lookup {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.wt-proj-direct-lookup .wt-input {
    flex: 1;
}

.wt-proj-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wt-proj-detail-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.wt-proj-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 500px) {
    .wt-proj-grid {
        grid-template-columns: 1fr;
    }
}

.wt-proj-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wt-proj-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wt-proj-field span {
    font-size: 0.95rem;
    color: #1a1a1a;
    padding: 0.35rem 0.5rem;
    background: #f5f5f5;
    border-radius: 6px;
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.wt-proj-status {
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-block;
}

.wt-proj-status-inprogress {
    background: #fff3e0;
    color: #ef6c00;
}

.wt-proj-status-complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.wt-proj-status-notstarted {
    background: #f5f5f5;
    color: #757575;
}

/* --- Workorder Tree --- */

.wt-tree {
    padding-left: 0;
}

.wt-tree-node {
    margin-bottom: 0.15rem;
}

.wt-tree-children {
    padding-left: 1.25rem;
    border-left: 2px solid #e0e0e0;
    margin-left: 0.5rem;
}

.wt-tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.wt-tree-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-tree-status {
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.wt-tree-complete {
    background: #e8f5e9;
}

.wt-tree-complete .wt-tree-status {
    color: #2e7d32;
}

.wt-tree-inprogress {
    background: #fff3e0;
}

.wt-tree-inprogress .wt-tree-status {
    color: #ef6c00;
}

.wt-tree-notstarted {
    background: #f5f5f5;
}

.wt-tree-notstarted .wt-tree-status {
    color: #757575;
}

.wt-tree-underreview {
    background: #e0f7fa;
}

.wt-tree-underreview .wt-tree-status {
    color: #00796b;
}

.wt-tree-cancelled {
    background: #fafafa;
    text-decoration: line-through;
    opacity: 0.6;
}

.wt-tree-cancelled .wt-tree-status {
    color: #999;
}

/* --- Data Tables --- */

.wt-table-wrap {
    overflow-x: auto;
}

.wt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.wt-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.wt-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.wt-table tbody tr:hover {
    background: #f8f9fa;
}

.wt-col-right {
    text-align: right;
}

/* --- Project Section Header --- */

.wt-proj-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.wt-proj-section-header h3 {
    margin: 0;
}

/* --- Project Finance Note --- */

.wt-proj-finance-note {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin: 0 0 0.75rem;
}

/* --- Negative Balance --- */

.wt-proj-balance-negative {
    color: #c62828 !important;
    font-weight: 600;
}

/* --- Table Totals Row --- */

.wt-table tfoot .wt-table-total td {
    border-top: 2px solid #e0e0e0;
    border-bottom: none;
    padding-top: 0.6rem;
    font-size: 0.9rem;
}

/* --- Paid Invoice Row --- */

.wt-table-row-paid td {
    color: #2e7d32;
}

/* --- Tree Legend --- */

.wt-tree-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wt-tree-legend-item {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* --- Time History Summary --- */

.wt-proj-time-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #555;
}

/* --- Compact Table --- */

.wt-table-compact th,
.wt-table-compact td {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.wt-table-compact th {
    font-size: 0.7rem;
}

/* ===== Task Lookup ===== */

.wt-wo-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.wt-wo-search-row .wt-input:first-child {
    flex: 1;
    min-width: 200px;
}

.wt-wo-direct-input {
    width: 130px !important;
    flex: none !important;
}

.wt-task-card-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.wt-task-card-clickable:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #0078d4;
}

.wt-wo-status-inline {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    display: inline-block;
}

.wt-wo-status-inprogress { background: #fff3e0; color: #ef6c00; }
.wt-wo-status-notstarted { background: #f5f5f5; color: #757575; }
.wt-wo-status-underreview { background: #e0f7fa; color: #00796b; }
.wt-wo-status-complete { background: #e8f5e9; color: #2e7d32; }
.wt-wo-status-cancelled, .wt-wo-status-deleted { background: #fafafa; color: #999; }
.wt-wo-status-returned { background: #fce4ec; color: #c62828; }
.wt-wo-status-accepted { background: #e3f2fd; color: #1565c0; }

.wt-wo-due-late {
    color: #c62828 !important;
    font-weight: 600;
}

.wt-wo-due-ok {
    color: #2e7d32 !important;
    font-weight: 600;
}

.wt-wo-notes {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* --- Task Lookup: Status Bar --- */

.wt-wo-status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.wt-wo-status-lg {
    font-size: 1rem !important;
    padding: 0.3rem 0.75rem !important;
}

.wt-wo-status-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wt-wo-status-btn-inprogress { background: #ef6c00; }
.wt-wo-status-btn-inprogress:hover:not(:disabled) { background: #e65100; }
.wt-wo-status-btn-complete { background: #2e7d32; }
.wt-wo-status-btn-complete:hover:not(:disabled) { background: #1b5e20; }
.wt-wo-status-btn-cancelled { background: #757575; }
.wt-wo-status-btn-cancelled:hover:not(:disabled) { background: #616161; }
.wt-wo-status-btn-deleted { background: #c62828; }
.wt-wo-status-btn-deleted:hover:not(:disabled) { background: #b71c1c; }
.wt-wo-status-btn-returned { background: #6a1b9a; }
.wt-wo-status-btn-returned:hover:not(:disabled) { background: #4a148c; }

/* --- Task Lookup: Save Feedback --- */

.wt-wo-save-ok {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

/* --- Task Lookup: Small Input --- */

.wt-wo-small-input {
    width: 100px !important;
}

/* --- Task Lookup: Wide Field --- */

.wt-proj-field-wide {
    grid-column: 1 / -1;
}

/* ===== Role Management ===== */

.wt-role-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wt-role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: border-color 0.15s, background 0.15s;
}

.wt-role-item:hover {
    border-color: #0078d4;
    background: #f0f6ff;
}

.wt-role-assigned {
    border-left: 3px solid #4caf50;
    background: #f1f8e9;
}

.wt-role-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    flex: 1;
}

.wt-role-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #0078d4;
}

.wt-role-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.wt-role-badge-active {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    background: #e8f5e9;
    color: #2e7d32;
    white-space: nowrap;
}

.wt-role-changes {
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: #f5f5f5;
    font-size: 0.9rem;
}

.wt-role-change-add {
    color: #2e7d32;
    margin: 0 0 0.25rem;
}

.wt-role-change-remove {
    color: #c62828;
    margin: 0;
}

.wt-role-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

/* ===== Expense Reports ===== */

.wt-er-form-group {
    margin-bottom: 0.75rem;
}

.wt-er-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.25rem;
}

.wt-er-project-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.wt-er-project-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s;
}

.wt-er-project-item:last-child {
    border-bottom: none;
}

.wt-er-project-item:hover {
    background: #e8f0fe;
}

.wt-er-project-selected {
    background: #d0e4ff;
    border-left: 3px solid #0078d4;
}

.wt-er-project-item strong {
    font-size: 0.9rem;
    min-width: 70px;
}

.wt-er-project-item span {
    font-size: 0.85rem;
    color: #555;
}

.wt-er-line-editor {
    border: 2px solid #0078d4;
    background: #f8fbff;
}

.wt-er-line-editor h4 {
    margin: 0 0 0.75rem;
    color: #0078d4;
}

.wt-er-perdiem-group {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.wt-er-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.wt-er-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.wt-er-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0078d4;
}

.wt-er-input-group {
    display: flex;
    align-items: center;
}

.wt-er-input-prefix {
    background: #e0e0e0;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 0.5rem 0.5rem;
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
    line-height: 1;
}

.wt-er-input-group .wt-input {
    border-radius: 0 6px 6px 0;
    flex: 1;
    min-width: 0;
}

.wt-er-amounts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 500px) {
    .wt-er-amounts-grid {
        grid-template-columns: 1fr;
    }
}

.wt-er-line-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* --- Drag & Drop Upload Zone --- */

.wt-er-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.25rem 1rem;
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
    min-height: 90px;
}

.wt-er-dropzone:hover {
    border-color: #0078d4;
    background: #f0f6ff;
}

.wt-er-dropzone-active {
    border-color: #0078d4;
    background: #dbeafe;
    border-style: solid;
}

.wt-er-dropzone-has-file {
    border-color: #4caf50;
    background: #f1f8e9;
}

.wt-er-dropzone-has-file:hover {
    border-color: #388e3c;
    background: #e8f5e9;
}

.wt-er-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.wt-er-dropzone-icon {
    font-size: 1.75rem;
}

.wt-er-dropzone-text {
    font-size: 0.85rem;
    color: #666;
}

.wt-er-dropzone-file {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2e7d32;
}

/* ===== Confirm Dialog / Input Dialog ===== */

.wt-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.wt-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: wt-dialog-in 0.15s ease-out;
}

@keyframes wt-dialog-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wt-dialog-header {
    padding: 1rem 1.25rem 0.5rem;
}

.wt-dialog-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.wt-dialog-body {
    padding: 0.75rem 1.25rem;
}

.wt-dialog-body p {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

.wt-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
}

.wt-btn-secondary {
    background: #666;
}

.wt-btn-secondary:hover:not(:disabled) {
    background: #555;
}

/* ===== RichTextEditor Component ===== */

.wt-rte-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wt-rte-wrapper:focus-within {
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.15);
}

.wt-rte-wrapper.wt-rte-readonly {
    border-color: #e5e7eb;
    background: #fafafa;
}

.wt-rte-wrapper.wt-rte-readonly:focus-within {
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Toolbar */
.wt-rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: #f8f9fa;
    border-bottom: none;
    margin-bottom: 6px;
    user-select: none;
}

.wt-rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.wt-rte-btn:hover {
    background: #e5e7eb;
}

.wt-rte-btn:active {
    background: #d1d5db;
}

.wt-rte-btn-ts {
    font-size: 0.9rem;
}

.wt-rte-sep {
    width: 1px;
    height: 20px;
    background: #d1d5db;
    margin: 0 4px;
    flex-shrink: 0;
}

/* Editable content area */
.wt-rte-content {
    min-height: 120px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 12px;
    margin: 0 6px 6px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fafbfc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    outline: none;
    color: #1a1a1a;
    word-wrap: break-word;
    transition: border-color 0.15s, background 0.15s;
}

.wt-rte-content:focus {
    border-color: #0078d4;
    background: #fff;
}

.wt-rte-content:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}

.wt-rte-content a {
    color: #0078d4;
    text-decoration: underline;
}

.wt-rte-content ul,
.wt-rte-content ol {
    margin: 0.25em 0;
    padding-left: 1.5em;
}

.wt-rte-content p {
    margin: 0.25em 0;
}

/* Read-only state */
.wt-rte-readonly .wt-rte-content {
    background: #f5f5f5;
    border-color: #e5e7eb;
    color: #4b5563;
    cursor: default;
}
