.shared-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.shared-page-header h1 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.2;
    color: #122032;
}

.shared-page-header p {
    margin: .35rem 0 0;
    color: #607086;
}

.shared-panel {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 1rem;
    background: #ffffff;
    color: #223247;
}

.shared-loading {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
}

.shared-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d8e0ea;
    border-top-color: #1f6feb;
    border-radius: 50%;
    animation: shared-spin .9s linear infinite;
}

.shared-error {
    border-color: #f0b8b8;
    background: #fff7f7;
    color: #8a1f1f;
    display: grid;
    gap: .25rem;
}

.shared-empty {
    color: #607086;
    display: grid;
    gap: .25rem;
}

.shared-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .18rem .55rem;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
}

.shared-status-success {
    background: #e9f8ef;
    color: #166534;
}

.shared-status-warning {
    background: #fff7e6;
    color: #92400e;
}

.shared-status-danger {
    background: #fff1f2;
    color: #9f1239;
}

.shared-status-neutral {
    background: #eef2f7;
    color: #475569;
}

.shared-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    display: grid;
    place-items: center;
    z-index: 50;
}

.shared-dialog {
    width: min(28rem, calc(100vw - 2rem));
    border-radius: 8px;
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .22);
}

.shared-dialog h2 {
    margin: 0 0 .5rem;
    font-size: 1.15rem;
}

.shared-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    margin-top: 1.25rem;
}

.shared-dialog-actions button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #122032;
    border-radius: 6px;
    padding: .45rem .75rem;
    font-weight: 700;
}

.shared-dialog-actions .danger {
    background: #b42318;
    border-color: #b42318;
    color: #ffffff;
}

@keyframes shared-spin {
    to { transform: rotate(360deg); }
}

.et-command-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
}

.et-command-button {
    min-height: 2.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #122032;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .65rem;
    font-weight: 700;
}

.et-command-button:disabled {
    opacity: .45;
}

.et-command-icon {
    width: 1rem;
    text-align: center;
    font-size: .8rem;
}

.et-dynamic-page {
    display: grid;
    gap: 1rem;
}

.et-dynamic-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.et-dynamic-page__header h1 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
}

.et-dynamic-page__header p {
    margin: .3rem 0 0;
    color: #607086;
}

.et-dynamic-page__body {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 1.25fr);
    gap: 1rem;
    align-items: start;
}

.et-dynamic-page__form,
.et-dynamic-page__grid,
.et-audit-panel {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #ffffff;
    padding: 1rem;
}

.et-dynamic-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.et-dynamic-field {
    display: grid;
    gap: .35rem;
    color: #334155;
    /* font-weight: 700; */
}

.et-dynamic-field input,
.et-dynamic-field select,
.et-dynamic-field textarea,
.et-grid-search {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: .48rem .6rem;
    color: #122032;
    background: #ffffff;
}

.et-dynamic-field textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.et-dynamic-field small {
    color: #607086;
    font-weight: 500;
}

.et-validation-message {
    color: #b42318;
}

.et-input-wrapper {
    position: relative;
    display: grid;
    gap: .32rem;
    color: #10233f;
    font-size: .82rem;
    /* font-weight: 900; */
}

.et-input-wrapper.wide {
    grid-column: 1 / -1;
}

.et-input-wrapper__label {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.et-input-wrapper__label strong {
    color: #b42318;
}

.et-input-wrapper__control {
    position: relative;
    min-width: 0;
}

 

.et-input-wrapper__control > input,
.et-input-wrapper__control > select,
.et-input-wrapper__control > textarea {
    width: 100%;
     height: 1.85rem;
     padding: 0 .35rem;
}

.et-input-wrapper.is-invalid input,
.et-input-wrapper.is-invalid select,
.et-input-wrapper.is-invalid textarea,
.et-lookup-input.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.et-input-wrapper__error-icon,
.et-lookup-error-icon {
    position: absolute;
    inset-inline-end: .65rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    color: #dc2626;
    pointer-events: none;
}

.et-input-wrapper.is-invalid input,
.et-input-wrapper.is-invalid select {
    padding-inline-end: 1rem;
}

.et-field-validation-message {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #b42318;
    font-size: .76rem;
    font-weight: 800;
}

.et-toast-host {
    position: fixed;
    inset-block-start: 1rem;
    inset-inline-end: 1rem;
    z-index: 3000;
    width: min(24rem, calc(100vw - 2rem));
    display: grid;
    gap: .65rem;
    pointer-events: none;
}

.et-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: start;
    border: 1px solid #d8e0ea;
    border-inline-start-width: 4px;
    border-radius: 8px;
    padding: .8rem;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.et-toast > i {
    margin-top: .15rem;
}

.et-toast strong {
    display: block;
    color: #122032;
    font-size: .88rem;
}

.et-toast p {
    margin: .15rem 0 0;
    color: #475569;
    font-size: .82rem;
    font-weight: 650;
}

.et-toast button {
    border: 0;
    background: transparent;
    color: #64748b;
}

.et-toast--success {
    border-inline-start-color: #16a34a;
}

.et-toast--success > i {
    color: #16a34a;
}

.et-toast--error {
    border-inline-start-color: #dc2626;
}

.et-toast--error > i {
    color: #dc2626;
}

.et-toast--warning {
    border-inline-start-color: #f59e0b;
}

.et-toast--warning > i {
    color: #d97706;
}

.et-toast--info {
    border-inline-start-color: #0284c7;
}

.et-toast--info > i {
    color: #0284c7;
}

.et-confirm-backdrop,
.et-alert-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2800;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(4px);
}

