:root {
    --bg: #16181d;
    --bg-soft: #1d2129;
    --panel: #212838;
    --panel-soft: #2a3243;
    --panel-muted: #323c51;
    --line: #334056;
    --text: #f2f5fb;
    --muted: #96a2b8;
    --purple: #8d36ff;
    --purple-strong: #b33cff;
    --green: #4dd18c;
    --danger: #ff7474;
    --shadow: 0 28px 48px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(137, 54, 255, 0.16), transparent 22%),
        radial-gradient(circle at bottom left, rgba(38, 52, 78, 0.75), transparent 30%),
        #17191f;
}

.login-shell[hidden],
.app-shell[hidden],
.toast[hidden],
.dialog-backdrop[hidden],
.history-pagination[hidden],
.workspace-grid[hidden],
.analysis-panel[hidden],
.analysis-panel-content[hidden] {
    display: none !important;
}

.mode-tabs[hidden],
.nav-item[hidden],
.module-panel[hidden],
.shop-info-panel[hidden],
.user-management-panel[hidden],
.menu-model-panel[hidden],
.studio-prompt-panel[hidden],
.password-panel[hidden] {
    display: none !important;
}

.login-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
    overflow: hidden;
}

.login-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(67, 203, 255, 0.18), transparent 24%),
        radial-gradient(circle at 78% 22%, rgba(139, 92, 246, 0.22), transparent 26%),
        radial-gradient(circle at 50% 85%, rgba(34, 211, 238, 0.14), transparent 28%);
    filter: saturate(120%);
}

.login-panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 34px 32px;
    border: 1px solid rgba(104, 133, 184, 0.34);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(19, 27, 44, 0.96), rgba(15, 20, 33, 0.94));
    box-shadow:
        0 0 0 1px rgba(97, 155, 255, 0.08),
        0 30px 60px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #8fdcff;
    background: rgba(38, 103, 185, 0.18);
    box-shadow: inset 0 0 0 1px rgba(74, 187, 255, 0.24);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
}

.login-panel h1 {
    margin: 18px 0 10px;
    font-size: 2.2rem;
    letter-spacing: -0.04em;
}

.login-panel p {
    margin: 0 0 22px;
    color: #92a0bc;
    line-height: 1.7;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-label {
    font-size: 0.96rem;
    color: #d6def1;
}

.login-input {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(92, 118, 166, 0.3);
    border-radius: 14px;
    color: var(--text);
    background: rgba(42, 51, 71, 0.88);
    outline: none;
}

.login-input:focus {
    border-color: rgba(104, 183, 255, 0.58);
    box-shadow: 0 0 0 3px rgba(68, 158, 255, 0.14);
}

.login-remember-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    min-height: 36px;
    color: #dce2f4;
    cursor: pointer;
}

.login-remember-row input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #32c5ff;
}

.login-error {
    margin: 2px 0 0;
    min-height: 24px;
    color: #ff9696;
}

.login-submit {
    margin-top: 8px;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    color: white;
    background:
        linear-gradient(90deg, #1677ff, #32c5ff 58%, #8a5cff);
    box-shadow: 0 14px 28px rgba(29, 114, 255, 0.24);
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
textarea,
input {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
}

.app-shell.is-sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100vh;
    padding: 18px 10px;
    overflow-y: auto;
    background: rgba(12, 13, 17, 0.84);
    border-right: 1px solid rgba(78, 92, 122, 0.24);
}

.brand {
    padding: 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.08em;
}

.brand span {
    color: #f4a542;
}

.app-shell.is-sidebar-collapsed .brand {
    font-size: 1.2rem;
    letter-spacing: 0;
}

.app-shell.is-sidebar-collapsed .brand span,
.app-shell.is-sidebar-collapsed .sidebar-label,
.app-shell.is-sidebar-collapsed .nav-text {
    display: none;
}

.app-shell.is-sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0;
}

.app-shell.is-sidebar-collapsed .nav-icon {
    margin: 0;
}

.sidebar-nav,
.sidebar-section {
    display: grid;
    gap: 8px;
}

.sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.sidebar-label {
    margin: 0 0 6px;
    font-size: 0.9rem;
    color: #68758f;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    color: #c1cade;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.nav-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    color: currentColor;
}

.nav-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item.is-active {
    color: #f4d8ff;
    background: linear-gradient(90deg, rgba(141, 54, 255, 0.22), rgba(141, 54, 255, 0.08));
    box-shadow: inset 0 0 0 1px rgba(168, 92, 255, 0.18);
}

.logout-button {
    color: #ffc1c1;
    background: rgba(255, 116, 116, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 116, 116, 0.14);
}

.logout-button:hover {
    color: #ffffff;
    background: rgba(255, 116, 116, 0.16);
}

.workspace {
    padding: 24px 24px 22px;
    min-width: 0;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.workspace-header h1 {
    margin: 0;
    font-size: 2.3rem;
    letter-spacing: -0.04em;
}

.workspace-header p {
    margin: 10px 0 0;
    color: var(--muted);
}

.workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mode-tabs {
    display: inline-flex;
    gap: 10px;
    margin-top: 18px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(31, 38, 54, 0.82);
    border: 1px solid rgba(92, 108, 139, 0.24);
}

.mode-tab {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.mode-tab.is-active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(141, 54, 255, 0.26), rgba(85, 174, 255, 0.18));
    box-shadow: inset 0 0 0 1px rgba(145, 181, 255, 0.22);
}

.sidebar-toggle {
    color: #dce2f4;
    background: rgba(63, 73, 99, 0.72);
    box-shadow: inset 0 0 0 1px rgba(145, 181, 255, 0.16);
}

.sidebar-toggle:hover {
    background: rgba(84, 98, 131, 0.86);
}

.app-shell.is-sidebar-collapsed .sidebar-toggle .nav-icon svg {
    transform: scaleX(-1);
}

.status-pill {
    min-width: 120px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(63, 73, 99, 0.72);
    color: #d9def1;
    text-align: center;
}

.app-shell.is-shop-info-view {
    background: #f3f5fb;
}

.app-shell.is-shop-info-view .workspace {
    padding: 10px 0 0;
    background: #fff;
}

.app-shell.is-shop-info-view .workspace-header {
    display: none;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(560px, 0.9fr) minmax(560px, 1.1fr);
    gap: 28px;
    align-items: start;
}

