/* ─── Reset & Variables ─────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary:      #4F46E5;
    --primary-dark: #4338CA;
    --background:   #F0F2F5;
    --surface:      #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border:       #E5E7EB;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
    --shadow:       0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg:    0 12px 32px rgba(0,0,0,0.15);
    --transition:   all 0.25s cubic-bezier(0.4,0,0.2,1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─── Loading ───────────────────────────────────────── */
.loading-screen {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-spinner { display: none; }
.loading-bar-wrap {
    width: 240px;
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 99px;
    overflow: hidden;
}
.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 99px;
    transition: width 0.15s ease;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen p { display: none; }

/* ─── Header ────────────────────────────────────────── */
.header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.header-content {
    display: flex; align-items: center;
    justify-content: flex-end;
    padding: 12px 0; gap: 8px;
}
.logo {
    font-size: 22px; font-weight: 800;
    letter-spacing: -0.5px; white-space: nowrap;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.catalog-selector { flex: 1; max-width: 480px; }
.catalog-dropdown {
    width: 100%; padding: 11px 16px;
    background: var(--surface); border: 2px solid var(--border);
    border-radius: 12px; color: var(--text-primary);
    font-size: 14px; font-weight: 500;
    cursor: pointer; outline: none;
    transition: var(--transition);
}
.catalog-dropdown:hover { border-color: var(--primary); }
.catalog-dropdown:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.icon-btn {
    width: 42px; height: 42px;
    border: 2px solid var(--border);
    background: var(--surface); border-radius: 11px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: var(--transition); color: var(--text-secondary);
}
.icon-btn:hover {
    background: var(--primary); border-color: var(--primary);
    color: #fff; transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ─── Main viewer ───────────────────────────────────── */
.viewer-main { min-height: calc(100vh - 77px); display: flex; flex-direction: column; }
.catalog-viewer {
    flex: 1; display: flex;
    align-items: center; justify-content: center;
    padding: 32px 16px;
}

/* ─── No catalog ────────────────────────────────────── */
.no-catalog { display: flex; align-items: center; justify-content: center; min-height: 460px; }
.no-catalog-content {
    text-align: center; color: var(--text-secondary);
    background: var(--surface); padding: 56px 48px;
    border-radius: 24px; box-shadow: var(--shadow-lg);
}
.no-catalog-content svg { margin-bottom: 20px; opacity: 0.25; stroke: var(--primary); }
.no-catalog-content h2 { font-size: 26px; color: var(--text-primary); margin-bottom: 10px; font-weight: 700; }
.no-catalog-content p { font-size: 15px; line-height: 1.7; }

/* ─── Flipbook container ────────────────────────────── */
.flipbook-container {
    display: flex;
    align-items: center; justify-content: center;
    width: 100%;
}

/* ─── Turn.js overrides ─────────────────────────────── */
#flipbook {
    box-shadow: 0 30px 60px rgba(0,0,0,0.35);
    border-radius: 3px 6px 6px 3px;
}

/* Each page in the flipbook */
#flipbook .page {
    background: #fff;
    overflow: hidden;
}

/* Canvas fills the page exactly — no whitespace, no reflow */
#flipbook .page canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
}

/* Hard cover pages */
#flipbook .page.hard {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

/* ─── Controls bar ──────────────────────────────────── */
.controls-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    position: sticky; bottom: 0; z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}
.controls-content {
    display: flex; align-items: center;
    justify-content: center; gap: 10px;
}
.control-btn {
    width: 42px; height: 42px;
    border: 2px solid var(--border);
    background: var(--surface); border-radius: 11px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: var(--transition); color: var(--text-secondary);
}
.control-btn:hover:not(:disabled) {
    background: var(--primary); border-color: var(--primary);
    color: #fff; transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.control-btn:disabled { opacity: 0.28; cursor: not-allowed; }
.page-info { display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.page-input {
    width: 64px; padding: 9px 10px;
    background: var(--surface); border: 2px solid var(--border);
    border-radius: 10px; color: var(--text-primary);
    text-align: center; font-size: 14px; font-weight: 600;
    outline: none; transition: var(--transition);
}
.page-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.page-input::-webkit-inner-spin-button,
.page-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.page-separator { color: var(--text-secondary); font-size: 16px; }
.total-pages { color: var(--text-secondary); font-size: 14px; }

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
    .header-content { flex-wrap: wrap; gap: 12px; }
    .catalog-selector { order: 3; width: 100%; max-width: 100%; }
    .logo { font-size: 18px; }
}

/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Header Actions ────────────────────────────────── */
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ─── Icon btn active state (싱글 페이지 모드 등) ──────── */
.icon-btn.active {
    background: var(--primary);
    color: #fff;
}
.icon-btn.active:hover { background: var(--primary-dark); }
.cart-icon-btn { position: relative; }
.cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: #EF4444; color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
}

