/* Manager shell page layout */
.shell-header-tools {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.shell-search { position: relative; }
.shell-auth-button.shell-guide-button { width: auto; padding-inline: 0.65rem; gap: 0.35rem; border-radius: 1.25rem; text-decoration: none; }
.shell-guide-button svg { flex-shrink: 0; }
.shell-guide-label { font-size: 0.85rem; }
.shell-guide-button:focus-visible { outline: 2px solid #4361ee; outline-offset: 3px; }
@media (max-width: 768px) {
    .shell-guide-label { display: none; }
    .shell-auth-button.shell-guide-button { width: 2.35rem; padding: 0; }
}
.shell-search-toggle { list-style: none; box-shadow: none; }
.shell-search-toggle::-webkit-details-marker { display: none; }
.shell-search-toggle:focus-visible { outline: 2px solid #4361ee; outline-offset: 3px; }
.shell-search[open] .shell-search-toggle { background: #edf2ff; color: #324bd1; }
.shell-search-popover {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    width: min(340px, calc(100vw - 2rem));
    padding: 0.8rem;
    border: 1px solid #d7deea;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 0.6rem 1.8rem rgba(15, 23, 42, 0.16);
    color: #14213d;
}
.manager-category-row { margin-bottom: 1.25rem; }
.manager-category-row:not(:has(#DIV_CategoryBox > *)) { display: none; }
.shell-auth-button.shell-support-button {
    width: auto;
    padding-inline: 0.65rem;
    gap: 0.35rem;
    border-radius: 1.25rem;
}
.shell-support-button svg { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }
.shell-support-label { font-size: 0.85rem; }
@media (max-width: 768px) {
    .shell-search { position: static; }
    .shell-search-popover { top: calc(100% + 0.35rem); left: 0.65rem; }
    .shell-support-label { display: none; }
    .shell-auth-button.shell-support-button { width: 2.35rem; padding: 0; }
}

.manager-main {
    max-width: 1200px;
    margin: 1.35rem auto 2rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.78)),
        radial-gradient(circle at 100% 0, rgba(34, 211, 238, 0.08), transparent 22rem);
    box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.manager-search-row {
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    border: 1px solid rgba(67, 97, 238, 0.12);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0.5rem 1.4rem rgba(15, 23, 42, 0.05);
}

.manager-search-box {
    width: 300px;
}

.global-search-modal {
    color: #14213d;
}

.global-search-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #d7deea;
}

.global-search-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.global-search-header p {
    margin: 0.2rem 0 0;
    color: #52637a;
    font-size: 0.92rem;
}

.global-search-context {
    flex: 0 0 auto;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(31, 122, 140, 0.22);
    border-radius: 0.45rem;
    background: rgba(31, 122, 140, 0.08);
    color: #1f5f70;
    font-weight: 700;
    font-size: 0.86rem;
}

.global-search-empty {
    padding: 1.2rem;
    border: 1px dashed #c7d2e5;
    border-radius: 0.6rem;
    color: #52637a;
    background: #f8fbff;
    text-align: center;
}

.global-search-group {
    margin-top: 1rem;
}

.global-search-group h4 {
    margin: 0 0 0.55rem;
    font-size: 0.98rem;
    font-weight: 800;
    color: #274060;
}

.global-search-list {
    display: grid;
    gap: 0.45rem;
}

.global-search-item {
    width: 100%;
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d7deea;
    border-radius: 0.55rem;
    background: #ffffff;
    color: inherit;
    text-align: right;
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.global-search-item:hover {
    transform: translateY(-1px);
    border-color: #4361ee;
    box-shadow: 0 0.55rem 1.2rem rgba(15, 23, 42, 0.08);
}

.global-search-icon {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9f8ff, #eef3ff);
    color: #1f7a8c;
    font-weight: 800;
}

.global-search-text {
    min-width: 0;
}

.global-search-text strong,
.global-search-text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-text strong {
    font-size: 0.98rem;
}

.global-search-text small {
    margin-top: 0.15rem;
    color: #52637a;
}

.global-search-type {
    padding: 0.22rem 0.45rem;
    border-radius: 0.4rem;
    background: #f1f5fb;
    color: #52637a;
    font-size: 0.78rem;
    font-weight: 700;
}

.visual-query-builder {
    width: 100%;
    min-width: 0;
}

.vqb-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
    padding: 0.75rem;
    border: 1px solid #d7deea;
    border-radius: 0.55rem;
    background: #f8fbff;
}

.vqb-toolbar h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #20324d;
}

.vqb-toolbar p {
    margin: 0.25rem 0 0;
    color: #52637a;
    font-size: 0.9rem;
}

.vqb-toolbar-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.vqb-shell {
    height: 34rem;
    min-height: 28rem;
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr) 18rem;
    gap: 0.75rem;
    direction: rtl;
}

.vqb-shell:has(.vqb-table-list.collapsed):has(.vqb-output-panel.collapsed) {
    grid-template-columns: 2.7rem minmax(0, 1fr) 2.7rem;
}

.vqb-shell:has(.vqb-table-list.collapsed):not(:has(.vqb-output-panel.collapsed)) {
    grid-template-columns: 2.7rem minmax(0, 1fr) 18rem;
}

.vqb-shell:has(.vqb-output-panel.collapsed) {
    grid-template-columns: 15rem minmax(0, 1fr) 2.7rem;
}

.vqb-table-list {
    min-width: 0;
    border: 1px solid #c7d2e5;
    border-radius: 0.55rem;
    background: #edf3f9;
    overflow: hidden;
}

.vqb-table-list.collapsed {
    width: 2.7rem;
}

.vqb-table-list-items {
    height: calc(100% - 2.35rem);
    overflow: auto;
    padding: 0.65rem;
    padding-left: 0.25rem;
}

.vqb-table-list.collapsed .vqb-table-list-items {
    display: none;
}

.vqb-table-source {
    margin-bottom: 0.45rem;
    padding: 0.55rem;
    border: 1px solid #c7d2e5;
    border-radius: 0.45rem;
    background: #ffffff;
    cursor: grab;
    box-shadow: 0 0.2rem 0.55rem rgba(15, 23, 42, 0.06);
    touch-action: none;
    user-select: none;
}

.vqb-table-source:active {
    cursor: grabbing;
}

.vqb-table-source b,
.vqb-table-source small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vqb-table-source small {
    margin-top: 0.2rem;
    color: #52637a;
    font-size: 0.78rem;
}

.vqb-workspace-wrap {
    position: relative;
    min-width: 0;
    border: 1px solid #c7d2e5;
    border-radius: 0.55rem;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        #ffffff;
    background-size: 24px 24px;
    overflow: auto;
    isolation: isolate;
}

.vqb-workspace-wrap.vqb-touch-drop-target {
    outline: 2px solid #2563eb;
    outline-offset: -4px;
    background-color: #f8fbff;
}

.vqb-touch-drag-ghost {
    position: fixed;
    z-index: 99999;
    max-width: 14rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #7aa2df;
    border-radius: 0.45rem;
    background: #ffffff;
    color: #20324d;
    font-weight: 800;
    box-shadow: 0 0.55rem 1.35rem rgba(15, 23, 42, 0.22);
    pointer-events: none;
    transform: translate3d(0, 0, 0);
}

.vqb-workspace {
    position: relative;
    width: 1800px;
    min-width: 100%;
    height: 1100px;
    min-height: 100%;
}

.vqb-workspace-empty {
    position: absolute;
    inset: 1rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #69798f;
    border: 1px dashed #c7d2e5;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.66);
    pointer-events: none;
}

.vqb-lines {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 1800px;
    height: 1100px;
    overflow: visible;
    pointer-events: auto;
    display: block;
}

.vqb-join-path {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.18));
    pointer-events: stroke;
    cursor: pointer;
}

