:root {
  --bg: #0f1115;
  --bg-2: #161a21;
  --surface: #1b212b;
  --surface-2: #222a36;
  --line: #2c3543;
  --text: #e7ecf3;
  --muted: #8b97a8;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --link: #38bdf8;
  --danger: #f87171;
  --warning: #fbbf24;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: var(--link);
  text-decoration: none;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 60px;
  padding: 0 22px;
  background: rgba(13, 16, 21, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06231f;
  font-weight: 900;
  font-size: 14px;
}

.brand-name {
  font-size: 17px;
  letter-spacing: 0.3px;
}
.brand-name strong {
  color: var(--accent);
}

.topnav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}
.topnav a {
  color: var(--muted);
}
.topnav a:hover {
  color: var(--text);
}

.search {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 6px 0 16px;
}
.search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  height: 38px;
  font-size: 14px;
}
.search input::placeholder {
  color: var(--muted);
}
.search-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 16px;
}

.session {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
}
.ghost-btn:hover {
  color: var(--text);
}
.pill-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06231f;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 8px 16px;
  font-size: 14px;
}
.icon-round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

/* ---------- User menu ---------- */
.user-menu {
  position: relative;
}
.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text);
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06231f;
  font-weight: 800;
}
.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.caret {
  color: var(--muted);
  font-size: 12px;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 46px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 40;
}
.dropdown-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.dropdown-head strong {
  display: block;
  font-size: 15px;
}
.dropdown-head a {
  font-size: 13px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
}
.dropdown-item span {
  width: 20px;
  text-align: center;
  color: var(--muted);
}
.dropdown-item:hover {
  background: var(--surface-2);
}
.dropdown-item.danger {
  color: var(--danger);
}

/* ---------- Category chips ---------- */
.chips-bar {
  position: sticky;
  top: 60px;
  z-index: 20;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 10px 22px;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.chip {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  white-space: nowrap;
}
.chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 700;
}

/* ---------- Page / views ---------- */
.page {
  padding: 22px;
  max-width: 1500px;
  margin: 0 auto;
}
.view {
  display: none;
}
.view.is-active {
  display: block;
}
.page-head h1 {
  font-size: 22px;
  margin: 4px 0 18px;
}
.muted {
  color: var(--muted);
}

/* ---------- Auction grid ---------- */
.auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.auction-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  color: var(--text);
  padding: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.auction-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.card-banner {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
}
.card-body {
  padding: 12px 14px 16px;
  display: grid;
  gap: 3px;
}
.card-body h3 {
  font-size: 15px;
  margin: 0 0 2px;
  line-height: 1.3;
}
.card-body .house {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.card-body .line {
  color: var(--muted);
  font-size: 12.5px;
}
.live-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 6px;
}

/* ---------- Detail ---------- */
.back-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
}
.detail-head {
  margin-bottom: 18px;
}
.detail-banner {
  width: 100%;
  max-height: 240px;
  aspect-ratio: 16 / 5;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 14px;
  background-color: var(--surface-2);
}
.detail-head h1 {
  font-size: 24px;
  margin: 6px 0;
}
.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.lots {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

/* 50 lots as a responsive card grid (3-up on desktop, like the source site). */
.lot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ---------- Lot list top bar (count + per-page) ---------- */
.lot-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px;
}
.lot-page-info {
  color: var(--muted);
  font-size: 13px;
}
.lot-perpage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.lot-perpage-select,
.lot-goto-select {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.lot-perpage-select:hover,
.lot-goto-select:hover {
  border-color: var(--accent);
}

/* ---------- Bottom "Sayfaya git" pagination ---------- */
.lot-goto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.lot-goto:empty {
  display: none;
}
.lot-goto-center {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.lot-goto-total {
  color: var(--muted);
}
.lot-goto-btn {
  min-width: 92px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.lot-goto-btn:hover:not(:disabled) {
  border-color: var(--accent);
}
.lot-goto-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- Lot view (single lot) ---------- */
.lot-open {
  cursor: pointer;
}
.lot-open:hover {
  color: var(--accent);
}
.lotview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
}
.lotview-gallery {
  background: #0b0d11;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.lv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.lv-lotno {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lv-icons {
  display: flex;
  gap: 6px;
}
.lv-icons button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.lv-follow.is-following {
  color: var(--accent);
  border-color: var(--accent);
}
.lv-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #000;
}
.lv-main {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lv-main.placeholder {
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.lv-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
}
.lv-arrow.prev {
  left: 12px;
}
.lv-arrow.next {
  right: 12px;
}
.lv-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
}
.lv-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-2);
  padding: 0;
}
.lv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lv-thumb.is-active {
  border-color: var(--accent);
}
.lotview-info {
  display: grid;
  gap: 6px;
  align-content: start;
}
.lv-house {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 14px;
  justify-self: start;
}
.lv-auction {
  font-size: 15px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.lv-when {
  font-size: 13px;
  margin: 0 0 6px;
}
.lv-title {
  font-size: 26px;
  margin: 6px 0;
}
.lv-desc {
  font-size: 14px;
  margin: 0 0 10px;
}
.lv-pricebox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 24px;
  font-weight: 800;
}
.lv-pricetag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.lv-bid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}
.lv-bid input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  height: 46px;
  padding: 0 14px;
  font-size: 16px;
}
.lv-bid .primary-btn {
  min-height: 46px;
  padding: 0 22px;
}
.lv-min {
  font-size: 12px;
  margin: 4px 0 0;
}
.lv-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.lv-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.lv-stats strong {
  font-size: 16px;
}
.lv-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.lv-nav button {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  height: 42px;
}
.lv-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Lot card (grid) ---------- */
.lot-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.lot-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  cursor: pointer;
  overflow: hidden;
}
.lot-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s;
}
.lot-card-image:hover img {
  transform: scale(1.03);
}
.lot-image.placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
}
.lot-card-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 2px;
}
.lot-card-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
}
.lot-card-dot.is-active {
  background: var(--accent);
}
.lot-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  flex: 1;
}
.lot-card-section {
  color: var(--muted);
  font-size: 12.5px;
}
.lot-card-title {
  font-size: 15px;
  font-weight: 750;
  margin: 0;
  cursor: pointer;
}
.lot-card-title:hover {
  color: var(--accent);
}
.lot-card-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.35;
}
.lot-card-prices {
  display: grid;
  gap: 4px;
  margin-top: auto;
  font-size: 13.5px;
  color: var(--muted);
}
.lot-card-line b {
  color: var(--text);
}
.lot-card-line.current b {
  color: var(--accent);
}
.lot-card-actions {
  display: flex;
  gap: 8px;
}
.lot-action {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}
.lot-action:hover {
  border-color: var(--accent);
}
.follow-btn.is-following {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
}
.bid-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.bid-form input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  height: 38px;
  padding: 0 12px;
  min-width: 0;
}

