/* ============================================================
   Lone Bid — Satıcı Paneli Tasarım Sistemi
   Premium Auction Management UI
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Brand Colors */
  --brand: #c0032d;
  --brand-mid: #9b0224;
  --brand-header: #77001a;
  --brand-active: #001a5c;
  --brand-light: #fef2f4;
  --brand-glow: rgba(192, 3, 45, 0.15);

  /* CTA Colors */
  --cta: #7c8c5c;
  --cta-hover: #697a4d;
  --cta-light: #f0f4e8;

  /* Neutral Colors */
  --title: #202226;
  --fg: #202226;
  --muted-fg: #6b7280;
  --muted: #f5f5f5;
  --bg: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f0;

  /* Semantic Colors */
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #3b82f6;
  --info-light: #eff6ff;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --header-height: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--fg);
  background: var(--muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--brand-mid);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   3. HEADER BAR
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--brand-header) 0%, var(--brand-mid) 50%, var(--brand) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  height: 36px;
  filter: brightness(0) invert(1);
  transition: var(--transition);
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-toggle {
  display: none;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  transition: var(--transition);
}

.header-toggle:hover {
  background: rgba(255,255,255,0.25);
}

.header-center {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.header-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  padding: 6px 18px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
}

.header-user-info {
  text-align: right;
  line-height: 1.4;
}

.header-company {
  font-weight: 600;
  color: white;
  font-size: 0.9rem;
}

.header-user {
  font-size: 0.78rem;
  opacity: 0.8;
}

.header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.3);
}

/* ============================================================
   4. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: white;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 900;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.sidebar-section {
  padding: 20px 0;
}

.sidebar-section-title {
  padding: 0 20px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted-fg);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-nav li a:hover {
  background: var(--muted);
  color: var(--brand);
  border-left-color: var(--brand-light);
}

.sidebar-nav li a.active {
  background: linear-gradient(90deg, rgba(0,26,92,0.08) 0%, transparent 100%);
  color: var(--brand-active);
  border-left-color: var(--brand-active);
  font-weight: 600;
}

.sidebar-nav li a .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-nav li a .nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--brand);
  color: white;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: 8px 20px;
}

.sidebar-auction-info {
  margin: 12px 16px;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-light) 0%, #fff5f7 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(192,3,45,0.1);
}

.sidebar-auction-info h4 {
  font-size: 0.78rem;
  color: var(--brand);
  margin-bottom: 4px;
  font-weight: 600;
}

.sidebar-auction-info p {
  font-size: 0.72rem;
  color: var(--muted-fg);
  line-height: 1.5;
}

/* ============================================================
   5. MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  transition: var(--transition);
}

.content-wrapper {
  padding: 28px;
  max-width: 1400px;
}

/* ============================================================
   6. CARDS
   ============================================================ */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-header h2,
.card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--title);
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--muted);
}

/* ============================================================
   7. STAT CARDS (Dashboard)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.stat-card:nth-child(1)::before { background: var(--brand); }
.stat-card:nth-child(2)::before { background: var(--cta); }
.stat-card:nth-child(3)::before { background: var(--info); }
.stat-card:nth-child(4)::before { background: var(--warning); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.stat-icon.red    { background: var(--brand-light); color: var(--brand); }
.stat-icon.green  { background: var(--cta-light); color: var(--cta); }
.stat-icon.blue   { background: var(--info-light); color: var(--info); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning); }

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted-fg);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--title);
  line-height: 1.2;
}

.stat-change {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ============================================================
   8. TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  background: var(--muted);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  vertical-align: middle;
}

table tbody tr {
  transition: var(--transition-fast);
}

table tbody tr:hover {
  background: rgba(0,26,92,0.02);
}

table tbody tr:last-child td {
  border-bottom: none;
}

.table-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* ============================================================
   9. BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-muted {
  background: var(--muted);
  color: var(--muted-fg);
}

.badge-brand {
  background: var(--brand-light);
  color: var(--brand);
}

/* ============================================================
   10. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 2px 4px rgba(192,3,45,0.25);
}

.btn-primary:hover {
  background: var(--brand-mid);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(192,3,45,0.35);
}

.btn-cta {
  background: var(--cta);
  color: white;
  box-shadow: 0 2px 4px rgba(124,140,92,0.25);
}

.btn-cta:hover {
  background: var(--cta-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(124,140,92,0.35);
}

.btn-secondary {
  background: var(--muted);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--title);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
  color: white;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: white;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   11. FORMS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--title);
}

.form-label .required {
  color: var(--brand);
  margin-left: 2px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  color: var(--fg);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.form-control::placeholder {
  color: #c0c4cc;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--success);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   12. ALERTS
   ============================================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background: var(--info-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
}

/* ============================================================
   13. GRID LAYOUTS
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ============================================================
   14. AUCTION CARDS
   ============================================================ */
.auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.auction-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.auction-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand-light);
}

.auction-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: var(--transition);
}

.auction-card:hover .auction-card-image {
  transform: scale(1.02);
}

.auction-card-body {
  padding: 20px;
}