.vqb-join-preview-path {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-dasharray: 7 5;
    pointer-events: none;
}

.vqb-join-point {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-width: 2;
    pointer-events: none;
}

.vqb-table-box {
    position: absolute;
    z-index: 4;
    width: 15.5rem;
    border: 1px solid #9fb1cc;
    border-radius: 0.5rem;
    background: #fffaf0;
    box-shadow: 0 0.55rem 1.2rem rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.vqb-table-title {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #c7d2e5;
    background: linear-gradient(180deg, #ffffff, #eaf2ff);
    cursor: move;
    user-select: none;
    touch-action: none;
}

.vqb-table-title strong,
.vqb-table-title small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vqb-table-title strong {
    color: #20324d;
    font-weight: 800;
}

.vqb-table-title small {
    margin-top: 0.15rem;
    color: #52637a;
    font-size: 0.73rem;
    direction: ltr;
    text-align: right;
}

.vqb-column-list {
    max-height: 18rem;
    overflow: auto;
}

.vqb-column {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.55rem;
    border: 0;
    border-bottom: 1px solid rgba(199, 210, 229, 0.85);
    background: transparent;
    color: #20324d;
    text-align: right;
    cursor: crosshair;
    user-select: none;
    touch-action: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body.vqb-dragging-column,
body.vqb-dragging-column * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

body.vqb-dragging-column .vqb-column {
    pointer-events: auto;
}

body.vqb-dragging-column .vqb-column.connecting {
    pointer-events: none;
}

.vqb-column-check {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    cursor: pointer;
}

.vqb-column-check input {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    accent-color: #4361ee;
    touch-action: manipulation;
}

.vqb-column-check input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.vqb-column:hover,
.vqb-column.selected {
    background: #eaf6ff;
}

.vqb-column.selected,
.vqb-column.connecting {
    box-shadow: inset 3px 0 0 #4361ee;
}

.vqb-column.connecting {
    background: #fff7e6;
    outline: 2px solid rgba(245, 158, 11, 0.55);
    outline-offset: -2px;
}

.vqb-column span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.vqb-column em {
    color: #69798f;
    font-style: normal;
    font-size: 0.72rem;
}

.column-setting-section-title {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.35rem 0 0.1rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-right: 4px solid #2563eb;
    border-radius: 0.45rem;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.88));
}

.column-setting-section-title strong {
    color: #20324d;
    font-size: 0.95rem;
    font-weight: 800;
}

.column-setting-section-title span {
    color: #52637a;
    font-size: 0.82rem;
}

.vqb-alias-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.34);
}

