/* ============================================================
   SK TES Global Auction Platform — MVP styles
   ============================================================ */
:root {
  --navy: #0d2137;
  --navy-2: #14314f;
  --navy-3: #1d426a;
  --accent: #00a878;
  --accent-dark: #008a63;
  --accent-light: #e6f7f1;
  --blue: #2f80ed;
  --blue-light: #eaf2fd;
  --red: #e34f4f;
  --red-light: #fdecec;
  --amber: #e8a020;
  --amber-light: #fdf3e0;
  --gray-50: #f7f9fb;
  --gray-100: #eef1f5;
  --gray-200: #dde3ea;
  --gray-300: #c3ccd6;
  --gray-500: #7b8794;
  --gray-700: #43505c;
  --gray-900: #1d2830;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(13, 33, 55, .08), 0 4px 14px rgba(13, 33, 55, .06);
  --shadow-lg: 0 8px 30px rgba(13, 33, 55, .18);
  --font: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- generic ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; transition: .15s;
  background: var(--gray-100); color: var(--gray-700);
}
.btn:hover { filter: brightness(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); filter: none; }
.btn-navy { background: var(--navy-2); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; justify-content: center; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge-green { background: var(--accent-light); color: var(--accent-dark); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-amber { background: var(--amber-light); color: #b57a10; }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.badge-navy { background: #e3eaf3; color: var(--navy-2); }

.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 18px; }
.card h3 { font-size: 15px; margin-bottom: 14px; color: var(--navy); }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--gray-700); margin-bottom: 5px; }
.form-group label .req { color: var(--red); margin-left: 3px; }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password],
.form-group input[type=number], .form-group input[type=tel], .form-group input[type=datetime-local],
.form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-300);
  border-radius: 8px; background: #fff; transition: .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,168,120,.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-hint { font-size: 11.5px; color: var(--gray-500); margin-top: 3px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 12px; background: var(--gray-50);
  color: var(--gray-500); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
