:root {
    --color-primary: #6DB9E3;
    --color-primary-strong: #4ea9dc;
    --color-accent: #F2A65A;
    --color-bg: #F4F6F8;
    --color-surface: #EAF5FB;
    --color-success: #4CAF93;
    --color-warning: #F5C26B;
    --color-error: #E57373;
    --text: #333333;
    --text-muted: #6B7280;
    --text-disabled: #B0BEC5;
    --border: rgba(15, 23, 42, 0.12);
    --app-header-bg: #6DB9E3;
    --header-height: 64px;
    --sidebar-width: 240px;
    --content-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;

    --bs-primary: #6DB9E3;
    --bs-primary-rgb: 109, 185, 227;
    --bs-success: #4CAF93;
    --bs-success-rgb: 76, 175, 147;
    --bs-warning: #F5C26B;
    --bs-warning-rgb: 245, 194, 107;
    --bs-danger: #E57373;
    --bs-danger-rgb: 229, 115, 115;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
    line-height: 1.6;
}

body.env-stg {
    --app-header-bg: #D97A28;
}

body.env-local {
    --app-header-bg: #2F8F6B;
}

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: 0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--app-header-bg);
    color: #fff;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.app-subheader {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--header-height);
    z-index: 950;
}

body.has-subnav .app-subheader {
    display: block;
}

.app-subheader-inner {
    max-width: none;
    margin: 0;
    width: 100%;
    padding: var(--space-2) var(--space-6);
}