.vqb-alias-modal {
    width: min(25rem, 92vw);
    padding: 1rem;
    border: 1px solid #d7deea;
    border-radius: 0.65rem;
    background: #ffffff;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.18);
}

.vqb-alias-modal h4 {
    margin: 0 0 0.8rem;
    color: #20324d;
    font-size: 1rem;
    font-weight: 800;
}

.vqb-alias-modal label {
    display: block;
    margin-bottom: 0.65rem;
    color: #52637a;
    font-size: 0.86rem;
    font-weight: 700;
}

.vqb-alias-modal input {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #c7d2e5;
    border-radius: 0.45rem;
    color: #20324d;
    background: #ffffff;
}

.vqb-alias-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.vqb-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.vqb-preview-grid section {
    min-width: 0;
    border: 1px solid #d7deea;
    border-radius: 0.55rem;
    background: #ffffff;
    overflow: hidden;
}

.vqb-preview-grid h4 {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid #d7deea;
    background: #f8fbff;
    font-size: 0.9rem;
    font-weight: 800;
}

.vqb-preview-grid pre {
    min-height: 7rem;
    max-height: 18rem;
    margin: 0;
    padding: 0.75rem;
    overflow: auto;
    direction: ltr;
    text-align: left;
    color: #20324d;
    background: #ffffff;
    font-size: 0.78rem;
}

