
.ewtc-admin-panel,
.ewtc-history-panel {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
}

.ewtc-admin-panel {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.ewtc-admin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.ewtc-admin-head h3,
.ewtc-section-title h3,
.ewtc-section-title h4 {
    margin: 0;
}

.ewtc-admin-head p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.45;
}

.ewtc-admin-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ewtc-admin-buttons button,
.ewtc-break-list button {
    min-height: 39px;
    margin: 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.ewtc-admin-buttons button.danger {
    background: #dc2626;
}

.ewtc-break-editor {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dbeafe;
}

.ewtc-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.ewtc-section-title > span {
    display: grid;
    min-width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 900;
}

.ewtc-break-list,
.ewtc-history-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ewtc-break-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #ffffff;
}

.ewtc-break-list strong,
.ewtc-break-list span {
    display: block;
}

.ewtc-break-list span {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.ewtc-break-list button {
    min-height: 35px;
    background: #e2e8f0;
    color: #334155;
}

.ewtc-open-break-badge {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.ewtc-history-list article {
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #7c3aed;
    border-radius: 12px;
    background: #fafafa;
}

.ewtc-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ewtc-history-head strong,
.ewtc-history-head small {
    display: block;
}

.ewtc-history-head small,
.ewtc-history-head time {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.ewtc-history-list p {
    margin: 10px 0;
    padding: 9px 10px;
    border-radius: 9px;
    background: #f5f3ff;
    color: #5b21b6;
    line-height: 1.45;
}

.ewtc-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ewtc-change-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 18px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 9px;
    background: #ffffff;
    font-size: 12px;
}

.ewtc-change-row > span {
    color: #64748b;
    font-weight: 900;
}

.ewtc-change-row del {
    color: #991b1b;
    text-decoration: none;
}

.ewtc-change-row ins {
    color: #166534;
    font-weight: 800;
    text-decoration: none;
}

.ewtc-change-row i {
    color: #94a3b8;
    text-align: center;
}

.ewtc-inline-empty,
.ewtc-no-change {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.ewtc-load-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 800;
}

.ewtc-modal {
    z-index: 101100;
}

.ewtc-modal-box {
    width: 670px;
    max-width: 95vw;
    max-height: 93vh;
    padding: 0;
    overflow: hidden;
}

.ewtc-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.ewtc-modal-head h2 {
    margin: 0 0 5px;
}

.ewtc-modal-head p {
    margin: 0;
    color: #64748b;
}

.ewtc-modal-head > button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #e2e8f0;
    color: #334155;
    cursor: pointer;
}

.ewtc-modal-body {
    max-height: calc(93vh - 82px);
    overflow: auto;
    padding: 18px 20px;
}

.ewtc-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ewtc-field,
.ewtc-reason-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ewtc-field span,
.ewtc-reason-field span {
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.ewtc-field input,
.ewtc-reason-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
}

.ewtc-field input {
    min-height: 44px;
    padding: 9px 11px;
}

.ewtc-reason-field {
    margin-top: 14px;
}

.ewtc-reason-field textarea {
    min-height: 125px;
    padding: 11px;
    resize: vertical;
}

.ewtc-info-box,
.ewtc-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 11px;
    border-radius: 10px;
    line-height: 1.45;
}

.ewtc-info-box {
    background: #eff6ff;
    color: #1e40af;
}

.ewtc-warning-box {
    background: #fff7ed;
    color: #9a3412;
}

.ewtc-message {
    min-height: 22px;
    margin-top: 8px;
    font-weight: 800;
}

.ewtc-message.loading {
    color: #475569;
}

.ewtc-message.error {
    color: #b91c1c;
}

.ewtc-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 14px;
}

.ewtc-modal-actions button {
    min-height: 43px;
    margin: 0;
    padding: 10px 15px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.ewtc-modal-actions button.secondary {
    background: #e2e8f0;
    color: #334155;
}

.ewtc-modal-actions button:disabled {
    cursor: wait;
    opacity: .65;
}

@media (max-width: 760px) {
    .ewtc-admin-head,
    .ewtc-history-head,
    .ewtc-break-list article {
        align-items: stretch;
        flex-direction: column;
    }

    .ewtc-admin-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ewtc-admin-buttons button,
    .ewtc-break-list button {
        width: 100%;
    }

    .ewtc-change-row {
        grid-template-columns: 1fr;
    }

    .ewtc-change-row i {
        transform: rotate(90deg);
    }

    .ewtc-field-grid {
        grid-template-columns: 1fr;
    }

    .ewtc-modal {
        align-items: flex-end;
        padding: 0;
    }

    .ewtc-modal-box {
        width: 100%;
        max-width: 100vw;
        max-height: 95dvh;
        border-radius: 22px 22px 0 0;
    }

    .ewtc-modal-body {
        max-height: calc(95dvh - 82px);
        padding: 14px;
    }

    .ewtc-modal-actions {
        flex-direction: column-reverse;
    }

    .ewtc-modal-actions button {
        width: 100%;
    }
}
