/* assets/css/eanbid-winning.css
   Winning Bid List (낙찰목록) - page styles
   Works with eanbid.css tokens/components
*/

/* Page Head */
.page-head {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.page-head .title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-head .kicker {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.page-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-head h1 i {
  color: var(--primary);
}

.page-head .sub {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 650;
}

.head-metrics {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.metric {
  text-align: right;
}

.metric .label {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metric .value {
  font-size: 22px;
  font-weight: 950;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 14px 0 18px;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  flex: 1;
  min-width: 320px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.search-pill:focus-within {
  border-color: rgba(79, 70, 229, .55);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12), 0 10px 18px rgba(15, 23, 42, 0.06);
}

.search-pill i {
  color: #94a3b8;
}

.search-pill input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}

.date-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px;
}

.date-pill label {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.date-pill input,
.date-pill select {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  outline: none;
}

.date-pill input:focus,
.date-pill select:focus {
  border-color: rgba(79, 70, 229, .55);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
  background: #fff;
}

.sep {
  color: #cbd5e1;
  font-weight: 900;
}

/* Table */
.table-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  padding: 14px 12px;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-sub);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  font-size: 13px;
}

.table tr:hover td {
  background: rgba(79, 70, 229, 0.04);
}

.t-center { text-align: center; }
.t-right { text-align: right; }

.badge-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.bid-nm {
  font-weight: 900;
  font-size: 14px;
  color: #0f172a;
  display: block;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.subline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price {
  font-weight: 900;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.price.blue { color: #2563eb; }
.price.gray { color: #64748b; }

.rate {
  font-weight: 900;
  color: var(--primary);
}

.small {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 800;
  margin-top: 3px;
}

.row-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .18s ease;
  color: var(--text-sub);
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, .35);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
  color: var(--primary);
}

.icon-btn.danger:hover {
  border-color: rgba(239, 68, 68, .45);
  color: #ef4444;
}

/* Bulk Bar */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 32px rgba(0,0,0,0.25);
}

.bulk-bar .count {
  font-weight: 950;
  color: #fde68a;
}

.bulk-bar .btn {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  box-shadow: none;
}

.bulk-bar .btn:hover {
  border-color: rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.10);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 40px;
}

.page-link {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--text-main);
  text-decoration: none;
  transition: .18s ease;
}

.page-link:hover {
  border-color: rgba(79, 70, 229, .45);
  color: var(--primary);
}

.page-link.active {
  background: var(--primary);
  color: #fff;
  border-color: rgba(79, 70, 229, .75);
  box-shadow: 0 14px 24px rgba(79, 70, 229, 0.22);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.modal-overlay.active { display: flex; }

.modal {
  width: min(460px, calc(100% - 36px));
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 30px 60px rgba(0,0,0,0.28);
  padding: 22px;
}

.modal .icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.modal p {
  margin: 0 0 16px;
  color: var(--text-sub);
  font-weight: 650;
  font-size: 13px;
  line-height: 1.6;
}

.modal .actions {
  display: flex;
  gap: 10px;
}

.modal .actions .btn {
  flex: 1;
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(239, 68, 68, .65);
  color: #fff;
  box-shadow: 0 12px 22px rgba(239, 68, 68, 0.22);
}

.btn-danger:hover {
  border-color: rgba(239, 68, 68, .85);
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.26);
}

@media (max-width: 820px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .head-metrics { width: 100%; justify-content: space-between; }
  .date-pill { width: 100%; flex-wrap: wrap; }
  .search-pill { min-width: 100%; }
  .table { min-width: 980px; }
}



/* ===== Winning list: multi-line compact layout (no horizontal scroll) ===== */
.table-compact{ table-layout: fixed; }
.table-compact th, .table-compact td{ padding: 14px 12px; }

.col-check{ width: 54px; }
.col-no{ width: 64px; }
.col-actions{ width: 112px; }
.col-money{ width: 220px; }
.col-rank{ width: 220px; }

.row-click{ cursor: pointer; }

.text-sub{ color: var(--text-sub); font-size: 11px; font-weight: 900; }

.win-main .win-title{
  font-weight: 950;
  font-size: 14px;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.win-meta{
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.meta-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.06);
  background: #f8fafc;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 850;
  max-width: 100%;
}

.meta-chip i{ color: #94a3b8; }

.kv-stack{
  display: grid;
  gap: 8px;
}

.kv{
  display: grid;
  grid-template-columns: 72px minmax(0,1fr);
  align-items: baseline;
  gap: 10px;
}

.kv .k{
  font-size: 11px;
  font-weight: 900;
  color: var(--text-sub);
  text-align: right;
  white-space: nowrap;
}

.kv .v{
  font-weight: 950;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.kv .v.primary{ color: var(--primary); }
.kv .v.blue{ color: var(--primary); }
.kv .v.gray{ color: var(--text-sub); }

.kv .s{
  grid-column: 2 / 3;
  font-size: 11px;
  font-weight: 900;
  color: var(--text-sub);
  margin-top: 2px;
}

.rank-box .rank-name{
  font-weight: 950;
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-sub{
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rank-money{
  font-weight: 950;
  color: var(--primary);
  white-space: nowrap;
}

.rank-rate{
  font-weight: 950;
  white-space: nowrap;
}

.rank-rate.pos{ color: #6366f1; }
.rank-rate.neg{ color: #f43f5e; }

.rank-hint{
  margin-top: 2px;
  font-size: 11px;
  font-weight: 850;
  color: var(--text-sub);
}

.empty-row{
  padding: 40px 16px;
  color: var(--text-sub);
  font-weight: 950;
}

@media (max-width: 1200px){
  .col-money{ width: 210px; }
  .col-rank{ width: 200px; }
}