.vqb-output-panel {
    min-width: 0;
    border: 1px solid #c7d2e5;
    border-radius: 0.55rem;
    background: #ffffff;
    overflow: hidden;
    transition: width 160ms ease;
}

.vqb-output-panel.collapsed {
    width: 2.7rem;
}

.vqb-side-toggle {
    width: 100%;
    min-height: 2.35rem;
    border: 0;
    border-bottom: 1px solid #d7deea;
    background: linear-gradient(180deg, #f8fbff, #edf3f9);
    color: #20324d;
    font-weight: 800;
    cursor: pointer;
}

.vqb-output-panel.collapsed .vqb-side-toggle,
.vqb-table-list.collapsed .vqb-side-toggle {
    height: 100%;
    writing-mode: vertical-rl;
}

.vqb-output-body {
    height: calc(100% - 2.35rem);
    overflow: auto;
    padding: 0.65rem;
}

.vqb-output-panel.collapsed .vqb-output-body {
    display: none;
}

.vqb-output-body p {
    margin: 0;
    padding: 0.8rem;
    border: 1px dashed #c7d2e5;
    border-radius: 0.45rem;
    color: #69798f;
    background: #f8fbff;
    text-align: center;
    font-size: 0.86rem;
}

.vqb-output-list {
    display: grid;
    gap: 0.55rem;
}

.vqb-output-row {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding: 0.55rem;
    border: 1px solid #d7deea;
    border-radius: 0.45rem;
    background: #f8fbff;
}

.vqb-output-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #52637a;
    font-size: 0.8rem;
    font-weight: 700;
}

.vqb-output-row input {
    width: 100%;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border: 1px solid #c7d2e5;
    border-radius: 0.38rem;
    background: #ffffff;
    color: #20324d;
}

.formula-sql-designer {
    grid-column: 1 / -1;
}

.formula-sql-input {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
    font-family: Consolas, "Courier New", monospace;
}

.formula-designer-modal-box.custom-modal-box {
    width: min(1180px, calc(100vw - 2rem));
    max-width: min(1180px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.formula-designer-modal-box .custom-modal-body {
    padding: 1.25rem;
    overflow: auto;
    max-height: calc(100vh - 3rem);
}

.formula-modal-designer {
    width: 100%;
    min-width: 0;
}

.formula-modal-designer h3 {
    margin-bottom: 0.45rem;
}

.formula-modal-textarea {
    width: 100%;
    min-height: 13rem;
    margin-bottom: 1rem;
    resize: vertical;
}

.formula-modal-tools {
    max-height: 44vh;
    overflow: auto;
    align-items: start;
}

.formula-designer-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.6rem;
    margin-top: -0.35rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem;
    border: 1px solid #d7deea;
    border-radius: 0.5rem;
    background: #f8fbff;
}

.formula-tool-group {
    min-width: 0;
    padding: 0.55rem;
    border: 1px solid #e1e7f1;
    border-radius: 0.5rem;
    background: #ffffff;
}

.formula-tool-group strong {
    display: block;
    margin-bottom: 0.4rem;
    color: #20324d;
    font-size: 0.86rem;
}

.formula-tool-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.formula-tool-buttons .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
}

@media (max-width: 720px) {
    .formula-designer-modal-box.custom-modal-box {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
    }

    .formula-designer-modal-box .custom-modal-body {
        padding: 0.9rem;
    }

    .formula-designer-tools {
        grid-template-columns: 1fr;
    }
}

