@font-face {
    font-family: 'BMWTypeNext';
    src: url('/static/fonts/BMWTypeNextKrTT-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BMWTypeNext';
    src: url('/static/fonts/BMWTypeNextKrTT-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BMWTypeNext';
    src: url('/static/fonts/BMWTypeNextKrTT-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'BMWTypeNext', 'Malgun Gothic', '맑은 고딕', sans-serif;
    font-weight: 400;
    background: #f0f2f5;
    color: #333;
}

/* 상단 바 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
    color: #fff;
    padding: 12px 24px;
}

.top-bar h1 {
    font-size: 18px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.btn-logout {
    padding: 5px 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

/* 알림 */
.flash-bar {
    background: #d4edda;
    border-bottom: 1px solid #c3e6cb;
    color: #155724;
    padding: 8px 24px;
    font-size: 13px;
}

/* 2열 레이아웃 */
.layout {
    display: flex;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
}

.panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.resizer {
    width: 10px;
    cursor: col-resize;
    background: #dfe6e9;
    flex-shrink: 0;
    position: relative;
    border-radius: 4px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.resizer::before {
    content: '';
    width: 2px;
    height: 40px;
    background: #95a5a6;
    border-radius: 1px;
    box-shadow: 5px 0 0 #95a5a6, -5px 0 0 #95a5a6;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.resizer:hover {
    background: #3498db;
}

.resizer:hover::before {
    opacity: 1;
    background: #fff;
    box-shadow: 5px 0 0 #fff, -5px 0 0 #fff;
}

.resizer:active {
    background: #2980b9;
}

.panel h2 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 12px;
}

/* 탭 */
.tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 12px;
}

.tab-btn {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    color: #95a5a6;
    cursor: pointer;
    margin-bottom: -2px;
    font-family: inherit;
    font-weight: 500;
}

.tab-btn .count {
    font-weight: normal;
    font-size: 13px;
    color: #bdc3c7;
    margin-left: 4px;
}

.tab-btn:hover {
    color: #34495e;
}

.tab-btn.active {
    color: #2c3e50;
    border-bottom-color: #3498db;
}

.tab-btn.active .count {
    color: #7f8c8d;
}

.tab-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tab-pane.active {
    display: flex;
}

.contract-meta-info {
    font-size: 11px;
    color: #95a5a6;
    margin-bottom: 6px;
}

/* 판매현황 대시보드 */
.dashboard {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 4px 20px;
}

.dash-card {
    background: #fff;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 24px;
}

.dash-card h3 {
    font-size: 13px;
    color: #34495e;
    margin-bottom: 8px;
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #95a5a6;
    border-bottom: none;
    font-weight: 500;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #95a5a6;
}

.dash-table th {
    background: #ecf0f1;
    color: #34495e;
    padding: 8px 10px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #bdc3c7;
    font-size: 12px;
}

.dash-table td {
    padding: 7px 10px;
    text-align: center;
    border: 1px solid #ecf0f1;
    color: #3498db;
}

.dash-branch {
    background: #fff !important;
    color: #2c3e50 !important;
    font-weight: 500;
    letter-spacing: 2px;
}

.dash-total-row td {
    background: #ecf0f1;
    font-weight: bold;
    color: #2c3e50 !important;
}

.dash-target {
    color: #34495e !important;
}

.is-admin .dash-target {
    cursor: pointer;
    position: relative;
}

.is-admin .dash-target:hover {
    background: #fef9e7;
    outline: 1px dashed #f39c12;
}

.dash-sum-col {
    background: #fff !important;
    vertical-align: middle;
    width: 80px;
    font-size: 13px;
    color: #34495e !important;
    border-left: 1px solid #bdc3c7 !important;
}

.dash-sum-val {
    font-size: 28px;
    font-weight: 500;
    color: #3498db;
    margin-top: 6px;
}

.dash-hint {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 8px;
}

/* SC별 판매현황 */
.sc-sales-wrap {
    margin-top: 24px;
}

.sc-sales-wrap h3 {
    font-size: 13px;
    color: #34495e;
    margin-bottom: 8px;
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #95a5a6;
    border-bottom: none;
    font-weight: 500;
}

.sc-sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    border: 1px solid #95a5a6;
}

.sc-sales-table th {
    background: #ecf0f1;
    color: #34495e;
    padding: 4px 5px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #bdc3c7;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: inset 0 -1px 0 #bdc3c7, inset 0 1px 0 #bdc3c7;
}

.sc-sales-table th.sc-expect {
    background: #fff9c4;
}

.sc-sales-table td {
    padding: 4px 6px;
    text-align: center;
    border: 1px solid #ecf0f1;
    color: #3498db;
    min-width: 28px;
}

.sc-sales-table .sc-name {
    background: #fff;
    color: #2c3e50 !important;
    font-weight: 500;
    text-align: left;
    letter-spacing: 1px;
    white-space: nowrap;
}

.sc-section-header td {
    background: #d5dbdb;
    color: #2c3e50 !important;
    font-weight: bold;
    text-align: left !important;
    padding: 6px 10px !important;
    font-size: 12px;
}

.sc-total td {
    background: #ecf0f1;
    font-weight: bold;
    color: #2c3e50 !important;
}

.sc-total .sc-name {
    background: #ecf0f1 !important;
}

.sc-team-row td {
    background: #d6eaf8;
    color: #1a5490 !important;
    font-weight: bold;
    padding: 5px 6px !important;
    font-size: 12px;
}

.sc-team-row .sc-name {
    background: #d6eaf8 !important;
    color: #1a5490 !important;
    text-align: left !important;
    letter-spacing: 1px;
}

.sc-grand-row td {
    background: #34495e !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 13px;
}

.sc-grand-row .sc-name {
    background: #34495e !important;
    color: #fff !important;
    text-align: left !important;
    letter-spacing: 2px;
}

/* 자료실 */
.resource-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

#resourceSearch {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

#resourceSearch:focus {
    outline: none;
    border-color: #3498db;
}

