/* ═══════════ SPQ WORKSPACE — 썬푸꾸옥항공 사내 인트라넷 ═══════════
   9G (Sun PhuQuoc Airways) CI 컬러
   · Crimson  #9C0512  메인 (브랜드 레드)
   · Wine     #64090C / #501116  딥 톤 (사이드바·헤더)
   · Gold     #EEC21A  포인트 (태양 심볼)
   · Ink      #2A2A2D  제목/본문 강조                                   */
:root {
  --primary: #9C0512;
  --primary-dark: #64090C;
  --primary-soft: #fbeff0;
  --gold: #EEC21A;
  --gold-dark: #b8900c;
  --gold-soft: #fdf6d8;
  --wine: #501116;
  --navy: #2a2a2d;
  --navy-2: #501116;
  --sea: #0873bf;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 35, 61, .08), 0 4px 16px rgba(15, 35, 61, .06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }

/* ── 로그인 ── */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 85% 10%, rgba(238,194,26,.35) 0, rgba(238,194,26,0) 38%),
    linear-gradient(135deg, #2a0a0e 0%, #501116 45%, #9C0512 100%);
  padding: 20px;
}
.login-card {
  width: 380px; max-width: 100%; background: #fff; border-radius: 18px;
  padding: 38px 34px 26px; box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo { height: 46px; }
.login-brand h1 { font-size: 20px; letter-spacing: 4px; color: var(--primary); margin-top: 14px; }
.login-brand p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 5px; }
.login-card input {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 9px;
  outline: none; transition: border .15s;
}
.login-card input:focus { border-color: var(--primary); }
.login-error {
  margin-top: 12px; background: #fef2f2; color: var(--danger);
  padding: 9px 12px; border-radius: 8px; font-size: 13px;
}
.login-foot { text-align: center; color: #94a3b8; font-size: 11.5px; margin-top: 20px; }

/* ── 버튼 ── */
.btn {
  border: none; border-radius: 9px; padding: 9px 16px; font-size: 13.5px;
  font-weight: 600; transition: filter .15s, background .15s; white-space: nowrap;
}
.btn:hover { filter: brightness(.95); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1.5px solid var(--line); }
.btn-danger-ghost { background: #fff; color: var(--danger); border: 1.5px solid #fecaca; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; margin-top: 18px; padding: 12px; font-size: 15px; }
.link-btn {
  background: none; border: none; color: #b9c6da; font-size: 13px;
  padding: 7px 10px; text-align: left; border-radius: 7px; width: 100%;
}
.link-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ── 레이아웃 ── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: linear-gradient(180deg, #3a0a0f 0%, var(--wine) 55%, #64090C 100%);
  color: #dbe5f2; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; flex-shrink: 0; z-index: 40;
}
.brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand-logo { height: 30px; }
.brand-text { font-weight: 800; font-size: 10px; letter-spacing: 4.5px; color: var(--gold); padding-left: 2px; }
.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 9px; font-size: 14px; color: #b9c6da; transition: background .12s;
}
.nav a .ico { font-size: 16px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active {
  background: linear-gradient(90deg, rgba(238,194,26,.22), rgba(238,194,26,.06));
  color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--gold);
}
.sidebar-foot { padding: 12px 10px 16px; border-top: 1px solid rgba(255,255,255,.09); }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 26px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.hamburger { display: none; background: none; border: none; font-size: 20px; }
.global-search {
  flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid transparent; border-radius: 10px; padding: 8px 14px;
  transition: border .15s, background .15s;
}
.global-search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(156,5,18,.08); }
.global-search input { flex: 1; border: none; background: none; outline: none; }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-chip .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.user-chip .uname { font-weight: 700; }
.user-chip .udept { color: var(--muted); font-size: 12px; }