.shell-auth-area {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.shell-area-combo {
    min-width: 11rem;
}

.shell-area-combo .mb-3 {
    margin-bottom: 0 !important;
}

.shell-auth-button {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(67, 97, 238, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1f3b57;
    cursor: pointer;
    box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.08);
    transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.shell-notification-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
}

.shell-notification-button {
    position: relative;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(31, 122, 140, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1f5f70;
    cursor: pointer;
    box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.08);
    transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.shell-notification-button:hover {
    transform: translateY(-1px);
    border-color: #1f7a8c;
    background: #1f7a8c;
    color: #fff;
}

.shell-notification-svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shell-notification-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0.25rem 0.65rem rgba(220, 53, 69, 0.28);
}

.shell-auth-button:hover {
    transform: translateY(-1px);
    border-color: #4361ee;
    background: #4361ee;
    color: #fff;
}

.shell-auth-button-logout:hover {
    border-color: #dc3545;
    background: #dc3545;
}

.shell-user-menu {
    position: relative;
    flex: 0 0 auto;
}

.shell-auth-button-user:hover,
.shell-user-menu.is-open .shell-auth-button-user {
    border-color: #4361ee;
    background: #4361ee;
    color: #fff;
}

.shell-auth-button-home:hover {
    border-color: #1f7a8c;
    background: #1f7a8c;
    color: #fff;
}

.shell-cart-button {
    position: relative;
}

.shell-cart-button-empty {
    color: #718096;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(113, 128, 150, 0.28);
}

.shell-cart-button-full {
    color: #fff;
    background: #0f9f6e;
    border-color: #0f9f6e;
    box-shadow: 0 0.45rem 1rem rgba(15, 159, 110, 0.24);
}

.shell-cart-button-full:hover {
    background: #0b7f59;
    border-color: #0b7f59;
}

.shell-cart-button-full .shell-cart-svg path:first-child {
    fill: rgba(255, 255, 255, 0.22);
}

.shell-cart-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.26rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
}

.shell-user-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    min-width: 11rem;
    display: none;
    padding: 0.35rem;
    border: 1px solid rgba(67, 97, 238, 0.18);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0.85rem 2rem rgba(15, 23, 42, 0.14);
    z-index: 3000;
}

.shell-user-menu.is-open .shell-user-dropdown {
    display: grid;
    gap: 0.25rem;
}

.shell-user-dropdown::before {
    content: "";
    position: absolute;
    top: -0.38rem;
    left: 0.9rem;
    width: 0.75rem;
    height: 0.75rem;
    transform: rotate(45deg);
    border-top: 1px solid rgba(67, 97, 238, 0.18);
    border-right: 1px solid rgba(67, 97, 238, 0.18);
    background: rgba(255, 255, 255, 0.98);
}

.shell-user-dropdown-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    direction: rtl;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: #1f3b57;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
}

.shell-user-dropdown-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shell-user-dropdown-item:hover {
    background: rgba(67, 97, 238, 0.09);
    color: #2447c7;
}

.shell-user-dropdown-danger {
    color: #b42318;
}

.shell-user-dropdown-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.shell-auth-svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shell-auth-avatar,
.user-avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.user-avatar-preview {
    width: 5.5rem;
    height: 5.5rem;
    border: 2px solid rgba(67, 97, 238, 0.18);
    box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.08);
}

.user-message-detail {
    color: #1f2d3d;
    direction: rtl;
}

.user-message-detail h3 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.user-message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    color: #52637a;
    font-size: 0.88rem;
}

.user-message-meta span {
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    background: #f1f5fb;
}

.user-message-body {
    padding: 0.9rem;
    border: 1px solid #d7deea;
    border-radius: 0.55rem;
    background: #ffffff;
    line-height: 1.9;
    white-space: normal;
}

#DIV_CategoryBox {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem;
}

#DIV_CategoryBox .btn {
    font-family: var(--font-action);
    min-height: 2rem;
    padding: 0.34rem 0.68rem;
    border-radius: 0.38rem;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#DIV_CategoryBox .btn-outline-secondary {
    color: #274060;
    background: #ffffff;
    border-color: #c7d2e5;
}