.resource-list-wrap {
    flex: 1;
    overflow-y: auto;
}

.resource-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.resource-table th {
    background: #34495e;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    font-weight: 500;
}

.resource-table th.rt-no { width: 50px; text-align: center; }
.resource-table th.rt-author { width: 100px; }
.resource-table th.rt-date { width: 150px; }

.resource-row {
    cursor: pointer;
}

.resource-row td {
    padding: 9px 10px;
    border-bottom: 1px solid #ecf0f1;
    color: #555;
}

.resource-row td:first-child {
    text-align: center;
}

.resource-row:hover {
    background: #f0f9ff;
}

.resource-row .rt-title {
    color: #2c3e50;
    font-weight: 500;
}

.resource-row:hover .rt-title {
    color: #3498db;
    text-decoration: underline;
}

/* 자료실 모달 */
.resource-modal-content {
    width: 700px;
    max-width: 95vw;
}

.resource-meta {
    display: flex;
    gap: 16px;
    color: #7f8c8d;
    font-size: 12px;
    padding: 8px 0 12px;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.resource-content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    min-height: 100px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 4px 0;
}

.resource-attachments {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
    font-size: 13px;
}

.resource-attachments ul {
    list-style: none;
    padding: 6px 0 0;
    margin: 0;
}

.resource-attachments li {
    padding: 4px 0;
}

.resource-attachments a {
    color: #3498db;
    text-decoration: none;
}

.resource-attachments a:hover {
    text-decoration: underline;
}

.resource-admin-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
}

.resource-admin-actions button {
    padding: 6px 16px;
    font-size: 13px;
}

/* 자료실 작성/수정 폼 */
.resource-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-form input[type=text],
.resource-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.resource-form textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.resource-form input:focus,
.resource-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.rf-file-section {
    border: 1px dashed #bdc3c7;
    border-radius: 6px;
    padding: 10px 12px;
    background: #f8f9fa;
}

