.tvwwc-member-shift {
    margin: 1rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tvwwc-member-input-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
}

.tvwwc-member-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.tvwwc-member-input {
    padding: 0.4rem 0.5rem;
    font-size: 14px;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    min-width: 12rem;
}

.tvwwc-member-button-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    overflow-x: auto;
}

.tvwwc-member-button-row .button {
    font-size: 8.25px;
    padding: 0.1875rem 0.375rem;
    height: auto;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: 0;
}

.tvwwc-member-status {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 14px;
}

.tvwwc-member-status.is-error {
    color: #b00020;
}

.tvwwc-member-display-area {
    margin-top: 1rem;
}

.tvwwc-member-planned-date {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    font-weight: 700;
}

.tvwwc-member-table-wrap {
    margin-bottom: 1rem;
}

.tvwwc-member-section {
    margin-bottom: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tvwwc-member-section + .tvwwc-member-section {
    border-top: 2px solid #c0c7d0;
    padding-top: 0.75rem;
}



.tvwwc-member-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 13px !important;
    border: 1px solid #d0d7de;
}

.tvwwc-member-table th {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    padding: 0.5rem 0.65rem;
    font-weight: 700;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    min-height: 50px;
}

.tvwwc-member-table thead th {
    position: static;
    top: auto;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    word-break: normal;
}

.tvwwc-member-table th,
.tvwwc-member-table td {
    font-size: 13px;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.shift-header {
    white-space: nowrap;
    display: block;
    padding: 0.25rem 0;
    min-width: 14ch;
}

.cut-header-rotated {
    display: inline-block;
    min-height: 0;
    min-width: 8ch;
    line-height: 1.2;
    white-space: nowrap;
    padding: 0.2rem 0.1rem;
}

.cut-header-rotated span {
    display: inline;
}

/* For vertical cut headers in token view */
.cut-header-vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: left;
    min-width: 7ch;
    min-height: 48px;
    line-height: 1.1;
    white-space: nowrap;
    padding: 0.2rem 0.1rem;
}

/* For vertical cut headers, keep text together */
.cut-header-vertical span {
    display: inline;
}

.tvwwc-member-table td {
    border: 1px solid #d0d7de;
    padding: 0.5rem 0.65rem;
    font-size: 13px;
}

.tvwwc-member-name-cell {
    text-align: left;
    font-weight: 600;
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
    user-select: none;
}

.tvwwc-member-shift-cell {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    user-select: none;
    min-width: 14ch;
}

.tvwwc-member-shift-cell.is-editable {
    background: #e8f4f8;
    cursor: pointer;
}

.tvwwc-member-shift-cell.is-editable:hover {
    background: #d0e8f2;
}

.tvwwc-member-shift-cell.is-marked {
    background: #d4f0d4;
    color: #228B22;
}

.tvwwc-member-shift-cell.is-readonly {
    background: #f9f9f9;
    cursor: default;
}

.tvwwc-member-table col.col-last-name {
    width: 7ch;
}

.tvwwc-member-table col.col-first-name {
    width: 7ch;
}

.tvwwc-member-table col.col-shift {
    width: 18ch;
}

.tvwwc-member-table col.col-slot {
    width: 54px;
}

.tvwwc-member-table col.col-total {
    width: 96px;
}

.tvwwc-member-table col.col-cut-vertical {
    width: 8ch !important;
}

.tvwwc-member-section .tvwwc-member-table {
    min-width: max-content;
    table-layout: auto;
}

.tvwwc-member-cutdates {
    margin: 0.75rem 0;
    padding: 0.75rem;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
}

.tvwwc-member-cutdates-title {
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 13px;
}

.tvwwc-member-cutdates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.tvwwc-member-cutdate-slot {
    border: 1px solid #d0d7de;
    border-radius: 3px;
    padding: 0.4rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tvwwc-member-cutdate-slot .slot-label {
    font-weight: 700;
    font-size: 11px;
    color: #333;
}

.tvwwc-member-cutdate-slot .slot-value {
    font-size: 12px;
    color: #666;
}

@media (max-width: 768px) {
    .tvwwc-member-input {
        min-width: 100%;
    }

    .tvwwc-member-cutdates-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    col.col-shift {
        width: 75px;
    }

    col.col-total {
        width: 72px;
    }
}