#DIV_CategoryBox .btn-outline-secondary:hover {
    color: #ffffff;
    background: #4361ee;
    border-color: #4361ee;
}

#DIV_CategoryBox .product-designer-route-panel {
    width: min(100%, 42rem);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

#DIV_CategoryBox .product-designer-route-panel .mb-3 {
    margin: 0 !important;
    flex: 0 1 18rem;
}

#DIV_CategoryBox .product-designer-route-panel .input-group {
    width: 100%;
}

#DIV_CategoryBox .product-designer-route-panel .form-select {
    min-width: 16rem;
    max-width: 20rem;
}

#DIV_CategoryBox .product-designer-route-title {
    flex: 0 0 auto;
    color: #274060;
    font-family: var(--font-action);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

#DIV_CategoryBox .product-designer-route-product {
    flex: 0 0 auto;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f5132;
    background: #eaf7ef;
    border: 1px solid #bfe8cd;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-action);
    font-size: 0.85rem;
    font-weight: 700;
}

#DIV_CategoryBox .product-designer-validation-btn {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0f7a4f;
    border-color: #bfe8cd;
    background: #ffffff;
}

#DIV_CategoryBox .product-designer-validation-btn:hover {
    color: #ffffff;
    background: #0f9f6e;
    border-color: #0f9f6e;
}

#DIV_CategoryBox .product-designer-shortcut-btn {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #315b8f;
    border-color: #c7d2e5;
    background: #ffffff;
}

#DIV_CategoryBox .product-designer-shortcut-btn:hover {
    color: #ffffff;
    background: #4361ee;
    border-color: #4361ee;
}

.product-designer-validation-svg,
.product-designer-shortcut-svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-validation-summary-modal {
    direction: rtl;
    color: #1f2d3d;
}

.product-validation-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-validation-summary-head h3 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    font-weight: 850;
}

.product-validation-summary-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.product-validation-summary-total {
    flex: 0 0 auto;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 850;
}

.product-validation-summary-total.is-error {
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffc9c2;
}

.product-validation-summary-total.is-warning {
    color: #8a4b00;
    background: #fff7df;
    border: 1px solid #ffd98a;
}

.product-validation-summary-total.is-ok {
    color: #0f7a4f;
    background: #eaf7ef;
    border: 1px solid #bfe8cd;
}

.product-validation-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.product-validation-summary-card {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.product-validation-summary-card span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 750;
}

.product-validation-summary-card strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.4rem;
    line-height: 1;
}

.product-validation-summary-card.is-error strong {
    color: #dc3545;
}

.product-validation-summary-card.is-warning strong {
    color: #b7791f;
}

.product-validation-summary-card.is-ok strong {
    color: #0f9f6e;
}

.product-validation-summary-list {
    display: grid;
    gap: 0.55rem;
    max-height: 46vh;
    overflow: auto;
    padding-left: 0.15rem;
}

