/* White skin — black(기본) 대비 가독성 중심 오버라이드 */

html[data-m2m-skin="white"] {
    --m2m-bg: #eef2f7;
    --m2m-bg-elev: #ffffff;
    --m2m-accent: #2563eb;
    --m2m-accent-2: #7c3aed;
    --m2m-text: #1e293b;
    --m2m-text-muted: #64748b;
    --m2m-glass: rgba(255, 255, 255, 0.96);
    --m2m-glass-border: rgba(15, 23, 42, 0.12);
    --m2m-cat-ar: #b45309;
    --m2m-cat-stock: #15803d;
    --m2m-cat-sales: #be123c;
    --m2m-cat-cs: #7e22ce;
    --m2m-cat-system: #475569;
    --m2m-cat-master: #0369a1;
    --m2m-cat-general: #c2410c;
    --m2m-cat-wh: #0e7490;
    --m2m-cat-dashboard: #4338ca;
}

html[data-m2m-skin="white"] body.m2m-app-body::before {
    background:
        radial-gradient(ellipse 100% 80% at 80% -30%, rgba(37, 99, 235, 0.08), transparent 50%),
        radial-gradient(ellipse 70% 60% at 10% 100%, rgba(124, 58, 237, 0.06), transparent 45%);
}

html[data-m2m-skin="white"] .m2m-sidebar:hover {
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08);
}

html[data-m2m-skin="white"] .sidebar-mark .sb-m {
    color: #334155;
    text-shadow: none;
}

html[data-m2m-skin="white"] .sidebar-mark .sb-2 {
    color: #2563eb;
}

html[data-m2m-skin="white"] .menu-link {
    color: #334155;
}

html[data-m2m-skin="white"] .menu-link:hover,
html[data-m2m-skin="white"] .menu-link.active {
    color: #0f172a;
    background: rgba(37, 99, 235, 0.08);
}

html[data-m2m-skin="white"] .m2m-sidebar .sidebar .collapse .menu-link:hover .menu-ico,
html[data-m2m-skin="white"] .m2m-sidebar .sidebar .collapse .menu-link:hover i {
    color: #1d4ed8 !important;
}

html[data-m2m-skin="white"] .app-top-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-m2m-skin="white"] .page-title-in-header {
    color: #0f172a;
}

html[data-m2m-skin="white"] .logout-link:hover {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
}