.auction-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--title);
  margin-bottom: 8px;
  line-height: 1.4;
}

.auction-card-desc {
  font-size: 0.82rem;
  color: var(--muted-fg);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.auction-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.auction-card-meta span {
  font-size: 0.78rem;
  color: var(--muted-fg);
  display: flex;
  align-items: center;
  gap: 4px;
}

.auction-card-meta svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============================================================
   15. PROGRESS BAR
   ============================================================ */
.progress {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s ease;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-mid) 100%);
}

.progress-bar.green {
  background: linear-gradient(90deg, var(--cta) 0%, var(--cta-hover) 100%);
}

.progress-bar.blue {
  background: linear-gradient(90deg, var(--info) 0%, #2563eb 100%);
}

/* ============================================================
   16. MEMBERSHIP WIDGET
   ============================================================ */
.membership-widget {
  background: linear-gradient(135deg, #001a5c 0%, #00296b 50%, #003f8a 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}

.membership-widget::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.membership-widget::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.membership-widget h4 {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
  margin-bottom: 6px;
}

.membership-widget .membership-type {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.membership-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
}

.membership-detail span:first-child {
  opacity: 0.7;
}

.membership-detail span:last-child {
  font-weight: 600;
}

/* ============================================================
   17. PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--title);
}

.page-header p {
  font-size: 0.88rem;
  color: var(--muted-fg);
  margin-top: 4px;
}

/* Page Actions Bar (replaces page-header when title is shown in top bar) */
.page-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.page-actions-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   18. TABS
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  gap: 4px;
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted-fg);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Poppins', sans-serif;
}

.tab:hover {
  color: var(--brand);
}

.tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ============================================================
   19. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  stroke: var(--border);
  fill: none;
  stroke-width: 1;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--title);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted-fg);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

/* ============================================================
   20. READ-ONLY INFO SECTIONS
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.info-item {
  padding: 16px;
  background: var(--muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.info-item label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-fg);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.info-item .info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--title);
}

.info-item .info-value a {
  color: var(--brand);
  font-weight: 500;
}

.info-item .info-value a:hover {
  text-decoration: underline;
}

/* ============================================================
   21. SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-light);
}

.section-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--title);
}

.section-header .section-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
  color: var(--brand);
}

.section-header .section-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.section-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--muted);
  color: var(--muted-fg);
  font-weight: 500;
}

/* ============================================================
   22. INCREMENT TABLE (Dynamic Rows)
   ============================================================ */
.increment-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  animation: fadeIn 0.2s ease;
}

.increment-row .form-control {
  flex: 1;
}

.increment-row .btn-icon {
  flex-shrink: 0;
}

/* ============================================================
   23. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--success);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  animation: slideInRight 0.35s ease;
  font-size: 0.88rem;
}

.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

/* ============================================================
   24. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

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

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.25s ease;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   25. SETTLEMENT SPECIFIC
   ============================================================ */
.settlement-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.settlement-summary-item {
  text-align: center;
  padding: 20px;
  background: var(--muted);
  border-radius: var(--radius);
}

.settlement-summary-item .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--title);
}

.settlement-summary-item .label {
  font-size: 0.78rem;
  color: var(--muted-fg);
  margin-top: 4px;
}

/* ============================================================
   26. IMAGE UPLOAD
   ============================================================ */
.image-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--muted);
}

.image-upload-zone:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.image-upload-zone svg {
  width: 48px;
  height: 48px;
  stroke: var(--muted-fg);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 12px;
}

.image-upload-zone p {
  color: var(--muted-fg);
  font-size: 0.88rem;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.image-preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item .remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239,68,68,0.9);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   27. LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-header) 0%, var(--brand-mid) 40%, var(--brand) 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  border-radius: 50%;
}

.login-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl), 0 0 80px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
  animation: scaleIn 0.5s ease;
}

.login-logo {
  display: block;
  margin: 0 auto 32px;
  height: 48px;
}

.login-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 8px;
}

.login-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted-fg);
  margin-bottom: 32px;
}

.login-card .form-group {
  margin-bottom: 18px;
}

.login-card .form-control {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.login-card .btn-primary {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  margin-top: 8px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--muted-fg);
}

/* ============================================================
   28. CHART CONTAINER
   ============================================================ */
.chart-container {
  position: relative;
  height: 280px;
  padding: 16px;
}

/* ============================================================
   29. ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   30. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-center {
    flex: 1;
    min-width: 0;
  }

  .header-title {
    font-size: 0.85rem;
    padding: 4px 12px;
    max-width: 200px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .main-content {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 20px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .auction-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .settlement-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .login-card {
    margin: 20px;
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .settlement-summary {
    grid-template-columns: 1fr;
  }

  .header-user-info {
    display: none;
  }

  table {
    font-size: 0.82rem;
  }

  table thead th,
  table tbody td {
    padding: 10px 8px;
  }
}

/* ============================================================
   31. UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted-fg); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-lg { font-size: 1.1rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mr-1 { margin-right: 8px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-fg);
}