.app-header-inner {
    max-width: none;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 0 var(--space-6);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.app-brand-name {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.app-brand-name:hover {
    color: #fff;
}

.app-sidebar-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

.app-sidebar-toggle:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.app-sidebar-toggle span {
    width: 18px;
    height: 2px;
    background: #fff;
    display: block;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.app-user-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-body {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    flex: 1;
}

body.sidebar-collapsed .app-body {
    grid-template-columns: 1fr;
}

.app-sidebar {
    position: sticky;
    top: var(--header-height);
    align-self: start;
    height: calc(100vh - var(--header-height));
    background: #fff;
    border-right: 1px solid var(--border);
    padding: var(--space-5) var(--space-4);
    overflow-y: auto;
}

body.sidebar-collapsed .app-sidebar {
    display: none;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.app-nav-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.app-nav-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
}

.app-nav-link {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-nav-link:hover {
    background: rgba(109, 185, 227, 0.12);
    color: var(--color-primary-strong);
}

.app-nav-link.is-active {
    background: rgba(109, 185, 227, 0.18);
    color: var(--color-primary-strong);
    border-left: 3px solid var(--color-primary);
    font-weight: 600;
    padding-left: 7px;
}

.app-main {
    padding: var(--space-6) var(--space-5);
    min-width: 0;
}

.app-container {
    max-width: var(--content-max);
    margin: 0 auto;
}

body.products-index .app-container {
    max-width: none;
}

body.products-index .app-main {
    padding-left: clamp(0px, 1vw, var(--space-2));
    padding-right: clamp(0px, 1vw, var(--space-2));
}

body.kintone-wide .app-container {
    max-width: none;
}

body.kintone-wide {
    --kintone-side-pad: clamp(5px, 1vw, var(--space-2));
    --kintone-wide-edge: 5px;
    --kintone-wide-offset: calc(var(--kintone-side-pad) - var(--kintone-wide-edge));
}

body.kintone-wide .app-main {
    padding-left: var(--kintone-side-pad);
    padding-right: var(--kintone-side-pad);
}

body.kintone-wide .kintone-table-narrow {
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
}

body.kintone-wide .kintone-table-narrow.is-wide {
    max-width: none;
    margin-left: calc(-1 * var(--kintone-wide-offset));
    margin-right: calc(-1 * var(--kintone-wide-offset));
    width: calc(100% + (2 * var(--kintone-wide-offset)));
}

@media (max-width: 520px) {
    body.products-index .app-main,
    body.kintone-wide .app-main {
        padding-left: 5px;
        padding-right: 5px;
    }

    body.kintone-wide {
        --kintone-side-pad: 5px;
    }

    body.kintone-wide .kintone-table-narrow {
        max-width: none;
    }
}

body.products-index .products-table-full {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

body.products-index .products-table-full .table-responsive {
    width: 100%;
    overflow-x: auto;
}

.app-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-4) 0;
    color: var(--text-muted);
    font-size: 12px;
}

.app-messages {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 900;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.page-header h1 {
    font-size: 24px;
    margin: 0;
}

.kintone-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

.kintone-subnav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    border: 1px solid transparent;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.kintone-subnav-dropdown {
    display: inline-flex;
    --bs-dropdown-spacer: 0;
}

.kintone-subnav-toggle {
    background: transparent;
    line-height: 1.5;
    white-space: nowrap;
}

.kintone-subnav-toggle.btn,
.kintone-subnav-toggle.btn:first-child:active {
    background: transparent;
    border-color: transparent;
}

.kintone-subnav-toggle:hover,
.kintone-subnav-toggle:focus,
.kintone-subnav-toggle:active,
.kintone-subnav-toggle.show {
    color: var(--text);
    background: rgba(109, 185, 227, 0.12);
    border-color: rgba(109, 185, 227, 0.2);
    box-shadow: none;
}

.kintone-subnav-toggle.is-active,
.kintone-subnav-toggle.is-active:hover,
.kintone-subnav-toggle.is-active:focus,
.kintone-subnav-toggle.is-active:active,
.kintone-subnav-toggle.is-active.show {
    color: var(--color-primary-strong);
    background: rgba(109, 185, 227, 0.18);
    border-color: rgba(109, 185, 227, 0.35);
    box-shadow: inset 0 -2px 0 var(--color-primary);
}

.kintone-subnav-toggle::after {
    margin-left: 8px;
}

.kintone-subnav-menu {
    margin-top: 0;
    border: 1px solid rgba(109, 185, 227, 0.24);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    min-width: 200px;
}

.kintone-subnav-menu .dropdown-item {
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    padding: 8px 12px;
}

.kintone-subnav-menu .dropdown-item:hover,
.kintone-subnav-menu .dropdown-item:focus {
    background: rgba(109, 185, 227, 0.12);
    color: var(--text);
}

.kintone-subnav-menu .dropdown-item.active,
.kintone-subnav-menu .dropdown-item:active {
    background: rgba(109, 185, 227, 0.18);
    color: var(--color-primary-strong);
}

.kintone-subnav-link:hover {
    color: var(--text);
    background: rgba(109, 185, 227, 0.12);
    border-color: rgba(109, 185, 227, 0.2);
}

.kintone-subnav-link.is-active {
    color: var(--color-primary-strong);
    background: rgba(109, 185, 227, 0.18);
    border-color: rgba(109, 185, 227, 0.35);
    box-shadow: inset 0 -2px 0 var(--color-primary);
}

.app-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
}

.app-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    color: inherit;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(109, 185, 227, 0.35);
}

.app-card-title {
    font-size: 18px;
    font-weight: 700;
}

.app-card-desc {
    margin-top: var(--space-2);
    color: var(--text-muted);
    font-size: 13px;
}

.card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: var(--color-surface);
    font-weight: 600;
}

.table {
    border-color: var(--border);
}

.table thead th,
.table-light th {
    background: var(--color-surface) !important;
    color: var(--text);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(109, 185, 227, 0.06);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(109, 185, 227, 0.12);
}

.table.table-sm th,
.table.table-sm td {
    padding: 6px 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

table th,
table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

table th {
    background: var(--color-surface);
    font-weight: 600;
}

table tr:hover td {
    background: rgba(109, 185, 227, 0.08);
}

table td.ratio-alert,
table th.ratio-alert {
    background: rgba(229, 115, 115, 0.18) !important;
    color: #b91c1c !important;
}

table tr:hover td.ratio-alert,
table tr:hover th.ratio-alert {
    background: rgba(229, 115, 115, 0.22) !important;
    color: #b91c1c !important;
}

.form-group {
    margin-bottom: var(--space-4);
}

label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

form p {
    margin-bottom: var(--space-3);
}

form p label {
    margin-bottom: 6px;
}

input,
select,
textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(109, 185, 227, 0.25);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

button,
.btn {
    font-family: inherit;
}

.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
}

a.btn {
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--color-primary-strong);
    border-color: var(--color-primary-strong);
}

.btn-accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.btn-accent:hover {
    background: #e19043;
    border-color: #e19043;
    color: #fff;
}

.btn-danger {
    background: var(--color-error);
    border-color: var(--color-error);
}

.btn-danger:hover {
    background: #d95c5c;
    border-color: #d95c5c;
}

.btn-success {
    background: var(--color-success);
    border-color: var(--color-success);
}

.btn-success:hover {
    background: #3e9a7f;
    border-color: #3e9a7f;
}

.btn-outline-secondary {
    border-color: rgba(15, 23, 42, 0.2);
    color: var(--text);
}

