@charset "utf-8";
@import url('fonts.css');

/* COMMON */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent body scroll, use inner scroll */
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    word-spacing: 0;
    word-break: keep-all;
    background: #c5c9d0;
    min-width: 1024px;
    font-weight: 400;
}

.desktop-query-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 3000;
    width: min(460px, calc(100vw - 64px));
    transform: translate(-50%, calc(-50% + 18px)) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.desktop-query-loader.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.desktop-query-loader::before {
    content: "";
    position: absolute;
    inset: -26px;
    border-radius: 38px;
    background:
        radial-gradient(circle at 20% 20%, rgba(79, 125, 255, 0.22), transparent 34%),
        radial-gradient(circle at 80% 75%, rgba(42, 182, 174, 0.18), transparent 36%);
    filter: blur(24px);
    opacity: 0.92;
    z-index: -1;
}

.desktop-query-loader__panel {
    position: relative;
    padding: 24px 26px;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(248, 250, 255, 0.985));
    box-shadow:
        0 30px 70px rgba(15, 23, 42, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.desktop-query-loader__panel::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 29px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06));
    pointer-events: none;
}

.desktop-query-loader__row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.desktop-query-loader__visual {
    position: relative;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
}

.desktop-query-loader__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(79, 125, 255, 0.12);
    border-top-color: #4f7dff;
    border-right-color: rgba(42, 182, 174, 0.84);
    animation: desktopQueryLoaderSpin 1.15s linear infinite;
}

.desktop-query-loader__ring--inner {
    inset: 10px;
    border-width: 3px;
    border-color: rgba(58, 74, 177, 0.10);
    border-bottom-color: #3a4ab1;
    border-left-color: rgba(58, 74, 177, 0.55);
    animation-duration: 1.6s;
    animation-direction: reverse;
}

.desktop-query-loader__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: linear-gradient(135deg, #4f7dff, #2ab6ae);
    box-shadow:
        0 0 0 0 rgba(79, 125, 255, 0.22),
        0 8px 18px rgba(79, 125, 255, 0.28);
    animation: desktopQueryLoaderPulse 1.5s ease-out infinite;
}

.desktop-query-loader__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.desktop-query-loader__label {
    display: block;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -0.03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.desktop-query-loader__hint {
    display: block;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.45;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

@keyframes desktopQueryLoaderSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes desktopQueryLoaderPulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(79, 125, 255, 0.22),
            0 8px 18px rgba(79, 125, 255, 0.28);
    }
    70% {
        box-shadow:
            0 0 0 14px rgba(79, 125, 255, 0),
            0 8px 18px rgba(79, 125, 255, 0.16);
    }
    100% {
        box-shadow:
            0 0 0 0 rgba(79, 125, 255, 0),
            0 8px 18px rgba(79, 125, 255, 0.28);
    }
}

.bundle-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #3a4ab1;
    background: #eef2ff;
    white-space: nowrap;
}

input[type="number"].no-native-spinner {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"].no-native-spinner::-webkit-outer-spin-button,
input[type="number"].no-native-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bundle-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.bundle-name-text {
    min-width: 0;
}

.product-row.is-hq-linked .w-product {
    position: relative;
}

.product-row.is-hq-linked .w-product::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 0;
    height: 0;
    border-top: 17px solid #2563eb;
    border-left: 18px solid transparent;
    border-top-right-radius: 7px;
    filter: drop-shadow(-1px 1px 0 rgba(15, 23, 42, 0.08));
    opacity: 0.9;
}

.product-row.is-hq-linked .bundle-name-row {
    padding-right: 10px;
}

.hq-order-link-info {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-height: 34px;
    padding: 5px 7px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
    color: #334155;
    font-size: 0.72rem;
}

.hq-order-link-info.is-muted {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #64748b;
}

.hq-order-link-info-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 25px;
}

.hq-order-link-info-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.hq-order-link-info-title i {
    color: #2563eb;
}

.hq-order-link-status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
}

.hq-order-link-status.is-open {
    background: #dcfce7;
    color: #047857;
}

.hq-order-link-status.is-closed {
    background: #fee2e2;
    color: #b91c1c;
}

.hq-order-link-status.is-sold-out {
    background: #fff1f2;
    color: #e11d48;
}

.hq-order-link-info-grid {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.hq-order-link-info-item {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    min-width: 0;
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    white-space: nowrap;
}

.hq-order-link-info-item span {
    display: inline;
    margin: 0;
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 600;
    white-space: nowrap;
}

.hq-order-link-info-item strong {
    display: inline;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.7rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hq-order-link-input-result {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    white-space: nowrap;
}

.hq-order-link-limit-item {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hq-order-link-limit-item span,
.hq-order-link-limit-item strong {
    color: #1d4ed8;
}

.hq-order-link-input-result.is-ok {
    background: #ecfdf5;
    color: #047857;
}

.hq-order-link-input-result.is-warning {
    background: #fff7ed;
    color: #c2410c;
}

.hq-order-link-input-result.is-error {
    background: #fff1f2;
    color: #e11d48;
}

.hq-order-link-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    margin-left: auto;
    align-self: flex-start;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #ffffff;
    color: #2563eb;
    font-size: 0.68rem;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.hq-order-link-refresh:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

@media (max-width: 480px) {
    .hq-order-link-info {
        align-items: flex-start;
        flex-direction: row;
        gap: 6px;
    }

    .hq-order-link-info-grid {
        overflow: visible;
    }

}

.product-memo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px dashed #f5d98b;
    color: #ca8a04;
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.12);
}

.product-search-modal .modal-dialog {
    width: min(540px, 92vw);
    max-width: 540px;
}

.product-search-results {
    height: 420px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 푸터 디자인 개선 - 둥근 카드 형태 */
.site-footer {
    background: #f8fafc;
    border: 1px solid #e2e8f0; /* 전체 테두리 */
    border-radius: 10px; /* 모서리 둥글게 */
    padding: 0.35rem 1.5rem;
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1;
    margin-top: 0.35rem; /* 위 컨텐츠와 간격 축소 */
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04); /* 가벼운 그림자 */
}

.footer-oneline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    max-width: 100%;
    margin: 0 auto;
}