.panel {
    background: linear-gradient(180deg, rgba(34, 43, 60, 0.98), rgba(28, 35, 49, 0.98));
    border: 1px solid rgba(80, 95, 125, 0.34);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.compose-panel {
    padding: 28px;
}

.records-panel {
    padding: 22px;
    min-height: calc(100vh - 116px);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

.module-panel,
.user-management-panel,
.password-panel,
.menu-model-panel,
.studio-prompt-panel {
    padding: 28px;
}

.module-workspace-panel {
    overflow: hidden;
    margin-top: 22px;
    color: #eef3ff;
    background: #202838;
    border: 1px solid rgba(92, 108, 139, 0.34);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
}

.module-analysis-panel {
    margin-bottom: 22px;
    padding: 28px;
    color: #eef3ff;
    background: #202838;
    border: 1px solid rgba(92, 108, 139, 0.34);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
}

.analysis-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 26px;
    border-bottom: 1px solid rgba(120, 138, 171, 0.26);
}

.analysis-module-header h2 {
    margin: 0;
    color: #f7f9ff;
    font-size: 1.8rem;
    font-weight: 700;
}

.analysis-collapse-button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #aebbd1;
    background: transparent;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.analysis-collapse-button:hover,
.analysis-collapse-button:focus-visible {
    color: #eef3ff;
    background: rgba(128, 144, 174, 0.14);
    border-color: rgba(128, 144, 174, 0.28);
    outline: none;
}

.analysis-collapse-icon {
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.18s ease;
}

.module-analysis-panel.is-analysis-collapsed .analysis-module-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom-color: transparent;
}

.module-analysis-panel.is-analysis-collapsed .analysis-collapse-icon {
    transform: rotate(-90deg);
}

.analysis-switch-bar {
    width: auto;
    margin: 0;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    justify-content: center;
    gap: 12px;
}

.analysis-switch-bar .mode-tab {
    min-width: 230px;
    min-height: 64px;
    padding: 0 22px;
    border-radius: 999px;
    color: #aebbd1;
    background: #354052;
    border: 1px solid rgba(128, 144, 174, 0.34);
    font-size: 1.02rem;
    font-weight: 500;
}

.analysis-switch-bar .mode-tab.is-active {
    color: white;
    background: #5772d8;
    border-color: #6780df;
    box-shadow: none;
}

.analysis-panel-content {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.analysis-two-col-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    min-height: 440px;
}

.analysis-left,
.analysis-right {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    padding: 20px;
    border-radius: 20px;
    background: #1e2534;
    border: 1px solid rgba(128, 144, 174, 0.22);
    box-shadow: none;
}

.section-title {
    margin: 0 0 14px;
    padding-left: 0;
    border-left: 0;
    color: #f7f9ff;
    font-size: 1.02rem;
    font-weight: 700;
}

.img-upload-area,
.result-prompt-box {
    padding: 16px;
    border-radius: 18px;
    background: #3e485b;
    border: 1px solid rgba(128, 144, 174, 0.34);
}

.img-upload-area {
    display: grid;
    gap: 12px;
    align-content: center;
    min-height: 210px;
}

.analysis-upload-dropzone {
    min-height: 156px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 18px;
    border: 1px dashed rgba(154, 169, 199, 0.62);
    border-radius: 16px;
    color: #dbe4f8;
    background:
        linear-gradient(180deg, rgba(62, 72, 91, 0.88), rgba(54, 64, 84, 0.88));
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.analysis-upload-dropzone:hover {
    border-color: rgba(172, 188, 222, 0.9);
    background:
        linear-gradient(180deg, rgba(70, 82, 104, 0.96), rgba(58, 70, 92, 0.96));
    transform: translateY(-1px);
}

.analysis-upload-dropzone input {
    display: none;
}

.result-prompt-box {
    display: flex;
    flex: 1;
    min-height: 0;
}

.result-prompt-box textarea {
    flex: 1;
    min-height: 280px;
}

.preselect-dropdown {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(128, 144, 174, 0.34);
    border-radius: 12px;
    color: #eef3ff;
    background: #3e485b;
}

.analyze-action-btn,
.btn-add-library {
    width: 100%;
    min-height: 54px;
    margin-top: 14px;
    border: 0;
    border-radius: 999px;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.analyze-action-btn {
    min-width: 100%;
    min-height: 54px;
    padding: 0 20px;
    background: #5772d8;
}

.btn-add-library {
    min-width: 100%;
    min-height: 54px;
    padding: 0 20px;
    background: #5772d8;
}

.helper-note {
    margin-top: 10px;
    color: #aab7cf;
    font-size: 0.86rem;
    line-height: 1.6;
}

.preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(128, 144, 174, 0.38);
}

.module-workspace-heading h2 {
    margin-bottom: 8px;
    color: #f7f9ff;
}

.module-workspace-heading .placeholder-copy {
    color: #aab7cf;
}

.module-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    min-height: 520px;
}

.module-workspace-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 520px;
}

.module-subpanel {
    padding: 22px;
    border-radius: 18px;
    background: #202838;
    border: 1px solid rgba(120, 138, 171, 0.22);
    box-shadow: none;
}

.module-workspace-col > .module-subpanel:last-child {
    flex: 1;
}

.module-workspace-col > .module-subpanel:last-child,
.module-preview-panel {
    display: flex;
    flex-direction: column;
}

.module-subpanel-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.module-subpanel-heading h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #f7f9ff;
}

.module-subpanel-heading p {
    margin: 6px 0 0;
    color: #aab7cf;
    line-height: 1.6;
}

.module-field-group {
    margin-bottom: 18px;
}

.module-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin-bottom: 18px;
}

.module-choice-grid {
    margin-top: 10px;
}

.module-select,
.module-textarea,
.module-input {
    width: 100%;
}

.module-select {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(128, 144, 174, 0.34);
    border-radius: 14px;
    color: #eef3ff;
    background: #3e485b;
    outline: none;
}

.module-textarea {
    min-height: 175px;
    resize: vertical;
    padding: 18px 18px 16px;
    border: 1px solid rgba(128, 144, 174, 0.34);
    border-radius: 18px;
    color: #eef3ff;
    background: #3e485b;
    outline: none;
}

.module-select:focus,
.module-textarea:focus,
.module-input:focus,
.preselect-dropdown:focus,
.result-prompt-box textarea:focus {
    border-color: #9a4bff;
    box-shadow: 0 0 0 3px rgba(141, 54, 255, 0.18);
    background: #445066;
}

