html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f6f7fb;
    color: #1f2d3d;
}

a {
    color: inherit;
    text-decoration: none;
}

.layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #1f3773, #274b8a);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 24px;
}

.app-header h1 {
    margin: 0;
    font-size: 28px;
}

.subtitle {
    margin-top: 8px;
    font-size: 16px;
    opacity: 0.85;
}

.header-actions .el-button + .el-button {
    margin-left: 12px;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper .el-table {
    min-width: 720px;
}

.class-account-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    width: 100%;
}

.card > .class-account-grid {
    min-width: 0;
}

.class-account-item {
    background: #f9fbff;
    border: 1px solid #e4e8f5;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(31, 61, 125, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.class-account-item:hover {
    box-shadow: 0 12px 28px rgba(31, 61, 125, 0.12);
    transform: translateY(-2px);
}

.class-account-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.class-account-item__title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2d3d;
    word-break: break-all;
}

.class-account-item__actions {
    display: flex;
    gap: 6px;
}

.class-account-item__body {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: #475569;
}

.class-account-item__body .label {
    display: inline-block;
    min-width: 56px;
    color: #8a94a6;
}

.class-account-item__body .value {
    margin-left: 8px;
    color: #1f2d3d;
    word-break: break-all;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.menu-toolbar {
    flex-wrap: wrap;
}

.menu-editor {
    margin-top: 10px;
}

.menu-transfer {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.menu-transfer > .el-transfer-panel {
    flex: 1 1 45%;
    max-height: 520px;
    min-width: 0;
}

.menu-transfer > .el-transfer__buttons {
    flex: 0 0 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.menu-transfer .el-transfer-panel__body {
    height: 480px;
}

.menu-transfer .el-transfer-panel__list.is-filterable {
    height: 430px;
}

.inline-input {
    width: 200px;
}

.muted {
    color: #8c8c8c;
}

.dish-gallery {
    margin-bottom: 16px;
}

.dish-gallery__title {
    margin: 0 0 12px;
    font-size: 18px;
    color: #1d2b56;
}

.dish-gallery__tag {
    margin-left: 8px;
    vertical-align: middle;
}

.dish-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.dish-gallery__card {
    border: 1px solid #e4e7f1;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fbff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dish-gallery__image {
    width: 200px;
    height: 150px;
    position: relative;
    background: #eef1f8;
    align-self: center;
}

.dish-gallery__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish-gallery__info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dish-gallery__name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2b56;
}

.dish-gallery__category {
    margin: 0;
    font-size: 13px;
    color: #5e6c84;
}

.dish-gallery__nutrition {
    margin: 0;
    font-size: 13px;
    color: #3a4b73;
    line-height: 1.4;
    white-space: pre-wrap;
}

.selection-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.selection-cell__adder {
    max-width: 200px;
}

.selection-cell__items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.selection-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f7ff;
    border-radius: 999px;
    padding: 4px 10px;
    line-height: 1.3;
    box-shadow: inset 0 0 0 1px rgba(31, 55, 115, 0.05);
}

.selection-item__name {
    font-weight: 500;
    color: #1d2b56;
    font-size: 13px;
    white-space: nowrap;
}

.selection-item__portion {
    width: 90px;
}

.selection-cell__empty {
    color: #8c8c8c;
    font-size: 13px;
}

.selection-item__remove {
    color: #ff4d4f;
    font-size: 12px;
    cursor: pointer;
}

.dish-table-thumb {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    background: #eef1f8;
}

.pagination {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* Audit toolbar compact layout */
.card .section-header .actions.menu-toolbar,
.card .section-header .actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Enhanced audit log styles */
.audit-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: #f8f9ff;
    border-radius: 12px;
    margin-bottom: 16px;
}

.audit-toolbar .el-input,
.audit-toolbar .el-select,
.audit-toolbar .el-date-picker {
    flex: 0 0 auto;
}

.audit-toolbar .inline-input {
    width: 180px;
}

.audit-details {
    background: #f8f9ff;
    border: 1px solid #e4e7f1;
    border-radius: 8px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #1f2d3d;
}

.audit-details::-webkit-scrollbar {
    width: 6px;
}

.audit-details::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.audit-details::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.audit-details::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Enhanced table styles */
.el-table .audit-table {
    border-radius: 12px;
    overflow: hidden;
}

.el-table .audit-table .el-table__header {
    background: #f8f9ff;
}

.el-table .audit-table .el-table__row:hover {
    background: #f0f5ff;
}

/* Action buttons styling */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .el-button {
    margin: 0;
}

/* Responsive audit toolbar */
@media (max-width: 1200px) {
    .audit-toolbar {
        gap: 8px;
        padding: 12px;
    }
    
    .audit-toolbar .inline-input {
        width: 160px;
    }
}

@media (max-width: 768px) {
    .audit-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .audit-toolbar .inline-input {
        width: 100%;
    }
    
    .audit-toolbar .el-button {
        width: 100%;
    }
}

.stats-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.stat-item {
    background: #f0f5ff;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 160px;
    text-align: center;
}

.stat-item .label {
    margin: 0;
    font-size: 14px;
    color: #3a4b73;
}

.stat-item .value {
    margin: 8px 0 0;
    font-size: 26px;
    font-weight: 600;
    color: #1d2b56;
}

.charts {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.chart-box {
    flex: 1;
    min-height: 320px;
    background: #f8f9ff;
    border-radius: 12px;
    padding: 12px;
}

.log-details {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.login-body {
    background: linear-gradient(135deg, #1f3773, #274b8a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.login-wrapper {
    width: 420px;
    padding: 24px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    color: #1f2d3d;
}

.login-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 26px;
}

.login-button {
    width: 100%;
}

.login-tips {
    font-size: 12px;
    color: #5e6c84;
    margin: 4px 0;
    text-align: center;
}

@media (max-width: 600px) {
    .login-body {
        align-items: flex-start;
        padding: 40px 16px;
    }

    .login-wrapper {
        width: 100%;
        padding: 0;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 16px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    }

    .login-title {
        font-size: 22px;
    }

    .login-card .el-form-item__label {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .login-body {
        padding: 32px 12px;
    }

    .login-card {
        padding: 24px 16px;
    }

.login-title {
    font-size: 20px;
}
}

.screen-body {
    margin: 0;
    height: 100vh;
    min-height: 100vh;
    background: #070b1f;
    color: #e4f1ff;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
}

.screen-wrapper {
    width: min(1920px, 100vw);
    height: 100%;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 36px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
    overflow: hidden;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: clamp(10px, 1.8vw, 18px);
}

.screen-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.screen-header h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: clamp(2px, 0.5vw, 6px);
}

.screen-header p {
    margin: 0;
    font-size: clamp(14px, 1.8vw, 18px);
    opacity: 0.85;
}

.screen-demo-btn {
    padding: 12px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #49d8ff, #2f6bff);
    color: #0c1f3d;
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 12px 28px rgba(13, 97, 255, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.screen-demo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(13, 97, 255, 0.45);
}

.screen-demo-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.screen-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2.4vw, 22px);
    min-height: 0;
    overflow: hidden;
}

.screen-summary {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.8vw, 16px);
    width: 100%;
}

@media (max-width: 1500px) {
    .screen-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.summary-panel {
    padding: clamp(14px, 2vw, 20px);
}

.summary-panel .screen-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-block {
    background: linear-gradient(135deg, rgba(47, 91, 201, 0.6), rgba(32, 178, 197, 0.35));
    border-radius: 18px;
    padding: clamp(12px, 1.8vw, 18px);
    min-height: clamp(72px, 8vh, 98px);
    text-align: center;
    box-shadow: 0 18px 38px rgba(12, 45, 120, 0.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(140, 200, 255, 0.25);
}

.summary-block .label {
    margin: 0;
    font-size: clamp(13px, 1.4vw, 16px);
    opacity: 0.8;
}

.summary-block .value {
    margin: 8px 0 0;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screen-chart {
    width: 100%;
    flex: 1;
    min-height: clamp(260px, 28vh, 360px);
    height: clamp(300px, 32vh, 420px);
}

.screen-chart.wide {
    min-height: clamp(300px, 32vh, 420px);
    height: clamp(320px, 36vh, 460px);
}

.screen-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(18px, 2.8vw, 28px);
    align-items: stretch;
    overflow: hidden;
}

.screen-grid-left {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(16px, 2.2vw, 24px);
    min-height: 0;
}

.screen-grid-right {
    display: flex;
    min-height: 0;
}

@media (max-width: 1280px) {
    .screen-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }
}

@media (max-width: 1180px) {
    .screen-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: auto;
    }

    .screen-grid-left {
        grid-template-rows: auto repeat(2, minmax(0, 1fr));
    }

    .screen-grid-right {
        order: -1;
    }

    .screen-chart {
        min-height: clamp(240px, 40vw, 360px);
    }
}

@media (max-width: 920px) {
    .screen-summary {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .ai-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .screen-summary {
        grid-template-columns: 1fr;
    }

    .ai-metrics {
        grid-template-columns: 1fr;
    }

    .screen-chart,
    .screen-chart.wide {
        min-height: 220px;
    }
}

@media (max-height: 900px) {
    .screen-wrapper {
        padding: clamp(14px, 2vw, 24px);
    }

    .screen-header h1 {
        font-size: clamp(24px, 3vw, 32px);
    }

    .screen-chart {
        min-height: clamp(220px, 34vh, 300px);
        height: clamp(240px, 36vh, 340px);
    }

    .screen-chart.wide {
        min-height: clamp(240px, 36vh, 360px);
        height: clamp(260px, 40vh, 380px);
    }

    .ai-panel {
        padding: clamp(16px, 2.5vw, 22px);
    }
}

@media (max-height: 720px) {
    .screen-summary .value {
        font-size: clamp(20px, 3vw, 28px);
    }

    .screen-demo-btn {
        padding: 10px 16px;
    }
}

.screen-panel {
    padding: clamp(16px, 2vw, 24px);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.screen-panel.glass {
    background: linear-gradient(135deg, rgba(12, 35, 90, 0.65), rgba(10, 55, 120, 0.35));
    border: 1px solid rgba(64, 158, 255, 0.2);
    box-shadow: 0 18px 48px rgba(8, 24, 60, 0.5);
    backdrop-filter: blur(8px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: clamp(10px, 1.6vw, 16px);
}

.panel-header h2 {
    margin: 0;
    font-size: clamp(16px, 2vw, 20px);
    letter-spacing: 1px;
}

.panel-header p {
    margin: 4px 0 0;
    font-size: clamp(12px, 1.5vw, 14px);
    opacity: 0.72;
}

.ai-panel {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: clamp(18px, 3vw, 26px);
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(16, 58, 112, 0.85), rgba(74, 38, 121, 0.55));
    box-shadow: 0 24px 60px rgba(18, 44, 110, 0.6);
    border: 1px solid rgba(117, 206, 255, 0.28);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.ai-panel.neon::before {
    content: "";
    position: absolute;
    inset: -60% -40%;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.2), transparent 60%);
    animation: pulseGlow 8s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

.ai-panel > * {
    position: relative;
    z-index: 1;
}

@keyframes pulseGlow {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.6; }
    50% { transform: rotate(15deg) scale(1.1); opacity: 1; }
}

.ai-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ai-panel-header h2 {
    margin: 0;
    font-size: 24px;
}

.ai-panel-header p {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.78;
}

.ai-status {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid rgba(0, 255, 214, 0.45);
    color: rgba(0, 255, 214, 0.85);
}

.ai-status.online {
    background: rgba(0, 255, 214, 0.18);
}

.ai-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.ai-metric {
    background: rgba(12, 30, 80, 0.55);
    border-radius: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(120, 170, 255, 0.18);
}

.ai-metric .label {
    display: block;
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 6px;
}

.ai-metric .value {
    font-size: 20px;
    font-weight: 600;
}

.ai-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    z-index: 1;
}

.ai-quick-questions button {
    background: rgba(32, 126, 255, 0.18);
    border: 1px solid rgba(114, 197, 255, 0.4);
    color: #d6e8ff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ai-quick-questions button:hover {
    background: rgba(74, 173, 255, 0.35);
    transform: translateY(-1px);
}

.ai-quick-questions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-chat {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: rgba(5, 18, 42, 0.55);
    border: 1px solid rgba(84, 146, 255, 0.18);
    box-shadow: inset 0 0 28px rgba(8, 24, 60, 0.4);
    touch-action: pan-y;
}

.ai-chat::-webkit-scrollbar {
    width: 6px;
}

.ai-chat::-webkit-scrollbar-thumb {
    background: rgba(120, 170, 255, 0.4);
    border-radius: 999px;
}

.ai-bubble {
    background: rgba(37, 75, 169, 0.45);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    line-height: 1.6;
    box-shadow: 0 10px 24px rgba(15, 45, 110, 0.35);
}

.ai-bubble strong {
    display: block;
    font-size: 12px;
    letter-spacing: 1.4px;
    margin-bottom: 6px;
    opacity: 0.72;
    text-transform: uppercase;
}

.ai-bubble.is-user {
    background: rgba(76, 102, 235, 0.55);
    border: 1px solid rgba(152, 196, 255, 0.35);
}

.ai-bubble.loading {
    display: flex;
    gap: 6px;
    background: rgba(20, 40, 90, 0.6);
}

.ai-bubble.loading .dot {
    width: 8px;
    height: 8px;
    background: rgba(152, 196, 255, 0.8);
    border-radius: 50%;
    animation: typing 1.2s infinite ease-in-out alternate;
}

.ai-bubble.loading .dot:nth-child(2) { animation-delay: 0.2s; }
.ai-bubble.loading .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    from { transform: translateY(0); opacity: 0.6; }
    to { transform: translateY(-6px); opacity: 1; }
}

