/* ============================================================
   PigeonRo — Design System
   ============================================================ */
:root {
  --primary:       #1a3a5c;
  --primary-light: #234d7a;
  --primary-dark:  #0f2540;
  --accent:        #e8a020;
  --accent-dark:   #c47e10;
  --accent-light:  #fdf3e0;
  --green:         #1b7f4e;
  --green-light:   #e8f5ee;
  --red:           #c0392b;
  --red-light:     #fdecea;
  --bg:            #f4f6f9;
  --bg-alt:        #eef1f6;
  --card-bg:       #ffffff;
  --border:        #dde3ec;
  --text:          #1e2d3d;
  --text-muted:    #6b7a8f;
  --shadow-sm:     0 2px 8px rgba(26,58,92,.08);
  --shadow-md:     0 6px 24px rgba(26,58,92,.13);
  --shadow-lg:     0 12px 40px rgba(26,58,92,.18);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

/* ---- Navbar ---- */
.navbar-main {
  background: var(--primary) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
  padding: 0 !important;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-main .navbar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}
.navbar-main .navbar-brand .brand-logo {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.navbar-main .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  padding: 22px 14px !important;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: #fff !important;
  border-bottom-color: var(--accent);
}
.navbar-main .nav-link i { margin-right: 5px; }
.btn-nav-register {
  background: var(--accent) !important;
  color: var(--primary-dark) !important;
  font-weight: 700;
  border-radius: var(--radius-sm) !important;
  padding: 7px 18px !important;
  border: none;
  transition: background .2s;
}
.btn-nav-register:hover { background: var(--accent-dark) !important; }
.navbar-main .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
}
.navbar-main .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: .93rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-main .dropdown-item:hover { background: var(--bg); }
.navbar-main .dropdown-item.text-danger:hover { background: var(--red-light); }
.navbar-main .navbar-toggler {
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.navbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.nav-avatar-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: #fff;
}

/* ---- Flash alerts ---- */
.flash-bar {
  padding: 12px 0;
  font-size: .93rem;
  font-weight: 500;
}
.flash-bar .container { display: flex; align-items: center; gap: 10px; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(232,160,32,.18) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(232,160,32,.1) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,160,32,.2);
  border: 1px solid rgba(232,160,32,.4);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -1px;
}
.hero h1 .text-gold { color: var(--accent); }
.hero p.lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 520px;
  margin-bottom: 30px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-gold {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: .97rem;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-gold:hover {
  background: var(--accent-dark);
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,.4);
  padding: 10px 26px;
  border-radius: var(--radius-sm);
  font-size: .97rem;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
}