.module-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}

.module-action-bar--right {
    justify-content: flex-end;
    align-items: center;
}

.module-action-bar--inline {
    margin-top: 8px;
}

.module-action-bar .generate-button,
.module-action-bar .secondary-button,
.module-action-bar .toolbar-button {
    width: auto;
    min-height: 46px;
    padding: 0 16px;
}

.module-primary-button {
    min-width: 120px;
}

.module-preview-panel {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    position: sticky;
    top: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(247, 249, 255, 0.05), rgba(247, 249, 255, 0)),
        #202838;
}

.module-workspace-col > .module-preview-panel {
    flex: 0 0 auto;
}

.module-canvas-wrap {
    display: grid;
    width: 100%;
    min-height: 420px;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 14%, rgba(112, 88, 214, 0.20), transparent 28%),
        radial-gradient(circle at 85% 85%, rgba(42, 184, 166, 0.12), transparent 34%),
        linear-gradient(135deg, #242d3e 0%, #1d2636 52%, #18202d 100%);
    border: 1px solid rgba(128, 144, 174, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 38px rgba(8, 12, 22, 0.24);
}

.module-result-grid {
    display: grid;
    width: 100%;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
}

.module-result-grid[hidden] {
    display: none !important;
}

.module-result-state {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 24px;
    border-radius: 16px;
    color: #c7d2ea;
    background:
        linear-gradient(135deg, rgba(43, 52, 70, 0.92), rgba(30, 38, 54, 0.86)),
        #1e2534;
    border: 1px solid rgba(128, 144, 174, 0.28);
    text-align: center;
}

.module-result-state strong {
    color: #f7f9ff;
    font-size: 1.25rem;
}

.module-result-state p {
    margin: 8px 0 0;
    color: #aab7cf;
}

.module-result-item {
    position: relative;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 10px;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(24, 31, 44, 0.88);
    border: 1px solid rgba(128, 144, 174, 0.24);
    box-shadow: 0 14px 32px rgba(8, 12, 22, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-result-grid .record-meta:first-child {
    margin-top: 0;
}

.module-result-grid .record-image-wrap,
.module-result-grid .record-generated-item {
    margin-top: 10px;
}

.module-result-item:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 93, 235, 0.42);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.22);
}

.module-result-item img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 560px;
    object-fit: contain;
    border-radius: 12px;
    background:
        linear-gradient(45deg, rgba(128, 144, 174, 0.10) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(128, 144, 174, 0.10) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(128, 144, 174, 0.10) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(128, 144, 174, 0.10) 75%),
        #141b28;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
}

.module-result-item figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 28px;
    color: #c3cee3;
    font-size: 0.82rem;
}

.module-result-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #d8ccff;
    background: rgba(129, 93, 235, 0.18);
    font-weight: 700;
}

#moduleCanvas,
#modulePersonalPreviewCanvas {
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: #1b2332;
}

.module-slot-list {
    display: grid;
    gap: 18px;
}

.module-slot-row {
    display: grid;
    gap: 10px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.module-slot-label {
    color: #eef3ff;
    font-size: 0.92rem;
    font-weight: 600;
}

.module-slot-label-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 28px;
}

.module-bg-save-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #c8d3ea;
    font-size: 0.82rem;
    cursor: pointer;
    user-select: none;
}

.module-bg-save-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #5772d8;
}

.module-bg-save-toggle input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.module-bg-save-toggle:has(input:disabled) {
    color: #8b97ad;
    cursor: default;
}

.module-slot-right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.module-slot-add {
    width: 180px;
    height: 150px;
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed rgba(154, 169, 199, 0.62);
    color: #dbe4f8;
    background:
        linear-gradient(180deg, rgba(62, 72, 91, 0.88), rgba(54, 64, 84, 0.88));
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.module-slot-add:hover {
    border-color: rgba(172, 188, 222, 0.9);
    background:
        linear-gradient(180deg, rgba(70, 82, 104, 0.96), rgba(58, 70, 92, 0.96));
    transform: translateY(-1px);
}

.module-slot-add input {
    display: none;
}

.module-slot-upload-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(87, 114, 216, 0.34);
    font-size: 1.35rem;
}

.module-slot-upload-title {
    color: #f7f9ff;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.35;
}

.module-slot-upload-note {
    color: #aab7cf;
    font-size: 0.78rem;
    line-height: 1.45;
}

.module-thumb-wrap {
    position: relative;
    flex: 0 0 150px;
    width: 150px;
}

.module-thumb-wrap img {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(128, 144, 174, 0.38);
    cursor: zoom-in;
}

.module-thumb-del {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: #ef4444;
    cursor: pointer;
}

.module-personal-dialog {
    width: min(900px, 100%);
    max-height: min(86vh, 880px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.26);
}

.module-personal-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 28px;
    border-bottom: 1px solid #eeeeee;
    background: #ffffff;
}

.module-personal-header h2 {
    margin: 0;
    color: #4069e0;
    font-size: 1.15rem;
}

.module-personal-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: #666666;
    background: #f0f0f0;
    font-size: 1.2rem;
    cursor: pointer;
}

.module-personal-body {
    overflow-y: auto;
    padding: 24px 28px;
}

.module-dialog-section {
    margin-bottom: 22px;
}

.module-dialog-section--flush {
    margin-bottom: 0;
}

.module-dialog-section-title {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4069e0;
    color: #1e2a3e;
    font-size: 0.9rem;
    font-weight: 700;
}

.module-dialog-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #4069e0;
    background: #eef2ff;
    font-size: 0.72rem;
    font-weight: 500;
}

.module-dialog-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.module-dialog-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.module-dialog-field {
    margin-bottom: 14px;
}

.module-dialog-field label {
    display: block;
    margin-bottom: 6px;
    color: #4a627a;
    font-size: 0.8rem;
    font-weight: 600;
}

.module-dialog-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    min-height: 42px;
    color: #4a627a;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.module-dialog-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #4069e0;
}

.required-mark {
    color: #ef4444;
}

.module-dialog-input,
.module-dialog-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    color: #1e2a3e;
    background: #f9f9f9;
    outline: none;
}

.module-dialog-textarea {
    resize: vertical;
}

.module-dialog-textarea--prompt {
    min-height: 110px;
    font-family: ui-monospace, Consolas, monospace;
}