.footer-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.2rem 0;
}

.footer-divider {
    display: inline-block;
    width: 1px;
    height: 8px;
    background: #cbd5e1;
    margin: 0 0.5rem;
}

.footer-links {
    display: inline-flex;
    align-items: center;
}

.footer-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    margin: 0 0.35rem;
}

.footer-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.footer-copyright {
    color: #94a3b8;
    margin-left: 0.5rem;
    font-family: monospace;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 0.4rem 1rem;
        margin-top: 0.25rem;
    }
    .footer-divider {
        display: none;
    }
    .footer-oneline {
        gap: 0.25rem;
    }
    .footer-item {
        padding: 0;
    }
}

/* POLICY PAGE STYLES */
.policy-page-wrapper {
    background-color: #ffffff;
    height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden !important; /* 가로 스크롤 방지 */
    display: block;
    min-width: auto !important; /* 기존 body의 1024px 제한 해제 */
}

.policy-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.policy-header {
    background: #ffffff;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 10;
}

.policy-title {
    font-size: 1.35rem; /* 사이즈 약간 최적화 */
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
    word-break: keep-all;
}

.policy-meta {
    font-size: 0.8125rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap; /* 좁은 화면 대응 */
    align-items: center;
    gap: 0.5rem;
}

.policy-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #eff6ff;
    color: #3b82f6;
}

.policy-content {
    padding: 1.5rem 1.5rem 3rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #334155;
}

.policy-content h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 1.75rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #f1f5f9;
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.25rem 0 0.5rem;
}

.policy-content p {
    margin-bottom: 0.75rem;
    word-break: break-all; /* 긴 URL 등 대응 */
}

.policy-content ol, 
.policy-content ul {
    margin-bottom: 1.25rem;
    padding-left: 1.2rem;
}

.policy-content ol {
    list-style-type: decimal;
}

.policy-content ul {
    list-style-type: disc;
}

/* 중첩 리스트 스타일 */
.policy-content ol ol,
.policy-content ul ul,
.policy-content ol ul,
.policy-content ul ol {
    margin-bottom: 0;
    margin-top: 0.5rem;
    padding-left: 1.2rem;
}

.policy-content ol ol {
    list-style-type: lower-alpha; /* a. b. c. */
}

.policy-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.2rem; /* 텍스트와 불릿 사이 간격 미세 조정 */
}

/* 약관 조항 스타일 (제1조 등) */
.policy-article-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
}

.policy-article-title:first-child {
    margin-top: 0;
}

.policy-content a {
    color: #3a4ab1;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.policy-content a:hover {
    color: #2e3b8b;
}

.policy-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .policy-header, .policy-content {
        padding: 1rem;
    }
    .policy-title {
        font-size: 1.15rem;
    }
}

/* Page Layout Wrapper */
.page-wrap {
    max-width: 1920px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem !important;
    height: 100%; /* Fill body */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Contain children */
    padding-bottom: 0.25rem !important; /* 푸터와 간격 축소 */
}

/* View Host - Critical for SPA layout */
#app-view-host {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow shrinking */
    overflow: hidden; /* Force internal scrolling */
}

/* Base styles for app views */
.app-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 0.25rem; /* 본문 하단 여백 축소 */
    overflow: hidden;
}

ul,ol,dl {list-style: none; margin: 0; padding: 0;}
img {max-width: 100%; height: auto;}
h1, h2, h3, h4, h5, h6, p {margin: 0;}
label {font-weight:normal;}
address {margin:0;}

/* LINK */
a,a:hover,a:focus,a:visited {color:inherit;text-decoration:none;outline:0;}

/* FORMS */
.form-control {
    border-radius: 6px;
    font-family:'noto',sans-serif;
    height:40px;
    font-size:15px;
}
select.form-control {
    font-weight:500;
    padding-right: 30px;
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    cursor:pointer;
    letter-spacing:-1.3px;
}
select::-ms-expand {display:none;}
input[readonly], input[readonly="readonly"] {cursor:default!important;}

/* BUTTON */
button{border: none;outline:none;}
.btn {
    outline: 0 !important;
    border-radius: 6px;
    letter-spacing: -0.02em;
    font-size: 14px;
    font-weight: 600;
}
.btn:focus, .btn:active, .btn:hover {
    -webkit-box-shadow: none;
    box-shadow: none;
}