/* ─── Side Panels ───────────────────────────────────── */
.side-panel {
    position: fixed; top: 0; right: -420px;
    width: 420px; height: 100vh;
    background: var(--surface);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    z-index: 500;
    display: flex; flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
}
.side-panel.open { right: 0; }

.panel-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 490;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.panel-overlay.active { opacity: 1; visibility: visible; }

.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.panel-header h2 { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.panel-close-btn {
    width: 32px; height: 32px; border: none; background: none;
    cursor: pointer; color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: var(--transition);
}
.panel-close-btn:hover { background: var(--background); color: var(--text-primary); }

.panel-body {
    flex: 1; overflow-y: auto; padding: 20px 24px;
    display: flex; flex-direction: column; gap: 16px;
}

/* ─── Search Panel ──────────────────────────────────── */
.search-input-wrap {
    display: flex; gap: 8px;
}
.search-input {
    flex: 1; padding: 10px 14px;
    border: 2px solid var(--border); border-radius: 10px;
    font-size: 14px; outline: none; transition: var(--transition);
    background: var(--surface); color: var(--text-primary);
}
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.search-btn {
    padding: 10px 16px; background: var(--primary); color: #fff;
    border: none; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 600; transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.search-btn:hover { background: var(--primary-dark); }

.search-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
    padding: 5px 12px; border: 2px solid var(--border);
    border-radius: 20px; font-size: 12px; font-weight: 500;
    cursor: pointer; background: var(--surface);
    color: var(--text-secondary); transition: var(--transition);
}
.filter-chip:hover, .filter-chip.active {
    border-color: var(--primary); background: rgba(79,70,229,0.08);
    color: var(--primary);
}

.search-hint { color: var(--text-secondary); font-size: 14px; text-align: center; padding: 24px 0; }

.search-results { display: flex; flex-direction: column; gap: 10px; }
.product-card {
    border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; background: var(--surface);
    transition: var(--transition); cursor: pointer;
}
.product-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.product-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.product-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.product-card-price { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.product-card-category {
    display: inline-block; font-size: 11px; font-weight: 600;
    background: rgba(79,70,229,0.1); color: var(--primary);
    padding: 2px 8px; border-radius: 6px; margin-bottom: 6px;
}
.product-card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.product-card-actions { display: flex; gap: 6px; }
.card-btn {
    flex: 1; padding: 7px 10px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: var(--transition); border: 2px solid var(--border);
    background: var(--surface); color: var(--text-secondary);
}
.card-btn:hover { border-color: var(--primary); color: var(--primary); }
.card-btn.primary {
    background: var(--primary); border-color: var(--primary);
    color: #fff;
}
.card-btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ─── Chat Panel ────────────────────────────────────── */
.chat-panel-body { padding: 0 !important; }
.api-key-section {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}
.api-key-notice {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 12px; color: var(--text-secondary);
}
.api-key-notice svg { flex-shrink: 0; margin-top: 1px; }
.api-key-notice p { font-size: 13px; line-height: 1.5; }
.api-key-input-wrap { display: flex; gap: 8px; margin-bottom: 8px; }
.api-key-link { font-size: 12px; color: var(--primary); text-decoration: none; }
.api-key-link:hover { text-decoration: underline; }
.api-key-section.hidden { display: none; }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 16px 24px;
    display: flex; flex-direction: column; gap: 12px;
    min-height: 200px;
}
.chat-message { display: flex; }
.chat-message.user { justify-content: flex-end; }
.chat-bubble {
    max-width: 80%; padding: 10px 14px;
    border-radius: 16px; font-size: 14px; line-height: 1.55;
    background: var(--background); color: var(--text-primary);
    border-radius: 18px 18px 18px 4px;
}
.chat-message.user .chat-bubble {
    background: var(--primary); color: #fff;
    border-radius: 18px 18px 4px 18px;
}
.chat-typing .chat-bubble {
    display: flex; gap: 4px; align-items: center; padding: 14px;
}
.typing-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--text-secondary); animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