.module-dialog-textarea--desc {
    min-height: 80px;
}

.module-dialog-input:focus,
.module-dialog-textarea:focus {
    border-color: #4069e0;
    box-shadow: 0 0 0 3px rgba(64, 105, 224, 0.12);
    background: #ffffff;
}

.module-dialog-hint,
.module-preview-tip,
.module-preview-label {
    margin: 6px 0 0;
    color: #9ca3af;
    font-size: 0.75rem;
}

.module-material-categories {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.module-material-category {
    padding: 14px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #f9fafb;
}

.module-material-category.is-empty {
    opacity: 0.58;
}

.module-material-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.module-material-category-rules {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    align-self: center;
}

.module-material-rule-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #d7def1;
    border-radius: 999px;
    color: #4069e0;
    background: #f4f7ff;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.module-material-hint-block {
    display: grid;
    grid-template-rows: auto minmax(88px, auto);
    gap: 6px;
    min-width: 0;
    flex: 1 1 360px;
    align-self: start;
    margin-top: -14px;
}

.module-material-hint-label {
    display: block;
    color: #4a627a;
    font-size: 0.78rem;
    font-weight: 700;
}

.module-material-hint-input {
    min-height: 88px;
    background: #ffffff;
}

.module-material-hint-input[readonly] {
    color: #5c6f89;
    background: #f7f8fc;
    resize: none;
}

.module-material-category-name {
    color: #1e2a3e;
    font-size: 0.88rem;
    font-weight: 700;
}

.module-material-category-count {
    padding: 3px 10px;
    border-radius: 12px;
    color: #4069e0;
    background: #eef2ff;
    font-size: 0.78rem;
}

.module-material-thumbs {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex: 0 0 112px;
    min-width: 112px;
    min-height: 88px;
    align-self: start;
}

.module-material-thumbs img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 1px solid #dddddd;
    border-radius: 12px;
    cursor: zoom-in;
}

.module-material-save-tip {
    margin: 0;
    color: #8b97ad;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.module-material-empty-tip {
    margin: 0;
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
}

.module-material-media-row {
    display: grid;
    grid-template-columns: 112px 170px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

@media (max-width: 820px) {
    .module-material-media-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .module-material-thumbs,
    .module-material-category-rules {
        justify-content: flex-start;
    }
}

.module-constraint-panel {
    padding: 16px 18px;
    border: 1px solid #c7d4f7;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
}

.module-constraint-intro {
    margin: 0 0 12px;
    color: #4a627a;
    font-size: 0.82rem;
    line-height: 1.6;
}

.module-constraint-intro strong {
    color: #4069e0;
}

.preview-block,
.module-preview-block {
    padding: 16px;
    border-radius: 12px;
    background: #f5f5f5;
    text-align: center;
}

.module-preview-label {
    margin: 0 0 10px;
    text-align: left;
}

#modulePersonalPreviewCanvas {
    max-width: 100%;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #dcdcdc;
    cursor: zoom-in;
}

.module-personal-preview-image {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #111827;
    cursor: zoom-in;
}

.module-personal-preview-image[hidden] {
    display: none;
}

.module-personal-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px 24px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
}

.module-dialog-button {
    min-height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.module-dialog-button--ghost {
    color: #4069e0;
    background: #ffffff;
    border: 1px solid #4069e0;
}

.module-dialog-button--primary {
    color: #ffffff;
    background: #4069e0;
    border: 1px solid #4069e0;
}

.placeholder-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.95rem;
}

.panel-heading--records h2 {
    font-size: 1.75rem;
}

.field-group {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 500;
}

.field-label--compact {
    margin-bottom: 0;
    font-size: 0.92rem;
    color: #cfd8eb;
}

textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 18px 18px 16px;
    border: 1px solid rgba(95, 110, 138, 0.26);
    border-radius: 14px;
    color: var(--text);
    background: #3a4458;
    outline: none;
}

textarea::placeholder {
    color: #97a0b4;
}

#promptInput,
#reversePromptInput {
    min-height: 195px;
}