.btn.blue {background:#3a4ab1;border-color:#3a4ab1;color:#fff}
.btn.blue:hover {background:#4f5fc5;border-color:#4f5fc5;}
.btn.green {background:#2ab6ae;border-color:#2ab6ae;color:#fff}
.btn.green:hover {background:#39c5bd;border-color:#39c5bd;}
.btn.orange {background:#e46825;border-color:#e46825;color:#fff}
.btn.orange:hover {background:#f27735;border-color:#f27735;}
.btn.gray {background:#586673;border-color:#586673;color:#fff;}
.btn.gray:hover {background:#6a7888;border-color:#6a7888;}
.btn.red {background:#e60b00;border-color:#e60b00;color:#fff;}
.btn.red:hover {background:#ff1c0f;border-color:#ff1c0f;}
.btn.lightgray {background:#f4f4f4;border-color:#ddd;color:#666}
.btn.lightgray:hover {background:#e8e8e8;border-color:#ccc;color:#555}

.btn.line {background: #fff !important;border:1px solid #373737;color: #373737;}
.btn.line.blue {border-color:#3a4ab1;color:#3a4ab1;background: #fff !important;}
.btn.line.green {border-color:#2ab6ae;color:#2ab6ae;background: #fff !important;}
.btn.line.gray {border-color:#ccc;color:#333;background: #fff !important;}
.btn.line.red {border-color:#e60b00;color:#e60b00;background: #fff !important;}

/* TABLE */
.table {
    border-top: 2px solid #666;
    border-bottom: 1px solid #ddd;
    margin: 0;
}

/* Bulk product add */
.bulk-add-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}
.bulk-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.bulk-option-set {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}
.bulk-set-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.bulk-rule-card {
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: #f8fafc;
}
.bulk-template-panel {
    margin-top: 0.75rem;
}
.bulk-template-panel.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}
.bulk-stock-card {
    margin-top: 0.75rem;
}
.bulk-stock-table {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem;
    background: #fff;
}
.bulk-stock-table table {
    min-width: 480px;
    margin-bottom: 0;
}
.bulk-option3-section {
    margin-bottom: 0.75rem;
}
.bulk-stock-table th,
.bulk-stock-table td {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.bulk-template-input:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
}
.bulk-stock-input {
    min-width: 56px;
}
.bulk-preview-table {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.bulk-modal-wide {
    max-width: 720px;
}
@media (max-width: 768px) {
    .bulk-modal-wide {
        max-width: 100%;
    }
}
.table>thead>tr>th {border-bottom-width: 1px;}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    vertical-align: middle;
    padding: 10px 12px;
    border-top: 0;
    border-bottom: 1px solid #ddd;
}
.table > thead > tr > th {border-top: 1px solid #888}
.table th {font-weight: 500}

/* MODAL */
.modal {
    padding: 1rem !important;
}
#storeModal .modal-dialog {
    max-width: 600px !important;
}
.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.modal.fade,
.modal.fade .modal-dialog {
    transition: none !important;
}
.modal:before {
    content: none;
    display: none;
}
.modal-dialog {
    margin: 0;
}
.modal-content {
    border-radius: var(--radius);
}
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}
.modal-header {background: #f8fafc; padding: 1rem 1.25rem;}

.modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Product Add Modal Scroll */
#productAddModal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#productAddModal form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#productAddModal .modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 1.25rem;
}

.product-quick-fill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-quick-fill-help {
    margin-top: 2px;
    margin-bottom: 0;
    font-size: 0.72rem;
    line-height: 1.2;
}

.product-quick-fill-trigger {
    position: relative;
    margin-left: auto;
    white-space: nowrap;
}

.product-quick-fill-row > .product-quick-fill-trigger::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    width: 1px;
    height: 22px;
    border-radius: 999px;
    background: #d9e6f7;
    transform: translateY(-50%);
}

.product-quick-fill-modal {
    position: fixed;
    inset: 0;
    z-index: 3050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.product-quick-fill-modal.show {
    display: flex;
}

.product-quick-fill-rule-modal {
    z-index: 3060;
}

.product-quick-fill-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
}

.product-quick-fill-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: min(760px, calc(100vh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.26);
}

.product-quick-fill-rule-dialog {
    width: min(760px, 100%);
}

.product-quick-fill-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 14px;
    background: #fff !important;
    border-bottom: 1px solid #eaf1ff;
}

.product-quick-fill-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-quick-fill-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 800;
}

.product-quick-fill-panel .product-quick-fill-header h5,
.product-quick-fill-panel #product-quick-fill-title {
    margin: 0;
    color: #0f172a !important;
    font-size: 1.15rem;
    font-weight: 850;
}

.product-quick-fill-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 1.45rem;
    line-height: 1;
}

.product-quick-fill-rule-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    background: #fff;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 800;
}

.product-quick-fill-body {
    padding: 18px 22px;
    overflow-y: auto;
}

.product-quick-fill-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 800;
}

.product-quick-fill-textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    padding: 14px;
    border: 1px solid #d8e6fb;
    border-radius: 16px;
    color: #0f172a;
    background: #fbfdff;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    outline: none;
}

.product-quick-fill-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.product-quick-fill-rule-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
}

.product-quick-fill-rule-modal .product-quick-fill-rule-panel {
    margin-top: 0;
    border: 0;
    background: transparent;
    padding: 0;
}

.product-quick-fill-rule-body {
    padding: 16px 18px 18px;
}

.product-quick-fill-rule-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.product-quick-fill-rule-head strong {
    color: #0f172a;
    font-size: 0.9rem;
}

.product-quick-fill-rule-head span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 650;
}

.product-quick-fill-rule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.product-quick-fill-rule-grid fieldset {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #e0ebfb;
    border-radius: 12px;
    background: #fff;
}

.product-quick-fill-rule-grid legend {
    float: none;
    width: auto;
    margin: 0 0 2px;
    color: #1e3a8a;
    font-size: 0.78rem;
    font-weight: 850;
}

.product-quick-fill-rule-grid label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}

.product-quick-fill-rule-grid label.product-quick-fill-rule-check {
    margin-top: 2px;
}

.product-quick-fill-rule-input {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #d8e6fb;
    border-radius: 9px;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 700;
    outline: none;
}

.product-quick-fill-rule-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.product-quick-fill-stop-word-label {
    display: block;
    margin: 10px 0 5px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
}

.product-quick-fill-stop-words {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #d8e6fb;
    border-radius: 10px;
    color: #0f172a;
    font-size: 0.82rem;
    outline: none;
}

.product-quick-fill-rule-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.product-quick-fill-analyze {
    width: 100%;
    margin-top: 10px;
    border: 0;
    border-radius: 14px;
    padding: 11px 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 850;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.product-quick-fill-result {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.product-quick-fill-group,
.product-quick-fill-message {
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
    padding: 12px;
}

.product-quick-fill-group-title {
    margin-bottom: 8px;
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 850;
}

.product-quick-fill-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-quick-fill-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.product-quick-fill-option input {
    accent-color: #2563eb;
}

.product-quick-fill-empty,
.product-quick-fill-message {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 650;
}

.product-quick-fill-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid #eaf1ff;
    background: #fbfdff;
}

@media (max-width: 560px) {
    .product-quick-fill-rule-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Order Detail Modal Scroll */
.product-order-detail {
    height: 75vh;
    max-height: 75vh;
}
.product-order-detail .modal-content {
    height: 100%;
}
.product-order-detail .modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.product-order-detail .table-responsive {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* ALERT MODAL */
.alert-modal .modal-dialog {
    max-width: 420px;
}
.alert-modal .modal-content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}
.alert-modal .modal-header {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
}
.alert-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1f2a44;
    font-size: 15px;
}
.alert-modal-title i {
    color: #3a4ab1;
}
.alert-modal .modal-body {
    padding: 15px 16px 8px;
}
.alert-modal-message {
    font-size: 14px;
    color: #1f2a44;
    white-space: pre-line;
    line-height: 1.5;
    text-align: center;
}
.alert-modal .modal-footer {
    border-top: 0;
    padding: 0 16px 15px;
    justify-content: center;
}
.alert-modal .modal-footer .btn {
    min-width: 100px;
}

/* PASSWORD POLICY */
.password-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input .form-control {
    padding-right: 42px;
}
.password-input .form-control.form-control-sm {
    padding-right: 36px;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.password-input .form-control.form-control-sm ~ .password-toggle {
    width: 26px;
    height: 26px;
    right: 6px;
}
.password-toggle i {
    pointer-events: none;
}
.password-input:focus-within .password-toggle {
    background: #e2e8f0;
    color: #1f2937;
}
.password-checklist {
    margin: 6px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4px 12px;
    font-size: 12px;
    color: #9ca3af;
}
.password-check-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.password-check-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: #16a34a;
    opacity: 0;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}
.password-check-item.is-ok {
    color: #16a34a;
}
.password-check-item.is-ok .password-check-icon {
    opacity: 1;
    border-color: #16a34a;
}
.password-message {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    white-space: pre-line;
}

/* HEADER */
header {
    background: rgba(38,41,60,.95);
    box-shadow: 0 3px 4px rgba(0,0,0,.2);
    padding: 12px 20px;
}
header.hdr-sub {
    background: rgba(38,41,60,1);
    box-shadow: none;
}
header > h1 .logo {
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    letter-spacing: -0.02em;
}
header > h1 .page-title {
    font-weight: 700;
    font-size: 24px;
    color: #fff;
    letter-spacing: -0.02em;
}

/* APP HEADER */
.app-header {
    background: rgb(38 41 60);
    border: 0;
    border-radius: var(--radius, 6px);
    padding: 1rem 1.25rem; /* 세로 높이 확대 */
    box-shadow: var(--shadow, 0 3px 4px rgba(0,0,0,.15));
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.app-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
}

.app-header-left { justify-self: start; min-width: 0; }
.app-header-center { justify-self: center; }
.app-header-right {
    justify-self: end;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fccd3e;
}

.brand-logo {
    width: auto;
    height: 44px;
    max-width: 180px;
    object-fit: contain;
}

.brand-title {
    white-space: nowrap;
    font-size: 1.1rem;
}

.app-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
}

.app-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    font-size: 0.9rem;
}

.app-tab:hover {
    background: rgba(255,255,255,0.14);
    color: #ffffff !important;
    opacity: 1;
}

.app-tab.active {
    background: #ffffff;
    color: #0f172a !important;
    text-shadow: none;
    opacity: 1;
}

.clock {
    padding: 0.35rem 0.65rem;
    border: 1px solid #4f5265;
    border-radius: var(--radius, 6px);
    background: #4f5265;
    font-weight: 600;
    color: #ffffff !important;
    font-variant-numeric: tabular-nums;
    min-width: 155px;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
    opacity: 0.8;
    font-size: 0.9rem;
}

.app-logout-form {
    margin: 0;
}

.app-header-btn,
.app-logout-btn {
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
    cursor: pointer;
    opacity: 0.8;
}

.app-header-btn:hover,
.app-logout-btn:hover {
    background: rgba(255,255,255,0.2);
    opacity: 1;
}

/* UTILITY */
.wp-100 {width: 100%;}
.wp-50 {width: 50%;}
.fr{float:right!important;}
.fl{float:left!important;}
.txc{text-align:center;}

.m-0 {margin:0 !important;}
.p-0 {padding:0 !important;}
.mt-0 {margin-top:0 !important;}
.mt-10 {margin-top:10px !important;}
.mt-20 {margin-top:20px !important;}
.mt-30 {margin-top:30px !important;}
.mb-0 {margin-bottom:0 !important;}
.mb-10 {margin-bottom:10px !important;}
.mb-20 {margin-bottom:20px !important;}
.mb-30 {margin-bottom:30px !important;}
.mr-10 {margin-right:10px !important;}
.mr-20 {margin-right:20px !important;}
.ml-10 {margin-left:10px !important;}
.ml-20 {margin-left:20px !important;}

.text-blue {color:#3a4ab1}
.text-red {color:#e60b00}
.text-orange {color:#e46825}
.text-green {color:#2ab6ae}

.fw-normal {font-weight:400;}
.fw-medium {font-weight:500;}
.fw-bold {font-weight:700;}

/* Toast Notification */
.toast-container {
    z-index: 10000;
    pointer-events: none;
}
#global-toast-container {
    top: 22px !important;
}
.toast {
    background-color: rgba(33, 37, 41, 0.9);
    backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 280px;
    pointer-events: none;
}
.toast .toast-body {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.toast-success .toast-body i { color: #10b981; }
.toast-error .toast-body i { color: #ef4444; }

@media (max-width: 640px) {
    #global-toast-container {
        top: max(12px, env(safe-area-inset-top)) !important;
        width: min(100%, 420px);
    }
    #global-toast-container .toast {
        min-width: 0;
        width: calc(100vw - 2rem);
        max-width: 420px;
    }
}

/* MODERN HEADER */
.modern-header {
    background: #ffffff;
    border-radius: 12px;
    padding: 6px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.license-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.license-banner-readonly {
    background: #fffbf2;
    color: #7c5a21;
    border: 1px solid #f2e2bf;
}

.license-banner-expiry {
    background: #fffaf5;
    color: #7a3e16;
    border: 1px solid #f8d9bd;
}

.license-banner-expiry-urgent {
    background: #fff5f5;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.license-banner > i {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 12px;
    flex-shrink: 0;
}

.license-banner-content {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1 1 auto;
}

.license-banner-content .fw-bold {
    font-size: 13px;
    letter-spacing: -0.01em;
}

.license-banner-extra {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-left: 8px;
    border-left: 1px solid rgba(148, 163, 184, 0.35);
}

.license-banner-note {
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0.86;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.license-banner-payment-btn,
.license-banner-dismiss {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.license-banner-payment-btn {
    white-space: nowrap;
}

.license-banner-dismiss {
    margin-left: 4px;
}

.license-banner-payment-btn:hover,
.license-banner-dismiss:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

@media (max-width: 900px) {
    .license-banner {
        padding: 7px 8px;
        gap: 8px;
    }

    .license-banner-content {
        flex-basis: calc(100% - 30px);
    }

    .license-banner-extra {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        justify-content: flex-end;
    }

    .license-banner-dismiss {
        margin-left: auto;
    }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.header-logo {
    height: 28px;
    width: auto;
}

.store-badge {
    background: linear-gradient(135deg, #3a4ab1 0%, #2e3b8b 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(58, 74, 177, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.store-badge i {
    color: #fccd3e; /* 강조 아이콘 색상 (노란색 계열) */
    font-size: 13px;
    margin-right: 8px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.store-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(58, 74, 177, 0.2);
    filter: brightness(1.05);
}

.store-demo-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    min-height: 18px;
    padding: 1px 8px 0;
    border-radius: 999px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f8fafc;
    padding: 3px;
    border-radius: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 13px;
    opacity: 0.8;
}

.nav-item:hover {
    color: #334155;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-item.active {
    color: #3a4ab1;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(58, 74, 177, 0.08);
}

.header-actions {
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.settings-notice-card-list {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.settings-notice-card {
    display: none;
    align-items: center;
    gap: 8px;
    max-width: 360px;
    min-height: 42px;
    padding: 5px 8px 5px 6px;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.98) 0%, rgba(250, 252, 255, 0.98) 52%, rgba(236, 253, 245, 0.95) 100%);
    color: #1e293b;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.settings-notice-card.is-visible {
    display: inline-flex;
}

.settings-notice-card:not(.is-static):hover {
    color: #0f172a;
    border-color: #93c5fd;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.settings-notice-card-link {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.settings-notice-card-link:hover {
    color: inherit;
}

.settings-notice-card-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #ffffff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.85);
    font-size: 0.82rem;
}

.settings-notice-card-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.settings-notice-card-copy strong {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.1;
}

.settings-notice-card-copy small {
    display: block;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.12;
}

.settings-notice-card-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.settings-notice-card-dismiss {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.settings-notice-card-dismiss:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-user:hover, .btn-user[aria-expanded="true"] {
    background: #f1f5f9;
}

.btn-header-action {
    padding: 4px 10px 4px 6px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.btn-header-action:hover,
.btn-header-action[aria-expanded="true"] {
    background: #eef4ff;
    border-color: rgba(99, 102, 241, 0.18);
    box-shadow: 0 10px 20px rgba(58, 74, 177, 0.12);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #3a4ab1;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.user-avatar-settings {
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    color: #3a4ab1;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.header-settings-menu {
    min-width: 220px;
}

@media (max-width: 1439.98px) {
    .settings-notice-card {
        max-width: 270px;
    }

    .settings-notice-card-copy small {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .settings-notice-card-list {
        display: none;
    }
}

.dropdown-menu {
    border-radius: 10px;
    padding: 6px;
    margin-top: 6px !important;
}

.dropdown-item {
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item.text-danger:hover {
    background: #fef2f2;
}

/* Offcanvas custom style for mobile nav */
.offcanvas {
    border-radius: 0 16px 16px 0;
}

/* UNIFIED CONTENT LAYOUT */
.content-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%; /* Fill available height in flex container */
    min-height: 0; /* Important for nested scrolling */
}

.content-header {
    background-color: #f8fafc; /* Slate-50 */
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    flex-shrink: 0;
}

.content-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.content-body .table-responsive {
    flex-grow: 1;
    overflow: auto;
    border-radius: 0;
}

.content-card .filter-card,
.content-card .table-card {
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    height: auto;
}

.content-header form {
    margin: 0;
}

.content-footer {
    border-top: 1px solid #e2e8f0;
    padding: 8px 16px;
    background-color: #ffffff;
    flex-shrink: 0;
}

/* =========================================
   MEMO STYLES (Shared)
   ========================================= */
.btn-memo-styled {
    background-color: #fffbeb; /* Amber-50 */
    color: #b45309; /* Amber-700 */
    border: 1px solid #fcd34d !important; /* Amber-300 */
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 4px;
    height: 28px;
}
.btn-memo-styled:hover {
    background-color: #fef3c7; /* Amber-100 */
    color: #92400e; /* Amber-800 */
    border-color: #f59e0b !important; /* Amber-500 */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.15);
}
.btn-memo-styled:active {
    transform: translateY(0);
    background-color: #fde68a; /* Amber-200 */
}
.btn-memo-styled.has-memo {
    background-color: #f59e0b; /* Amber-500 */
    color: #ffffff;
    border-color: #d97706 !important; /* Amber-600 */
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}
.btn-memo-styled.has-memo:hover {
    background-color: #d97706; /* Amber-600 */
}
.btn-memo-styled.is-open {
    background-color: #fde68a; /* Amber-200 */
    color: #92400e;
    border-color: #f59e0b !important;
}

.memo-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.55rem 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    transition: all 0.2s ease;
}
.memo-toggle-btn .memo-toggle-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.memo-toggle-btn .memo-toggle-text i {
    color: #ca8a04;
}
.memo-toggle-btn .memo-toggle-track {
    position: relative;
    width: 34px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 999px;
    transition: background 0.2s ease;
}
.memo-toggle-btn .memo-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}
.memo-toggle-btn:hover {
    border-color: #f5d98b;
    color: #92400e;
}
.memo-toggle-btn.has-memo {
    background: #fff7d1;
    border-color: #f5d98b;
    color: #854d0e;
}
.memo-toggle-btn.is-open .memo-toggle-track {
    background: #f59e0b;
}
.memo-toggle-btn.is-open .memo-toggle-thumb {
    transform: translateX(16px);
}
.memo-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

/* Memo Modal Theme (Yellow Note Style) */
.modal-memo-theme .modal-header {
    background-color: #fef3c7; /* Amber-100 */
    border-bottom: 1px dashed #fcd34d; /* Amber-300 */
    color: #92400e;
    padding: 0.75rem 1rem;
}
.modal-memo-theme .modal-title {
    color: #92400e; /* Amber-800 */
    font-weight: 800;
    display: flex;
    align-items: center;
    font-size: 1rem;
}
.modal-memo-theme .modal-body {
    background-color: #fffbeb; /* Amber-50 */
    padding: 1rem;
}
.modal-memo-theme .form-control {
    background-color: #ffffff;
    border-color: #fcd34d;
    font-size: 0.9rem;
}
.modal-memo-theme .form-control:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.modal-memo-theme .modal-footer {
    background-color: #fffbeb;
    border-top: 1px dashed #fcd34d;
    padding: 0.75rem 1rem;
}

/* Sticky memo panel (shared) */
.pickup-memo-panel {
    position: absolute;
    top: 60px;
    left: 100%;
    margin-left: 15px;
    z-index: 1060;
    width: 360px;
    max-width: 90vw;
    background: transparent;
    border: none;
    overflow: visible;
    animation: memoSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: 5px;
}
.pickup-memo-panel.is-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: 0;
    transform: translate(-50%, -50%);
    z-index: 2000;
    animation: none;
}

@media (max-width: 1100px) {
    .pickup-memo-panel {
        left: auto;
        right: -10px;
        top: 100px;
        width: 320px;
    }
    .pickup-memo-panel.is-centered {
        right: auto;
        top: 50%;
    }
}

@media (max-width: 768px) {
    .pickup-memo-panel {
        width: calc(100% - 2rem);
        max-width: none;
        left: 1rem;
        right: auto;
    }
}

/* Paper Background Layer */
.pickup-memo-paper {
    position: absolute;
    inset: 0;
    background: #fff7d1; /* Classic Post-it Yellow */
    border-radius: 2px;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.1);
    z-index: 0; /* Sits at base level */
}

/* Masking Tape Effect on top */
.pickup-memo-panel::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 120px;
    height: 35px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 10; /* Above paper and content */
}

/* Lifted Corner Shadow - Simplified & Robust */
.pickup-memo-panel::after {
    content: "";
    position: absolute;
    z-index: -1; /* Behind paper */
    bottom: 15px;
    right: 8px;
    width: 70%;
    height: 20%;
    max-width: 300px;
    box-shadow: 0 15px 10px rgba(0, 0, 0, 0.2);
    transform: rotate(3deg);
    background: transparent;
}

@keyframes memoSlideIn {
    from { opacity: 0; transform: translateY(-20px) rotate(1deg); }
    to { opacity: 1; transform: translateY(0) rotate(0); }
}

.pickup-memo-header {
    position: relative;
    z-index: 1; /* Above paper */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.75rem;
    border: none;
    background: transparent;
    cursor: grab;
    user-select: none;
}

.pickup-memo-panel.is-dragging .pickup-memo-header {
    cursor: grabbing;
}

body.pickup-memo-dragging {
    user-select: none;
}

.pickup-memo-title {
    font-weight: 800;
    color: #854d0e; /* Darker Amber-800 */
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'GmarketSansBold', sans-serif;
}
.pickup-memo-title i {
    color: #ca8a04;
}

.pickup-memo-nickname {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    color: #a16207;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pickup-memo-body {
    position: relative;
    z-index: 1; /* Above paper */
    padding: 0 1.25rem 1.25rem;
}

.pickup-memo-body textarea {
    line-height: 1.8;
    min-height: 10rem;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 1rem;
    font-size: 1.05rem;
    color: #422006;
    resize: none;
}
.pickup-memo-body textarea:focus {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    outline: none;
}

.pickup-memo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}
.pickup-memo-actions .btn-primary {
    background-color: #ca8a04;
    border-color: #ca8a04;
    color: #fff;
    border-radius: 4px;
    padding: 0.4rem 1.2rem;
}
.pickup-memo-actions .btn-primary:hover {
    background-color: #a16207;
}

.pickup-memo-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #a16207;
    font-weight: 600;
}

.product-memo-input-wrap {
    display: none;
    padding: 0.65rem 0.75rem 0.7rem;
    border-radius: 10px;
    background: #fff7d1;
    border: 1px dashed #f5d98b;
}
.product-memo-input-wrap.is-open {
    display: block;
}

.product-memo-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: #854d0e;
    margin-bottom: 0.4rem;
}
.product-memo-label i {
    color: #ca8a04;
}
.product-memo-limit {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a16207;
}

.product-memo-input {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(245, 217, 139, 0.6);
    color: #422006;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0.65rem 0.75rem;
    resize: none;
    max-height: calc(1.6em * 2 + 1.3rem);
    overflow-y: auto;
}
.product-memo-input:focus {
    background: rgba(255, 255, 255, 0.85);
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.product-procurement-field {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 0.28rem 0.46rem;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #ffffff;
}

.product-procurement-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.product-procurement-label i {
    color: #2563eb;
}

.product-procurement-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.28rem;
    min-width: 0;
}

.product-procurement-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.14rem 0.58rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn-check:checked + .product-procurement-option {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.12);
}

.btn-check:checked + .product-procurement-option.is-not-ordered {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
}

.btn-check:checked + .product-procurement-option.is-order-closed {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}

.product-procurement-hint {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.product-procurement-stock-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    margin-bottom: 0.3rem;
}

.procurement-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0.14rem 0.48rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.procurement-status-badge.is-not-ordered {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.procurement-status-badge.is-order-closed {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

/* Product favorite (desktop) */
.modal-modern .modal-header {
    position: relative;
}

.product-favorite-actions {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-favorite-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#productEditModal .modal-title {
    padding-left: 3.15rem;
}

.product-favorite-btn.is-active {
    color: #ef4444;
    border-color: #fecaca;
    background: #fff1f2;
}

.product-favorite-btn:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.favorite-color-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.product-edit-header-actions {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 5;
}

.favorite-color-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
}

.favorite-color-trigger:hover {
    border-color: #cbd5f5;
}

.favorite-color-trigger:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.favorite-color-arrow {
    font-size: 0.7rem;
    color: #94a3b8;
}

.favorite-color-palette {
    position: absolute;
    top: calc(100% + 10px);
    left: auto;
    right: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0.55rem;
    width: min(232px, calc(100vw - 32px));
    min-width: 0;
    padding: 0.65rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
    z-index: 20;
    box-sizing: border-box;
}

.favorite-color-picker.is-open .favorite-color-palette {
    display: flex;
}

.favorite-color-option-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.42rem;
    width: 100%;
}

.favorite-color-divider {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.favorite-color-custom-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
}

.favorite-color-custom-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: -0.01em;
}

.favorite-color-custom-row {
    display: flex;
    flex-direction: column;
    gap: 0.46rem;
    padding: 0.38rem 0.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.favorite-color-custom-row.is-saving {
    opacity: 0.6;
}

.favorite-color-custom-main {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 0.5rem;
}

.favorite-color-custom-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
}

.favorite-color-custom-name-field {
    width: 100%;
    display: block;
}

.favorite-color-custom-name-input {
    width: 100%;
    height: 28px;
    padding: 0 0.55rem;
    border: 1px solid #dbe2ec;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.favorite-color-custom-name-input::placeholder {
    color: #94a3b8;
    font-weight: 600;
}

.favorite-color-custom-name-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.28);
}