.chat-product-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.chat-product-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: rgba(255,255,255,0.15);
    border-radius: 10px; font-size: 13px;
    border: 1px solid rgba(255,255,255,0.2);
}
.chat-message.assistant .chat-product-item {
    background: var(--surface); border: 1px solid var(--border);
}
.chat-product-item-actions { display: flex; gap: 4px; }
.chat-item-btn {
    padding: 4px 8px; font-size: 11px; font-weight: 600;
    border-radius: 6px; cursor: pointer; border: 1px solid;
    transition: var(--transition);
}
.chat-item-btn.page { border-color: var(--primary); color: var(--primary); background: none; }
.chat-item-btn.page:hover { background: var(--primary); color: #fff; }
.chat-item-btn.add { border-color: #10B981; color: #10B981; background: none; }
.chat-item-btn.add:hover { background: #10B981; color: #fff; }

.chat-input-area {
    display: flex; gap: 8px; padding: 16px 24px;
    border-top: 1px solid var(--border); align-items: flex-end;
}
.chat-textarea {
    flex: 1; resize: none; padding: 10px 14px;
    border: 2px solid var(--border); border-radius: 12px;
    font-size: 14px; line-height: 1.4; outline: none;
    transition: var(--transition); font-family: inherit;
    max-height: 100px;
}
.chat-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.chat-send-btn {
    width: 42px; height: 42px; background: var(--primary);
    border: none; border-radius: 12px; cursor: pointer; color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); }

/* ─── Cart Panel ────────────────────────────────────── */
.cart-empty-msg { color: var(--text-secondary); font-size: 14px; text-align: center; padding: 32px 0; }
.cart-items { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cart-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px; border: 1px solid var(--border);
    border-radius: 12px; background: var(--surface);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.cart-item-price { font-size: 13px; color: var(--primary); font-weight: 700; }
.cart-item-controls { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.qty-btn {
    width: 26px; height: 26px; border: 1px solid var(--border);
    background: var(--surface); border-radius: 6px;
    cursor: pointer; font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: var(--transition);
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-display { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.cart-item-remove {
    width: 28px; height: 28px; border: none; background: none;
    cursor: pointer; color: #9CA3AF;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: var(--transition); flex-shrink: 0;
}
.cart-item-remove:hover { color: #EF4444; background: #FEF2F2; }

.cart-footer {
    border-top: 1px solid var(--border); padding-top: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.cart-total {
    display: flex; justify-content: space-between;
    font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.quote-btn {
    width: 100%; padding: 13px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 12px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.quote-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

/* ─── Quote Modal ───────────────────────────────────── */
.quote-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.quote-modal-inner {
    background: #fff; border-radius: 4px;
    max-width: 860px; width: 100%;
    max-height: 92vh; overflow-y: auto;
    box-shadow: 0 4px 32px rgba(0,0,0,0.22);
}
.quote-modal-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 12px 20px; border-bottom: 1px solid #ccc;
    background: #f5f5f5;
}
.quote-print-btn {
    padding: 8px 20px; background: #222; color: #fff;
    border: none; border-radius: 4px; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.quote-print-btn:hover { background: #000; }
.quote-pdf-btn {
    padding: 8px 20px; background: #444; color: #fff;
    border: none; border-radius: 4px; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.quote-pdf-btn:hover { background: #222; }
.quote-pdf-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.quote-close-btn {
    padding: 8px 20px; background: #fff; color: #333;
    border: 1px solid #bbb; border-radius: 4px; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.quote-close-btn:hover { background: #eee; }

/* ─── Quote Document ─────────────────────────────────── */
.quote-document {
    padding: 0;
    font-family: '맑은 고딕', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    color: #000;
    line-height: 1.5;
    font-size: 13px;
}

/* 전체 문서 래퍼 */
.qdoc {
    padding: 40px 48px;
    background: #fff;
    color: #000;
}

/* 제목 영역 */
.qdoc-title-wrap {
    text-align: center;
    margin-bottom: 28px;
}
.qdoc-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #000;
    border-top: 2.5px solid #000;
    border-bottom: 2.5px solid #000;
    padding: 10px 0;
    display: inline-block;
    min-width: 260px;
}
.qdoc-no {
    font-size: 12px;
    color: #444;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* 수신/공급자 2단 레이아웃 */
.qdoc-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.qdoc-party-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.qdoc-party-tbl th,
.qdoc-party-tbl td {
    border: 1px solid #000;
    padding: 5px 8px;
    text-align: left;
    white-space: nowrap;
}
.qdoc-party-tbl th {
    background: #e8e8e8;
    font-weight: 600;
    text-align: center;
    width: 80px;
    letter-spacing: 2px;
}
.qdoc-party-tbl .party-head {
    background: #333;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 6px;
}

/* 견적 개요 */
.qdoc-info-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-bottom: 14px;
}
.qdoc-info-tbl th,
.qdoc-info-tbl td {
    border: 1px solid #000;
    padding: 5px 10px;
}
.qdoc-info-tbl th {
    background: #e8e8e8;
    font-weight: 600;
    text-align: center;
    width: 90px;
    white-space: nowrap;
    letter-spacing: 2px;
}

/* 품목 테이블 */
.qdoc-items-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-bottom: 14px;
}
.qdoc-items-tbl thead th {
    background: #333;
    color: #fff;
    border: 1px solid #000;
    padding: 7px 6px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}
.qdoc-items-tbl tbody td {
    border: 1px solid #888;
    padding: 5px 6px;
    vertical-align: middle;
}
.qdoc-items-tbl tbody tr:nth-child(even) td { background: #f7f7f7; }
.qdoc-items-tbl tfoot td { border: 1px solid #000; padding: 5px 8px; }

.qc { text-align: center; }
.qr { text-align: right; }

/* 소계/합계 행 */
.qt-sub td { background: #f0f0f0; font-weight: 600; }
.qt-grand td { background: #d8d8d8; font-weight: 800; font-size: 13.5px; }
.qt-label { text-align: right; letter-spacing: 2px; }
.qt-val { font-weight: 700; white-space: nowrap; }

/* 특기사항 */
.qdoc-remark-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 24px;
}
.qdoc-remark-tbl th,
.qdoc-remark-tbl td {
    border: 1px solid #000;
    padding: 8px 10px;
    vertical-align: top;
}
.qdoc-remark-tbl th {
    background: #e8e8e8;
    font-weight: 600;
    text-align: center;
}

/* 서명란 */
.qdoc-sign-wrap {
    display: flex;
    justify-content: flex-end;
}
.qdoc-sign-tbl {
    border-collapse: collapse;
    font-size: 12.5px;
    width: 300px;
}
.qdoc-sign-tbl th {
    border: 1px solid #000;
    background: #e8e8e8;
    text-align: center;
    padding: 6px 20px;
    font-weight: 600;
}
.qdoc-sign-tbl td {
    border: 1px solid #000;
    height: 52px;
    width: 100px;
}

@media print {
    @page { size: A4; margin: 15mm 12mm; }

    /* 모달 제외한 모든 요소 숨김 */
    body > *:not(.quote-modal) { display: none !important; }

    /* 배경색/그림자 강제 출력 */
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    .quote-modal {
        position: fixed !important;
        inset: 0 !important;
        background: none !important;
        padding: 0 !important;
        display: block !important;
        overflow: visible !important;
    }
    .quote-modal-inner {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .quote-modal-actions { display: none !important; }

    /* 문서 자체 여백 제거 (@page margin이 처리) */
    .quote-document { padding: 0 !important; }
    .qdoc { padding: 0 !important; }
}

/* ─── Responsive (panels) ───────────────────────────── */
@media (max-width: 768px) {
    .side-panel { width: 100%; right: -100%; }
    .header-content { flex-wrap: wrap; gap: 12px; }
    .catalog-selector { order: 3; width: 100%; max-width: 100%; }
    .logo { font-size: 18px; }
}

/* ─── Admin Modal ───────────────────────────────────── */
.admin-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.admin-modal {
    background: var(--surface, #fff);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    width: 100%; max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}
.admin-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 0;
    border-bottom: 1px solid var(--border, #E5E7EB);
    padding-bottom: 16px;
}
.admin-modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.admin-modal-body { padding: 20px 24px 24px; }
.admin-form { display: flex; flex-direction: column; gap: 10px; }
.admin-form label { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 2px; }
.admin-section-title {
    font-size: 14px; font-weight: 700; color: var(--primary, #2563EB);
    padding: 8px 0 4px; border-bottom: 1px solid var(--border, #E5E7EB);
}
.admin-error {
    font-size: 13px; color: #EF4444; min-height: 18px; margin: 0;
}
.admin-desc { font-size: 13px; color: #666; margin: 0 0 8px; }
.admin-link {
    font-size: 13px; color: var(--primary, #2563EB);
    text-decoration: none;
}
.admin-link:hover { text-decoration: underline; }
.admin-notice {
    background: #F0F7FF; border-radius: 10px; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.admin-notice code {
    display: block; background: #E8F0FE; border-radius: 6px;
    padding: 6px 10px; font-size: 12px; font-family: monospace;
}