.polish-button,
.secondary-button,
.toolbar-button,
.preview-remove {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.polish-button {
    margin-top: 12px;
    padding: 10px 18px;
    background: linear-gradient(90deg, #6f2aff, #a83cff);
    color: white;
}

.upload-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.secondary-button,
.toolbar-button {
    min-height: 38px;
    padding: 0 16px;
    color: #d5d9e7;
    background: #3a4357;
}

.toolbar-select {
    min-height: 40px;
    width: min(320px, 100%);
    padding: 0 42px 0 14px;
    border: 1px solid rgba(97, 119, 153, 0.38);
    border-radius: 12px;
    color: #edf3ff;
    background:
        linear-gradient(180deg, rgba(47, 57, 77, 0.98), rgba(39, 48, 66, 0.98));
    outline: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #c4cce0 50%),
        linear-gradient(135deg, #c4cce0 50%, transparent 50%),
        linear-gradient(180deg, rgba(47, 57, 77, 0.98), rgba(39, 48, 66, 0.98));
    background-position:
        calc(100% - 20px) 17px,
        calc(100% - 14px) 17px,
        0 0;
    background-size:
        6px 6px,
        6px 6px,
        100% 100%;
    background-repeat: no-repeat;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.toolbar-select:focus {
    border-color: rgba(104, 183, 255, 0.62);
    box-shadow: 0 0 0 3px rgba(68, 158, 255, 0.14);
}

.toolbar-select option {
    color: #e8eefc;
    background: #252d3d;
}

.secondary-button:disabled,
.toolbar-button:disabled,
.polish-button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.choice-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prompt-model-switch {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.prompt-model-grid {
    width: min(360px, 100%);
}

.prompt-model-grid .choice-button {
    min-height: 42px;
}

.choice-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    color: #d1d8ea;
    background: #394456;
    cursor: pointer;
}

.choice-button.is-selected {
    color: white;
    background: linear-gradient(90deg, #7b2dff, #a63fff);
}

.upload-dropzone {
    display: grid;
    place-items: center;
    min-height: 184px;
    padding: 24px;
    border: 1px dashed #57627a;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(36, 44, 60, 0.5);
    text-align: center;
    cursor: pointer;
}

.upload-dropzone input {
    display: none;
}

.upload-dropzone--compact {
    min-height: 88px;
}

.upload-icon {
    font-size: 3rem;
    line-height: 1;
    color: #7b889f;
}

.upload-title {
    margin-top: 8px;
    color: #e7ecf6;
}

.upload-meta {
    margin: 12px 0 14px;
    color: var(--muted);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 12px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.range-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.range-value {
    color: var(--text);
    font-size: 0.96rem;
}

.range-input {
    width: 100%;
    margin-top: 12px;
    accent-color: #7a3cff;
}

.range-input.is-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.range-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.field-help {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.range-lock {
    margin-top: 8px;
    color: #c6cde2;
    font-size: 0.9rem;
}

.switch {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 32px;
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-slider {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(77, 87, 110, 0.92);
    transition: background 0.2s ease;
}

.switch-slider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    transition: transform 0.2s ease;
}

.switch input:checked + .switch-slider {
    background: linear-gradient(90deg, #2e7dff, #6c47ff);
}

.switch input:checked + .switch-slider::after {
    transform: translateX(22px);
}

.single-preview {
    min-height: 24px;
    margin-top: 10px;
}

.single-preview-item {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
    background: rgba(35, 43, 60, 0.92);
    border: 1px solid rgba(92, 108, 139, 0.24);
}

.single-preview-image {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 10px;
    background: #141924;
}

.single-preview-name {
    margin-top: 8px;
}

.single-preview-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.single-preview-remove {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: #dce2f4;
    background: #394356;
    cursor: pointer;
}

.preview-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 1 / 1;
    background: #374051;
}

.preview-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 6px 10px;
    background: rgba(18, 20, 26, 0.88);
    color: white;
}

.form-error {
    margin: 0 0 14px;
    color: var(--danger);
}

.generate-button {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 14px;
    color: white;
    background: linear-gradient(90deg, #7a2fff, #ae40ff);
    cursor: pointer;
}

.generate-button:disabled {
    cursor: not-allowed;
    color: #8f99b0;
    background: #3c4558;
}

.user-create-form {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.user-create-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 120px;
    gap: 12px;
    align-items: center;
}

.user-create-button {
    min-height: 52px;
}

.admin-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    min-height: 36px;
    color: #dce2f4;
    cursor: pointer;
}

.admin-checkbox-row input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #8d36ff;
}

.user-table-wrap {
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    color: #dce2f4;
}

.user-table th,
.user-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(92, 108, 139, 0.28);
    text-align: left;
    white-space: nowrap;
}

.table-empty {
    padding: 22px 12px;
    color: var(--muted);
    text-align: center;
}

.table-muted {
    color: var(--muted);
}

.menu-model-form {
    margin-bottom: 22px;
}

.menu-model-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.menu-model-form-actions {
    justify-content: flex-end;
}

.menu-model-table th,
.menu-model-table td {
    white-space: nowrap;
}

.menu-model-table-wrap {
    overflow-x: auto;
}

.studio-prompt-form {
    margin-bottom: 22px;
}

.studio-prompt-form-grid {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1fr);
    gap: 36px;
    align-items: start;
}

.studio-prompt-left-column,
.studio-prompt-right-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.studio-prompt-filter-field {
    margin: 18px 0 24px;
    max-width: 640px;
}

.studio-prompt-left-column .login-input,
.studio-prompt-right-column .login-input {
    width: 100%;
    max-width: 520px;
}

.studio-prompt-filter-label {
    color: #f3f6ff;
    font-size: 1rem;
    font-weight: 600;
}

.studio-prompt-filter-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: min(640px, 100%);
    min-width: 0;
}

.studio-prompt-filter-controls .toolbar-select {
    flex: 1;
    min-width: 0;
}

.studio-prompt-filter-controls .toolbar-button {
    flex: 0 0 auto;
    min-width: 72px;
}

.studio-prompt-table th,
.studio-prompt-table td {
    white-space: nowrap;
}

.studio-prompt-table-wrap {
    overflow-x: auto;
}

.shop-info-panel {
    min-height: calc(100vh - 10px);
    padding: 0;
    overflow: hidden;
    color: #1c1d1e;
    background: #fff;
    border: 0;
    border-radius: 10px 10px 0 0;
    box-shadow: none;
}

.shop-info-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 10px);
    padding: 27px 26px 20px;
    overflow: hidden;
    font-family: "PingFang SC", "Noto Sans SC", sans-serif;
}

.shop-info-page__title {
    margin-bottom: 20px;
    color: #1c1d1e;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
}

.shop-info-page__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    margin-bottom: 18px;
    flex-wrap: nowrap;
}

.shop-info-page__filters {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 280px) minmax(0, 230px) minmax(0, 230px) minmax(0, 230px) 110px;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: start;
    min-width: 0;
    overflow: visible;
    flex-wrap: nowrap;
}

.shop-info-page__input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #dcdfe5;
    border-radius: 8px;
    color: #1c1d1e;
    background: #fff;
    outline: none;
    font: inherit;
    font-size: 15px;
}

.shop-info-page__input:focus {
    border-color: #505cff;
}

.shop-info-page__search-btn,
.shop-info-page__add-btn,
.shop-info-page__create-link,
.shop-info-page__action-icon {
    border: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.shop-info-page__search-btn,
.shop-info-page__add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.shop-info-page__search-btn {
    width: 110px;
    color: #505cff;
    background: #fff;
    border: 1px solid #505cff;
}

.shop-info-page__search-btn:hover {
    background: rgba(80, 92, 255, 0.04);
}

.shop-info-page__add-btn {
    flex: 0 0 138px;
    color: #fff;
    background: #505cff;
}

.shop-info-page__add-btn:hover {
    opacity: 0.92;
}

.shop-info-page__search-icon,
.shop-info-page__add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 18px;
    line-height: 1;
}

.shop-info-page__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.shop-info-page__table-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.shop-info-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: #1c1d1e;
    background: #fff;
}

.shop-info-table__col-index {
    width: 5.5%;
}

.shop-info-table__col-brand {
    width: 9%;
}

.shop-info-table__col-unique {
    width: 12%;
}

.shop-info-table__col-no {
    width: 9.5%;
}

.shop-info-table__col-name {
    width: 13.5%;
}

.shop-info-table__col-category {
    width: 8.5%;
}

.shop-info-table__col-color {
    width: 8.5%;
}

.shop-info-table__col-image {
    width: 10.5%;
}

.shop-info-table__col-selling {
    width: 5.5%;
}