/* ---- Sections ---- */
.section { padding: 64px 0; }
.section-dark {
  background: var(--primary-dark);
  color: #fff;
}
.section-alt { background: var(--bg-alt); }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -.5px;
}
.section-dark .section-header h2 { color: #fff; }
.text-gold { color: var(--accent) !important; }

/* ---- Cards ---- */
.card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

/* ---- Auction Card ---- */
.auction-card {
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.auction-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md) !important;
}
.card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-alt);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.auction-card:hover .card-img-wrap img { transform: scale(1.04); }
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: #c0c8d4;
}
.badge-live {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e53935;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: .5px;
}
.blink-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }
.badge-ended {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.5);
  color: #ccc;
  font-size: .73rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
}
.badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}
.auction-card .card-body { padding: 16px; }
.pigeon-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ring-number {
  font-size: .8rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: .5px;
}
.ring-number-sm {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 10px;
}
.auction-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 4px 0 6px;
  line-height: 1.3;
}
.auction-card h3 a { color: var(--text); }
.auction-card h3 a:hover { color: var(--accent); }
.loft-info {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.auction-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}
.price-label { font-size: .75rem; color: var(--text-muted); }
.price-current {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.bid-count {
  font-size: .82rem;
  color: var(--text-muted);
}
.countdown {
  font-size: .82rem;
  font-weight: 700;
  color: #e53935;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ---- Pigeon mini card ---- */
.pigeon-mini-card {
  display: block;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  color: var(--text);
}
.pigeon-mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md) !important;
  color: var(--text);
}
.pigeon-mini-img {
  position: relative;
  height: 140px;
  overflow: hidden;
  background: var(--bg-alt);
}
.pigeon-mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pigeon-mini-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #c0c8d4;
}
.sex-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  color: #fff;
}
.sex-male { background: #1565c0; }
.sex-female { background: #c2185b; }
.sex-unknown { background: #546e7a; }
.pigeon-mini-body { padding: 10px 12px; }
.pigeon-name {
  font-weight: 700;
  font-size: .9rem;
  margin: 3px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loft-sm { font-size: .78rem; color: var(--text-muted); }

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: background .2s;
}
.feature-card:hover { background: rgba(255,255,255,.1); }
.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(232,160,32,.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
  margin: 0 auto 16px;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  line-height: 1.5;
}

/* ---- CTA Section ---- */
.section-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.section-cta h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.section-cta p { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-bottom: 28px; }

/* ---- Grids ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media(max-width:1100px) { .grid-4 { grid-template-columns: repeat(3,1fr); } }
@media(max-width:900px)  { .grid-3 { grid-template-columns: repeat(2,1fr); } .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:576px)  { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: .92rem;
  cursor: pointer;
  transition: all .18s;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: #fff; }
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-outline-secondary:hover { background: var(--bg-alt); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #a93226; border-color: #a93226; color: #fff; }
.btn-outline-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { background: #145c38; color: #fff; }
.btn-sm { padding: 5px 13px; font-size: .83rem; }
.btn-lg { padding: 13px 32px; font-size: 1.02rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Forms ---- */
.form-label { font-weight: 600; font-size: .9rem; color: var(--text); margin-bottom: 5px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: .93rem;
  color: var(--text);
  background: var(--card-bg);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}
.form-control.is-invalid { border-color: var(--red); }
.invalid-feedback { color: var(--red); font-size: .83rem; margin-top: 4px; }
.form-text { color: var(--text-muted); font-size: .83rem; margin-top: 4px; }

/* ---- Auth pages ---- */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 44px;
  width: 100%;
  max-width: 440px;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}
.auth-logo span { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.auth-card h2 { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); font-size: .93rem; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 40px; }
.input-icon-wrap i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .95rem;
  pointer-events: none;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: .85rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- Alert ---- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .92rem;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-danger { background: var(--red-light); border-color: #f5c6cb; color: var(--red); }
.alert-success { background: var(--green-light); border-color: #b7dfca; color: var(--green); }
.alert-info { background: #e8f0fe; border-color: #b8d0f8; color: #1a56db; }
.alert-warning { background: var(--accent-light); border-color: #fbd38d; color: var(--accent-dark); }
.alert ul { margin: 4px 0 0 16px; padding: 0; }

/* ---- Page header ---- */
.page-hero {
  background: var(--primary);
  color: #fff;
  padding: 8px 0 7px;
}
.page-hero h1 { font-size: 1.25rem; font-weight: 800; margin: 0 0 2px; }
.page-hero p { color: rgba(255,255,255,.72); margin: 0; font-size: .8rem; }
.breadcrumb-nav {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 5px;
}
.breadcrumb-nav a { color: rgba(255,255,255,.65); }
.breadcrumb-nav a:hover { color: var(--accent); }

/* ---- Filter bar ---- */
.filter-bar {
  padding: 16px 20px;
  margin-bottom: 24px;
}
.filter-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-form .form-control,
.filter-form .form-select { flex: 1; min-width: 140px; }
.results-meta {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---- Pagination ---- */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  color: var(--primary);
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.disabled { color: var(--text-muted); cursor: not-allowed; opacity: .5; }

/* ---- Auction detail ---- */
.auction-detail-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media(max-width:900px) { .auction-detail-wrap { grid-template-columns: 1fr; } }
.auction-main-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); }
.auction-photo-placeholder {
  height: 280px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #c0c8d4;
  border-radius: var(--radius);
}
.status-badge-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .83rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}
.status-active { background: #ffe8e8; color: #e53935; }
.status-closed { background: #f0f0f0; color: #757575; }
.pigeon-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0;
  font-size: .88rem;
  color: var(--text-muted);
}
.pigeon-meta-row span { display: flex; align-items: center; gap: 5px; }
.bid-card { }
.auc-sidebar { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; overflow-x: hidden; }
.bid-card-top { background: var(--primary); color: #fff; padding: 24px; border-radius: var(--radius) var(--radius) 0 0; }
.current-price-display { font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.bid-count-display { font-size: .88rem; color: rgba(255,255,255,.7); margin-top: 4px; }
.countdown-large {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.bid-form-wrap { padding: 20px; }
.bid-input-group { display: flex; gap: 10px; }
.bid-hint { font-size: .82rem; color: var(--text-muted); margin-top: 6px; }
.bid-message { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; margin-top: 12px; }
.bid-success { background: var(--green-light); color: var(--green); }
.bid-error { background: var(--red-light); color: var(--red); }
.bid-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.bid-history-row:last-child { border-bottom: none; }
.bid-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.bid-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.bid-amount { font-weight: 800; color: var(--accent); margin-left: auto; white-space: nowrap; }
.bid-user { font-weight: 600; font-size: .9rem; }
.bid-time { font-size: .78rem; color: var(--text-muted); }

/* ---- Pedigree ---- */
.pedigree-wrap { overflow-x: auto; }
.ped-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 3fr;
  gap: 0;
  min-width: 560px;
}
.ped-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; padding: 4px; }
.ped-node {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: .82rem;
}
.ped-node.ped-self { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.ped-node.ped-father { border-left: 3px solid #1565c0; }
.ped-node.ped-mother { border-left: 3px solid #c2185b; }
.ped-node .ped-ring { font-weight: 700; font-size: .85rem; }
.ped-node .ped-name { color: var(--text-muted); font-size: .78rem; margin-top: 1px; }
.ped-node.ped-self .ped-name { color: rgba(255,255,255,.7); }

/* ---- Profile ---- */
.profile-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
@media(max-width:860px) { .profile-wrap { grid-template-columns: 1fr; } }
.profile-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin: 0 auto 14px;
  display: block;
}
.profile-avatar-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--text-muted);
  border: 4px solid var(--border);
  margin: 0 auto 14px;
}
.profile-username {
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}
.profile-meta { text-align: center; color: var(--text-muted); font-size: .87rem; }
.profile-stat-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0;
}
.profile-stat strong { display: block; font-size: 1.4rem; font-weight: 800; text-align: center; color: var(--primary); }
.profile-stat span { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* ---- Admin ---- */
.admin-sidebar {
  width: 240px;
  background: var(--primary-dark);
  min-height: calc(100vh - 70px);
  position: fixed;
  left: 0;
  top: 70px;
  overflow-y: auto;
  z-index: 100;
  padding: 16px 0;
}
.admin-body { margin-left: 240px; padding: 24px; }
@media(max-width:860px) { .admin-sidebar { display: none; } .admin-body { margin-left: 0; } }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.75);
  font-size: .92rem;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.admin-nav-item.active { border-left: 3px solid var(--accent); }
.admin-nav-section {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.35);
  padding: 14px 20px 5px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  border: 1px solid var(--border);
}
.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.stat-card-icon.blue  { background: #e8f0fe; color: #1a56db; }
.stat-card-icon.gold  { background: var(--accent-light); color: var(--accent-dark); }
.stat-card-icon.green { background: var(--green-light); color: var(--green); }
.stat-card-icon.red   { background: var(--red-light); color: var(--red); }
.stat-card-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-card-label { font-size: .85rem; color: var(--text-muted); margin-top: 3px; }
.table-admin { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-admin th {
  text-align: left;
  padding: 10px 14px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}
.table-admin td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-admin tr:hover td { background: var(--bg); }
.table-admin tr:last-child td { border-bottom: none; }
.badge-role {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}
.badge-admin  { background: #fdecea; color: var(--red); }
.badge-user   { background: #e8f0fe; color: #1a56db; }
.badge-status-active  { background: var(--green-light); color: var(--green); }
.badge-status-closed  { background: #f0f0f0; color: #757575; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3.5rem; margin-bottom: 14px; opacity: .35; display: block; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: .9rem; }

/* ---- Table ---- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { padding: 10px 12px; font-weight: 700; border-bottom: 2px solid var(--border); text-align: left; font-size: .85rem; color: var(--text-muted); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-borderless td, .table-borderless th { border: none; }
.table-sm td, .table-sm th { padding: 7px 10px; }

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 56px 0 28px;
  margin-top: auto;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--primary-dark);
}
.footer-logo span { font-size: 1.2rem; font-weight: 800; color: #fff; }
.footer-desc { font-size: .87rem; color: rgba(255,255,255,.5); line-height: 1.6; max-width: 280px; }
.footer h6 { color: #fff; font-weight: 700; margin-bottom: 14px; font-size: .88rem; text-transform: uppercase; letter-spacing: .7px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: rgba(255,255,255,.55); font-size: .88rem; transition: color .15s; }
.footer ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 36px;
  padding-top: 20px;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* ---- Misc ---- */
.section-divider { height: 1px; background: var(--border); margin: 0; }
.card-header-styled {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-content { padding: 36px 0 60px; }
.back-link { color: var(--text-muted); font-size: .88rem; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 20px; }
.back-link:hover { color: var(--primary); }

/* ---- Responsive ---- */
@media(max-width:768px) {
  .hero { padding: 50px 0 40px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 1.5rem; }
  .section { padding: 44px 0; }
  .auth-card { padding: 28px 20px; }
  .filter-form { flex-direction: column; }
  .filter-form .form-control, .filter-form .form-select { min-width: 0; }
}
@media(max-width:480px) {
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
}