table.data tr:hover td { background: #fbfcfe; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty {
  text-align: center; padding: 50px 20px; color: var(--gray-500);
}
.empty .icon { font-size: 40px; margin-bottom: 10px; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: stretch;
}
.login-hero {
  flex: 1.1; background: linear-gradient(150deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,168,120,.35), transparent 70%);
}
.login-hero .logo { font-size: 26px; font-weight: 800; letter-spacing: .02em; margin-bottom: 8px; }
.login-hero .logo span { color: var(--accent); }
.login-hero h1 { font-size: 30px; line-height: 1.4; margin: 25px 0 14px; font-weight: 800; }
.login-hero p.lead { color: #b8c7d8; max-width: 460px; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; }
.hero-stats .hs .v { font-size: 26px; font-weight: 800; color: var(--accent); }
.hero-stats .hs .k { font-size: 12px; color: #9fb2c5; }
.login-panel {
  flex: 0 0 480px; background: #fff; display: flex; flex-direction: column;
  justify-content: center; padding: 50px 55px;
}
.login-panel h2 { font-size: 21px; color: var(--navy); margin-bottom: 4px; }
.login-panel .sub { color: var(--gray-500); font-size: 13px; margin-bottom: 26px; }
.demo-accounts { margin-top: 26px; border-top: 1px dashed var(--gray-200); padding-top: 18px; }
.demo-accounts .ttl { font-size: 12px; font-weight: 700; color: var(--gray-500); margin-bottom: 10px; }
.demo-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 8px; text-align: left; transition: .15s;
}
.demo-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.demo-btn .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 13px;
}
.demo-btn .nm { font-weight: 700; font-size: 13px; }
.demo-btn .rl { font-size: 11.5px; color: var(--gray-500); }
.login-links { margin-top: 18px; font-size: 12.5px; display: flex; justify-content: space-between; }
.mfa-note {
  margin-top: 14px; font-size: 11.5px; color: var(--gray-500);
  background: var(--gray-50); padding: 8px 12px; border-radius: 8px;
}

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex: none; background: var(--navy); color: #cdd9e5;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  padding: 20px 22px 16px; font-size: 17px; font-weight: 800; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand span { color: var(--accent); }
.sidebar .brand small { display: block; font-size: 10.5px; font-weight: 600; color: #7e93a8; letter-spacing: .08em; }
.nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav .sec { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: #61788f; margin: 16px 10px 6px; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  color: #cdd9e5; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 2px;
}
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; }
.nav a .cnt {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px;
  border-radius: 10px; padding: 0 7px; font-weight: 700;
}
.sidebar .userbox {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar .userbox .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex: none;
}
.sidebar .userbox .nm { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; }
.sidebar .userbox .rl { font-size: 11px; color: #8ba1b6; }
.sidebar .userbox button { background: none; border: none; color: #8ba1b6; margin-left: auto; font-size: 16px; }
.sidebar .userbox button:hover { color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--gray-200);
  padding: 0 28px; height: 58px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16.5px; color: var(--navy); font-weight: 800; }
.topbar .spacer { flex: 1; }
.topbar .clock { font-size: 12px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.bell { position: relative; background: none; border: none; font-size: 19px; color: var(--gray-700); padding: 6px; }
.bell .dot {
  position: absolute; top: 2px; right: 0; background: var(--red); color: #fff;
  font-size: 9.5px; font-weight: 800; border-radius: 9px; padding: 0 5px; min-width: 15px;
}
.content { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }

.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; color: var(--navy); }
.page-head .spacer { flex: 1; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi .k { font-size: 12px; color: var(--gray-500); font-weight: 700; }
.kpi .v { font-size: 25px; font-weight: 800; color: var(--navy); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--gray-500); }
.kpi.accent { border-top: 3px solid var(--accent); }
.kpi.blue { border-top: 3px solid var(--blue); }
.kpi.amber { border-top: 3px solid var(--amber); }
.kpi.navy { border-top: 3px solid var(--navy-2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.bar-row .lbl { width: 130px; flex: none; color: var(--gray-700); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar { flex: 1; height: 14px; background: var(--gray-100); border-radius: 7px; overflow: hidden; }
.bar-row .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #3ec89a); border-radius: 7px; }
.bar-row .val { width: 46px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- lots ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters select, .filters input {
  padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: 8px; background: #fff;
}
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.lot-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; transition: .15s;
  cursor: pointer; border: 1px solid transparent;
}
.lot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.lot-thumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 52px; position: relative;
}
.lot-thumb .flag { position: absolute; top: 10px; left: 12px; font-size: 20px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 1px 7px; box-shadow: var(--shadow); font-size: 13px; font-weight:700; color: var(--gray-700);}
.lot-thumb .st { position: absolute; top: 10px; right: 12px; }
.lot-body { padding: 15px 17px 17px; flex: 1; display: flex; flex-direction: column; }
.lot-body .cat { font-size: 11px; font-weight: 700; color: var(--gray-500); letter-spacing: .05em; }
.lot-body h4 { font-size: 14.5px; margin: 3px 0 8px; color: var(--navy); line-height: 1.45; }
.lot-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--gray-500); margin-bottom: 10px; }
.lot-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--gray-100); padding-top: 10px; }
.lot-foot .timer { font-size: 12px; font-weight: 700; }
.lot-foot .timer.hot { color: var(--red); }
.lot-foot .qty { font-size: 12px; color: var(--gray-500); }