.shop-info-table__col-actions {
    width: 17.5%;
}

.shop-info-table th {
    height: 48px;
    padding: 0 8px;
    color: #1c1d1e;
    background: #f3f4f7;
    border-bottom: 1px solid #f3f4f7;
    font-size: clamp(12px, 0.82vw, 16px);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-info-table th:first-child {
    border-top-left-radius: 6px;
    text-align: center;
}

.shop-info-table th:last-child {
    border-top-right-radius: 6px;
    text-align: center;
}

.shop-info-table td {
    height: 76px;
    padding: 0 12px;
    border-bottom: 1px solid #f1f1f1;
    color: #1c1d1e;
    font-size: clamp(13px, 0.82vw, 16px);
    line-height: 20px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-info-empty-row td {
    height: min(48vh, 420px);
    color: #8d929c;
    font-size: 16px;
    text-align: center;
    vertical-align: middle;
}

.shop-info-table td:first-child,
.shop-info-table__color-cell {
    text-align: center;
}

.shop-info-table td[rowspan] {
    vertical-align: middle;
}

.shop-info-table__cell--no-divider {
    border-bottom-color: transparent !important;
}

.shop-info-table tbody tr:hover td {
    background: #fafbff;
}

.shop-info-selling-point {
    max-width: 220px;
}

.shop-info-table__image-cell {
    overflow: visible !important;
    text-align: center;
}

.shop-info-table__actions-cell {
    overflow: visible !important;
}

.shop-info-image-stack {
    display: inline-flex;
    width: 112px;
    height: 60px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.shop-info-image-stack__reference {
    width: 112px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.shop-info-image-stack__shell {
    position: relative;
    width: 112px;
    height: 60px;
}

.shop-info-image-stack__fan {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 94px;
    height: 52px;
    transform-origin: center bottom;
}

.shop-info-image-stack__item {
    position: absolute;
    width: 54px;
    height: 54px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 6px;
    box-sizing: border-box;
    transform-origin: 0 100%;
    box-shadow: 0 4px 12px rgba(28, 29, 30, 0.06);
}

.shop-info-image-stack__item.is-blank {
    background: #fff;
}

.shop-info-image-stack__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-info-image-stack__count {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 10;
    min-width: 54px;
    height: 18px;
    padding: 0 6px;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    box-sizing: border-box;
    transform: translateX(-50%);
    pointer-events: none;
}

.shop-info-image-empty {
    color: #8d929c;
    font-size: 13px;
}

.shop-info-page__actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    white-space: nowrap;
    min-width: 174px;
}

.shop-info-page__create-link {
    padding: 0;
    color: #505cff;
    background: transparent;
    font-size: 16px;
    line-height: 22px;
    text-decoration: underline;
}

.shop-info-page__action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.shop-info-page__action-icon:hover {
    opacity: 0.72;
}

.shop-info-page__action-icon img {
    display: block;
    width: 28px;
    height: 28px;
}

.shop-info-pagination {
    margin-top: 16px;
    display: none;
}

.product-add-dialog-backdrop {
    z-index: 35;
    padding: 36px 48px;
    background: rgba(18, 23, 36, 0.48);
    backdrop-filter: none;
}

.product-add-dialog {
    width: min(1280px, calc(100vw - 96px));
    max-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    color: #1c1d1e;
    background: #fff;
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.24);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.product-add-dialog__header {
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    flex: 0 0 auto;
}

.product-add-dialog__title {
    margin: 0;
    color: #1c1d1e;
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
}

.product-add-dialog__close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    color: #7b8190;
    background: transparent;
    cursor: pointer;
    font-size: 26px;
    line-height: 28px;
}

.product-add-dialog__close:hover {
    color: #1c1d1e;
    background: #f3f4f7;
}

.product-add-dialog__body {
    padding: 22px 28px 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.product-add-dialog__section {
    margin-bottom: 24px;
}

.product-add-dialog__section--last {
    margin-bottom: 12px;
}

.product-add-dialog__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.product-add-dialog__section-head--muted .product-add-dialog__section-title {
    color: #929499;
}

.product-add-dialog__section-title {
    margin: 0;
    color: #1c1d1e;
}

.product-add-dialog__section-title--small {
    font-size: 15px;
    font-weight: 400;
    line-height: 21px;
}

.product-add-dialog__section-title--mixed {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.product-add-dialog__section-title-main,
.product-add-dialog__section-title-sub,
.product-add-dialog__size-title {
    color: #1c1d1e;
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
}

.product-add-dialog__section-title-sub {
    color: #b6c1d6;
    font-weight: 400;
}

.product-add-dialog__size-title {
    margin: 0 0 16px;
}

.product-add-dialog__section-action,
.product-add-dialog__mini-action,
.product-add-dialog__generate-btn,
.product-add-dialog__footer-btn,
.product-add-dialog__icon-btn,
.product-add-dialog__text-icon,
.product-add-dialog__move-btn {
    border: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.product-add-dialog__section-action {
    width: 210px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #1c1d1e;
    background: #f3f5f7;
    font-size: 15px;
    font-weight: 500;
    flex: 0 0 auto;
}

.product-add-dialog__section-action:hover,
.product-add-dialog__mini-action:hover,
.product-add-dialog__generate-btn:hover {
    background: #eaedf2;
}

.product-add-dialog__section-action-icon {
    color: #5f6dff;
    font-size: 18px;
    line-height: 1;
}

.product-add-dialog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
}

.product-add-dialog__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.product-add-dialog__field--textarea {
    margin-top: 20px;
}

.product-add-dialog__field-label {
    color: #1c1d1e;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
}

.product-add-dialog__required {
    margin-right: 4px;
    color: #f53f3f;
}

.product-add-dialog__control,
.product-add-dialog__textarea,
.product-add-dialog__size-remark,
.product-add-dialog__table-input {
    width: 100%;
    min-width: 0;
    border: 1px solid #dcdfe5;
    border-radius: 8px;
    color: #1c1d1e;
    background: #fff;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.product-add-dialog__control {
    height: 44px;
    padding: 0 14px;
}

.product-add-dialog__control:disabled {
    color: #8a94a6;
    background: #f6f7f9;
}

.product-add-dialog__control:focus,
.product-add-dialog__textarea:focus,
.product-add-dialog__size-remark:focus,
.product-add-dialog__table-input:focus {
    border-color: #505cff;
}

.product-add-dialog__material-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
    align-items: end;
    gap: 20px;
}

.product-add-dialog__icon-btn {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
    border-radius: 50%;
    color: #d04747;
    background: #fff1f1;
    font-size: 20px;
    line-height: 28px;
}

.product-add-dialog__textarea-wrap {
    position: relative;
    display: block;
}

.product-add-dialog__textarea {
    min-height: 136px;
    padding: 14px 14px 58px;
    resize: none;
    line-height: 22px;
}

.product-add-dialog__generate-btn {
    position: absolute;
    right: 14px;
    bottom: 14px;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #5f6dff;
    background: #f3f5f7;
    font-size: 15px;
}

.product-add-dialog__color-card,
.product-add-dialog__size-card {
    border: 1px solid #dcdfe5;
    border-radius: 12px;
    background: #fff;
}

.product-add-dialog__color-card {
    padding: 18px;
}

.product-add-dialog__color-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.product-add-dialog__color-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.product-add-dialog__color-name {
    color: #1c1d1e;
    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
}

.product-add-dialog__color-input {
    min-width: 140px;
    max-width: 220px;
}

.product-add-dialog__text-icon {
    padding: 0;
    color: #5f6dff;
    background: transparent;
    font-size: 14px;
}

.product-add-dialog__text-icon--danger {
    color: #d04747;
}

.product-add-dialog__upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
    min-height: 116px;
}

.product-add-dialog__upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.product-add-dialog__upload-trigger {
    width: 116px;
    height: 116px;
    border: 1px dashed transparent;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f3f4f7;
    cursor: pointer;
}

.product-add-dialog__upload-trigger:hover {
    border-color: #505cff;
    background: #eef2ff;
}

.product-add-dialog__upload-trigger-icon {
    color: #5f6dff;
    font-size: 18px;
    line-height: 1;
}

.product-add-dialog__upload-trigger-text {
    color: #1c1d1e;
    font-size: 15px;
    line-height: 22px;
}

.product-add-dialog__upload-trigger-tip {
    color: #8a94a6;
    font-size: 12px;
    line-height: 18px;
}

.product-add-dialog__hidden-input {
    display: none;
}

.product-add-dialog__size-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-add-dialog__size-options,
.product-add-dialog__size-section--parameter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
}

.product-add-dialog__size-option,
.product-add-dialog__param-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1c1d1e;
    font-size: 15px;
    line-height: 22px;
}