.ai-error {
    font-size: 13px;
    color: #ff8c8c;
    background: rgba(120, 20, 50, 0.3);
    border: 1px solid rgba(255, 120, 150, 0.4);
    padding: 8px 12px;
    border-radius: 12px;
}

.ai-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-form-row {
    display: flex;
    gap: 16px;
}

.ai-form-row label {
    flex: 1;
    font-size: 13px;
    opacity: 0.78;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-form input,
.ai-form textarea {
    background: rgba(10, 30, 70, 0.6);
    border: 1px solid rgba(117, 206, 255, 0.25);
    border-radius: 12px;
    padding: 12px;
    color: #e4f1ff;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: none;
}

.ai-form input:focus,
.ai-form textarea:focus {
    outline: none;
    border-color: rgba(142, 227, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(90, 180, 255, 0.3);
}

.ai-form button {
    align-self: flex-end;
    padding: 12px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4d8cff, #23d1ff);
    border: none;
    color: #021433;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-form button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.ai-form button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(56, 173, 255, 0.45);
}

@media (max-width: 1024px) {
    .screen-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .screen-grid-right {
        order: -1;
    }

    .screen-summary {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .ai-form-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .layout {
        padding: 16px;
    }

    .card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card > * {
        min-width: 560px;
    }

    .class-account-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .card > .class-account-grid {
        min-width: 100%;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .app-header h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .screen-header {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .screen-demo-btn {
        width: 100%;
    }

    .ai-form-row {
        flex-direction: column;
    }

    .dish-gallery__grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .selection-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .screen-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .actions > * {
        flex: 0 0 auto;
    }

    .actions .el-button,
    .actions .el-input,
    .actions .el-select,
    .inline-input {
        width: auto !important;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-actions .el-button {
        flex: 1 1 auto;
    }

    .card > * {
        min-width: 520px;
    }

    .table-wrapper .el-table {
        min-width: 640px;
    }
}

@media (max-width: 480px) {
    .layout {
        padding: 12px;
    }

    .app-header {
        padding: 16px;
    }

    .app-header h1 {
        font-size: 20px;
    }

    .subtitle {
        font-size: 13px;
    }

    .header-actions .el-button {
        width: 100%;
    }

    .class-account-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .card > .class-account-grid {
        min-width: 100%;
    }
}

.menu-editor {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-editor .menu-transfer {
    min-width: 680px;
}
