body{
    margin: 0;
    padding: 0;
}

#twgt-content{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.twgt-content-layout {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    overflow: hidden;
}

.twgt-node-wrapper{
    display: flex;
    flex-direction: column;
}

.twgt-node-content {
    flex-grow: 1;
    position: relative;
    box-sizing: border-box;
}

.twgt-node-main {
    overflow: auto;
    flex-grow: 1 !important;
    max-height: 100%;
}

.twgt-node-header {
    flex-shrink: 0 !important;
}

.twgt-node-left-sidebar {
    flex-shrink: 0 !important;
}

.twgt-node-video {
    aspect-ratio: 16 / 9;
}

.twgt-node-button {
    display: flex !important;
}

.twgt-icon-svg{
    display: flex;
}

.twgt-text {
    margin: 0;
    padding: 0;
}

.twgt-node-radio{
    display: flex;
    align-items: center;
    column-gap: 10px;

    input {
        margin: 0;
    }
}

.twgt-node-navigation{}

.twgt-navigation-item-wrapper{
    position: relative;
}

.twgt-navigation-item {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 1rem;
    cursor: pointer;
    column-gap: 10px;
    box-sizing: border-box;
}

.twgt-navigation-item-wrapper a{
    text-decoration: none;
    color: inherit;
}

.twgt-navigation-label{
    display: flex;
    align-items: center;
}

.twgt-navigation-icon {
    margin-right: 10px;
    display: flex;
}

.twgt-navigation-dropdown {
    position: absolute;
    background-color: white;
    width: 200px;
    border-radius: 5px;
    z-index: 9;
    -webkit-box-shadow: 0 2px 4px rgba(123, 123, 123, .5);
    -moz-box-shadow: 0 2px 4px rgba(123, 123, 123, .5);
    box-shadow: 0 2px 4px rgba(123, 123, 123, .5);
}

.twgt-node-modal {
    z-index: 15;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .32);
    padding: 10px;
}

.twgt-node-drawer {
    z-index: 15;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    background: rgba(0, 0, 0, .32);
}

/* Do not define page theme tokens globally: an unthemed imported page must
   retain its own var(..., fallback) values, just as it does in the editor. */