.product-add-dialog__size-option input[type="checkbox"],
.product-add-dialog__param-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #505cff;
}

.product-add-dialog__size-remark {
    width: 82px;
    height: 38px;
    padding: 0 10px;
}

.product-add-dialog__mini-action {
    height: 38px;
    padding: 0 20px;
    border-radius: 6px;
    color: #5f6dff;
    background: #f3f5f7;
    font-size: 15px;
    font-weight: 500;
}

.product-add-dialog__size-section--parameter {
    padding: 16px;
    border: 1px solid #dcdfe5;
    border-radius: 12px;
    background: #fff;
}

.product-add-dialog__size-section--table {
    overflow: hidden;
    border: 1px solid #dcdfe5;
    border-radius: 12px;
    background: #fff;
}

.product-add-dialog__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.product-add-dialog__table th,
.product-add-dialog__table td {
    height: 44px;
    padding: 8px 12px;
    border-right: 1px solid #dcdfe5;
    border-bottom: 1px solid #dcdfe5;
    color: #1c1d1e;
    background: #fff;
    font-size: 14px;
    text-align: left;
    vertical-align: middle;
}

.product-add-dialog__table th {
    background: #f3f4f7;
    font-weight: 500;
}

.product-add-dialog__table th:last-child,
.product-add-dialog__table td:last-child {
    border-right: 0;
}

.product-add-dialog__table tbody tr:last-child td {
    border-bottom: 0;
}

.product-add-dialog__table-input {
    height: 34px;
    padding: 0 10px;
}

.product-add-dialog__move-btn {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    color: #4e5969;
    background: #fff;
    font-size: 14px;
}

.product-add-dialog__footer {
    height: 72px;
    padding: 0 28px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
    background: #fff;
}

.product-add-dialog__footer-btn {
    min-width: 96px;
    height: 40px;
    padding: 0 20px;
    border: 1px solid #dcdfe5;
    border-radius: 8px;
    color: #1c1d1e;
    background: #fff;
    font-size: 14px;
}

.product-add-dialog__footer-btn--primary {
    border-color: #505cff;
    color: #fff;
    background: #505cff;
}

@media (max-width: 1100px) {
    .product-add-dialog {
        width: calc(100vw - 40px);
    }

    .product-add-dialog-backdrop {
        padding: 20px;
    }

    .product-add-dialog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .product-add-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .product-add-dialog-backdrop {
        padding: 10px;
    }

    .product-add-dialog__header,
    .product-add-dialog__footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .product-add-dialog__body {
        padding: 18px;
    }

    .product-add-dialog__grid,
    .product-add-dialog__material-row {
        grid-template-columns: 1fr;
    }

    .product-add-dialog__section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .product-add-dialog__section-action {
        width: 100%;
    }
}

.prompt-text-cell {
    max-width: 360px;
    white-space: normal !important;
    line-height: 1.6;
}

.user-table th {
    color: var(--muted);
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.password-form {
    display: grid;
    max-width: 460px;
}

.password-submit-button {
    margin-top: 4px;
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(7, 10, 16, 0.72);
    backdrop-filter: blur(12px);
}

.password-dialog {
    width: min(520px, 100%);
    padding: 26px;
    border: 1px solid rgba(121, 145, 190, 0.34);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(39, 49, 68, 0.98), rgba(25, 32, 45, 0.98));
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.dialog-kicker {
    margin: 0 0 6px;
    color: #8fdcff;
    font-size: 0.86rem;
}

.dialog-heading h2 {
    margin: 0;
    font-size: 1.7rem;
}

.dialog-close-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    color: #dbe4f8;
    background: rgba(72, 84, 113, 0.72);
    cursor: pointer;
}

.dialog-copy {
    margin: 0 0 22px;
    color: var(--muted);
}

.dialog-copy strong {
    color: var(--text);
}