.rf-file-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #555;
}

.rf-file-label > span {
    font-weight: 500;
    color: #2c3e50;
}

.rf-selected-files {
    margin-top: 8px;
}

.rf-selected-label {
    font-size: 12px;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 4px;
}

.rf-selected-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 3px;
    margin-bottom: 4px;
    font-size: 12px;
}

.rf-selected-item span {
    color: #95a5a6;
    font-size: 11px;
}

.rf-selected-item button {
    margin-left: auto;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 13px;
    padding: 0 4px;
}

.rf-existing-label {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}

.rf-existing-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 12px;
    background: #f8f9fa;
    border-radius: 3px;
    margin-bottom: 4px;
}

/* 메일 카드 피드 */
.mail-feed {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px;
}

.mail-card {
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mail-card-unread {
    border-left: 3px solid #3498db;
}

.mail-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.mail-sender-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.mail-sender-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.mail-sender-text {
    line-height: 1.3;
    min-width: 0;
    flex: 1;
}

.mail-sender-name {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-received-date {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 3px;
}

.mail-att-badge {
    background: #ecf0f1;
    color: #34495e;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

.mail-card-subject {
    font-size: 16px;
    font-weight: bold;
    color: #1a5490;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ecf0f1;
    word-break: break-word;
}

.mail-card-attachments {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mail-card-body {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 4px 0;
}

.mail-att {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f2f5;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    word-break: break-all;
}

.mail-expand-btn {
    margin-top: 8px;
    padding: 6px 14px;
    background: #ecf0f1;
    border: none;
    border-radius: 4px;
    color: #3498db;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.mail-expand-btn:hover {
    background: #d5dbdb;
}

.mail-load-more-wrap {
    text-align: center;
    padding: 16px 0 24px;
}

.mail-load-more {
    padding: 10px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.mail-load-more:hover {
    background: #2980b9;
}

.mail-load-more:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    body { font-size: 14px; }
    .top-bar { padding: 10px 14px; }
    .top-bar h1 { font-size: 16px; }
    .layout {
        padding: 8px;
        gap: 8px;
    }
    .panel { padding: 10px; }
    .tab-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    .tab-btn .count { font-size: 12px; }

    .mail-feed {
        padding: 4px 0;
    }
    .mail-card {
        padding: 14px 14px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    .mail-sender-avatar {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
    .mail-sender-name { font-size: 14px; }
    .mail-card-subject { font-size: 15px; }
    .mail-card-body { font-size: 14px; line-height: 1.7; }

    .stock-filters {
        flex-wrap: wrap;
    }
    .resource-toolbar {
        flex-wrap: wrap;
    }
}

.dash-target.editing {
    padding: 0 !important;
}

.target-input {
    width: 100%;
    padding: 5px 8px;
    border: 2px solid #3498db;
    border-radius: 2px;
    font-size: 13px;
    font-family: inherit;
    text-align: center;
    box-sizing: border-box;
}

.panel h2 .count {
    font-weight: normal;
    font-size: 13px;
    color: #999;
}

.panel-stock {
    flex: 1;
    overflow: hidden;
}

.panel-board {
    display: none;
}

.resizer {
    display: none;
}

/* 재고 필터 */
.stock-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.stock-filters select,
.stock-filters input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.stock-filters input {
    flex: 1;
}

.stock-filters select:focus,
.stock-filters input:focus {
    outline: none;
    border-color: #3498db;
}

/* 재고 테이블 */
.table-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;               /* 모바일: 넓은 표 가로 스크롤 */
    -webkit-overflow-scrolling: touch;
}

:root {
    --tbl-zoom: 1;                  /* 표 크기 조절 (버튼으로 변경) */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    zoom: var(--tbl-zoom, 1);       /* 표 확대/축소 */
}

thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

th {
    background: #34495e;
    color: #fff;
    padding: 8px 6px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}

th.filter-th {
    padding-right: 22px;
    cursor: default;
}

.filter-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    user-select: none;
}

.filter-icon:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

th.filter-active {
    background: #2980b9;
}

th.filter-active .filter-icon {
    color: #f1c40f;
}

/* 필터 팝업 */
.filter-popup {
    position: fixed;
    background: #fff;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    width: 240px;
    z-index: 3000;
    font-size: 13px;
    color: #333;
}

.filter-popup-search {
    margin-bottom: 6px;
}

.fp-search {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    box-sizing: border-box;
}

.fp-search:focus {
    outline: none;
    border-color: #3498db;
}

.filter-popup-sort {
    display: flex;
    gap: 4px;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.fp-sort-asc, .fp-sort-desc {
    flex: 1;
    padding: 6px 8px;
    background: #f8f9fa;
    border: 1px solid #ecf0f1;
    border-radius: 3px;
    font-size: 12px;
    color: #34495e;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.fp-sort-asc:hover, .fp-sort-desc:hover {
    background: #ebf5fb;
    border-color: #3498db;
    color: #2980b9;
}

th.sort-asc::after,
th.sort-desc::after {
    content: '';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

th.sort-asc::after { border-bottom: 5px solid #f1c40f; }
th.sort-desc::after { border-top: 5px solid #f1c40f; }

.filter-popup-actions {
    padding: 4px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.fp-all {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 2px;
}

.filter-popup-list {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 6px;
}

.fp-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}

.fp-item:hover {
    background: #f0f2f5;
}

.fp-item input[type=checkbox] {
    flex-shrink: 0;
}

.fp-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-popup-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    padding-top: 4px;
    border-top: 1px solid #eee;
}

.fp-apply, .fp-clear {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.fp-apply {
    background: #3498db;
    color: #fff;
}

.fp-apply:hover {
    background: #2980b9;
}

.fp-clear {
    background: #ecf0f1;
    color: #555;
}

.fp-clear:hover {
    background: #bdc3c7;
}

td {
    padding: 7px 6px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

/* 대기계약 점수/체크 열 구분용 연한 세로선 + 가운데정렬 */
#contractTable th.col-divider,
#contractTable td.col-divider {
    border-left: 1px solid #e3e3e3;
    text-align: center;
}

tbody tr:hover {
    background: #f8f9fa;
}

.chassis {
    font-family: 'Consolas', monospace;
    font-size: 12px;
}

.color-cell {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* 재고등급·색상·PDI 열: 좁게 고정 */
.col-grade, .td-grade {
    width: 52px;
    white-space: nowrap;
    text-align: center;
    font-size: 12px;
}
.col-color, .color-cell {
    width: 48px;
    max-width: 48px;
    white-space: nowrap;
    text-align: center;
}
.color-code {
    display: block;
    max-width: 44px;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.col-pdi, .td-pdi {
    white-space: nowrap;   /* 가장 긴 PDI 값에 맞춰 한눈에 보이게 */
}

/* 출고불가=O 행 어두운 음영 */
tr.row-shipping-blocked td {
    background-color: #dfe3e6 !important;
    color: #888 !important;
    opacity: 0.85;
}

tr.row-shipping-blocked .badge {
    opacity: 0.7;
}

.td-model {
    padding: 0 !important;
    white-space: nowrap;   /* 가장 긴 모델명에 맞춰 전체 표시 */
}

.td-model .td-scroll {
    white-space: nowrap;
    padding: 7px 6px;
}

.td-date {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

/* PDI 상태가 Done 이면 옅은 초록색 배경 */
.td-date.pdi-done {
    background-color: #e3f6e3;
}

.chassis-link {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px dashed #bdc3c7;
    cursor: pointer;
}

.chassis-link:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* 차량 상세 모달 */
.vehicle-modal-content {
    width: 520px;
}

.vehicle-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-contract {
    padding: 6px 14px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.btn-view-contract:hover {
    background: #2980b9;
}

.vehicle-chassis-title {
    font-family: 'Consolas', monospace;
    color: #3498db;
    font-size: 14px;
    margin-left: 10px;
}

.vehicle-body {
    min-height: 200px;
}

.vehicle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vehicle-table th {
    background: #f8f9fa;
    color: #555;
    text-align: left;
    padding: 10px 12px;
    font-weight: 500;
    width: 35%;
    border: 1px solid #e9ecef;
}

.vehicle-table td {
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    color: #333;
}

.vehicle-meta {
    margin-top: 12px;
    font-size: 11px;
    color: #95a5a6;
    text-align: right;
}

/* 상태 뱃지 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-free {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-assign {
    background: #fff3e0;
    color: #e65100;
}

.badge-contract {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-carryover {
    background: #f3e5f5;
    color: #6a1b9a;
}

.badge-assigned {
    background: #fff9c4;
    color: #795548;
    font-weight: bold;
}

.badge-cancelled {
    background: #ffebee;
    color: #c62828;
    font-weight: bold;
}

/* 게시판 */
.write-form {
    margin-bottom: 16px;
}

.write-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
}

.write-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.write-form button {
    margin-top: 8px;
    padding: 8px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.write-form button:hover {
    background: #2980b9;
}

.post-list {
    flex: 1;
    overflow-y: auto;
}

.post-card {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.post-author {
    font-weight: bold;
    font-size: 13px;
    color: #2c3e50;
}

.post-date {
    font-size: 11px;
    color: #999;
}

.post-content {
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.empty {
    text-align: center;
    color: #999;
    padding: 30px 0;
    font-size: 13px;
}

/* 로그인 */
.login-container {
    max-width: 400px;
    margin: 120px auto;
    padding: 0 20px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.login-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: #3498db;
}

.login-form input[name="code"] {
    text-transform: uppercase;
}

/* 이메일 아이디 + 고정 도메인 */
.email-input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}
.email-input-group:focus-within {
    border-color: #3498db;
}
.email-input-group input {
    flex: 1;
    min-width: 0;
    border: none;
    margin: 0;
    border-radius: 0;
    padding: 12px;
    font-size: 15px;
    text-align: right;
}
.email-input-group input:focus {
    outline: none;
}
.email-domain {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #f1f4f6;
    color: #7f8c8d;
    font-size: 14px;
    white-space: nowrap;
    border-left: 1px solid #e3e8eb;
}

.login-hint {
    text-align: center;
    color: #95a5a6;
    font-size: 12px;
    margin-top: 14px;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 2px 10px;
    font-size: 13px;
    color: #555;
}

.opt-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.opt-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.verify-info {
    text-align: center;
    margin-bottom: 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.verify-actions {
    text-align: center;
    margin-top: 16px;
}

.verify-actions a {
    color: #95a5a6;
    font-size: 13px;
    text-decoration: none;
}

.verify-actions a:hover {
    color: #3498db;
}

.login-form button {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.login-form button:hover {
    background: #2980b9;
}

.flash-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.flash {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.update-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c3e50;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2000;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-banner button {
    padding: 4px 10px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.update-banner button:hover {
    background: #2980b9;
}

/* 첨부파일 */
.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.file-input {
    flex: 1;
    font-size: 12px;
}

.post-attachment {
    margin-top: 6px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.post-attachment a {
    color: #3498db;
    text-decoration: none;
}

.post-attachment a:hover {
    text-decoration: underline;
}

.attach-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-download {
    font-size: 13px;
    padding: 0 4px;
    color: #7f8c8d !important;
}

.btn-download:hover {
    color: #2c3e50 !important;
}

/* 관리자: 재고 수정 */
.td-actions {
    white-space: nowrap;
}

.td-actions button {
    padding: 2px 6px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    margin-right: 2px;
}

.btn-edit-stock, .btn-save-stock {
    padding: 3px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.btn-edit-stock {
    background: #3498db;
    color: #fff;
}

.btn-edit-stock:hover {
    background: #2980b9;
}

.drag-handle {
    display: inline-block;
    padding: 2px 6px;
    cursor: grab;
    color: #95a5a6;
    font-weight: bold;
    user-select: none;
    margin-right: 2px;
}

.drag-handle:hover {
    color: #34495e;
}

.drag-handle:active {
    cursor: grabbing;
}

#stockTable tbody tr.dragging {
    opacity: 0.4;
}

#stockTable tbody tr.drag-over {
    background: #e8f4fd !important;
    box-shadow: inset 0 -2px 0 #3498db;
}

.btn-delete-stock {
    background: #e74c3c;
    color: #fff;
}

.btn-delete-stock:hover {
    background: #c0392b;
}

.btn-add-stock {
    padding: 6px 12px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-add-stock:hover {
    background: #219a52;
}

.btn-reload-stock {
    padding: 6px 12px;
    background: #f39c12;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-export {
    padding: 6px 12px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

/* 고객명 클릭 가능 표시 */
.customer-link {
    color: #2980b9;
    text-decoration: none;
    border-bottom: 1px dashed #3498db;
    cursor: pointer;
    font-weight: 500;
}
.customer-link:hover {
    color: #fff;
    background: #3498db;
    border-bottom-color: transparent;
}

/* SC 요청 모달 */
.sc-req-choice-content {
    width: 420px;
}
.sc-req-target {
    text-align: center;
    padding: 10px 0 16px;
    color: #555;
    font-size: 14px;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 18px;
}
.sc-req-target span {
    color: #2c3e50;
    font-weight: bold;
}
.sc-req-choices {
    display: flex;
    gap: 12px;
    padding: 8px 0 16px;
}
.btn-sc-choice {
    flex: 1;
    padding: 22px 10px;
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 15px;
    color: #2980b9;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}
.btn-sc-choice:hover {
    background: #3498db;
    color: #fff;
}
.sc-req-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sc-req-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sc-req-field label {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}
.sc-req-field input[type="text"],
.sc-req-field input[type="file"] {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}
.sc-req-field input[readonly] {
    background: #f8f9fa;
    color: #777;
}

.sc-req-field textarea {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
}

.label-hint {
    font-weight: normal;
    color: #95a5a6;
    font-size: 11px;
    margin-left: 4px;
}

.sc-req-notice {
    margin-top: 4px;
    padding: 10px 12px;
    background: #fff3cd;
    border-left: 3px solid #f39c12;
    color: #7d5800;
    font-size: 12px;
    border-radius: 4px;
}

.sc-req-row td {
    font-size: 12px;
    vertical-align: middle;
}
.sc-req-done td {
    opacity: 0.6;
}
.sc-att-link {
    color: #3498db;
    text-decoration: none;
    font-size: 11px;
    display: inline-block;
    margin: 2px 0;
}
.sc-att-link:hover {
    text-decoration: underline;
}

.btn-export:hover {
    background: #1e8449;
    color: #fff;
}

.btn-reload-stock:hover {
    background: #d68910;
}

.btn-clear-filter {
    padding: 6px 12px;
    background: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.btn-clear-filter:hover {
    background: #7f8c8d;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #2c3e50;
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}

.btn-close:hover {
    color: #333;
}

.add-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.add-form label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #555;
    gap: 4px;
}

.add-form input,
.add-form select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.add-form input:focus,
.add-form select:focus {
    outline: none;
    border-color: #3498db;
}

.modal-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.btn-submit {
    padding: 8px 20px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-submit:hover {
    background: #219a52;
}

.btn-cancel-modal {
    padding: 8px 20px;
    background: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-save-stock {
    background: #27ae60;
    color: #fff;
}

.btn-save-stock:hover {
    background: #219a52;
}

.edit-input {
    width: 80px;
    padding: 3px 5px;
    border: 1px solid #3498db;
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
}

.edit-select {
    width: 70px;
}

/* 반영 버튼 & 뱃지 */
.post-author-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reflect-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.btn-reflect {
    padding: 2px 8px;
    background: #fff;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 10px;
    font-size: 10px;
    cursor: pointer;
}

.btn-reflect:hover {
    background: #e74c3c;
    color: #fff;
}

.btn-reflect.active {
    background: #95a5a6;
    color: #fff;
    border-color: #95a5a6;
}

.btn-reflect.active:hover {
    background: #7f8c8d;
    border-color: #7f8c8d;
}

/* 관리자 답글 */
.post-comment {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f0f9f4;
    border-left: 3px solid #27ae60;
    border-radius: 4px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comment-label {
    font-size: 11px;
    font-weight: bold;
    color: #27ae60;
}

.comment-text {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
}

.btn-comment-delete {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

.btn-comment-delete:hover {
    text-decoration: underline;
}

.inline-form {
    display: inline;
}

.post-admin-action {
    margin-top: 8px;
}

.comment-form {
    display: flex;
    gap: 6px;
}

.comment-form input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
}

.comment-form input:focus {
    outline: none;
    border-color: #27ae60;
}

.btn-comment {
    padding: 5px 12px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.btn-comment:hover {
    background: #219a52;
}

/* ===== 출고확정 카드 (모바일 입력) ===== */
.delivery-info {
    font-size: 12px;
    color: #7f8c8d;
    padding: 6px 2px 8px;
}
.delivery-filter {
    padding: 8px;
    border: 1px solid #cbd3d9;
    border-radius: 6px;
    font-size: 14px;
}
.delivery-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 2px 24px;
}
.delivery-card {
    border: 1px solid #e3e8eb;
    border-left: 4px solid #bdc3c7;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.delivery-card[data-confirm="출고확정"] { border-left-color: #27ae60; }
.delivery-card[data-confirm="출고지연"] { border-left-color: #e74c3c; }
.dc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.dc-model {
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
}
.dc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12px;
    color: #566;
    margin-bottom: 12px;
}
.dc-meta b { font-family: 'Consolas', monospace; color: #2c3e50; }
.dc-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dc-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #7f8c8d;
    flex: 1;
    min-width: 130px;
}
.dc-fields .dc-reason-wrap { flex-basis: 100%; }
.dc-fields select,
.dc-fields input {
    padding: 10px;
    border: 1px solid #cbd3d9;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}
.dc-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 10px;
}
.dc-updated {
    font-size: 11px;
    color: #95a5a6;
}
.dc-save {
    padding: 10px 22px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.dc-save:hover { background: #2980b9; }
.dc-save:disabled { opacity: 0.7; }
.delivery-empty {
    text-align: center;
    color: #95a5a6;
    padding: 40px 10px;
}

/* ===== 재고 모바일 필터바 ===== */
.stock-filters-m {
    display: none;          /* 데스크톱 숨김 */
    padding: 10px 12px 6px;
    background: #fff;
}
.sfm-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f4f6;
    border: 1px solid #e3e8ec;
    border-radius: 10px;
    padding: 11px 12px;
    margin-bottom: 10px;
}
.sfm-ico { font-size: 14px; color: #9aa6b2; }
.sfm-search input {
    flex: 1; min-width: 0;
    border: none; background: none; outline: none;
    font-size: 14px; color: #2c3e50;
}
.sfm-selects { display: flex; gap: 8px; margin-bottom: 10px; }
.sfm-selects select {
    flex: 1; min-width: 0;
    padding: 9px 6px;
    border: 1px solid #cbd3d9;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
}
.sfm-info {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; padding: 0 2px 4px;
}
.sfm-info #mCount { font-weight: 700; color: #2c3e50; }
.sfm-clear {
    border: none; background: none; color: #3498db;
    font-size: 13px; cursor: pointer; padding: 0;
}

/* ===== 재고 모바일 카드 리스트 ===== */
.stock-cards {
    display: none;          /* 데스크톱 숨김, 모바일에서만 표시 */
    flex: 1;
    overflow-y: auto;
}
.stock-cards .sc-head {
    display: grid;
    grid-template-columns: 1fr 46px 42px 48px;
    gap: 4px;
    align-items: center;
    padding: 8px 10px;
    font-size: 11px;
    color: #8a97a3;
    background: #f4f6f8;
    position: sticky;
    top: 0;
    z-index: 1;
}
.stock-cards .sc-h-color, .stock-cards .sc-h-spec, .stock-cards .sc-h-status { text-align: center; }
.stock-card {
    display: grid;
    grid-template-columns: 1fr 46px 42px 48px;
    gap: 4px;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #eef1f4;
    cursor: pointer;
    background: #fff;
}
.stock-card:active { background: #eef4fb; }
.stock-card .sc-c-model {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stock-card .sc-c-spec {
    text-align: center;
    font-size: 12px;
    color: #667;
}
.stock-card .sc-c-color { text-align: center; }
.stock-card .sc-c-status { text-align: center; }
.color-badge {
    display: inline-block;
    min-width: 34px;
    padding: 3px 3px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.08);
}

/* ===== 재고 상세 바텀시트 ===== */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,28,38,0.45);
    z-index: 3000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.detail-overlay.open { display: flex; }
.detail-sheet {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 10px 20px 20px;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
    position: relative;
    animation: sheetUp 0.25s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ds-grip {
    width: 40px; height: 4px; border-radius: 2px;
    background: #d4dae0; margin: 2px auto 14px;
}
.ds-close {
    position: absolute; top: 16px; right: 16px;
    border: none; background: none; font-size: 18px; color: #9aa6b2; cursor: pointer;
}
.ds-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ds-meta { font-size: 12px; color: #8a97a3; }
.ds-model { font-size: 20px; font-weight: 700; color: #1f2d3d; margin: 2px 0 4px; }
.ds-chassis { font-family: 'Consolas', monospace; font-size: 14px; color: #5a6b7b; margin-bottom: 8px; }
.ds-body { margin-top: 6px; }
.ds-sec {
    font-size: 12px; font-weight: 700; color: #95a5a6;
    margin: 16px 0 4px; padding-bottom: 4px;
}
.ds-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 2px; border-bottom: 1px solid #f0f3f5; font-size: 14px;
}
.ds-row span { color: #7f8c8d; }
.ds-row b { color: #2c3e50; font-weight: 600; text-align: right; }
.ds-actions { display: flex; gap: 10px; margin-top: 20px; }
.ds-copy, .ds-ok {
    flex: 1; padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ds-copy { background: #fff; border: 1px solid #cbd3d9; color: #34495e; }
.ds-ok { background: #2c3e50; border: none; color: #fff; }

/* ===== 모바일 반응형 ===== */
@media (max-width: 768px) {
    .top-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 10px;
    }
    .top-bar h1 {
        font-size: 18px;
    }
    /* 탭 버튼 가로 스크롤 */
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    .tab-nav .tab-btn {
        flex: 0 0 auto;
    }
    /* 필터/툴바 줄바꿈 */
    .stock-filters {
        flex-wrap: wrap;
        gap: 6px;
    }
    /* 재고현황: 표·데스크톱 필터바 숨기고 모바일 필터바+카드 표시 */
    #stockTableWrap {
        display: none;
    }
    #tabStock > .stock-filters {
        display: none;
    }
    .stock-filters-m {
        display: block;
    }
    .stock-cards {
        display: block;
    }
    /* 좌우 패널 세로 배치 */
    .layout {
        flex-direction: column;
    }
    /* 표 셀 여백 축소로 더 많이 보이게 */
    th, td {
        padding: 5px 4px;
    }
}