html[data-m2m-skin="white"] .content-body {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html[data-m2m-skin="white"] .dashboard-tagline {
    color: #334155;
}

html[data-m2m-skin="white"] .ql-edit-btn {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

html[data-m2m-skin="white"] .ql-edit-btn:hover {
    background: rgba(37, 99, 235, 0.14);
    color: #1e3a8a;
}

html[data-m2m-skin="white"] .ql-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    color: #1e293b;
}

html[data-m2m-skin="white"] .ql-card:hover {
    background: #f8fafc;
    border-color: rgba(37, 99, 235, 0.35);
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

html[data-m2m-skin="white"] .ql-card:hover span {
    color: #64748b;
}

html[data-m2m-skin="white"] .ql-modal .modal-content {
    background: #ffffff;
    color: #1e293b;
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-m2m-skin="white"] .ql-modal .btn-close {
    filter: none;
    opacity: 0.55;
}

html[data-m2m-skin="white"] .ql-editor-list {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-m2m-skin="white"] .ql-ed-row {
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-m2m-skin="white"] .content-body label.stock-control-label,
html[data-m2m-skin="white"] .content-body label.label {
    color: #9a3412 !important;
    text-shadow: none;
}

html[data-m2m-skin="white"] .content-body .stock-inquiry-grid .product-code-link,
html[data-m2m-skin="white"] .content-body table.table tbody td a,
html[data-m2m-skin="white"] .content-body table.table tbody td a.text-primary {
    color: #2563eb !important;
}

html[data-m2m-skin="white"] .content-body .stock-inquiry-grid .product-code-link:hover,
html[data-m2m-skin="white"] .content-body table.table tbody td a:hover {
    color: #1d4ed8 !important;
}

html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > thead > tr > th,
html[data-m2m-skin="white"] .content-body table.sales-monthly-table > thead > tr > th,
html[data-m2m-skin="white"] .content-body table.table thead th {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-bottom-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > tbody > tr:nth-child(odd) > td {
    background-color: #ffffff;
}

html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > tbody > tr:nth-child(even) > td {
    background-color: #f8fafc;
}

html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > tbody > tr:hover > td,
html[data-m2m-skin="white"] .content-body table.table > tbody > tr:hover > td,
html[data-m2m-skin="white"] .content-body table.table > tbody > tr:hover > th {
    background-color: rgba(37, 99, 235, 0.12) !important;
    color: #0f172a !important;
}

html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > tfoot > tr > td,
html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > tfoot > tr:nth-child(1) > td,
html[data-m2m-skin="white"] .content-body table.stock-inquiry-grid > tfoot > tr:nth-child(2) > td {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-m2m-skin="white"] .content-body table.table {
    --bs-table-color: #1e293b;
    --bs-table-bg: #ffffff;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: rgba(37, 99, 235, 0.1);
    --bs-table-hover-color: #0f172a;
    --bs-table-border-color: #cbd5e1;
    border-color: #cbd5e1 !important;
    color: #1e293b;
}

html[data-m2m-skin="white"] .content-body table.table-hover > tbody > tr:hover > *,
html[data-m2m-skin="white"] .content-body table.table > tbody > tr:hover > td,
html[data-m2m-skin="white"] .content-body table.table > tbody > tr:hover > th {
    color: #0f172a !important;
}

html[data-m2m-skin="white"] .content-body table.table td,
html[data-m2m-skin="white"] .content-body table.table th {
    border-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] .content-body .card {
    background: #ffffff;
    color: #1e293b;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

html[data-m2m-skin="white"] .content-body .card .card-header {
    background: #f8fafc;
    color: #334155;
    border-bottom-color: #e2e8f0;
}

html[data-m2m-skin="white"] .content-body .m2m-query-header {
    color: #fff8ef !important;
}

html[data-m2m-skin="white"] .content-body .btn-outline-secondary {
    border-color: #94a3b8;
    color: #475569;
    background: #ffffff;
}

html[data-m2m-skin="white"] .content-body .btn-outline-secondary:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: #2563eb;
    color: #1d4ed8;
}

html[data-m2m-skin="white"] .content-body .form-control,
html[data-m2m-skin="white"] .content-body .form-select,
html[data-m2m-skin="white"] .content-body input[type='text'],
html[data-m2m-skin="white"] .content-body input[type='date'],
html[data-m2m-skin="white"] .content-body input[type='month'],
html[data-m2m-skin="white"] .content-body input[type='number'],
html[data-m2m-skin="white"] .content-body textarea {
    background: #ffffff;
    color: #1e293b;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .content-body .form-control::placeholder,
html[data-m2m-skin="white"] .content-body input::placeholder,
html[data-m2m-skin="white"] .content-body textarea::placeholder {
    color: #94a3b8;
}

html[data-m2m-skin="white"] .content-body .form-control:focus,
html[data-m2m-skin="white"] .content-body .form-select:focus,
html[data-m2m-skin="white"] .content-body input:focus,
html[data-m2m-skin="white"] .content-body textarea:focus {
    background: #ffffff;
    color: #0f172a;
    border-color: #2563eb;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.15);
}

html[data-m2m-skin="white"] .content-body .form-check-input {
    background-color: #ffffff;
    border-color: #94a3b8;
}

html[data-m2m-skin="white"] .content-body .inquiry-pager .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html[data-m2m-skin="white"] .content-body .inquiry-pager .page-link {
    color: #334155;
    background: #ffffff;
    border-color: #cbd5e1;
}

/* 재고조회 하단 탭(다크 전용 스타일 보정) */
html[data-m2m-skin="white"] #stockDetailTabs.nav-tabs {
    border-bottom-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] #stockDetailTabs .nav-link,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabs .nav-link {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] #stockDetailTabs .nav-link:hover,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabs .nav-link:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

html[data-m2m-skin="white"] #stockDetailTabs .nav-link.active,
html[data-m2m-skin="white"] #stockDetailTabs .nav-link.active:hover,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabs .nav-link.active,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabs .nav-link.active:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 -2px 10px rgba(37, 99, 235, 0.2) !important;
}

html[data-m2m-skin="white"] #stockDetailTabContent.tab-content,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabContent,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabContent.tab-content {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] #stockDetailTabContent .stock-detail-table-wrap,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabContent .stock-detail-table-wrap {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] #stockDetailTabContent .table,
html[data-m2m-skin="white"] #stockDetailTabContent .table td,
html[data-m2m-skin="white"] #stockDetailTabContent .table th {
    --bs-table-bg: #ffffff;
    --bs-table-color: #1e293b;
    --bs-table-border-color: #cbd5e1;
    background: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html[data-m2m-skin="white"] #stockDetailTabContent .table thead th,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabContent .table > thead > tr > th {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #f8fafc !important;
    border-color: #2563eb !important;
}

html[data-m2m-skin="white"] #stockDetailTabContent .table.table-hover > tbody > tr:hover > *,
html[data-m2m-skin="white"] .stock-inquiry-detail-card #stockDetailTabContent .table.table-hover > tbody > tr:hover > * {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #0f172a !important;
}