:root { --twgt-primary: #695cff; --twgt-border: #dce0e8; }
#twgt-content { --twgt-primary: var(--twgt-color-primary, #695cff); --twgt-border: var(--twgt-color-border, #dce0e8); --twgt-text:var(--twgt-color-text,#20314f); --twgt-muted:var(--twgt-color-muted,#64748b); --twgt-surface:var(--twgt-color-surface,#fff); --twgt-danger:var(--twgt-color-danger,#dc3545); }
.twgt-data-table { border-collapse: collapse; width:100%; font:inherit; }
.twgt-data-table th, .twgt-data-table td { padding: .75rem; text-align:left; border-bottom:1px solid var(--twgt-border); }
.twgt-data-table th[tabindex] { cursor:pointer; }
.twgt-table-pagination { display:flex; align-items:center; gap:.75rem; padding-top:.75rem; }
.twgt-table-pagination { flex-wrap:wrap; }
.twgt-table {overflow-x:auto;}
.twgt-table-search {box-sizing:border-box;width:100%;padding:8px 12px;min-height:38px;margin-bottom:12px;border:1px solid var(--twgt-border);border-radius:6px;color:inherit;background:var(--twgt-surface,#fff);font:inherit;}
.twgt-table-pagination button {padding:7px 12px;min-height:34px;border:1px solid var(--twgt-border);border-radius:6px;color:var(--twgt-text,#20314f);background:var(--twgt-surface,#fff);font:inherit;cursor:pointer;}
.twgt-table-pagination button:hover:not(:disabled) {background:#dee2e6;}
.twgt-table-pagination button:disabled {opacity:.5;cursor:default;}
.twgt-table-pagination span {color:var(--twgt-muted,#64748b);font-size:13px;}
.twgt-data-table th input { width:100%; min-width:5rem; box-sizing:border-box; padding:.5rem .65rem; border:1px solid var(--twgt-border); border-radius:.375rem; font:inherit; background:transparent; color:inherit; }
.twgt-field-help, .twgt-form-status { font:inherit; margin-top:.4rem; }
.twgt-form-status[role=alert] { color:#b42318; }
[aria-busy=true] button[type=submit] { pointer-events:none; opacity:.65; }
.twgt-tab-list,.twgt-calendar-controls { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.twgt-tab-list button[aria-selected=true] { color:var(--twgt-primary); border-bottom:2px solid var(--twgt-primary); }
.twgt-calendar-grid { width:100%; table-layout:fixed; border-collapse:collapse; }
.twgt-calendar-grid td,.twgt-calendar-grid th { border:1px solid var(--twgt-border); padding:.4rem; vertical-align:top; }
.twgt-calendar-grid td { min-height:4rem; height:4rem; }
.twgt-calendar-grid [aria-current=date] { background:#efedff; }
.twgt-calendar-event { font-size:.8rem; overflow-wrap:anywhere; }
.twgt-chart-data { margin-top:.75rem; border-collapse:collapse; }
.twgt-chart-data th,.twgt-chart-data td { text-align:left; padding:.25rem .75rem; }
[hidden] { display:none !important; }
.twgt-preset-spinner .twgt-node-content { border-radius:50%; border:3px solid var(--twgt-border); border-top-color:var(--twgt-primary); animation:twgt-spin 1s linear infinite; }
.twgt-preset-skeleton { opacity:.55; }
@keyframes twgt-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .twgt-preset-spinner .twgt-node-content { animation:none; } }
:root { --twgt-feedback-font: var(--twgt-font-family, Arial, sans-serif); }
.twgt-toast-region { position:fixed;right:24px;bottom:24px;z-index:10000;display:grid;gap:10px;width:min(380px,calc(100vw - 32px));font-family:var(--twgt-feedback-font); }
.twgt-toast {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:var(--twgt-surface,#fff);color:var(--twgt-text,#20314f);border:1px solid var(--twgt-border,#dce0e8);border-left:4px solid var(--twgt-primary,#695cff);border-radius:10px;box-shadow:0 4px 20px #0002;overflow-wrap:anywhere;font-size:14px;line-height:1.5;}
.twgt-toast-success {border-left-color:#198754;} .twgt-toast-warning {border-left-color:#d49a13;} .twgt-toast-error {border-left-color:var(--twgt-danger,#dc3545);}
.twgt-toast button {flex-shrink:0;font:inherit;font-size:22px;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:4px;padding:0 6px;}
.twgt-toast button:hover {background:#dee2e6;} .twgt-toast button:focus-visible {outline:2px solid var(--twgt-primary,#695cff);}
.twgt-date-range {display:flex!important;gap:16px;flex-wrap:wrap;width:100%;padding:0!important;border:0!important;background:transparent!important;}
.twgt-date-range label {display:flex;flex:1 1 160px;min-width:0;flex-direction:column;gap:6px;font-size:14px;color:var(--twgt-text,#20314f);}
.twgt-date-range input[type=date] {box-sizing:border-box;width:100%;min-height:40px;padding:8px 12px;border:1px solid var(--twgt-border,#dce0e8);border-radius:6px;background:var(--twgt-surface,#fff);color:inherit;font:inherit;}
.twgt-date-range input:focus-visible {outline:2px solid var(--twgt-primary,#695cff);outline-offset:1px;}
:root .twgt-file-upload { display:grid; gap:10px; padding:12px; margin-top:8px; border:1px solid var(--twgt-border); border-radius:8px; font:inherit; }
.twgt-upload-files { display:grid; gap:8px; }
.twgt-upload-file { display:flex; align-items:center; gap:10px; min-width:0; }
.twgt-upload-file span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.twgt-upload-file img { object-fit:cover; border-radius:6px; }
.twgt-file-upload progress { width:100%; accent-color:var(--twgt-primary); }
.twgt-file-upload button { justify-self:start; padding:6px 12px; border:1px solid var(--twgt-border); border-radius:6px; background:transparent; font:inherit; cursor:pointer; }
.twgt-api-option-search {box-sizing:border-box;width:100%;min-height:38px;padding:8px 12px;margin-bottom:8px;border:1px solid var(--twgt-border,#dce0e8);border-radius:6px;background:var(--twgt-surface,#fff);color:var(--twgt-text,#20314f);font:inherit;}
.twgt-api-option-search:focus-visible {outline:2px solid var(--twgt-primary,#695cff);outline-offset:1px;}
.twgt-api-option-status {font:inherit;font-size:12px;color:var(--twgt-muted,#64748b);margin-top:6px;}
.twgt-node-wrapper > input[type=file] {box-sizing:border-box;width:100%;min-height:42px;border:1px solid var(--twgt-border,#dce0e8);border-radius:6px;background:var(--twgt-surface,#fff);color:var(--twgt-muted,#64748b);font:inherit;}
.twgt-node-wrapper > input[type=file]::file-selector-button {min-height:40px;padding:8px 14px;margin-right:12px;border:0;border-right:1px solid var(--twgt-border,#dce0e8);background:#f4f3ff;color:var(--twgt-primary,#695cff);font:inherit;cursor:pointer;}
.twgt-node-wrapper > input[type=file]::file-selector-button:hover {background:#e8e5ff;}