.user-password-form {
    max-width: none;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.dialog-submit-button {
    width: auto;
    min-height: 44px;
    padding: 0 20px;
}

.records-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.records-empty {
    display: grid;
    place-items: center;
    min-height: 220px;
    border-radius: 16px;
    border: 1px dashed rgba(103, 118, 146, 0.38);
    color: var(--muted);
}

.records-list {
    display: grid;
    gap: 16px;
    overflow: auto;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: var(--muted);
}

.history-page-info {
    min-width: 130px;
    text-align: center;
}

.module-assets-page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.module-assets-page-input {
    width: 72px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(103, 118, 146, 0.35);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    text-align: center;
    font: inherit;
}

.module-assets-table {
    table-layout: fixed;
}

.module-assets-table th:nth-child(1),
.module-assets-table td:nth-child(1) {
    width: 16%;
}

.module-assets-table th:nth-child(2),
.module-assets-table td:nth-child(2) {
    width: 26%;
}

.module-assets-table th:nth-child(3),
.module-assets-table td:nth-child(3) {
    width: 10%;
}

.module-assets-table th:nth-child(4),
.module-assets-table td:nth-child(4) {
    width: 12%;
}

.module-assets-table th:nth-child(5),
.module-assets-table td:nth-child(5) {
    width: 10%;
}

.module-assets-table th:nth-child(6),
.module-assets-table td:nth-child(6) {
    width: 18%;
}

.module-assets-table th:nth-child(7),
.module-assets-table td:nth-child(7) {
    width: 12%;
}

.module-assets-table__usage-scene-cell {
    white-space: normal !important;
}

.module-assets-table__usage-scene-content {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.module-assets-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-button--danger {
    color: #ffe6e6;
    background: rgba(255, 116, 116, 0.2);
}

.record-card {
    padding: 18px;
    border-radius: 16px;
    background: #2a3447;
    border: 1px solid rgba(92, 109, 136, 0.22);
}

.record-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.record-id {
    font-size: 1.1rem;
    font-weight: 700;
}

.record-status {
    font-weight: 700;
}

.record-status.is-completed {
    color: var(--green);
}

.record-status.is-failed {
    color: var(--danger);
}

.record-meta,
.record-files,
.record-error {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.record-prompt {
    margin-top: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.record-prompt-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.record-prompt-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8fb4ff;
    cursor: pointer;
}

.record-prompt-copy {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: #dce2f4;
    background: #394356;
    cursor: pointer;
}

.record-image-wrap {
    margin-top: 14px;
    overflow: hidden;
    border-radius: 14px;
    background: #1a1f2c;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 540px;
    min-width: 0;
}

.record-reference-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.record-reference-grid--single {
    grid-template-columns: minmax(220px, 420px);
    justify-content: start;
}

.record-reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.record-reference-toggle {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: #394356;
    color: #dce2f4;
    cursor: pointer;
}

.record-reference-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1f2c;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-reference-item--single {
    min-height: 180px;
}

.record-generated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.record-generated-item {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #1a1f2c;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-generated-single {
    position: relative;
}

.record-generated-image {
    width: 100%;
    height: auto;
    max-height: 540px;
    object-fit: contain;
    display: block;
}

.record-video {
    width: 100%;
    margin-top: 10px;
    border-radius: 16px;
    background: #0f131d;
}

.record-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 540px;
    object-fit: contain;
    cursor: zoom-in;
    background: #1a1f2c;
}

.record-reference-image {
    width: 100%;
    height: clamp(130px, 12vw, 190px);
    object-fit: contain;
    display: block;
    background: #1a1f2c;
}

.record-reference-image--single {
    width: 100%;
    height: clamp(180px, 22vw, 260px);
    object-fit: contain;
    display: block;
}

.record-files a {
    color: #d9dff2;
}

.record-image-download {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    color: #eef2ff;
    background: rgba(23, 28, 40, 0.82);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.record-image-download:hover {
    background: rgba(76, 90, 118, 0.92);
}

.record-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.record-action {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    color: #dce2f4;
    background: #394356;
    cursor: pointer;
}

.record-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 48px 24px 24px;
    background: rgba(7, 10, 18, 0.82);
    backdrop-filter: blur(8px);
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox-stage {
    display: grid;
    place-items: center;
    width: min(92vw, 1320px);
    max-height: calc(100vh - 96px);
    padding: 18px;
    border: 1px solid rgba(119, 136, 171, 0.35);
    border-radius: 22px;
    background: rgba(21, 26, 37, 0.96);
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.42);
}

.image-lightbox-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 132px);
    object-fit: contain;
    border-radius: 16px;
}

.image-lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    color: #eef2ff;
    background: rgba(47, 57, 79, 0.92);
    cursor: pointer;
}

.toast {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 1400;
    min-width: 180px;
    max-width: min(360px, calc(100vw - 44px));
    padding: 12px 16px;
    border: 1px solid rgba(119, 136, 171, 0.35);
    border-radius: 14px;
    color: #eef2ff;
    background: rgba(28, 35, 49, 0.96);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.34);
    opacity: 0;
    transform: translate(-50%, -8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .records-panel {
        min-height: 0;
    }

    .shop-info-page__toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .shop-info-page__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-info-page__search-btn,
    .shop-info-page__add-btn {
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-shell.is-sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        min-height: auto;
        padding-bottom: 12px;
        overflow-y: visible;
    }

    .workspace {
        padding: 18px;
    }

    .workspace-header {
        flex-direction: column;
    }

    .workspace-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .choice-grid,
    .choice-grid--two,
    .choice-grid--three,
    .choice-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-create-row {
        grid-template-columns: 1fr;
    }

    .menu-model-form-grid {
        grid-template-columns: 1fr;
    }

    .analysis-module-header {
        align-items: stretch;
        flex-direction: column;
    }

    .analysis-switch-bar {
        justify-content: flex-start;
    }

    .analysis-switch-bar .mode-tab {
        flex: 1;
        min-width: min(180px, 100%);
    }

    .analysis-two-col-layout,
    .module-workspace-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .analysis-left,
    .analysis-right,
    .module-workspace-col {
        min-height: 0;
    }

    .studio-prompt-form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .studio-prompt-filter-field {
        margin-top: 0;
    }

    .studio-prompt-filter-controls {
        justify-content: flex-start;
        min-width: 0;
    }

    .studio-prompt-filter-controls .toolbar-select {
        flex: 1;
    }

    .prompt-text-cell {
        max-width: 260px;
    }

    .record-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