.main { padding: 24px 26px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ── 페이지 공통 ── */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; color: var(--navy); }
.page-head .spacer { flex: 1; }
.count-badge { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: 20px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ── 대시보드 ── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; align-items: center; gap: 13px;
}
.stat .s-ico { font-size: 26px; }
.stat .s-num { font-size: 21px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .s-label { font-size: 12px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-weight: 700; color: var(--navy); font-size: 15px;
}
.panel-head a { margin-left: auto; font-size: 12.5px; color: var(--primary); font-weight: 600; }
.plist { list-style: none; }
.plist li { border-bottom: 1px solid #f1f5f9; }
.plist li:last-child { border-bottom: none; }
.plist a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; transition: background .1s; }
.plist a:hover { background: #f8fafc; }
.plist .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .d { color: #94a3b8; font-size: 12px; flex-shrink: 0; }
.pin { color: var(--primary); font-weight: 800; }
.empty { padding: 34px 18px; text-align: center; color: #94a3b8; }

/* ── 리스트/테이블 ── */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search], .toolbar select {
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 9px; outline: none; background: #fff;
}
.toolbar input[type=search]:focus { border-color: var(--primary); }
.toolbar input[type=search] { min-width: 230px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 20px;
  padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all .12s;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .c-cnt { opacity: .65; font-weight: 500; margin-left: 3px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 11px 14px; border-bottom: 1.5px solid var(--line); background: #fafbfd; white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tr:hover td { background: #f8fafc; }
.tbl .title-cell { font-weight: 600; cursor: pointer; }
.tbl .title-cell:hover { color: var(--primary-dark); }
.tbl-wrap { overflow-x: auto; }
.nowrap { white-space: nowrap; }

/* ── 자료실 파일 행 ── */
.file-ico { font-size: 21px; width: 30px; text-align: center; }
.f-title { font-weight: 600; cursor: pointer; }
.f-title:hover { color: var(--primary-dark); }
.f-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.tag { display: inline-block; background: #eef2f7; color: #475569; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; }
.sheet-mark { display: inline-block; background: #dcfce7; color: #15803d; border-radius: 5px; padding: 1.5px 7px; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
a.f-title { display: inline-block; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  border: 1.5px solid var(--line); background: #fff; border-radius: 7px;
  width: 30px; height: 30px; font-size: 14px; display: inline-flex;
  align-items: center; justify-content: center; transition: all .12s;
}
.icon-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.icon-btn.danger:hover { border-color: var(--danger); background: #fef2f2; }

/* ── 업로드 존 ── */
.dropzone {
  border: 2px dashed #cbd5e1; border-radius: var(--radius); background: #fff;
  padding: 26px; text-align: center; color: var(--muted); cursor: pointer;
  transition: all .15s; margin-bottom: 16px;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.dropzone .dz-big { font-size: 15px; font-weight: 700; color: var(--navy); }
.dropzone.over .dz-big { color: var(--primary-dark); }
.drop-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(18,35,61,.72);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 800;
}
.drop-overlay > div {
  border: 3px dashed rgba(255,255,255,.7); border-radius: 20px; padding: 46px 70px;
}

/* 업로드 진행 목록 */
.up-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.up-item .u-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.u-bar { width: 130px; height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.u-bar i { display: block; height: 100%; background: var(--primary); width: 0%; transition: width .2s; border-radius: 4px; }
.u-state { font-size: 12px; width: 64px; text-align: right; flex-shrink: 0; }
.u-state.ok { color: var(--ok); font-weight: 700; }
.u-state.err { color: var(--danger); font-weight: 700; }
.u-state.dup { color: #d97706; font-weight: 700; }

/* ── 상세보기 ── */
.detail-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.detail-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--line); }
.detail-head h2 { font-size: 20px; color: var(--navy); line-height: 1.4; }
.detail-meta { display: flex; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.detail-body { padding: 24px 26px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }
.att-list { padding: 0 26px 20px; display: flex; flex-direction: column; gap: 8px; }
.att-item {
  display: flex; align-items: center; gap: 10px; background: #f8fafc;
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px;
}
.att-item .a-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; }
.detail-actions { display: flex; gap: 8px; padding: 14px 26px; border-top: 1px solid var(--line); background: #fafbfd; }

/* ── 댓글 ── */
.cmt-box { padding: 18px 26px; border-top: 1px solid var(--line); }
.cmt-box h3 { font-size: 14.5px; margin-bottom: 12px; color: var(--navy); }
.cmt { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.cmt .avatar-s {
  width: 32px; height: 32px; border-radius: 50%; background: var(--sea); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.cmt-body { flex: 1; min-width: 0; }
.cmt-body .c-head { font-size: 12.5px; margin-bottom: 3px; }
.cmt-body .c-head b { margin-right: 7px; }
.cmt-body p { white-space: pre-wrap; word-break: break-word; }
.cmt-form { display: flex; gap: 8px; margin-top: 13px; }
.cmt-form textarea {
  flex: 1; border: 1.5px solid var(--line); border-radius: 9px; padding: 10px 12px;
  resize: vertical; min-height: 44px; outline: none;
}
.cmt-form textarea:focus { border-color: var(--primary); }

/* ── 검색 결과 ── */
.sr-section { margin-bottom: 22px; }
.sr-section h3 { font-size: 15px; color: var(--navy); margin-bottom: 10px; }
.sr-item { display: block; padding: 13px 16px; border-bottom: 1px solid #f1f5f9; }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: #f8fafc; }
.sr-item .s-title { font-weight: 700; margin-bottom: 3px; }
.sr-item .s-snip { color: var(--muted); font-size: 13px; line-height: 1.55; }
.sr-item .s-meta { color: #94a3b8; font-size: 11.5px; margin-top: 4px; }
mark { background: #fbe7a1; border-radius: 3px; padding: 0 2px; }

/* ── 모달 ── */
.modal-back {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 16px; width: 560px; max-width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.3); animation: pop .18s ease;
}
.modal.wide { width: 860px; }
.modal.pv-modal { width: 1032px; }  /* 미리보기 팝업: wide 대비 20% 확대 */
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16.5px; color: var(--navy); }
.modal-x { margin-left: auto; background: none; border: none; font-size: 19px; color: var(--muted); }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 16px 16px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=email],
.form-row select, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-row textarea { resize: vertical; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 미리보기 모달 */
.preview-box { background: #0f172a; display: flex; align-items: center; justify-content: center; min-height: 300px; max-height: 72vh; border-radius: 0 0 16px 16px; overflow: auto; }
.preview-box img { max-width: 100%; max-height: 70vh; object-fit: contain; }
.preview-box iframe { width: 100%; height: 70vh; border: none; background: #fff; }
.preview-box pre { color: #e2e8f0; padding: 20px; font-size: 13px; white-space: pre-wrap; word-break: break-all; width: 100%; max-height: 70vh; overflow: auto; }
.preview-box.light { background: #f4f6fa; align-items: flex-start; }

/* 엑셀/워드 변환 미리보기 */
.pv-doc { width: 100%; max-height: 70vh; overflow: auto; padding: 18px 22px; background: #fff; }
.pv-doc p { margin: 0 0 9px; line-height: 1.7; font-size: 14px; }
.pv-doc h4 { margin: 14px 0 8px; color: var(--navy); }
.pv-sheet { background: var(--primary-soft); color: var(--primary-dark); padding: 6px 12px; border-radius: 8px; display: inline-block; }
.pv-table { border-collapse: collapse; margin: 6px 0 16px; font-size: 12.5px; }
.pv-table th, .pv-table td { border: 1px solid #d8e0ea; padding: 5px 10px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.pv-table th { background: var(--navy); color: #fff; font-weight: 600; position: sticky; top: 0; }
.pv-table tr:nth-child(even) td { background: #f8fafc; }
.pv-note { color: #94a3b8; font-size: 12px; margin: 4px 0 12px; }

/* 스프레드시트 편집기 */
.se-toolbar { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; flex-wrap: wrap; }
.se-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.se-tab { border: 1.5px solid var(--line); background: #fff; border-radius: 7px 7px 0 0; padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.se-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.se-wrap { overflow: auto; max-height: 62vh; min-height: 260px; background: #fff; }
.se-table { border-collapse: collapse; font-size: 13px; }
.se-table th, .se-table td { border: 1px solid #d8e0ea; padding: 5px 9px; min-width: 84px; max-width: 340px; white-space: pre-wrap; word-break: break-word; }
.se-table th { background: #eef2f7; color: #475569; font-weight: 600; font-size: 11.5px; text-align: center; }
.se-col { position: sticky; top: 0; z-index: 2; }
.se-row { position: sticky; left: 0; z-index: 1; min-width: 40px !important; }
.se-corner { position: sticky; top: 0; left: 0; z-index: 3; }
.se-table td { background: #fff; cursor: cell; outline: none; }
.se-table td:focus { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--primary-soft); }
.se-foot { padding: 8px 16px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 16px 16px; }

/* 미리보기 미지원 안내 */
.pv-none { text-align: center; color: #cbd5e1; padding: 50px 20px; }
.pv-none-ico { font-size: 52px; margin-bottom: 10px; }
.pv-none p { margin-bottom: 18px; line-height: 1.7; }

/* ── 페이지네이션 ── */
.pager { display: flex; gap: 5px; justify-content: center; margin-top: 18px; }
.pager button {
  min-width: 34px; height: 34px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.pager button.cur { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager button:hover:not(.cur):not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ── 토스트 ── */
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 28px rgba(0,0,0,.3);
  animation: toastIn .2s ease; max-width: 90vw;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── 배지 ── */
.badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2.5px 8px; }
.badge.admin { background: var(--primary-soft); color: var(--primary); }
.badge.staff { background: #e0f2fe; color: #0369a1; }
.badge.off { background: #f1f5f9; color: #94a3b8; }
.badge.on { background: #dcfce7; color: var(--ok); }

/* ── 반응형 ── */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: -240px; transition: left .2s ease; height: 100vh;
    box-shadow: 8px 0 30px rgba(0,0,0,.25);
  }
  .sidebar.open { left: 0; }
  .hamburger { display: block; }
  .dash-grid { grid-template-columns: 1fr; }
  .main { padding: 16px 14px 60px; }
  .topbar { padding: 10px 14px; }
  .user-chip .udept { display: none; }
  .form-2col { grid-template-columns: 1fr; }
  .hide-m { display: none !important; }
}

/* ═══════════ 9G 리뉴얼 추가 컴포넌트 ═══════════ */
.nav a { position: relative; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
.nav-badge.gold { background: var(--gold); color: #3a0a0f; }

/* LF 비교: 현재 레이아웃 오른쪽 본문에 임베드 */
.main.full { max-width: none; padding: 0; }
.lf-frame { display: block; width: 100%; height: calc(100vh - 61px); border: 0; background: var(--bg); }

/* 상태/분류 배지 */
.pri { display: inline-block; font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 2px 7px; margin-right: 5px; vertical-align: 1px; letter-spacing: .3px; }
.pri.urgent { background: var(--primary); color: #fff; }
.pri.important { background: var(--gold); color: #3a0a0f; }
.cat-tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px; background: #f3eded; color: #6b4a4d; white-space: nowrap; }
.new-n { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 9.5px; font-weight: 800; margin-left: 5px; vertical-align: 2px; }
tr.unread .title-cell { font-weight: 800; }
.dot-unread { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: 2px; }
.readbar { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.readbar i { display: block; width: 46px; height: 5px; border-radius: 3px; background: #eee; overflow: hidden; position: relative; }
.readbar i b { position: absolute; inset: 0 auto 0 0; background: var(--gold); border-radius: 3px; }

/* 세그먼트 토글 */
.seg { display: inline-flex; background: #f1eeee; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: 6px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.seg button.on { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 좋아요 / 즐겨찾기 */
.like-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 22px; padding: 7px 16px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: all .15s;
}
.like-btn:hover { border-color: var(--primary); color: var(--primary); }
.like-btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.like-btn.on .heart { animation: pulse .35s ease; }
@keyframes pulse { 50% { transform: scale(1.35); } }
.star-btn { background: none; border: none; font-size: 17px; line-height: 1; color: #d6cfcf; padding: 2px; transition: transform .12s; }
.star-btn:hover { transform: scale(1.2); }
.star-btn.on { color: var(--gold); }
.meta-ico { color: #9ca3af; font-size: 12px; margin-left: 8px; white-space: nowrap; }

/* 간이 마크다운 본문 */
.md { white-space: normal; }
.md p { margin: 0 0 10px; }
.md h3 { font-size: 16.5px; color: var(--navy); margin: 18px 0 8px; }
.md h4 { font-size: 15px; color: var(--primary); margin: 14px 0 6px; }
.md ul { margin: 4px 0 12px 20px; }
.md li { margin: 3px 0; }
.md blockquote { border-left: 3px solid var(--gold); background: var(--gold-soft); padding: 8px 14px; border-radius: 0 8px 8px 0; margin: 8px 0 12px; }
.md a { color: var(--sea); text-decoration: underline; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.fmt-hint { font-size: 11.5px; color: #9ca3af; margin-top: 5px; }
.fmt-hint code { background: #f3f4f6; padding: 0 4px; border-radius: 4px; }

/* 읽음 확인 모달 */
.reader-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.reader-cols h4 { font-size: 13px; margin-bottom: 8px; color: var(--navy); }
.reader-list { list-style: none; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.reader-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #f5f2f2; font-size: 13px; }
.reader-list li:last-child { border-bottom: none; }

/* ═══════════ 오늘의 모닝 토픽 & 브리핑 ═══════════ */
.brief-hero {
  position: relative; overflow: hidden; border-radius: 18px; color: #fff; padding: 26px 28px 24px; margin-bottom: 18px;
  background:
    radial-gradient(circle at 92% -10%, rgba(238,194,26,.55) 0, rgba(238,194,26,0) 42%),
    linear-gradient(120deg, #3a0a0f 0%, #64090C 50%, #9C0512 100%);
  box-shadow: 0 10px 30px rgba(80,17,22,.25);
}
.brief-hero .bh-sun { position: absolute; right: -30px; top: -40px; width: 190px; opacity: .14; pointer-events: none; }
.brief-hero .bh-date { font-size: 12.5px; letter-spacing: 1.5px; color: var(--gold); font-weight: 800; }
.brief-hero h2 { font-size: 23px; margin: 6px 0 4px; line-height: 1.35; }
.brief-hero .bh-sub { font-size: 13px; opacity: .8; }
.brief-hero .bh-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; position: relative; }
.btn-gold { background: var(--gold); color: #3a0a0f; }
.btn-glass { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.brief-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.topic-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; border-top: 3px solid var(--gold); }
.topic-card .tc-num { font-size: 11px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.topic-card h4 { font-size: 14.5px; color: var(--navy); margin: 4px 0 7px; line-height: 1.4; }
.topic-card p { font-size: 13px; color: #4b5563; line-height: 1.6; }
.topic-card .tc-tag { display: inline-block; margin-top: 9px; font-size: 11px; font-weight: 700; color: var(--gold-dark); background: var(--gold-soft); border-radius: 6px; padding: 2px 8px; }
.brief-summary { padding: 20px 24px; line-height: 1.75; font-size: 14px; margin-bottom: 18px; }
.brief-summary .bs-by { font-size: 11.5px; color: #9ca3af; margin-top: 10px; }
.news-sec { margin-bottom: 16px; }
.news-sec-head { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-weight: 800; color: var(--navy); }
.news-sec-head .ns-cnt { font-size: 12px; color: var(--muted); font-weight: 600; }
.news-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f5f2f2; transition: background .1s; }
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #fcf9f9; }
.news-item .ni-main { flex: 1; min-width: 0; }
.news-item .ni-title { font-weight: 700; line-height: 1.45; color: var(--text); }
.news-item a.ni-title:hover { color: var(--primary); }
.news-item .ni-note { font-size: 12.5px; color: #4b5563; margin-top: 4px; line-height: 1.55; }
.news-item .ni-meta { font-size: 11.5px; color: #9ca3af; margin-top: 4px; }
.hot { display: inline-block; font-size: 10.5px; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 5px; padding: 1.5px 6px; margin-left: 6px; vertical-align: 1px; }
.brief-dates { position: sticky; top: 80px; }
.brief-dates a { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px; border-bottom: 1px solid #f5f2f2; font-size: 13px; }
.brief-dates a:hover { background: #fcf9f9; }
.brief-dates a.cur { background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.brief-dates .bd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.ns-ico { font-size: 16px; }

/* 홈: 모닝 브리핑 카드 */
.home-brief { display: block; margin-bottom: 18px; }
.home-brief .brief-hero { margin-bottom: 0; padding: 20px 24px; cursor: pointer; transition: transform .15s; }
.home-brief .brief-hero:hover { transform: translateY(-2px); }
.home-brief ul { list-style: none; margin-top: 12px; position: relative; }
.home-brief li { font-size: 13.5px; padding: 4px 0; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-brief li::before { content: "•"; color: var(--gold); margin-right: 8px; font-weight: 800; }
.stat.unread-stat { border: 1.5px solid var(--primary-soft); }
.stat.unread-stat .s-num { color: var(--primary); }

@media (max-width: 900px) {
  .brief-layout { grid-template-columns: 1fr; }
  .brief-dates { position: static; }
  .reader-cols { grid-template-columns: 1fr; }
  .lf-frame { height: calc(100vh - 57px); }
}
.nav .ext-ico { margin-left: auto; font-size: 12px; opacity: .55; }
.brief-hero .bh-greet { position: relative; font-size: 26px; font-weight: 800; margin: 8px 0 2px; letter-spacing: -.3px; }
.home-brief .brief-hero h2 { font-size: 17px; font-weight: 600; opacity: .92; }
/* 게시판 다중 선택 */
.tbl .chk-col { width: 38px; text-align: center; padding-left: 10px; padding-right: 4px; }
.tbl .chk-col input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.tbl tr.row-checked td { background: var(--primary-soft); }
/* 직원관리 · 비밀번호 */
.info-note { background: var(--gold-soft); border: 1px solid #f3e3a1; color: #5b4a12; border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.info-note.small { font-size: 12px; margin: 4px 0 0; }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--primary-soft); border: 1px solid #f1cdd1; border-radius: 10px; padding: 9px 14px; margin-bottom: 12px; font-size: 13px; color: var(--primary); }
.bulk-bar b { font-size: 15px; }
.badge.pw { background: var(--gold-soft); color: #8a6a00; }
.tbl tr.row-off td { color: #9ca3af; }
.pw-rule { min-height: 18px; font-size: 12.5px; color: var(--danger); }
.user-chip { cursor: pointer; border-radius: 10px; padding: 4px 8px; transition: background .12s; }
.user-chip:hover { background: var(--bg); }
