.wsb-app {
    --wsb-border: #b7bcc4;
    --wsb-soft: #f6f7f8;
    --wsb-text: #1f2937;
    color: var(--wsb-text);
    max-width: 1180px;
    margin: 1.5rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wsb-app .button {
    appearance: none;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #1d2327;
    padding: .5rem .75rem;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}
.wsb-app .button:hover { background: #f6f7f7; border-color: #646970; }
.wsb-app .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.wsb-app .button-primary:hover { background: #135e96; border-color: #135e96; }

.wsb-app .button:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.wsb-app .wsb-delete-selected:not(:disabled) {
    border-color: #b42318;
    color: #b42318;
}
.wsb-app .wsb-delete-selected:not(:disabled):hover {
    background: #fff1f0;
    border-color: #912018;
}
.wsb-selection-mode .wsb-schedule-table .wsb-editable-cell {
    cursor: crosshair;
}
.wsb-schedule-table .wsb-editable-cell.is-selected-block {
    outline: 4px solid #2271b1;
    outline-offset: -4px;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.85);
}
.wsb-schedule-table .wsb-editable-cell.is-selected-block::after {
    content: '\2713';
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #2271b1;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.wsb-toolbar,
.wsb-user-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    align-items: end;
    margin-bottom: 1rem;
}
.wsb-title-area { flex: 1 1 340px; }
.wsb-title-area label,
.wsb-setup label,
.wsb-field label {
    display: block;
    font-weight: 600;
    margin-bottom: .3rem;
}
.wsb-title-input,
.wsb-setup textarea,
.wsb-field textarea,
.wsb-field input[type="number"],
.wsb-field input[type="text"],
.wsb-field select,
.wsb-user-row select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: .55rem .65rem;
    background: #fff;
}
.wsb-title-input { font-size: 1.1rem; }
.wsb-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.wsb-user-row { align-items: center; }
.wsb-user-row label { font-weight: 600; }
.wsb-user-row select { width: auto; min-width: 240px; }
.wsb-status { font-size: .9rem; min-height: 1.2em; }
.wsb-status.is-error { color: #b42318; }
.wsb-status.is-ok { color: #067647; }
.wsb-login-note { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.wsb-setup {
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    padding: .75rem 1rem;
    background: #fafafa;
    margin-bottom: 1rem;
}
.wsb-setup summary { font-weight: 650; cursor: pointer; }
.wsb-setup-grid {
    display: grid;
    grid-template-columns: minmax(180px, .65fr) minmax(220px, 1fr) minmax(180px, .55fr);
    gap: 1rem;
    margin-top: 1rem;
}
.wsb-setup textarea { min-height: 180px; resize: vertical; }
.wsb-setup-actions { align-self: end; }
.wsb-help {
    background: #f0f6fc;
    border: 1px solid #c8ddf0;
    padding: .65rem .8rem;
    border-radius: 5px;
    margin-bottom: .8rem;
    font-size: .92rem;
}
.wsb-table-wrap {
    overflow-x: auto;
    border-radius: 4px;
    box-shadow: 0 0 0 1px var(--wsb-border);
    background: #fff;
}
.wsb-schedule-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
    margin: 0;
    background: #fff;
}
.wsb-schedule-table th,
.wsb-schedule-table td {
    border: 1px solid #333;
    padding: 7px 8px;
    vertical-align: top;
    line-height: 1.25;
    box-sizing: border-box;
}
.wsb-schedule-table thead th {
    background: #f2f4f7;
    font-weight: 650;
    text-align: left;
}
.wsb-schedule-table .wsb-time-head,
.wsb-schedule-table .wsb-time-cell {
    width: 95px;
    background: #fff;
    color: #111;
    font-weight: 500;
}
.wsb-schedule-table .wsb-editable-cell {
    cursor: pointer;
    min-height: 42px;
    white-space: pre-wrap;
    word-break: break-word;
    position: relative;
}
.wsb-schedule-table .wsb-editable-cell:hover {
    outline: 3px solid rgba(34,113,177,.28);
    outline-offset: -3px;
}
.wsb-schedule-table .wsb-editable-cell:focus {
    outline: 3px solid rgba(34,113,177,.5);
    outline-offset: -3px;
}
.wsb-schedule-table .wsb-editable-cell.is-dragging { opacity: .55; }
.wsb-schedule-table .wsb-editable-cell.is-drop-target {
    outline: 4px solid #2271b1;
    outline-offset: -4px;
}
.wsb-empty-cell { color: #667085; }
.wsb-modal[hidden] { display: none !important; }
.wsb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.wsb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17,24,39,.55);
}
.wsb-modal-card {
    position: relative;
    width: min(620px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 55px rgba(0,0,0,.28);
    padding: 1rem;
}
.wsb-modal-head { display: flex; align-items: center; gap: 1rem; }
.wsb-modal-head h2 { margin: 0; font-size: 1.2rem; }
.wsb-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.wsb-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.wsb-field input[type="color"] { width: 100%; height: 42px; padding: 2px; }
.wsb-preset-label {
    margin-top: .55rem;
    font-size: .78rem;
    font-weight: 600;
    color: #475467;
}
.wsb-color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 6px;
    margin-top: .35rem;
}
.wsb-color-swatch {
    position: relative;
    width: 100%;
    min-width: 28px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid #98a2b3;
    border-radius: 5px;
    background: var(--wsb-swatch-color);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.wsb-color-swatch:hover,
.wsb-color-swatch:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}
.wsb-color-swatch.is-selected::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 2px solid #111827;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.9);
}
.wsb-color-swatch.is-light.is-selected::after,
.wsb-color-swatch[data-color="#ffffff"].is-selected::after {
    border-color: #111827;
}
.wsb-text-swatches {
    grid-template-columns: repeat(2, 34px);
}
.wsb-field input[readonly] {
    background: #f6f7f8;
    color: #475467;
}
.wsb-span-help {
    margin: .35rem 0 0;
    font-size: .82rem;
    line-height: 1.3;
}
.wsb-modal-actions { display: flex; gap: .5rem; align-items: center; margin-top: 1.25rem; }
.wsb-spacer { flex: 1; }
@media (max-width: 760px) {
    .wsb-setup-grid { grid-template-columns: 1fr; }
    .wsb-modal-grid { grid-template-columns: 1fr; }
    .wsb-actions { width: 100%; }
    .wsb-actions .button { flex: 1 1 120px; }
}
@media print {
    body * { visibility: hidden !important; }
    .wsb-table-wrap,
    .wsb-table-wrap * { visibility: visible !important; }
    .wsb-editable-cell.is-selected-block::after { display: none !important; }
    .wsb-table-wrap {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        overflow: visible;
    }
}

.wsb-json-file { display: none !important; }