.et-confirm-dialog,
.et-alert-dialog {
    width: min(30rem, 100%);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .9rem;
    align-items: start;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.et-confirm-dialog__icon,
.et-alert-dialog__icon {
    inline-size: 2.6rem;
    block-size: 2.6rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fff1f2;
    color: #dc2626;
}

.et-confirm-dialog h2,
.et-alert-dialog h2 {
    margin: 0;
    color: #122032;
    font-size: 1.08rem;
}

.et-confirm-dialog p,
.et-alert-dialog p {
    margin: .3rem 0 0;
    color: #475569;
    font-weight: 650;
}

.et-confirm-dialog__actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: .35rem;
}

.et-confirm-dialog__cancel,
.et-confirm-dialog__confirm,
.et-alert-dialog__button {
    min-height: 2.35rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: .5rem .85rem;
    background: #fff;
    color: #122032;
    font-weight: 850;
}

.et-confirm-dialog__confirm,
.et-alert-dialog__button {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.et-confirm-dialog--warning .et-confirm-dialog__icon,
.et-alert-dialog--warning .et-alert-dialog__icon {
    background: #fff7ed;
    color: #d97706;
}

.et-confirm-dialog--info .et-confirm-dialog__icon,
.et-alert-dialog--info .et-alert-dialog__icon {
    background: #eff6ff;
    color: #0284c7;
}

.et-confirm-dialog--success .et-confirm-dialog__icon,
.et-alert-dialog--success .et-alert-dialog__icon {
    background: #f0fdf4;
    color: #16a34a;
}

.et-span-1 { grid-column: span 1; }
.et-span-2 { grid-column: span 2; }
.et-span-3 { grid-column: span 3; }
.et-span-4 { grid-column: span 4; }

.et-grid-search {
    margin-bottom: .75rem;
}

.et-grid {
    width: 100%;
    border-collapse: collapse;
}

.et-grid th,
.et-grid td {
    border-bottom: 1px solid #e2e8f0;
    padding: .55rem .6rem;
    text-align: left;
    vertical-align: top;
}

.et-grid th {
    color: #475569;
    font-size: .82rem;
    text-transform: uppercase;
}

.et-grid tr.selected {
    background: #eef6ff;
}

.et-grid tbody tr {
    cursor: pointer;
}

.et-audit-panel h2 {
    margin: 0 0 .75rem;
    font-size: 1rem;
}

.et-audit-panel dl {
    display: grid;
    grid-template-columns: minmax(8rem, auto) 1fr;
    gap: .45rem .8rem;
    margin: 0;
}

.et-audit-panel dt {
    color: #607086;
    font-weight: 700;
}

.et-audit-panel dd {
    margin: 0;
    color: #122032;
}

@media (max-width: 900px) {
    .et-dynamic-page__header,
    .et-dynamic-page__body {
        grid-template-columns: 1fr;
    }

    .et-dynamic-page__header {
        display: grid;
    }

    .et-dynamic-form {
        grid-template-columns: 1fr;
    }

    .et-span-1,
    .et-span-2,
    .et-span-3,
    .et-span-4 {
        grid-column: span 1;
    }
}

/* Center popup styling for dynamic page edit panels */
.et-dynamic-drawer--popup {
    justify-content: center !important;
    align-items: center !important;
    padding: 1.5rem !important;
    pointer-events: auto !important;
}

.et-dynamic-drawer__panel--popup {
    width: min(44rem, calc(100vw - 3rem)) !important;
    height: auto !important;
    max-height: min(50rem, calc(100dvh - 3rem)) !important;
    border-radius: 0.75rem !important;
    border: 1px solid var(--et-color-slate-200) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    animation: et-popup-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes et-popup-in {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Center popup styling for split grid forms */
.admin-form--popup {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    z-index: 100 !important;
    width: min(44rem, calc(100vw - 3rem)) !important;
    height: fit-content !important;
    max-height: min(50rem, calc(100dvh - 3rem)) !important;
    background: #fff !important;
    border: 1px solid var(--et-color-slate-200) !important;
    border-radius: 0.75rem !important;
    padding: 1.5rem 2rem 2rem 2rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    animation: et-popup-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-y: auto !important;
}