.favorite-color-custom-name-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.favorite-color-custom-label {
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-color-custom-code {
    font-size: 0.68rem;
    line-height: 1.1;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.favorite-color-custom-edit-btn {
    position: relative;
    width: 78px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.favorite-color-custom-edit-btn:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.favorite-color-custom-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.5rem;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #ffffff;
}

.favorite-color-custom-editor-preview {
    width: 100%;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
}

.favorite-color-custom-editor-main {
    width: 100%;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
}

.favorite-color-custom-picker-btn {
    position: relative;
    width: 92px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
}

.favorite-color-custom-picker-btn-text {
    pointer-events: none;
}

.favorite-color-custom-editor-code {
    min-width: 0;
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
}

.favorite-color-opacity-row {
    width: 100%;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
}

.favorite-color-opacity-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.favorite-color-opacity-input {
    width: 100%;
    height: 18px;
    margin: 0;
    accent-color: #3b82f6;
    cursor: pointer;
}

.favorite-color-custom-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.favorite-color-custom-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.favorite-color-custom-input::-webkit-color-swatch {
    border: 0;
    border-radius: 0;
}

.favorite-color-custom-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.favorite-color-cancel-btn,
.favorite-color-save-btn {
    min-width: 62px;
    height: 32px;
    padding: 0 0.82rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.favorite-color-cancel-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
}

.favorite-color-save-btn {
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.favorite-color-custom-input::-moz-color-swatch {
    border: 0;
    border-radius: 0;
}

.favorite-color-option {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0;
    cursor: pointer;
}

.product-edit-header-actions .favorite-color-picker,
.modal-header .favorite-color-picker {
    margin-top: 2px;
}

.favorite-color-option.is-default {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.favorite-color-option.is-active {
    outline: 2px solid #60a5fa;
    outline-offset: 1px;
}

.favorite-color-chip {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--chip-border, #e2e8f0);
    background: var(--chip-bg, #ffffff);
    display: inline-block;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.favorite-color-chip.is-default {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.favorite-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: inline-block;
    flex-shrink: 0;
}

.favorite-color-dot.is-default {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.favorite-color-dot.is-sky {
    background: #DDEBFF;
    border-color: #BFD2FF;
}

.favorite-color-dot.is-mint {
    background: #DFF7E8;
    border-color: #B6EFD0;
}

.favorite-color-dot.is-lemon {
    background: #FFF6D6;
    border-color: #FDE68A;
}

.favorite-color-dot.is-peach {
    background: #FFE2CC;
    border-color: #F6B37B;
}

.favorite-color-dot.is-rose {
    background: #FFD6E0;
    border-color: #F4AFC2;
}

.favorite-picker {
    position: relative;
}

.favorite-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.favorite-picker-panel {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.favorite-picker-search {
    margin-bottom: 0.5rem;
}

.favorite-picker-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.25rem;
}

.favorite-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.4rem 0.45rem;
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.2;
    color: #0f172a;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.favorite-item:hover {
    background: #f8fafc;
    border-color: #cbd5f5;
}

.favorite-item:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.favorite-item-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.favorite-item-name {
    min-width: 0;
}

.favorite-item-meta {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.35;
}

.favorite-item-tier {
    font-size: 0.7rem;
    color: #475569;
    font-weight: 600;
    line-height: 1.35;
}

.favorite-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.favorite-item-badge {
    font-size: 0.65rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.favorite-picker-empty {
    margin-top: 0.4rem;
}

.product-memo-preview {
    margin-top: 0.6rem;
    padding: 0.45rem 0.6rem;
    background: #fff7d1;
    border: 1px dashed #f5d98b;
    border-radius: 6px;
    color: #7c4a0d;
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: pre-line;
    max-height: calc(1.4em * 5);
    overflow-y: auto;
}
.product-memo-preview-text {
    white-space: pre-line;
}
.memo-updated-badge,
.product-memo-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    margin-top: 0.42rem;
    padding: 0.12rem 0.44rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(245, 217, 139, 0.72);
    color: #8a5a12;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.memo-updated-badge[hidden],
.product-memo-updated[hidden] {
    display: none !important;
}
.memo-updated-badge::before,
.product-memo-updated::before {
    content: "";
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    .memo-updated-badge,
    .product-memo-updated {
        gap: 0.26rem;
        margin-top: 0.3rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: #7c8aa0;
        font-size: 0.67rem;
        font-weight: 650;
        line-height: 1.2;
    }

    .memo-updated-badge::before,
    .product-memo-updated::before {
        width: 0.24rem;
        height: 0.24rem;
        background: #a8b4c5;
        box-shadow: none;
    }
}
.product-memo-preview::-webkit-scrollbar {
    width: 6px;
}
.product-memo-preview::-webkit-scrollbar-track {
    background: transparent;
}
.product-memo-preview::-webkit-scrollbar-thumb {
    background-color: #f4cf6a;
    border-radius: 10px;
}
.product-memo-preview::-webkit-scrollbar-thumb:hover {
    background-color: #e9b949;
}

.group-buy-cancel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #e11d48;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

[data-product-tax-type-group] {
    position: relative;
    isolation: isolate;
    border-color: rgba(20, 184, 166, 0.42) !important;
    background:
        radial-gradient(circle at 10% 18%, rgba(153, 246, 228, 0.4), transparent 36%),
        linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(236, 254, 255, 0.94)) !important;
    box-shadow:
        0 7px 16px -15px rgba(13, 148, 136, 0.66),
        0 0 0 1px rgba(20, 184, 166, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
    animation: productTaxTypeBorderPulse 1.9s ease-in-out infinite;
}

[data-product-tax-type-group] > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #0f766e !important;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

[data-product-tax-type-group] > span:first-child::before {
    content: "";
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 999px;
    background: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.13);
}

[data-product-tax-type-group] label {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-height: 1.28rem;
    padding: 0.08rem 0.4rem;
    padding-left: 0.4rem !important;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #64748b;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

[data-product-tax-type-group] label .form-check-input {
    float: none;
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: 0;
}

[data-product-tax-type-group] label:has(input:checked) {
    border-color: rgba(14, 116, 144, 0.24);
    background: #0891b2;
    color: #ffffff;
    box-shadow: 0 5px 14px -11px rgba(8, 145, 178, 0.72);
}

[data-product-tax-type-group] label:has(input:checked) .form-check-input {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
}

@keyframes productTaxTypeBorderPulse {
    0%, 100% {
        border-color: rgba(20, 184, 166, 0.34);
        box-shadow:
            0 7px 16px -15px rgba(13, 148, 136, 0.66),
            0 0 0 1px rgba(20, 184, 166, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.84);
    }
    50% {
        border-color: rgba(8, 145, 178, 0.64);
        box-shadow:
            0 8px 18px -15px rgba(8, 145, 178, 0.74),
            0 0 0 2px rgba(20, 184, 166, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-product-tax-type-group] {
        animation: none;
    }
}
