:root { --olive: #26301f; --olive-d: #1b2316; --cream: #f2ede1; --paper: #f6f3ec; --ink: #1e1f1a; --muted: #6c6b5f; --line: #e2ddd0; --gold: #c8a46b; --gold-d: #8c6a35; --red: #b4432a; --green: #2f6b2a; --blue: #2b5c9e; }
* { box-sizing: border-box; }
body { margin: 0; font: 400 16px/1.6 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: var(--ink); background: var(--paper); word-break: keep-all; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--olive); padding: 20px; }
.login-box { width: min(100%, 380px); background: #fff; border-radius: 14px; padding: 36px 32px; display: grid; gap: 14px; }
.lg-mark { width: 56px; height: 56px; color: var(--gold-d); }
.login h1 { font-size: 21px; margin: 0 0 6px; }
.login label, .f label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfc8b8; border-radius: 8px; background: #fff; font-size: 16px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--olive); }
.err { color: var(--red); font-weight: 600; min-height: 1.4em; margin: 0; }
.back { font-size: 14px; color: var(--muted); text-align: center; }
.b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 8px; border: 1px solid #cfc8b8; background: #fff; cursor: pointer; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.b:hover { border-color: var(--ink); }
.b:active { transform: scale(.97); }
.b-pri { background: var(--olive); border-color: var(--olive); color: var(--cream); }
.b-pri:hover { background: #33402a; }
.b-red { color: var(--red); border-color: #e6c3b9; }
.b-lg { min-height: 52px; font-size: 17px; }
.b-sm { min-height: 34px; padding: 0 10px; font-size: 14px; }
.b[disabled] { opacity: .5; pointer-events: none; }
.linkbtn { background: none; border: 0; cursor: pointer; padding: 0; text-decoration: underline; }
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--olive); color: var(--cream); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { text-decoration: none; font-size: 18px; padding: 0 10px; }
.brand b { color: var(--gold); font-size: 22px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px; border-radius: 8px; text-decoration: none; font-size: 16px; }
.nav a:hover { background: rgba(255, 255, 255, .07); }
.nav a.on { background: var(--gold); color: var(--olive-d); font-weight: 700; }
.cnt { font-style: normal; background: var(--red); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 13px; font-weight: 700; }
.side-ft { margin-top: auto; display: grid; gap: 10px; padding: 0 10px; font-size: 14px; opacity: .8; }
.main { padding: 30px clamp(16px, 3vw, 40px) 80px; min-width: 0; outline: none; }
.hd2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.hd2 h1 { font-size: 26px; margin: 0; }
.hd2 .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.warn { background: #fff4dc; border: 1px solid #f0d9a4; padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; }
.info-b { background: #eef3ea; border: 1px solid #cfdcc5; padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; display: grid; gap: 4px; }
.tile b { font-size: 30px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 14px; }
.tile.hot { border-color: var(--red); }
.tile.hot b { color: var(--red); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.card h2 { font-size: 18px; margin: 0 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters select, .filters input { width: auto; min-width: 140px; }
.filters input[type=search] { flex: 1; min-width: 180px; }
.tbl-w { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #faf8f3; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fbf9f4; }
td.num { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #eee9dd; white-space: nowrap; }
.st-new, .st-await_deposit, .st-pending { background: #fde4dc; color: var(--red); }
.st-paid, .st-booked, .st-quoted { background: #e1ecf8; color: var(--blue); }
.st-contracted, .st-done, .st-shipped { background: #e2efd9; color: var(--green); }
.st-cancelled, .st-refunded { background: #eee; color: #777; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-bg { position: absolute; inset: 0; background: rgba(20, 24, 16, .45); }
.drawer-p { position: absolute; right: 0; top: 0; bottom: 0; width: min(100%, 680px); background: var(--paper); overflow-y: auto; padding: 28px clamp(16px, 3vw, 34px) 60px; animation: din .3s cubic-bezier(.22, 1, .36, 1); }
@keyframes din { from { transform: translateX(40px); opacity: 0; } }
.drawer-close { position: absolute; right: 16px; top: 14px; width: 44px; height: 44px; border: 0; background: none; font-size: 30px; cursor: pointer; }
.drawer h2 { font-size: 22px; margin: 0 40px 16px 0; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.f { display: grid; gap: 14px; }
.f .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.f .chk { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.f small { font-weight: 400; color: var(--muted); }
.f fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; display: grid; gap: 12px; background: #fff; }
.f legend { font-weight: 700; padding: 0 6px; }
.acts-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.imgf { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.imgf img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #eee; }
.imgf .up { position: relative; overflow: hidden; }
.imgf .up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.notes { display: grid; gap: 8px; margin-top: 10px; }
.note { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; white-space: pre-wrap; }
.note small { display: flex; justify-content: space-between; color: var(--muted); }
.files a { display: inline-flex; gap: 6px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; margin: 0 6px 6px 0; }
.link-box { display: flex; gap: 8px; }
.link-box input { flex: 1; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; opacity: 0; transition: .3s; pointer-events: none; z-index: 60; font-weight: 600; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars i { flex: 1; background: var(--gold); border-radius: 3px 3px 0 0; min-height: 2px; }
.help { font-size: 14px; color: var(--muted); margin: -4px 0 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; z-index: 10; padding: 10px; gap: 8px; }
  .brand { display: none; }
  .nav { grid-auto-flow: column; overflow-x: auto; }
  .nav a { white-space: nowrap; padding: 10px 12px; font-size: 15px; gap: 6px; }
  .side-ft { display: none; }
  .f .row, .f .row3, .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  .main { padding-top: 20px; }
}