html[data-m2m-skin="white"] #stockDetailTabContent .stock-detail-dt-label-value .dt-label {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

html[data-m2m-skin="white"] .stock-detail-empty-note {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

html[data-m2m-skin="white"] .stock-inquiry-grid thead th {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

/* 로그인 화면 white */
html[data-m2m-skin="white"] body.login-page {
    color: #1e293b;
    background: #f4f7fb;
}

html[data-m2m-skin="white"] body.login-page::before {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 58, 237, 0.08), transparent 45%),
        linear-gradient(165deg, #f8fafc 0%, #eef2f7 45%, #e8edf5 100%);
}

html[data-m2m-skin="white"] .login-slogan {
    color: #475569;
}

html[data-m2m-skin="white"] .login-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

html[data-m2m-skin="white"] .login-field label,
html[data-m2m-skin="white"] .login-page .form-check-label {
    color: #1e293b;
    font-weight: 600;
}

html[data-m2m-skin="white"] .login-page .form-check-input {
    background-color: #ffffff;
    border: 2px solid #64748b;
    width: 1.1em;
    height: 1.1em;
}

html[data-m2m-skin="white"] .login-page .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

html[data-m2m-skin="white"] .login-page .form-check-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2);
}

html[data-m2m-skin="white"] .login-page .form-control {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .login-page .form-control:focus {
    background: #ffffff;
    color: #0f172a;
}

html[data-m2m-skin="white"] .btn-mode-switch {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

html[data-m2m-skin="white"] .btn-mode-switch:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

html[data-m2m-skin="white"] .login-mode-link {
    color: #64748b;
}

html[data-m2m-skin="white"] .login-mode-link:hover {
    color: #2563eb;
}

html[data-m2m-skin="white"] .login-skin-wrap label {
    color: #64748b;
}

html[data-m2m-skin="white"] .login-skin-wrap .form-select {
    background: #ffffff;
    color: #1e293b;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .dashboard-sub {
    color: #64748b;
}

html[data-m2m-skin="white"] .user-info {
    color: #64748b;
}

html[data-m2m-skin="white"] .footer-slogan {
    color: #94a3b8;
}

html[data-m2m-skin="white"] .m2m-skin-select {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .content-body .text-muted,
html[data-m2m-skin="white"] .text-muted {
    color: #64748b !important;
}

html[data-m2m-skin="white"] .content-body .alert {
    border: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-m2m-skin="white"] .content-body .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
}

html[data-m2m-skin="white"] .content-body .alert-success {
    background: #f0fdf4;
    color: #15803d;
}

html[data-m2m-skin="white"] .content-body .alert-warning {
    background: #fffbeb;
    color: #b45309;
}

html[data-m2m-skin="white"] .content-body .alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* 로그인 화면 알림(로그아웃·오류 등) */
html[data-m2m-skin="white"] .login-panel .alert {
    border: 1px solid rgba(15, 23, 42, 0.12);
    font-weight: 600;
}

html[data-m2m-skin="white"] .login-panel .alert-success {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #6ee7b7 !important;
}

html[data-m2m-skin="white"] .login-panel .alert-danger {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
}

html[data-m2m-skin="white"] .login-panel .alert-warning {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-color: #fcd34d !important;
}

html[data-m2m-skin="white"] .login-panel .alert-info {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #93c5fd !important;
}

/* 업무 화면 오류·경고 메시지 */
html[data-m2m-skin="white"] .erp-error-msg {
    color: #b91c1c !important;
    background: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 8px;
    padding: 0.5rem 0.75rem !important;
    animation: erp-error-blink-white 1.2s ease-in-out infinite;
}

html[data-m2m-skin="white"] .content-body .alert-warning,
html[data-m2m-skin="white"] .alert.alert-warning {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-color: #fcd34d !important;
}

html[data-m2m-skin="white"] .content-body .alert-secondary,
html[data-m2m-skin="white"] .alert.alert-secondary {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

@keyframes erp-error-blink-white {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.78; }
}

/* === 모바일(m_base) White 스킨 === */
html[data-m2m-skin="white"] body.m-mobile-body {
    background: #eef2f7;
    color: #1e293b;
}

html[data-m2m-skin="white"] .m-topbar {
    background: #ffffff;
    border-bottom-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-topbar h1 {
    color: #0f172a;
}

html[data-m2m-skin="white"] .m-topbar .m-user {
    color: #64748b;
}

html[data-m2m-skin="white"] .m-skin-select {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-bottom-nav {
    background: #ffffff;
    border-top-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-bottom-nav a,
html[data-m2m-skin="white"] .m-bottom-nav button {
    color: #334155;
}

html[data-m2m-skin="white"] .m-bottom-nav a:hover,
html[data-m2m-skin="white"] .m-bottom-nav button:hover {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
}

html[data-m2m-skin="white"] .m-grid-head {
    color: #64748b;
}

html[data-m2m-skin="white"] .m-menu-tile {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

html[data-m2m-skin="white"] .m-menu-tile:hover {
    background: #f8fafc;
    color: #0f172a;
}

html[data-m2m-skin="white"] .m-menu-text strong {
    color: #0f172a;
}

html[data-m2m-skin="white"] .m-menu-text span {
    color: #64748b;
}

html[data-m2m-skin="white"] .m-mobile-query-card {
    background: #ffffff;
    color: #1e293b;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-mobile-form .m-label,
html[data-m2m-skin="white"] .m-label {
    color: #475569;
}

html[data-m2m-skin="white"] .m-mobile-form .m-input,
html[data-m2m-skin="white"] .m-mobile-form .m-select {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-mobile-form .m-input:focus,
html[data-m2m-skin="white"] .m-mobile-form .m-select:focus {
    background: #ffffff;
    color: #0f172a;
    border-color: #2563eb;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.15);
}

html[data-m2m-skin="white"] .m-mobile-form .m-select option {
    background: #ffffff;
    color: #1e293b;
}

html[data-m2m-skin="white"] .m-mobile-sub-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

html[data-m2m-skin="white"] .m-mobile-small-note,
html[data-m2m-skin="white"] .m-sub,
html[data-m2m-skin="white"] .m-scan-note,
html[data-m2m-skin="white"] .m-pin-user-hint {
    color: #64748b;
}

html[data-m2m-skin="white"] .m-mobile-readonly {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

html[data-m2m-skin="white"] .m-mobile-line-item {
    background: #ffffff;
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-title {
    color: #0f172a;
}

html[data-m2m-skin="white"] .m-res-row {
    border-bottom-color: #e2e8f0;
}

html[data-m2m-skin="white"] .m-res-btn.active {
    background: rgba(37, 99, 235, 0.1);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35);
}

html[data-m2m-skin="white"] .m-tab-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

html[data-m2m-skin="white"] .m-tab-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html[data-m2m-skin="white"] .m-table-wrap {
    border-color: #cbd5e1;
}

html[data-m2m-skin="white"] .m-table th,
html[data-m2m-skin="white"] .m-table td {
    border-color: #cbd5e1;
    color: #1e293b;
}

html[data-m2m-skin="white"] .m-table th,
html[data-m2m-skin="white"] .m-kv td:first-child,
html[data-m2m-skin="white"] .m-kv td:nth-child(3) {
    background: #f1f5f9;
    color: #334155;
}

html[data-m2m-skin="white"] .m-scan-sheet .m-scan-panel {
    background: #ffffff;
    color: #1e293b;
}

html[data-m2m-skin="white"] .m-scan-head {
    border-bottom-color: #e2e8f0;
    color: #0f172a;
}

html[data-m2m-skin="white"] .m-scan-close,
html[data-m2m-skin="white"] .m-scan-torch {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

