/* Shared public card and ERP editor. Public pages do not load the ERP stylesheet. */
.public-card-page { margin: 0; padding: 36px 16px; background: #edf2f4; color: #183145; font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif; }
.public-card-page *, .business-card *, .bc-qr-dialog * { box-sizing: border-box; }
.public-card-page button, .public-card-page a { -webkit-tap-highlight-color: transparent; }
.business-card { --card-accent: #176b5b; width: 100%; max-width: 440px; margin: 0 auto; overflow: hidden; border: 1px solid #dbe5e9; border-radius: 8px; background: #fff; color: #183145; box-shadow: 0 18px 50px #17364b12; font-size: 13px; line-height: 1.6; text-align: left; }
.business-card a { color: inherit; text-decoration: none; }
.business-card button, .business-card a { touch-action: manipulation; }
.business-card svg, .card-save-bar svg, .card-preview-qr svg { flex: 0 0 auto; width: 17px; height: 17px; }
.business-card button { font: inherit; cursor: pointer; }
.business-card button:disabled { cursor: default; }
.business-card :focus-visible, .cards-layout :focus-visible, .bc-qr-dialog :focus-visible { outline: 3px solid #3985ff; outline-offset: 3px; }
.bc-brand { min-height: 77px; display: flex; gap: 10px; align-items: center; padding: 18px; border-bottom: 1px solid #e6edef; }
.bc-brand img { width: 76px; max-height: 42px; object-fit: contain; }
.bc-monogram { display: grid; place-items: center; flex: 0 0 35px; height: 35px; background: var(--card-accent); color: #fff; border-radius: 7px; font-size: 24px; font-weight: 800; }
.bc-brand > div { min-width: 0; flex: 1; }
.bc-brand strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.bc-brand small { display: block; color: #71858f; font-size: 7px; font-weight: 700; letter-spacing: .3px; }
.bc-edition { padding-left: 10px; border-left: 1px solid #dbe5e9; color: var(--card-accent); font-size: 8px; font-weight: 700; white-space: nowrap; }
.bc-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 32%; gap: 18px; padding: 30px 23px 44px; background: linear-gradient(130deg, #f4f9fa, color-mix(in srgb, var(--card-accent) 17%, white)); border-left: 4px solid var(--card-accent); }
.bc-person { align-self: center; min-width: 0; }
.business-card .bc-eyebrow { margin: 0 0 8px; font-size: 8px; color: var(--card-accent); font-weight: 800; letter-spacing: .35px; }
.bc-person h1 { font-size: 30px; line-height: 1.25; letter-spacing: -1px; margin: 0 0 7px; overflow-wrap: anywhere; }
.bc-english { margin: 0; font-size: 9px; color: #617c8b; overflow-wrap: anywhere; }
.bc-role { margin: 16px 0 0; padding: 5px 8px; border-left: 3px solid var(--card-accent); font-size: 10px; background: #ffffffb8; overflow-wrap: anywhere; }
.bc-portrait { align-self: center; aspect-ratio: 4 / 5; background: #fff9; box-shadow: 5px 5px 0 color-mix(in srgb, var(--card-accent) 45%, white); border: 3px solid #fff; display: grid; place-items: center; color: var(--card-accent); font-size: 45px; font-weight: 800; overflow: hidden; }
.bc-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bc-signature { position: absolute; bottom: 15px; left: 23px; display: flex; align-items: center; gap: 9px; color: #78909b; font-size: 6px; font-weight: 800; letter-spacing: .5px; }
.bc-signature i { width: 38px; height: 2px; background: var(--card-accent); }
.bc-quick { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #e5edef; }
.bc-quick > * { display: flex; flex-direction: column; gap: 7px; align-items: center; justify-content: center; min-height: 75px; font-size: 10px; font-weight: 700; border-right: 1px solid #e5edef; }
.bc-quick > :last-child { border-right: 0; }
.bc-quick svg { color: var(--card-accent); }
.bc-unavailable { opacity: .4; }
.bc-primary-actions { display: grid; grid-template-columns: 1fr 90px; padding: 14px 16px; gap: 8px; }
.bc-primary-actions > * { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px; border-radius: 4px; border: 1px solid #c6d6dc; background: #fff; font-size: 11px !important; font-weight: 700 !important; }
.bc-primary-actions > :first-child { color: #fff; background: var(--card-accent); border-color: var(--card-accent); }
.bc-intro { display: flex; gap: 18px; padding: 28px 23px; background: color-mix(in srgb, var(--card-accent) 8%, white); }
.bc-intro > b { font-size: 28px; color: var(--card-accent); line-height: 1.2; }
.business-card h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: -.5px; }
.bc-intro > div { min-width: 0; }
.bc-intro > div > p:last-child { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; }
.bc-contact { padding: 28px 23px 8px; }
.bc-contact ul { list-style: none; margin: 0; padding: 0; }
.bc-contact li { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid #edf2f4; }
.bc-contact li > svg { box-sizing: content-box; padding: 8px; background: #f4f8f9; border-radius: 4px; color: var(--card-accent); }
.bc-contact li > div { min-width: 0; }
.bc-contact li span { display: block; color: #728993; font-size: 9px; }
.bc-contact li strong, .bc-contact li a { display: block; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.bc-contact li a:hover { text-decoration: underline; }
.bc-empty-contact { color: #7c8c96; font-size: 12px; }
.bc-footer { display: flex; justify-content: space-between; padding: 16px 23px 20px; }
.bc-footer > * { display: inline-flex; align-items: center; gap: 5px; padding: 8px; border: 1px solid #d7e1e5; border-radius: 4px; background: white; font-size: 10px; }
.bc-preview-caption { padding: 8px; text-align: center; color: #78909b; background: #f4f7f8; font-size: 10px; }
.bc-qr-dialog { width: min(380px, calc(100% - 32px)); padding: 26px; border: 1px solid #dbe5e9; border-radius: 12px; color: #183145; text-align: center; font-family: "Malgun Gothic", sans-serif; box-shadow: 0 24px 80px #122c4440; }
.bc-qr-dialog::backdrop { background: #10233599; }
.bc-qr-dialog form { margin: -12px -10px 0; text-align: right; }
.bc-qr-dialog form button { border: 0; background: transparent; color: #6b7e89; font-size: 26px; cursor: pointer; }
.bc-qr-dialog h2 { font-size: 19px; margin: 5px 0 10px; }
.bc-qr-dialog canvas { max-width: 100%; height: auto !important; }
.bc-qr-dialog p { font-size: 12px; overflow-wrap: anywhere; }
.bc-qr-dialog > button { border: 0; border-radius: 5px; padding: 12px 18px; color: #fff; background: #176b5b; font: inherit; font-size: 13px; cursor: pointer; }
.bc-message:empty { display: none; }
.bc-message { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 13px 22px; border-radius: 8px; background: #183145; color: #fff; z-index: 20; font-size: 13px; overflow-wrap: anywhere; }
.bc-not-found { width: min(440px, 100%); margin: 12vh auto; padding: 32px; box-sizing: border-box; background: #fff; border-radius: 12px; }
.bc-not-found h1 { font-size: 22px; }
.bc-not-found p { color: #708591; line-height: 1.7; }

/* Editor */
.main-content { min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.cards-heading { align-items: center; }
.cards-heading .heading-actions { flex-shrink: 0; }
.cards-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0 18px; }
.cards-stat { padding: 18px 20px; background: #fff; border: 1px solid #dfe7ef; border-left: 3px solid #2863ee; border-radius: 7px; }
.cards-stat > span { display: block; color: #748599; font-size: 11px; margin-bottom: 7px; }
.cards-stat > strong { color: #203447; font-size: 21px; }
.cards-stat-1 { border-left-color: #18846e; }
.cards-stat-2 { border-left-color: #c68a26; }
.cards-stat-3 { border-left-color: #c94f72; }
.cards-feedback { margin: 0; color: #b33047; font-size: 13px; overflow-wrap: anywhere; }
.cards-feedback:not(:empty) { padding: 12px 15px; margin-bottom: 16px; background: #fff1f3; border-radius: 6px; }
.cards-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.cards-list-panel { padding: 16px 13px; }
.cards-list-panel .panel-header { padding: 0; margin-bottom: 16px; gap: 8px; }
.cards-list-panel h2 { font-size: 15px; }
.cards-list-panel .panel-count { font-size: 10px; }
.cards-search { display: block; margin-bottom: 12px; }
.cards-search input { width: 100%; min-width: 0; padding: 10px; border: 1px solid #dfe7ef; border-radius: 5px; font: inherit; font-size: 11px; }
.cards-list-item { border: 1px solid #dfe7ef; border-radius: 6px; overflow: hidden; margin-bottom: 9px; }
.cards-list-item.selected { border-color: #36887b; box-shadow: inset 3px 0 #176b5b; }
.card-select { display: flex; align-items: center; gap: 8px; width: 100%; padding: 13px 9px; border: 0; background: transparent; text-align: left; color: #203447; font: inherit; cursor: pointer; }
.cards-list-avatar { flex: 0 0 31px; height: 36px; display: grid; place-items: center; border-radius: 5px; background: #e8f1ef; color: #176b5b; font-weight: 800; }
.card-select > span:nth-child(2) { min-width: 0; flex: 1; }
.card-select strong { display: block; font-size: 11px; overflow-wrap: anywhere; }
.card-select small { display: block; font-size: 9px; margin-top: 4px; color: #6c7e91; overflow-wrap: anywhere; }
.cards-badge { flex-shrink: 0; background: #f1f3f6; color: #7a8998; font-size: 9px; padding: 3px 6px; border-radius: 12px; }
.cards-badge.published { background: #e4f3ed; color: #277b67; }
.cards-list-actions { display: flex; gap: 4px; justify-content: flex-end; padding: 8px; border-top: 1px solid #e7edf3; background: #f8fafc; }
.cards-list-actions .row-button { padding: 5px 6px; font-size: 9px; }
.cards-list-actions .danger { color: #cb5365; }
.cards-list-actions button:disabled { opacity: .4; cursor: default; }
.cards-list-empty { padding: 24px 8px; color: #7c8c9f; font-size: 12px; text-align: center; }
.cards-editor-panel { padding: 22px; min-width: 0; }
.cards-editor-panel > .panel-header { padding: 0; margin-bottom: 24px; align-items: start; gap: 10px; }
.cards-editor-panel .panel-header h2 { font-size: 19px; }
#cardSaveState { font-size: 10px; color: #7b8c9d; margin: 7px 0 0; }
.cards-editor-panel .secondary-button { font-size: 11px; padding: 9px 11px; }
.cards-welcome { padding: 80px 16px; text-align: center; }
.cards-welcome > span { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 24px; background: #e9f4f0; border-radius: 18px; color: #176b5b; font-size: 38px; }
.cards-welcome h2 { font-size: 22px; color: #203447; }
.cards-welcome p { margin: 14px 0 24px; font-size: 13px; line-height: 1.9; color: #78899c; }
.card-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.card-editor-form { min-width: 0; }
.card-editor-form fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 28px; }
.card-editor-form legend { margin-bottom: 18px; padding: 0; font-size: 13px; font-weight: 700; color: #203447; }
.card-editor-form legend b { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 6px; color: #fff; background: #253d3b; font-size: 9px; border-radius: 4px; }
.card-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.card-editor-form label > span:first-child { display: block; margin-bottom: 7px; color: #6f7f91; font-size: 11px; font-weight: 600; }
.card-editor-form input:not([type=checkbox]):not([type=color]):not([type=file]), .card-editor-form select, .card-editor-form textarea { display: block; width: 100%; min-width: 0; border: 1px solid #dce5ed; border-radius: 5px; padding: 10px 11px; font: inherit; font-size: 12px; line-height: 1.4; color: #263a4e; background: white; }
.card-editor-form textarea { resize: vertical; min-height: 90px; }
.card-editor-form input:focus, .card-editor-form select:focus, .card-editor-form textarea:focus { border-color: #2d72f2; outline: 2px solid #2d72f215; }
.card-span-full { grid-column: 1 / -1; }
.card-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card-upload { display: flex; align-items: center; gap: 9px; padding: 12px 10px; border: 1px solid #e0e8e8; border-radius: 6px; background: #f7faf9; min-width: 0; }
.card-upload-thumb { width: 43px; height: 51px; flex-shrink: 0; display: grid; place-items: center; background: #e2eeea; color: #498372; font-size: 12px; border: 1px solid #dce6e2; border-radius: 4px; overflow: hidden; }
.card-upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
#logoThumb img { object-fit: contain; background: white; }
.card-upload > div:last-child { min-width: 0; flex: 1; }
.card-upload strong { display: block; font-size: 11px; color: #263a4e; }
.card-upload small { display: block; margin-top: 3px; font-size: 8px; color: #7a8b99; }
.card-upload-button { display: inline-block; margin-top: 7px; padding: 6px 10px; border-radius: 4px; background: #273d4f; color: white; font-size: 10px; cursor: pointer; position: relative; overflow: hidden; }
.card-upload-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.card-upload-button:focus-within { outline: 3px solid #3985ff; outline-offset: 2px; }
.card-upload .text-button { font-size: 10px; margin-left: 6px; color: #c25b6b; }
.card-help { font-size: 10px; color: #7d8e9f; line-height: 1.7; margin: 10px 0 16px; }
.card-color-label { display: block; margin: 18px 0; }
.card-color-label > div { display: flex; align-items: center; gap: 10px; }
.card-color-label input { width: 43px; height: 33px; padding: 3px; border: 1px solid #dce5ed; background: #fff; border-radius: 4px; }
#cardColorValue { font-size: 12px; color: #63758a; }
.card-save-bar { border-top: 1px solid #e4ebf2; padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.card-save-bar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.card-save-bar label { font-size: 10px; color: #536b81; display: inline-flex; align-items: center; gap: 5px; }
.card-save-bar input { margin: 0; width: 13px; height: 13px; accent-color: #2863ee; }
.card-save-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.card-save-bar .primary-button { padding: 10px 12px; font-size: 12px; }
.cards-editor-panel button:disabled { opacity: .4; cursor: default; }
.card-url-caption { font-size: 9px; color: #718397; overflow-wrap: anywhere; line-height: 1.7; }
.card-preview-column { min-width: 0; border-left: 1px solid #e2e9f0; padding-left: 18px; position: sticky; top: 20px; }
.card-preview-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 14px; }
.card-preview-heading strong { font-size: 11px; color: #35495b; }
.card-preview-heading span { font-size: 8px; color: #7b8c9f; }
.card-preview-scroll .bc-brand { padding: 13px 10px; gap: 6px; min-height: 63px; }
.card-preview-scroll .bc-brand img { width: 58px; }
.card-preview-scroll .bc-brand strong { font-size: 10px; }
.card-preview-scroll .bc-edition { font-size: 6px; padding-left: 6px; }
.card-preview-scroll .bc-hero { padding: 25px 14px 40px; gap: 10px; }
.card-preview-scroll .bc-person h1 { font-size: 25px; }
.card-preview-scroll .bc-role { font-size: 8px; padding: 4px; }
.card-preview-scroll .bc-quick > * { min-height: 60px; font-size: 9px; }
.card-preview-scroll .bc-primary-actions { grid-template-columns: 1fr 60px; padding: 10px; }
.card-preview-scroll .bc-primary-actions > * { font-size: 9px !important; gap: 4px; min-height: 34px; }
.card-preview-scroll .bc-intro, .card-preview-scroll .bc-contact { padding: 22px 14px; }
.card-preview-scroll .bc-contact li { padding: 13px 0; gap: 8px; }
.card-preview-scroll .bc-contact li a, .card-preview-scroll .bc-contact li strong { font-size: 10px; }
.card-preview-scroll .bc-footer { padding: 10px 14px 16px; }
.card-preview-qr { display: flex; justify-content: center; align-items: center; gap: 7px; width: 100%; margin-top: 13px; }
@media (max-width: 1350px) { .card-edit-grid { grid-template-columns: minmax(0, 1fr); } .card-preview-column { position: static; border-left: 0; padding: 22px 0 0; border-top: 1px solid #e2e9f0; width: min(380px, 100%); justify-self: center; } }
@media (max-width: 1050px) { .cards-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 12px; } .cards-editor-panel { padding: 17px; } .cards-heading { flex-wrap: wrap; gap: 15px; } .card-image-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cards-layout { grid-template-columns: minmax(0, 1fr); } .cards-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .cards-stat { padding: 14px; } #cardsList { max-height: 300px; overflow-y: auto; } .card-field-grid { gap: 14px 10px; } .cards-heading .heading-actions { flex-wrap: wrap; } .cards-editor-panel > .panel-header { flex-wrap: wrap; } .cards-welcome { padding: 45px 5px; } .cards-welcome h2 { font-size: 19px; } }
@media (max-width: 440px) { .public-card-page { padding: 0; background: #fff; } .public-card-page .business-card { border: 0; border-radius: 0; box-shadow: none; } .card-field-grid { grid-template-columns: 1fr; } .cards-editor-panel { padding: 16px 13px; } .card-save-bar > div:last-child { width: 100%; } .card-save-bar > div:last-child button { flex: 1; } }