.btn-outline-primary {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.auth-page .app-main {
    padding-top: var(--space-7);
    padding-bottom: var(--space-7);
}

.auth-wrapper {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
}

.auth-wrapper h1,
.auth-wrapper h2 {
    font-size: 22px;
    margin-top: 0;
}

.auth-wrapper .extra-links {
    margin-top: var(--space-4);
    font-size: 13px;
    color: var(--text-muted);
}

.no-sidebar .app-body {
    grid-template-columns: 1fr;
}

.no-sidebar .app-sidebar {
    display: none;
}

.no-sidebar .app-overlay {
    display: none;
}

.no-sidebar .app-sidebar-toggle {
    display: none;
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.left-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.search-form {
    display: none;
    flex-direction: column;
    gap: var(--space-3);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-5);
    width: 100%;
}

.search-form.is-open {
    display: flex;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.search-field {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 220px;
}

.search-field.search-field-multi {
    align-items: flex-start;
}

.search-field.search-field-pulldown {
    display: flex;
    flex: 1 1 360px;
    min-width: min(100%, 360px);
    flex-direction: column;
    align-items: stretch;
}

.search-field label {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
}

.search-field :is(input, select, textarea) {
    min-width: 170px;
}

.multi-pulldown {
    position: relative;
    width: 100%;
}

.multi-pulldown-trigger {
    width: 100%;
    min-height: 42px;
    padding: 10px 42px 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #fff 0%, #f7fbfd 100%);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-radius 0.18s ease;
}

.multi-pulldown-trigger::after {
    content: "";
    width: 10px;
    height: 10px;
    position: absolute;
    top: 50%;
    right: 16px;
    border-right: 2px solid rgba(15, 23, 42, 0.5);
    border-bottom: 2px solid rgba(15, 23, 42, 0.5);
    transform: translateY(-60%) rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.multi-pulldown-trigger:hover {
    border-color: rgba(109, 185, 227, 0.45);
    background: linear-gradient(180deg, #fff 0%, rgba(234, 245, 251, 0.78) 100%);
}

.multi-pulldown-trigger:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(109, 185, 227, 0.25);
}

.multi-pulldown.is-open .multi-pulldown-trigger {
    border-color: rgba(78, 169, 220, 0.55);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 3px rgba(109, 185, 227, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(234, 245, 251, 0.92) 100%);
}

.multi-pulldown.is-open .multi-pulldown-trigger::after {
    transform: translateY(-35%) rotate(-135deg);
    border-color: rgba(78, 169, 220, 0.8);
}

.multi-pulldown-summary {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 600;
}

.multi-pulldown-summary.is-placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.multi-pulldown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    margin-top: -1px;
    border: 1px solid rgba(78, 169, 220, 0.45);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.multi-pulldown-options {
    display: grid;
    gap: 0;
    max-height: 260px;
    overflow-y: auto;
}

.multi-pulldown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    min-height: 42px;
    cursor: pointer;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    transition: background 0.18s ease, color 0.18s ease;
}

.multi-pulldown-option:first-child {
    border-top: none;
}

.multi-pulldown-option:hover {
    background: rgba(109, 185, 227, 0.1);
}

.multi-pulldown-option input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    accent-color: var(--color-primary-strong);
}

.multi-pulldown-option-text {
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.multi-pulldown-option input[type="checkbox"]:checked + .multi-pulldown-option-text {
    color: #0f4f72;
    font-weight: 700;
}

.search-field.search-field-wide :is(input, select, textarea) {
    min-width: 220px;
}

.search-form .button-group {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.results-count {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.result-count {
    margin-bottom: var(--space-4);
    color: var(--text-muted);
    font-size: 13px;
}

.step-links a {
    margin-left: var(--space-2);
}

.step-links {
    font-size: 13px;
    color: var(--text-muted);
}

.drop-zone {
    border: 1px dashed rgba(15, 23, 42, 0.2);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.drop-zone p {
    margin: 0;
    color: var(--text-muted);
}

.drop-zone.hover {
    border-color: var(--color-primary);
    background: rgba(109, 185, 227, 0.1);
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: flex-end;
    margin-bottom: var(--space-4);
}

.filter-form > div {
    min-width: 160px;
}

.product-detail-table th {
    width: 30%;
}

.drawing-image {
    max-width: 180px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    background: #fff;
    cursor: zoom-in;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.7);
}

.modal-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.modal-content {
    max-width: 85%;
    max-height: 85%;
    border-radius: var(--radius-md);
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
}

.close {
    position: absolute;
    top: 20px;
    right: 28px;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    cursor: pointer;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.pagination {
    margin-top: var(--space-4);
    text-align: center;
}

.preview-text {
    white-space: pre-wrap;
}

.error-message {
    color: var(--color-error);
    font-size: 13px;
    margin-top: 4px;
}

.app-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1200;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: min(80vw, var(--sidebar-width));
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 1001;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .app-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    .app-header-inner {
        padding: 0 var(--space-4);
    }

    .app-main {
        padding: var(--space-4);
    }

    .search-field.search-field-pulldown {
        min-width: 100%;
    }

    .multi-pulldown-panel {
        position: static;
        margin-top: 8px;
        border-top: 1px solid rgba(78, 169, 220, 0.45);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .multi-pulldown.is-open .multi-pulldown-trigger {
        border-radius: var(--radius-sm);
    }
}