/* ---------- Buttons / pills ---------- */
.primary-btn {
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06231f;
  font-weight: 750;
}
.secondary-btn,
.icon-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 6px;
  min-height: 38px;
  padding: 0 12px;
}
.secondary-btn.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--muted);
}
.pill.live {
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
}
.pill.closed {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

/* ---------- Account ---------- */
.account-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.account-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 18px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.panel-head h2 {
  font-size: 16px;
  margin: 0;
}
.form {
  display: grid;
  gap: 12px;
}
.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.form input,
.form select,
.form textarea,
.staff-toolbar select,
.staff-live-select select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 38px;
  padding: 0 12px;
}
.form textarea {
  min-height: 82px;
  padding: 10px 12px;
  resize: vertical;
}
.current-user {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 10px;
  background: var(--bg-2);
  border-radius: 6px;
}
.current-user strong {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.watchlist-list,
.mybids-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.watch-group {
  display: grid;
  gap: 8px;
}
.watch-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.watch-group-head h3 {
  font-size: 15px;
  margin: 0;
}
.watch-items {
  display: grid;
  gap: 8px;
}
.watch-item,
.bid-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: 8px;
}
.watch-item > div,
.bid-item > div {
  display: grid;
  gap: 4px;
}
.link-btn {
  border: none;
  background: none;
  color: var(--accent-2);
  font-weight: 650;
  font-size: 13px;
  padding: 0;
}
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.accepted {
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
}
.badge.rejected {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}
.badge.superseded,
.badge.cancelled {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}


/* ---------- Staff ---------- */
.staff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.staff-head p {
  margin: 4px 0 0;
}
.staff-panel {
  margin-bottom: 18px;
}
.staff-toolbar label,
.staff-live-select {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  max-width: 420px;
}
.staff-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.staff-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.staff-list {
  display: grid;
  gap: 8px;
}
.staff-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
}
.staff-list-item span {
  color: var(--muted);
  font-size: 13px;
}
.staff-list-item.is-active,
.staff-list-item:hover:not(.static) {
  border-color: var(--accent);
}
.staff-list-item.static {
  cursor: default;
}
.staff-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.live-lot-list {
  display: grid;
  gap: 8px;
}
.live-lot-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.live-lot-row > div {
  display: flex;
  gap: 6px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 60;
}
.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .topnav,
  .brand-name {
    display: none;
  }
  .account-data,
  .account-layout,
  .staff-grid {
    grid-template-columns: 1fr;
  }
  .staff-form .form-row,
  .live-lot-row {
    grid-template-columns: 1fr;
  }
  .lot-main {
    grid-template-columns: 96px 1fr;
  }
  .lot-side {
    grid-column: 1 / -1;
    justify-items: start;
  }
  .lotview {
    grid-template-columns: 1fr;
  }
  .lot-image,
  .lot-image img {
    width: 96px;
    height: 96px;
  }
}