/* ---------- detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
@media (max-width: 1050px) { .detail-grid { grid-template-columns: 1fr; } }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; font-size: 13.5px; }
.dl dt { color: var(--gray-500); font-weight: 600; }
.dl dd { color: var(--gray-900); font-weight: 500; }
.bid-panel .price { font-size: 27px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.sealed-note {
  background: var(--amber-light); border: 1px solid #f2d9a8; color: #8a6210;
  font-size: 12.5px; border-radius: 8px; padding: 10px 13px; margin: 12px 0;
}
.countdown-box { background: var(--gray-50); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; text-align: center; }
.countdown-box .cd { font-size: 21px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.countdown-box .cd.hot { color: var(--red); }
.countdown-box .lbl { font-size: 11.5px; color: var(--gray-500); }

.steps { display: flex; gap: 0; margin: 8px 0 20px; flex-wrap: wrap; }
.step { flex: 1; min-width: 90px; text-align: center; position: relative; padding-top: 26px; font-size: 11.5px; font-weight: 700; color: var(--gray-500); }
.step::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 100%;
  height: 3px; background: var(--gray-200);
}
.step:last-child::before { display: none; }
.step::after {
  content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 15px; height: 15px; border-radius: 50%; background: var(--gray-200); border: 3px solid #fff; z-index: 1;
}
.step.done { color: var(--accent-dark); }
.step.done::after { background: var(--accent); }
.step.done::before { background: var(--accent); }
.step.now { color: var(--navy); }
.step.now::after { background: var(--navy-2); box-shadow: 0 0 0 4px rgba(29,66,106,.18); }

/* ---------- notifications ---------- */
.notif-item { display: flex; gap: 13px; padding: 14px 6px; border-bottom: 1px solid var(--gray-100); }
.notif-item.unread { background: var(--blue-light); border-radius: 8px; padding: 14px 12px; }
.notif-item .ic { font-size: 20px; flex: none; }
.notif-item .t { font-weight: 700; font-size: 13.5px; }
.notif-item .b { font-size: 12.5px; color: var(--gray-700); }
.notif-item .d { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ---------- register / stepper ---------- */
.reg-wrap { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.reg-logo { text-align: center; font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.reg-logo span { color: var(--accent); }
.reg-sub { text-align: center; color: var(--gray-500); font-size: 13px; margin-bottom: 24px; }
.check-list { list-style: none; }
.check-list li { padding: 6px 0 6px 26px; position: relative; font-size: 13.5px; }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.file-drop {
  border: 2px dashed var(--gray-300); border-radius: 10px; padding: 16px;
  text-align: center; color: var(--gray-500); font-size: 12.5px; margin-bottom: 10px;
  cursor: pointer; transition: .15s; background: var(--gray-50);
}
.file-drop:hover { border-color: var(--accent); color: var(--accent-dark); }
.file-drop.ok { border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark); font-weight:700; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(13,33,55,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .15s;
}
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  animation: slideUp .18s;
}
.modal.wide { max-width: 780px; }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; }
.modal-head h3 { font-size: 16px; color: var(--navy); }
.modal-head button { margin-left: auto; background: none; border: none; font-size: 20px; color: var(--gray-500); }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 15px 24px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } }

/* ---------- toast ---------- */
#toast-container { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 600;
  display: flex; gap: 10px; align-items: center; max-width: 360px;
  animation: slideIn .2s;
}
.toast.success { background: var(--accent-dark); }
.toast.error { background: var(--red); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }

/* ---------- invoice ---------- */
.invoice { font-size: 13px; }
.invoice .inv-head { display: flex; justify-content: space-between; margin-bottom: 18px; }
.invoice h2 { font-size: 22px; letter-spacing: .2em; color: var(--navy); }
.invoice table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.invoice th, .invoice td { border: 1px solid var(--gray-300); padding: 8px 10px; text-align: left; }
.invoice th { background: var(--gray-50); }
.invoice .total { font-size: 16px; font-weight: 800; text-align: right; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 18px; }
.tabs button {
  background: none; border: none; padding: 9px 16px; font-size: 13.5px; font-weight: 700;
  color: var(--gray-500); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--navy); border-color: var(--accent); }

.audit-row td { font-size: 12.5px; font-family: Consolas, monospace; }

.pill-select { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-select label {
  border: 1px solid var(--gray-300); border-radius: 20px; padding: 6px 14px;
  font-size: 12.5px; cursor: pointer; font-weight: 600; color: var(--gray-700);
}
.pill-select input { display: none; }
.pill-select input:checked + span { color: var(--accent-dark); }
.pill-select label:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }

@media (max-width: 860px) {
  .login-hero { display: none; }
  .login-panel { flex: 1; }
  .sidebar { width: 64px; }
  .sidebar .brand { font-size: 13px; padding: 16px 8px; text-align: center; }
  .sidebar .brand small, .nav .sec, .nav a .txt, .sidebar .userbox .meta { display: none; }
  .content { padding: 18px 14px 50px; }
}
@media print {
  .sidebar, .topbar, .modal-foot, .no-print { display: none !important; }
  .modal-backdrop { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: 100%; max-height: none; }
}
