/* 稼働ワークスペース */
/* --- Work workspace --- */
.wpg-work-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: var(--wpg-bg);
}

.wpg-work-panel {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.wpg-work-workspace .wpg-apps-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.wpg-work-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 16px 8px;
    box-sizing: border-box;
}

.wpg-work-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.wpg-work-filters .wpg-input {
    min-width: 140px;
}

.wpg-work-filters input[type="search"] {
    flex: 1;
    min-width: 180px;
}

.wpg-work-content {
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    max-width: none;
    margin: 0;
    padding: 0 16px 20px;
    box-sizing: border-box;
    font-size: var(--wpg-text-lg);
}

.wpg-work-content .wpg-empty-state,
.wpg-work-content-wide .wpg-empty-state {
    padding: 3.5rem 1rem;
}

.wpg-work-toolbar-wide,
.wpg-work-content-wide,
.wpg-work-toolbar-wide.is-roster,
.wpg-work-content-wide.is-roster {
    max-width: none;
}

.wpg-work-view-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    gap: 6px;
    margin-bottom: 8px;
}

.wpg-work-view-tab {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    padding: 7px 14px;
    min-width: 5.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
}

.wpg-work-view-tab.is-active {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.wpg-work-view-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wpg-work-confirm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.wpg-work-confirm-filters .wpg-input,
.wpg-work-confirm-filters .wpg-btn {
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.wpg-work-filters .wpg-btn,
.wpg-work-confirm-filters .wpg-btn {
    min-height: 38px;
    align-self: center;
}

.wpg-work-confirm-filters .wpg-input,
.wpg-work-confirm-filters select.wpg-input {
    width: auto;
    min-width: 10rem;
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 0;
}

.wpg-work-confirm-filters .wpg-work-keyword {
    flex: 0 1 18rem;
    width: auto;
    min-width: 12rem;
    max-width: 22rem;
}

.wpg-work-me-label {
    min-width: 140px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
}

.wpg-work-confirm-hint {
    margin: 0 0 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.72rem;
}

.wpg-work-deadline-banner {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.78rem;
    line-height: 1.45;
}

.wpg-work-deadline-banner.is-closed {
    background: #fef2f2;
    color: #b91c1c;
}

.wpg-work-confirm-list {
    display: flex;
    flex-direction: column;
}

.wpg-work-confirm-day {
    display: block;
    padding: 6px 0;
    border-bottom: 1px dotted #d1d5db;
}

.wpg-work-confirm-day-head {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 8px;
    align-items: flex-start;
}

.wpg-work-confirm-day-side {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
    padding-top: 2px;
}

.wpg-work-confirm-head-main {
    min-width: 0;
}

.wpg-work-confirm-day-body {
    padding-left: 104px;
}

.wpg-work-confirm-day-label {
    flex: 0 0 auto;
    min-width: 0;
    font-weight: 700;
    color: #2563eb;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    white-space: nowrap;
    line-height: 1.35;
}

.wpg-work-confirm-day.is-sat .wpg-work-confirm-day-label { color: #2563eb; }
.wpg-work-confirm-day.is-sun .wpg-work-confirm-day-label { color: #dc2626; }

.wpg-work-confirm-unpublished,
.wpg-work-roster-chip.is-unpublished,
.wpg-roster-bar.is-unpublished {
    color: #9a3412;
}
.wpg-work-confirm-unpublished {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0 6px;
    border-radius: 999px;
    background: #ffedd5;
}
.wpg-work-confirm-entry {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.wpg-work-confirm-entry-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 1px 0;
    cursor: default;
    text-align: left;
    color: inherit;
    font-size: 0.78rem;
}

.wpg-work-confirm-time { font-weight: 700; min-width: 84px; }
.wpg-work-confirm-person { color: #1d4ed8; font-weight: 700; }
.wpg-work-confirm-site { color: #0f766e; font-weight: 700; }
.wpg-work-confirm-hours { color: #6b7280; font-size: 0.92em; margin-left: 0.25em; }
.wpg-work-confirm-empty-day { color: #9ca3af; font-size: 0.75rem; }

.wpg-work-anno-add {
    border: none;
    background: transparent;
    color: #059669;
    font-weight: 800;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 1px 3px;
    line-height: 1;
}
.wpg-work-anno-add:hover { color: var(--wpg-brand, #ff6b00); }

.wpg-work-event-banner {
    margin-bottom: 4px;
    padding: 5px;
    border-radius: 5px;
    background: #d9edf7;
    color: #31708f;
    font-size: 0.78rem;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
}

.wpg-work-note {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 8px;
    padding: 2px;
    border: 1px solid #888;
    border-radius: 0;
    background: #eafce3;
    color: #003000;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 400;
    text-align: left;
    line-height: 1.35;
    cursor: pointer;
}
.wpg-work-note-row.has-arrow {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 0 0 6px;
}
.wpg-work-note-row.has-arrow .wpg-work-note {
    display: inline-block;
    width: auto;
    max-width: calc(100% - 28px);
    margin-bottom: 0;
    border-color: #555;
}
.wpg-work-note-arrow {
    flex: 0 0 auto;
    margin-left: 10px;
    color: darkgreen;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}
.wpg-work-note-who {
    font-weight: 700;
    margin-right: 0.4em;
}
.wpg-work-note-pencil {
    display: inline;
    border: none;
    background: transparent;
    color: #003000;
    cursor: pointer;
    padding: 0 2px;
    margin-left: 4px;
    font-size: 0.85rem;
    line-height: 1;
    vertical-align: baseline;
}
.wpg-work-note-pencil:hover,
.wpg-work-note:hover {
    opacity: 0.86;
}
.wpg-work-roster-cell .wpg-work-note {
    margin: 2px 0 0;
    font-size: 0.62rem;
    white-space: normal;
}

.wpg-work-roster-wrap { overflow: hidden; }
.wpg-work-scroll-hint {
    display: none;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--wpg-muted);
}
@media (max-width: 767px) {
    .wpg-work-scroll-hint { display: block; }
}
.wpg-work-roster-scroll {
    overflow: auto;
    max-height: calc(100vh - 280px);
    border: 1px solid #93c5fd;
    background: #fff;
}
.wpg-work-roster-table {
    border-collapse: collapse;
    min-width: 100%;
    font-size: 0.68rem;
    background: #fff;
}
.wpg-work-roster-table th,
.wpg-work-roster-table td {
    border: 1px solid #93c5fd;
    padding: 2px 4px;
    vertical-align: top;
    line-height: 1.2;
    min-width: 150px;
}
.wpg-work-roster-head th {
    background: #d9edf7;
    font-weight: 700;
    font-size: 0.7rem;
    text-align: center;
    vertical-align: middle;
}
.wpg-work-roster-head.is-sticky th {
    position: sticky;
    top: 0;
    z-index: 2;
}
.wpg-work-roster-person {
    min-width: 150px;
    white-space: nowrap;
}
.wpg-work-roster-role {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.62rem;
}
.wpg-work-roster-date-col,
.wpg-work-roster-dow-col {
    position: sticky;
    background: #f0f8ff;
    z-index: 1;
    min-width: 42px !important;
    max-width: 56px;
    width: 42px;
    text-align: center;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    white-space: nowrap;
    border-left: 2px solid #555;
    border-right: 2px solid #555;
}
.wpg-work-roster-date-col { left: 0; }
.wpg-work-roster-dow-col { left: 42px; }
.wpg-work-roster-table tr > .wpg-work-roster-dow-col:last-child {
    left: auto;
    right: 0;
    z-index: 1;
}
.wpg-work-roster-head.is-sticky .wpg-work-roster-date-col,
.wpg-work-roster-head.is-sticky .wpg-work-roster-dow-col {
    z-index: 3;
    background: #d9edf7;
}
.wpg-work-roster-table tr.is-sun .wpg-work-roster-date-col,
.wpg-work-roster-table tr.is-sun .wpg-work-roster-dow-col { color: #dc2626; }
.wpg-work-roster-table tr.is-sat .wpg-work-roster-date-col,
.wpg-work-roster-table tr.is-sat .wpg-work-roster-dow-col { color: #2563eb; }
.wpg-work-roster-cell.is-empty { background: #fafafa; }
.wpg-work-roster-chip {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: default;
    padding: 1px 0;
    line-height: 1.25;
    color: #111827;
    font-size: 0.68rem;
    white-space: nowrap;
}
.wpg-work-roster-chip:hover { color: inherit; }

@media (max-width: 720px) {
    .wpg-work-confirm-day-head {
        grid-template-columns: 64px 1fr;
    }
    .wpg-work-confirm-day-body {
        padding-left: 64px;
    }
}

.wpg-work-day-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpg-work-day-block,
.wpg-work-summary-block {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--wpg-line);
}

.wpg-work-summary-overview {
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #f8fbff;
}

.wpg-work-summary-overview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.wpg-work-summary-overview-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wpg-work-summary-overview-title,
.wpg-work-summary-details-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e3a8a;
}

.wpg-work-summary-grand {
    font-size: 0.82rem;
    color: #1f2937;
}

.wpg-work-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: #fff;
}

.wpg-work-summary-table th,
.wpg-work-summary-table td {
    border: 1px solid #dbeafe;
    padding: 6px 8px;
    text-align: left;
}

.wpg-work-summary-table thead th {
    background: #eff6ff;
    font-weight: 700;
}

.wpg-work-summary-table tfoot th,
.wpg-work-summary-table tfoot td {
    background: #ecfdf5;
    font-weight: 700;
}

.wpg-work-summary-num {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.wpg-work-hour-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: var(--wpg-radius-sm);
    border: 1px solid transparent;
    font-size: 0.82rem;
    line-height: 1.45;
}

.wpg-work-hour-alert.is-caution {
    color: #92400e;
    background: var(--wpg-warn-soft);
    border-color: #fde68a;
}

.wpg-work-hour-alert.is-warning,
.wpg-work-hour-alert.is-danger {
    color: #9a3412;
    background: #fff7ed;
    border-color: var(--wpg-brand-border);
}

.wpg-work-hour-alert.is-danger {
    color: #991b1b;
    background: var(--wpg-danger-soft);
    border-color: #fecaca;
}

.wpg-work-hour-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.wpg-work-hour-badge.is-caution {
    color: #92400e;
    background: #fef3c7;
}

.wpg-work-hour-badge.is-warning {
    color: #9a3412;
    background: #ffedd5;
}

.wpg-work-hour-badge.is-danger {
    color: #991b1b;
    background: #fee2e2;
}

.wpg-work-summary-table tbody tr.is-caution {
    background: #fffbeb;
}

.wpg-work-summary-table tbody tr.is-warning {
    background: #fff7ed;
}

.wpg-work-summary-table tbody tr.is-danger {
    background: #fef2f2;
}

.wpg-work-summary-details {
    margin-top: 8px;
}

.wpg-work-summary-details-title {
    margin-bottom: 10px;
}

.wpg-work-day-title,
.wpg-work-summary-title {
    color: #2563eb;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.wpg-work-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 8px;
}

.wpg-work-row:hover {
    background: #f3f4f6;
}

.wpg-work-row-main {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 110px minmax(90px, 140px) 1fr auto;
    gap: 8px;
    align-items: center;
    border: none;
    background: transparent;
    text-align: left;
    cursor: default;
}

.wpg-work-summary-block .wpg-work-row-main {
    grid-template-columns: 150px 1fr auto;
}

.wpg-work-time {
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
    white-space: nowrap;
}

.wpg-work-person,
.wpg-work-event-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpg-work-hours {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    white-space: nowrap;
}

.wpg-work-edit {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 6px;
}

.wpg-work-edit:hover {
    color: var(--wpg-brand, #ff6b00);
}

.wpg-work-total {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
    background: #f0fdf4;
}

/* --- Work change wizard --- */
.wpg-work-wizard-sheet {
    width: min(920px, calc(100vw - 24px));
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
}

.wpg-work-wizard-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wpg-work-wizard-banner {
    background: #2f6f4e;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    padding: 10px 14px;
}

.wpg-work-wizard-steps {
    display: flex;
    gap: 8px;
    padding: 12px 16px 0;
}

.wpg-work-wizard-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 700;
}

.wpg-work-wizard-step.is-active {
    background: color-mix(in srgb, var(--wpg-brand, #ff6b00) 16%, white);
    color: var(--wpg-brand, #ff6b00);
}

.wpg-work-wizard-step-num {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #9ca3af;
    color: #fff;
    font-size: 0.7rem;
}

.wpg-work-wizard-step.is-active .wpg-work-wizard-step-num {
    background: var(--wpg-brand, #ff6b00);
}

.wpg-work-wizard-body {
    overflow: auto;
}

.wpg-work-wizard-note {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 0.8rem;
    font-weight: 600;
}

.wpg-work-wizard-block {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
}

.wpg-work-wizard-block-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1f2937;
}

.wpg-work-wizard-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wpg-work-wizard-date-row .wpg-input {
    flex: 1;
    min-width: 120px;
}

#workWizardSite {
    flex: 1.4;
    min-width: 160px;
}

.wpg-work-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.wpg-work-slot-card {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wpg-work-slot-card:hover {
    border-color: var(--wpg-brand, #ff6b00);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--wpg-brand, #ff6b00) 20%, transparent);
}

.wpg-work-slot-card.is-selected {
    border-color: var(--wpg-brand, #ff6b00);
    background: color-mix(in srgb, var(--wpg-brand, #ff6b00) 8%, white);
}

.wpg-work-slot-card.is-new {
    border-style: dashed;
    color: var(--wpg-brand, #ff6b00);
    font-weight: 800;
}

.wpg-work-slot-card.is-locked {
    cursor: default;
    opacity: 0.7;
    background: #f3f4f6;
    color: #6b7280;
}

.wpg-work-slot-card.is-locked:hover {
    border-color: #d1d5db;
    box-shadow: none;
}

.wpg-work-slot-time {
    display: block;
    font-weight: 800;
    font-size: 0.9rem;
    color: #111827;
}

.wpg-work-slot-name {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #4b5563;
}

.wpg-work-wizard-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.wpg-work-wizard-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wpg-work-wizard-time-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    grid-column: 1 / -1;
}

.wpg-work-wizard-editor-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.wpg-work-draft-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpg-work-draft-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    font-size: 0.85rem;
}

.wpg-work-draft-item strong {
    color: var(--wpg-brand, #ff6b00);
}

.wpg-work-wizard-reset {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: none;
    color: #6b7280;
    text-decoration: underline;
    font-size: 0.8rem;
    cursor: pointer;
}

.wpg-work-wizard-done {
    text-align: center;
    padding: 28px 12px;
}

.wpg-work-wizard-done-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

@media (max-width: 720px) {
    .wpg-work-row-main,
    .wpg-work-summary-block .wpg-work-row-main {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .wpg-work-wizard-editor-grid,
    .wpg-work-wizard-time-fields {
        grid-template-columns: 1fr;
    }
}

.wpg-subnav,
.wpg-apps-subnav {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    gap: 0;
    overflow-x: auto;
    background: var(--wpg-surface);
    border-bottom: 1px solid var(--wpg-line);
    scrollbar-width: none;
}

.wpg-subnav::-webkit-scrollbar,
.wpg-apps-subnav::-webkit-scrollbar {
    display: none;
}

.wpg-subnav-group {
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
    gap: 0;
    padding: 0 6px 0 0;
    border-right: 1px solid var(--wpg-line);
}

.wpg-subnav-group:last-child {
    border-right: none;
    padding-right: 0;
}

.wpg-subnav-group.hidden {
    display: none;
}

.wpg-subnav-group-label {
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin: 0 2px 0 10px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #8a8a8a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.wpg-subnav-btn,
.wpg-apps-subnav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--wpg-muted);
    font-size: var(--wpg-text-sm);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.wpg-subnav-btn:hover,
.wpg-apps-subnav-btn:hover {
    color: var(--wpg-ink);
    background: #fafafa;
}

.wpg-subnav-btn.is-active,
.wpg-apps-subnav-btn.is-active {
    color: var(--wpg-brand);
    border-bottom-color: var(--wpg-brand);
}

.wpg-work-pipeline {
    padding: 8px 4px 24px;
}

.wpg-work-pipeline-heading {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 16px 4px 8px;
}

.wpg-work-request-form {
    background: var(--wpg-surface);
    border: 1px solid var(--wpg-line);
    border-radius: 10px;
    padding: 14px;
    margin: 4px 0 8px;
}

.wpg-work-request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.wpg-work-request-allday {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    align-self: end;
    padding-bottom: 6px;
}

.wpg-work-pipeline-row {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.wpg-work-pipeline-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wpg-work-pipeline-note {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 0.8rem;
}

.wpg-work-pipeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.wpg-work-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
}

.wpg-work-status-badge.is-requested {
    background: #fff7ed;
    color: #c2410c;
}

.wpg-work-status-badge.is-draft {
    background: #eff6ff;
    color: #1d4ed8;
}

/* 希望申請: 月カレンダー / 日付指定タブ */
.wpg-work-request-mode-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin: 4px 0 16px;
}

.wpg-work-request-mode-tab {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
}

.wpg-work-request-mode-tab.is-active {
    color: #111827;
    border-bottom-color: #ff6b00;
}

.wpg-work-month-request {
    background: var(--wpg-surface, #fff);
    border: 1px solid var(--wpg-line, #e5e7eb);
    border-radius: 10px;
    padding: 16px 14px 18px;
    margin: 0 0 8px;
}

.wpg-work-month-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b00;
}

.wpg-work-month-select {
    min-width: 5.5rem;
}

.wpg-work-month-top-right {
    font-size: 0.95rem;
    color: #374151;
    white-space: nowrap;
}

.wpg-work-month-legend-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.wpg-work-month-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    font-size: 0.85rem;
    color: #6b7280;
}

.wpg-work-month-bulk {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #4b5563;
}

.wpg-work-month-bulk select {
    width: 3.5rem;
}

.wpg-work-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.wpg-work-month-weekday {
    background: #dbeafe;
    text-align: center;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 8px 4px;
    border-right: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.wpg-work-month-weekday:nth-child(7n) {
    border-right: none;
}

.wpg-work-month-weekday.is-sat {
    color: #2563eb;
}

.wpg-work-month-weekday.is-sun {
    color: #dc2626;
}

.wpg-work-month-cell {
    min-height: 72px;
    padding: 6px 6px 8px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.wpg-work-month-cell:nth-child(7n) {
    border-right: none;
}

.wpg-work-month-cell.is-other-month {
    background: #f9fafb;
    color: #9ca3af;
}

.wpg-work-month-cell.is-sat .wpg-work-month-day {
    color: #2563eb;
}

.wpg-work-month-cell.is-sun .wpg-work-month-day,
.wpg-work-month-cell.is-holiday .wpg-work-month-day {
    color: #dc2626;
}

.wpg-work-month-cell-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 6px;
    min-height: 1.2em;
}

.wpg-work-month-day {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
}

.wpg-work-month-holiday {
    font-size: 0.65rem;
    color: #dc2626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 58%;
}

.wpg-work-month-pref {
    width: 100%;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.85rem;
    background: #fff;
    color: #111827;
}

.wpg-work-month-cell.is-other-month .wpg-work-month-pref {
    border-color: #e5e7eb;
    color: #6b7280;
}

.wpg-work-month-detail {
    margin-top: 16px;
}

.wpg-work-month-detail textarea {
    width: 100%;
    min-height: 96px;
}

@media (max-width: 720px) {
    .wpg-work-month-legend-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wpg-work-month-cell {
        min-height: 64px;
        padding: 4px;
    }

    .wpg-work-month-holiday {
        display: none;
    }

    .wpg-work-month-pref {
        font-size: 0.75rem;
        padding: 2px 2px;
    }
}

.wpg-deadline-when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wpg-deadline-when-label {
    font-size: var(--wpg-text-sm);
    font-weight: 700;
    color: #374151;
}

.wpg-deadline-day,
.wpg-deadline-minute {
    width: 4.75rem;
    text-align: right;
}

.wpg-deadline-preview {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.45;
}

.wpg-plan-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
}
.wpg-plan-tools label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wpg-plan {
    min-width: 0;
    max-width: 100%;
}
.wpg-plan-scroll {
    width: max-content;
    min-width: 100%;
    max-width: none;
    overflow: visible;
    max-height: none;
    border: 0;
    background: transparent;
}
.wpg-plan-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    font-size: 0.68rem;
}
.wpg-plan-table th,
.wpg-plan-table td {
    border-right: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
    padding: 1px 2px;
    text-align: center;
    vertical-align: middle;
    background: #fff;
    white-space: nowrap;
}
.wpg-plan-table thead th {
    position: sticky;
    top: var(--wpg-plan-solo, 0px);
    z-index: 4;
    background: #f8fafc;
    font-weight: 800;
}
.wpg-plan-table thead tr:nth-child(2) th { top: var(--wpg-plan-head1, 34px); }
.wpg-plan-date,
.wpg-plan-date-right {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 58px;
    background: #eff6ff;
    box-shadow: inset 0 0 0 2px #2563eb;
    font-weight: 800;
}
.wpg-plan-date-right {
    position: static;
    left: auto;
}
.wpg-plan-table thead .wpg-plan-date { z-index: 6; }
.wpg-plan-table tr.is-sun .wpg-plan-date,
.wpg-plan-table tr.is-sun .wpg-plan-date-right { color: #dc2626; }
.wpg-plan-table tr.is-sat .wpg-plan-date,
.wpg-plan-table tr.is-sat .wpg-plan-date-right { color: #2563eb; }
.wpg-plan-event {
    min-width: 72px;
    max-width: 120px;
    background: #dbeafe;
    color: #1e3a8a;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: normal;
}
.wpg-plan-event.is-empty {
    background: transparent;
    color: #94a3b8;
}
.wpg-plan-person {
    position: relative;
    min-width: 92px;
    box-shadow: inset 0 0 0 2px #ef4444;
    background: #fff;
}
.wpg-plan-person-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.wpg-plan-person-name {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    color: inherit;
}
.wpg-plan-person-name.is-missing { color: #dc2626; }
.wpg-plan-panel {
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 0.75rem;
    line-height: 1.5;
}
.wpg-plan-panel[hidden] { display: none; }
.wpg-plan-badge {
    font-size: 0.62rem;
    padding: 0 4px;
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
}
.wpg-plan-card {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 30;
    width: 240px;
    padding: 8px 10px;
    text-align: left;
    white-space: normal;
    background: #fff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
}
.wpg-plan-person:hover .wpg-plan-card,
.wpg-plan-person:focus-within .wpg-plan-card { display: none; }
.wpg-plan-sub { background: #f8fafc; font-size: 0.62rem; }
.wpg-plan-cell {
    min-width: 26px;
    height: 24px;
    cursor: pointer;
}
.wpg-plan-cell:hover { outline: 1px solid #2563eb; outline-offset: -1px; }
.wpg-plan-g-start { border-left: 2px solid #ef4444; }
.wpg-plan-g-end { border-right: 2px solid #ef4444; }
.wpg-plan-cell.is-early { box-shadow: inset 3px 0 0 #e7c27a; background: #fbf6ea; }
.wpg-plan-cell.is-late { box-shadow: inset 3px 0 0 #8eafd4; background: #f4f7fb; }
.wpg-plan-cell.is-timed { box-shadow: inset 3px 0 0 #6aa84f; background: #f3faf1; }
.wpg-plan-cell.is-off { background: #f7f4ef; }
.wpg-plan-cell.is-off .wpg-plan-chip { background: #e7e1d8; }
.wpg-plan-cell.is-paid { background: #fff; }
.wpg-plan-cell.is-paid .wpg-plan-chip { box-shadow: inset 0 0 0 1.5px #64748b; }
.wpg-plan-cell.is-holiday { background: #eef2ff; color: #312e81; }
.wpg-plan-cell.is-tone-train-new { box-shadow: inset 3px 0 0 #e0a15a; background: #fbf3e8; }
.wpg-plan-cell.is-tone-training { box-shadow: inset 3px 0 0 #3d8f84; background: #f3faf8; }
.wpg-plan-cell.is-tone-meeting { box-shadow: inset 3px 0 0 #c48490; background: #fbf5f6; }
.wpg-plan-cell.is-tone-patrol { box-shadow: inset 3px 0 0 #6d74b0; background: #f6f6fb; }
.wpg-plan-cell.is-tone-setup { box-shadow: inset 3px 0 0 #7d8648; background: #f7f8f1; }
.wpg-plan-cell.is-tone-trial { box-shadow: inset 3px 0 0 #1f6f6a; background: #f3f8f7; }
.wpg-plan-cell.is-tone-sc { box-shadow: inset 3px 0 0 #6b93c9; background: #f5f8fc; }
.wpg-plan-cell.is-pinned { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.wpg-plan-cell.is-selected { outline: 2px solid #1d4ed8; outline-offset: -2px; }
.wpg-plan-cell.is-draft { box-shadow: inset 0 -2px 0 #f97316; }
.wpg-plan-cell.is-split { box-shadow: inset 3px 0 0 #f97316; }
.wpg-plan-line {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.35;
    text-align: left;
    padding: 1px 0;
}
.wpg-plan-line-main {
    flex: 1;
    min-width: 0;
    text-align: left;
    background: none;
    border: 0;
    padding: 2px 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.wpg-plan-line-x {
    flex: none;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 4px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
.wpg-plan-people {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 2px 2px 8px;
    font-size: 0.78rem;
    font-weight: 700;
}
.wpg-plan-solo-row:not(:empty) {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 4px 0;
    background: var(--wpg-bg, #f3f4f6);
}
.wpg-plan-solo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}
.wpg-plan-chip {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 6px;
    border-radius: 999px;
    font-weight: 800;
}
.wpg-plan-gap { min-width: 28px; font-weight: 800; }
.wpg-plan-gap.is-ok { color: #15803d; background: #f0fdf4; }
.wpg-plan-gap.is-ng { color: #b91c1c; background: #fef2f2; }
.wpg-plan-ws {
    width: 4.75rem;
    min-width: 4.75rem;
    max-width: 8.5rem;
    background: #fafafa;
    font-size: 0.62rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wpg-plan-ws.is-recommended { background: #ecfdf5; }
.wpg-tick {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.wpg-tick-face {
    width: 11px;
    height: 11px;
    border: 1px solid #334155;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}
.wpg-tick-face::after {
    content: '';
    position: absolute;
    width: 1.5px;
    height: 4px;
    left: 4px;
    top: 1px;
    background: #0f172a;
    transform-origin: 50% 4px;
}
.wpg-tick.is-15 .wpg-tick-face::after { transform: rotate(90deg); }
.wpg-tick.is-30 .wpg-tick-face::after { transform: rotate(180deg); }
.wpg-tick.is-45 .wpg-tick-face::after { transform: rotate(-90deg); }
.wpg-plan-more { color: #c2410c; font-size: 0.6rem; }
.wpg-plan-mark.is-multi { color: #dc2626; font-weight: 800; }
.wpg-plan-home { display: block; font-size: 0.62rem; color: #1e40af; font-weight: 700; }
.wpg-plan-role { display: block; font-size: 0.6rem; color: #64748b; font-weight: 700; }
.wpg-plan-contract { display: block; font-size: 0.72rem; font-weight: 800; }
.wpg-plan-contract.is-over,
.wpg-plan-total-days.is-over { color: #dc2626; background: #fef2f2; }
.wpg-plan-total th,
.wpg-plan-total td { background: #fff7ed; font-weight: 800; }
.wpg-plan-guide { margin: 0 0 8px; font-size: 0.75rem; color: #334155; line-height: 1.5; }
.wpg-plan-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.wpg-plan-tool { font-weight: 800; }
.wpg-check-line { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.85rem; font-weight: 700; }
.wpg-work-ws-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 4px 8px;
    border: 1px solid #fdba74;
    border-radius: 6px;
    background: #fff7ed;
}
.wpg-plan-menu {
    position: fixed;
    z-index: 1200;
    min-width: 200px;
    max-height: min(70vh, calc(100vh - 16px));
    overflow: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    padding: 4px;
}
.wpg-plan-menu[hidden] { display: none; }
.wpg-plan-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.wpg-plan-menu button:hover { background: #eff6ff; }
.wpg-plan-menu button.is-danger { color: #991b1b; font-weight: 800; }
.wpg-plan-menu .is-label {
    font-size: 0.68rem;
    color: #64748b;
    padding: 6px 8px 2px;
    font-weight: 800;
}
.wpg-plan-legacy { margin-top: 16px; }
.wpg-plan-legacy summary { cursor: pointer; font-weight: 800; margin-bottom: 8px; }
.wpg-plan-shift-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wpg-tc { display: flex; flex-direction: column; gap: 12px; }
.wpg-tc-modes, .wpg-tc-decide, .wpg-tc-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wpg-tc-head { justify-content: space-between; }
.wpg-tc-head h3 { margin: 0; font-size: 1rem; }
.wpg-tc-stats, .wpg-close-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}
.wpg-close-head, .wpg-close-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wpg-close-actions { justify-content: flex-start; }
.wpg-close-stat {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}
.wpg-close-stat strong { display: block; font-size: 1.25rem; line-height: 1.2; }
.wpg-close-stat span { display: block; margin-top: 2px; color: #64748b; font-size: 0.75rem; }
.wpg-tc-stat {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}
.wpg-tc-stat strong { display: block; font-size: 1.25rem; line-height: 1.2; }
.wpg-tc-stat span { display: block; margin-top: 2px; color: #64748b; font-size: 0.75rem; }
.wpg-tc-stats.is-caution .wpg-tc-stat strong { color: #b45309; }
.wpg-tc-stats.is-warning .wpg-tc-stat strong { color: #c2410c; }
.wpg-tc-stats.is-danger .wpg-tc-stat strong { color: #b91c1c; }
.wpg-tc-plan-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    font-size: 0.7rem;
}
.wpg-tc-plan.is-calendar { background: #f8fafc; }
.wpg-tc-plan.is-leave { background: #ecfdf5; border-color: #99f6e4; }
.wpg-tc-mode {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 800;
}
.wpg-tc-mode.is-active { background: #0f766e; color: #fff; border-color: #0f766e; }
.wpg-tc-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(180px, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 720px) {
    .wpg-tc-layout { grid-template-columns: 1fr; }
}
.wpg-tc-clock {
    background: #ffedd5;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.wpg-tc-time { margin: 4px 0; font-size: 3rem; font-weight: 800; letter-spacing: 0.04em; }
.wpg-tc-who, .wpg-tc-date, .wpg-tc-last, .wpg-tc-note, .wpg-tc-reason { margin: 0; line-height: 1.5; }
.wpg-tc-note { color: #475569; font-size: 0.8rem; }
.wpg-tc-reason {
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    white-space: pre-wrap;
}
.wpg-tc-actions, .wpg-tc-staff { display: flex; flex-direction: column; gap: 8px; }
.wpg-tc-btn, .wpg-tc-staff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 8px;
    min-height: 48px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}
.wpg-tc-btn.is-primary { background: #e2e8f0; }
.wpg-tc-btn.is-alert, .wpg-tc-staff-btn.is-active { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.wpg-tc-btn.is-wait { background: #7f1d1d; color: #fff; border-color: #7f1d1d; }
.wpg-tc-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; background: #fff; }
.wpg-tc-table th, .wpg-tc-table td { border: 1px solid #cbd5e1; padding: 6px 8px; text-align: left; vertical-align: top; }
.wpg-tc-table th { background: #f8fafc; }

.wpg-ts { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 100%; }
.wpg-ts-tools, .wpg-ts-head, .wpg-ts-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wpg-ts-head div, .wpg-ts-summary div {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 108px;
}
.wpg-ts-head span, .wpg-ts-summary span { display: block; font-size: 0.72rem; color: #9a3412; }
.wpg-ts-head strong, .wpg-ts-summary strong { font-size: 0.95rem; }
.wpg-ts-help, .wpg-ts-warn { margin: 0; font-size: 0.78rem; color: #57534e; }
.wpg-ts-warn { color: #b91c1c; font-weight: 700; }
.wpg-ts-note-label { font-size: 0.8rem; font-weight: 800; }
.wpg-ts-note { margin: 0; white-space: pre-wrap; }
.wpg-ts-scroll { width: 100%; max-width: 100%; overflow: auto; max-height: 70vh; border: 1px solid #e7e5e4; background: #fff; }
.wpg-ts-table { border-collapse: separate; border-spacing: 0; font-size: 0.72rem; min-width: 1680px; }
.wpg-ts-table th, .wpg-ts-table td { border-right: 1px solid #d6d3d1; border-bottom: 1px solid #d6d3d1; padding: 4px 6px; white-space: nowrap; vertical-align: middle; background-clip: padding-box; }
.wpg-ts-table tr > :first-child { border-left: 1px solid #d6d3d1; }
.wpg-ts-table thead tr:first-child > * { border-top: 1px solid #d6d3d1; }
.wpg-ts-table thead th { position: sticky; top: 0; background: #ffedd5; z-index: 3; }
.wpg-ts-table thead tr:nth-child(2) th { top: var(--wpg-ts-head1, 30px); }
.wpg-ts-table thead th[rowspan] { z-index: 4; }
.wpg-ts-table thead th:first-child { left: 0; z-index: 5; min-width: 3.6rem; }
.wpg-ts-table tbody th { position: sticky; left: 0; background: #fff; text-align: left; z-index: 2; min-width: 3.6rem; }
.wpg-ts-table tbody th span { display: block; color: #78716c; font-weight: 600; }
.wpg-ts-table tr.is-off td, .wpg-ts-table tr.is-off th { background: #f5f5f4; }
.wpg-ts-table tr.is-warn td { background: #fef2f2; }
.wpg-ts-comment { min-width: 140px; }

@media print {
    .wpg-subnav, .wpg-toolbar, .wpg-ts-tools, .wpg-ts-help { display: none !important; }
    .wpg-ts-scroll { overflow: visible; max-height: none; }
    .wpg-ts-table { font-size: 8px; }
}

.wpg-plan-table td.wpg-plan-cell { white-space: normal; min-width: 112px; vertical-align: top; }
.wpg-plan-cell.is-split.is-draft { box-shadow: inset 3px 0 0 #f97316, inset 0 -2px 0 #f97316; }
.wpg-plan-more { margin: 0 0 8px; }
.wpg-plan-more summary { cursor: pointer; font-size: 0.78rem; font-weight: 800; color: #475569; }
.wpg-sheet-backdrop.is-plan-drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.wpg-plan-drawer { width: min(440px, 100vw); height: 100%; max-height: 100%; border-radius: 0; margin: 0; }
.wpg-plan-timeline { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wpg-plan-timeline-item, .wpg-plan-timeline-empty { width: 100%; text-align: left; }
.wpg-plan-timeline-item {
    display: flex; justify-content: space-between; gap: 8px;
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 10px 12px; font: inherit; cursor: pointer;
}
.wpg-plan-timeline-item.is-travel { border-style: dashed; }
.wpg-plan-timeline-item.is-active { border-color: #f97316; }
.wpg-aena-cal { overflow: auto; border: 1px solid #93c5fd; background: #fff; }
.wpg-aena-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.wpg-aena-table th,
.wpg-aena-table td {
    border: 1px solid #93c5fd;
    vertical-align: top;
    padding: 4px;
}
.wpg-aena-table thead th {
    background: #dbeafe;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 6px 4px;
}
.wpg-aena-table thead th.is-sun,
.wpg-aena-cell.is-sun .wpg-aena-date { color: #dc2626; }
.wpg-aena-table thead th.is-sat,
.wpg-aena-cell.is-sat .wpg-aena-date { color: #2563eb; }
.wpg-aena-cell { min-height: 88px; height: 1px; background: #fff; }
.wpg-aena-cell.is-empty { background: #f8fafc; }
.wpg-aena-date { font-size: 0.78rem; font-weight: 800; margin-bottom: 2px; }
.wpg-aena-list { display: flex; flex-direction: column; gap: 1px; }
.wpg-aena-entry {
    font-size: 0.7rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wpg-aena-entry.is-off { color: #64748b; }
.wpg-aena-entry.is-unpublished { color: #c2410c; }
.wpg-aena-draft { font-size: 0.62rem; font-weight: 800; color: #ea580c; }
.wpg-roster-board { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.wpg-roster-week { display: flex; flex-wrap: wrap; gap: 8px; }
.wpg-tc-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}
.wpg-tc-secondary .wpg-tc-btn {
    width: 100%;
    min-height: 48px;
}
.wpg-roster-day {
    border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: 6px 10px; font-weight: 800; cursor: pointer;
}
.wpg-roster-day.is-on { border-color: #f97316; color: #c2410c; }
.wpg-roster-axis, .wpg-roster-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; align-items: center; }
.wpg-roster-scale { display: flex; justify-content: space-between; color: #94a3b8; font-size: 0.72rem; }
.wpg-roster-track { position: relative; min-height: 36px; background: #f8fafc; border-radius: 8px; overflow: hidden; }
.wpg-roster-bar {
    position: absolute; top: 6px; height: 24px; border-radius: 6px; background: #f3e6c8;
    font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; padding: 0 6px; overflow: hidden; white-space: nowrap;
}
.wpg-roster-bar.is-travel { background: #fff; border: 1px dashed #94a3b8; }
.wpg-roster-off { color: #94a3b8; font-size: 0.78rem; padding-left: 8px; }
.wpg-roster-month { margin-top: 8px; }
.wpg-work-month-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.wpg-work-month-side { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; background: #fff; }
.wpg-work-month-side h3 { margin: 0 0 8px; }
.wpg-work-month-day-mark { margin: 0 0 8px; font-weight: 800; }
.wpg-work-month-hit {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    width: 100%; min-height: 64px; border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; text-align: left;
}
.wpg-work-month-cell.is-focused { box-shadow: inset 0 0 0 2px #f97316; }
.wpg-work-month-chip {
    display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 0.72rem; font-weight: 800;
}
.wpg-work-month-chip.is-e { background: #f3e6c8; }
.wpg-work-month-chip.is-l { background: #dbe7f5; }
.wpg-work-month-chip.is-o { background: #f5f5f4; }
.wpg-work-month-chip.is-t { background: #e8f5e9; }
.wpg-work-month-chip.is-x { background: #e7e1d8; }
.wpg-work-month-chip.is-empty { visibility: hidden; }
.wpg-work-month-bulk select { width: auto; min-width: 6.5rem; }
.wpg-work-month-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 10px;
}
.wpg-work-month-side .wpg-label { display: block; margin: 0 0 4px; }
.wpg-work-month-side .wpg-input { margin-bottom: 10px; }
.wpg-work-month-side #workMonthDayMark { width: 100%; }
.wpg-tc-btn.is-next { background: #f97316; color: #fff; border-color: #f97316; min-height: 64px; font-size: 1.15rem; }
.wpg-tc-link { border: 0; background: transparent; color: #475569; text-decoration: underline; cursor: pointer; font: inherit; }
.wpg-tc-plan-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.wpg-tc-plan { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; background: #fff; }
.wpg-tc-plan.is-travel { border-style: dashed; }
.wpg-ts-line { display: block; }
.wpg-ts-day { cursor: pointer; }
.wpg-ts-money td { text-align: left; font-size: 0.75rem; background: #fff7ed; }
@media (max-width: 800px) {
    .wpg-work-month-layout, .wpg-roster-axis, .wpg-roster-row { grid-template-columns: 1fr; }
}

/* 工数 */
.wpg-effort-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.wpg-effort-table .wpg-effort-cell { width: 4.2rem; min-width: 3.5rem; padding: 2px 4px; }
.wpg-effort-table th.is-mismatch,
.wpg-effort-table td.is-mismatch { background: #fff1f2; color: #9f1239; }
.wpg-effort-sum td { font-weight: 700; background: #f8fafc; }
.wpg-effort-name { min-width: 7rem; white-space: nowrap; }
.wpg-effort-day span { font-weight: 500; color: #64748b; font-size: 0.7rem; }
.wpg-effort-approvals { margin-top: 16px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.wpg-effort-approvals h4 { margin: 0 0 8px; }
.wpg-effort-approve-item { display: block; margin: 4px 0; font-size: 0.9rem; }
.wpg-effort-projects { margin-top: 16px; }
.wpg-effort-project-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.wpg-effort-project-list { margin: 0; padding-left: 1.2rem; }