.product-validation-summary-row {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.product-validation-summary-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.product-validation-summary-row strong,
.product-validation-summary-row small {
    display: block;
}

.product-validation-summary-row small {
    margin-top: 0.25rem;
    color: #64748b;
    line-height: 1.8;
}

.product-validation-summary-row.is-error {
    border-color: #ffd5d1;
}

.product-validation-summary-row.is-error .product-validation-summary-icon {
    color: #b42318;
    background: #fff1f0;
}

.product-validation-summary-row.is-warning {
    border-color: #ffe1a6;
}

.product-validation-summary-row.is-warning .product-validation-summary-icon {
    color: #8a4b00;
    background: #fff7df;
}

.product-validation-summary-row.is-ok {
    border-color: #bfe8cd;
}

.product-validation-summary-row.is-ok .product-validation-summary-icon {
    color: #0f7a4f;
    background: #eaf7ef;
}

.product-validation-summary-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.manager-products-placeholder {
    justify-content: space-between;
    min-height: 12rem;
    padding: 0.25rem;
}

.manager-hero-action {
    margin-top: 1rem;
}

.manager-footer {
    padding: 2rem 0;
    margin-top: 3rem;
}

.manager-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.manager-footer-about {
    width: 300px;
}

.manager-footer-line {
    max-width: 1200px;
    margin: 2rem auto;
}

.manager-footer-copy {
    margin-bottom: 0;
}

.dbai-file-upload-control {
    min-width: 0;
}

.dbai-file-upload-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.dbai-file-upload-row input[type="file"] {
    min-width: 0;
}

.dbai-file-icon {
    width: 2.65rem;
    min-width: 2.65rem;
    min-height: 2.35rem;
    border: 1px solid #c7d2e5;
    border-radius: 0.45rem;
    background: #f8fafc;
    color: #64748b;
    font-family: var(--font-action);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.dbai-file-icon span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dbai-file-has-file {
    cursor: pointer;
    color: #ffffff;
    border-color: #1f7a8c;
    background: #1f7a8c;
}

.dbai-file-has-file:hover {
    transform: translateY(-1px);
    border-color: #174ea6;
    background: #174ea6;
}

.dbai-file-pdf { background: #b91c1c; border-color: #b91c1c; }
.dbai-file-image { background: #0f766e; border-color: #0f766e; }
.dbai-file-excel { background: #15803d; border-color: #15803d; }
.dbai-file-word { background: #1d4ed8; border-color: #1d4ed8; }
.dbai-file-powerpoint { background: #c2410c; border-color: #c2410c; }
.dbai-file-visio { background: #2563eb; border-color: #2563eb; }
.dbai-file-publisher { background: #047857; border-color: #047857; }
.dbai-file-onenote { background: #6d28d9; border-color: #6d28d9; }
.dbai-file-outlook { background: #0ea5e9; border-color: #0ea5e9; }
.dbai-file-project { background: #166534; border-color: #166534; }
.dbai-file-archive { background: #92400e; border-color: #92400e; }
.dbai-file-sql { background: #4f46e5; border-color: #4f46e5; }
.dbai-file-text { background: #475569; border-color: #475569; }
.dbai-file-print { background: #7c3aed; border-color: #7c3aed; }
.dbai-file-setup { background: #0f172a; border-color: #0f172a; }
.dbai-file-license { background: #0e7490; border-color: #0e7490; }
.dbai-file-activation { background: #0369a1; border-color: #0369a1; }
.dbai-file-hardware { background: #64748b; border-color: #64748b; }
.dbai-file-file { background: #334155; border-color: #334155; }

.manager-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.manager-footer-revisions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.manager-revision-link,
.manager-revision-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.2rem 0.65rem;
    border: 1px solid #c7d2e5;
    border-radius: 999px;
    color: #274060;
    background: #ffffff;
    font-family: var(--font-action);
    font-weight: 700;
}

.manager-revision-link {
    cursor: pointer;
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.manager-revision-link:hover {
    color: #ffffff;
    background: #1f7a8c;
    border-color: #1f7a8c;
}

.app-revision-history {
    direction: rtl;
    padding: 0.75rem;
}

.app-revision-history h3 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
}

.app-revision-item {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid #d7deea;
    border-radius: 0.5rem;
    background: #ffffff;
}

.app-revision-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: #1f2a44;
}

.app-revision-item-head span {
    color: #64748b;
    font-size: 0.85rem;
}

.app-revision-item ul {
    margin: 0.65rem 1rem 0 0;
    color: #334155;
}

.tab-control {
    width: 100%;
}

.tab-control-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #d7deea;
}

.tab-control-button {
    min-height: 2.25rem;
    padding: 4px;
    border: 1px solid #c7d2e5;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    color: #274060;
    background: #ffffff;
    font-family: var(--font-action);
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.tab-control-button:hover {
    color: #ffffff;
    background: #4361ee;
    border-color: #4361ee;
}

.tab-control-button.active {
    color: #ffffff;
    background: #1f7a8c;
    border-color: #1f7a8c;
    box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.35);
}

.tab-control-content {
    min-width: 0;
}

.tab-control-pane {
    min-width: 0;
}

.product-column-parent-node {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.35rem;
    border: 1px solid #c7d2e5;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-column-tree-node {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-inline-start: calc(var(--tree-level, 0) * 1.35rem);
    min-width: 14rem;
}

.product-column-tree-toggle {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c7d2e5;
    border-radius: 0.3rem;
    color: #274060;
    background: #ffffff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.product-column-tree-toggle:empty {
    border-color: transparent;
    background: transparent;
    cursor: default;
}

.product-column-tree-branch {
    width: 0.75rem;
    height: 1px;
    background: #c7d2e5;
    flex: 0 0 auto;
}

.product-column-tree-title {
    font-weight: 700;
    color: #1f2a44;
}

.product-column-child-row .product-column-tree-title {
    font-weight: 600;
}

.product-column-parent-filled {
    color: #174ea6;
    background: #eaf2ff;
}

.product-column-parent-empty {
    color: #64748b;
    background: #f8fafc;
}

.product-column-draggable-row {
    cursor: grab;
}

.product-column-draggable-row.product-column-dragging {
    opacity: 0.55;
}

.product-column-draggable-row.product-column-drop-target {
    outline: 2px dashed #1f7a8c;
    outline-offset: -4px;
    background: rgba(31, 122, 140, 0.08);
}

.product-table-draggable-row {
    cursor: grab;
}

.product-table-draggable-row.product-table-dragging {
    opacity: 0.55;
}

.product-table-draggable-row.product-table-drop-target {
    outline: 2px dashed #1f7a8c;
    outline-offset: -4px;
    background: rgba(31, 122, 140, 0.08);
}

.product-sale-image-link {
    display: inline-flex;
    width: 96px;
    height: 64px;
    border: 1px solid #d6e0ef;
    border-radius: 0.45rem;
    overflow: hidden;
    background: #f8fafc;
    align-items: center;
    justify-content: center;
}

.product-sale-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-sale-image-empty {
    display: inline-flex;
    min-width: 96px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #c7d2e5;
    border-radius: 0.45rem;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.82rem;
}

.checkout-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 18px;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #526173;
    border-radius: 8px;
}

.checkout-step span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    font-weight: 800;
}

.checkout-step strong {
    font-size: .9rem;
}

.checkout-step.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.checkout-step.active span {
    background: #2563eb;
    color: #fff;
}

.checkout-step.done {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #166534;
}

.checkout-step.done span {
    background: #22c55e;
    color: #fff;
}

.checkout-product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-product-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
}

.checkout-product-image {
    width: 128px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f7;
}

.checkout-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.checkout-product-body h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.checkout-product-body p {
    margin: 0 0 10px;
    color: #475569;
    line-height: 1.8;
}

.checkout-product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #475569;
    font-size: .9rem;
    margin-bottom: 10px;
}

.checkout-product-meta strong {
    color: #0f172a;
}

.checkout-gift-badge {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 3px 9px;
}

.checkout-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkout-contract-preview {
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    line-height: 2;
    font-size: .94rem;
    white-space: normal;
}

.checkout-contract-frame {
    width: 100%;
    min-height: 620px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    display: block;
}

@media (max-width: 768px) {
    .checkout-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkout-product-card {
        grid-template-columns: 1fr;
    }

    .checkout-product-image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .manager-main {
        margin-top: 0.85rem;
        padding: 0.75rem;
        border-radius: 0.55rem;
    }

    .manager-search-row {
        align-items: stretch !important;
        padding: 0.55rem;
    }

    .manager-search-box {
        width: 100%;
    }

    .tab-control-button {
        flex: 1 1 auto;
        padding-inline: 0.65rem;
    }
}
