/* ================================================
   PetCatanduva Rifas – Custom Stylesheet
   Colors: Orange #F47920 | White #FFFFFF
   ================================================ */

:root {
  --primary:   #F47920;
  --primary-d: #d9650f;
  --secondary: #ffffff;
  --dark:      #2c2c2c;
  --gray-soft: #f8f4f0;
  --border:    #e8d8c8;
  --text:      #444;
  --shadow:    0 4px 20px rgba(244,121,32,.15);
}

* { box-sizing: border-box; }

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

/* ── NAVBAR ── */
.navbar-brand img { height: 46px; object-fit: contain; }
.navbar-brand .brand-text { font-size: 1.25rem; font-weight: 700; color: var(--secondary); letter-spacing: -.3px; }
.navbar-pet { background: var(--primary) !important; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.navbar-pet .nav-link { color: rgba(255,255,255,.9) !important; font-weight: 500; transition: color .2s; }
.navbar-pet .nav-link:hover { color: #fff !important; }
.navbar-toggler-icon { filter: invert(1); }

/* ── HERO ── */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #e86010 60%, #c85000 100%);
  color: #fff;
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section .container { position: relative; z-index: 1; }
.hero-title  { font-size: clamp(1.8rem,4vw,3rem); font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hero-subtitle { font-size: 1.1rem; opacity: .92; max-width: 540px; }
.hero-badge  { background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.4); border-radius: 50px; padding: 8px 22px; font-weight: 600; display: inline-block; }

/* ── SECTION HEADERS ── */
.section-title { font-size: 1.8rem; font-weight: 700; color: var(--dark); }
.section-title span { color: var(--primary); }
.divider-orange { width: 60px; height: 4px; background: var(--primary); border-radius: 4px; margin: 10px auto 30px; }

/* ── RAFFLE CARD ── */
.raffle-card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform .25s, box-shadow .25s;
  background: #fff;
  height: 100%;
}
.raffle-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.raffle-card .card-img-wrap { height: 200px; overflow: hidden; background: var(--gray-soft); }
.raffle-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.raffle-card:hover .card-img-wrap img { transform: scale(1.06); }
.raffle-card .card-body { padding: 20px; }
.raffle-card .card-title { font-weight: 700; font-size: 1.1rem; color: var(--dark); }
.raffle-card .price-tag { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.raffle-card .progress { height: 8px; border-radius: 10px; }
.raffle-card .progress-bar { background: var(--primary); }
.raffle-card .badge-status { font-size: .75rem; padding: 5px 12px; border-radius: 50px; }
.badge-active   { background: #e8f5e9; color: #2e7d32; }
.badge-draft    { background: #fff3e0; color: #e65100; }
.badge-completed{ background: #e8eaf6; color: #3949ab; }
.badge-cancelled{ background: #fce4ec; color: #c62828; }

/* ── BUTTONS ── */
.btn-primary-pet {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 28px;
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.btn-primary-pet:hover { background: var(--primary-d); color: #fff; transform: translateY(-1px); }
.btn-outline-pet { border: 2px solid var(--primary); color: var(--primary); border-radius: 50px; padding: 9px 26px; font-weight: 600; background: transparent; transition: all .2s; }
.btn-outline-pet:hover { background: var(--primary); color: #fff; }

/* ── NUMBER GRID ── */
.numbers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.num-btn {
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
  cursor: pointer;
  transition: all .18s;
  display: flex; align-items: center; justify-content: center;
}
.num-btn:hover:not(.taken):not(.selected) { border-color: var(--primary); color: var(--primary); transform: scale(1.08); }
.num-btn.selected { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 3px rgba(244,121,32,.3); }
.num-btn.taken    { background: #eee; border-color: #ddd; color: #aaa; cursor: not-allowed; }
.num-btn.winner   { background: gold; border-color: #c9a800; color: #333; }

/* ── LEGEND ── */
.legend-dot { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }

/* ── RAFFLE DETAIL HEADER ── */
.raffle-header {
  background: linear-gradient(135deg, var(--primary) 0%, #e86010 100%);
  color: #fff; padding: 50px 0 40px;
}
.raffle-header h1 { font-size: clamp(1.5rem,3vw,2.4rem); font-weight: 800; }

/* ── SIDEBAR CARD ── */
.sidebar-card { border-radius: 16px; border: 1px solid var(--border); background: #fff; overflow: hidden; }
.sidebar-card .sc-header { background: var(--primary); color: #fff; padding: 18px 20px; font-weight: 700; font-size: 1.1rem; }
.sidebar-card .sc-body { padding: 20px; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-soft); font-size: .95rem; }
.info-row:last-child { border: none; }
.info-row .label { color: #888; }
.info-row .value { font-weight: 600; color: var(--dark); }

/* ── CART SUMMARY ── */
#cart-summary { background: var(--gray-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
#cart-count { color: var(--primary); font-weight: 700; }

/* ── ADMIN SIDEBAR ── */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; min-width: 260px;
  background: var(--dark);
  color: #fff;
  display: flex; flex-direction: column;
  transition: width .3s;
}
.admin-sidebar .sidebar-brand {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
}
.admin-sidebar .sidebar-brand img { height: 40px; }
.admin-sidebar .sidebar-brand .brand-name { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
.admin-sidebar .sidebar-brand .brand-sub  { font-size: .75rem; color: #aaa; }
.admin-sidebar .nav { padding: 16px 0; }
.admin-sidebar .nav-item .nav-link {
  color: rgba(255,255,255,.75);
  padding: 11px 24px;
  border-radius: 0;
  display: flex; align-items: center; gap: 12px;
  font-size: .95rem;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-item .nav-link:hover,
.admin-sidebar .nav-item .nav-link.active {
  color: #fff;
  background: rgba(244,121,32,.15);
  border-left-color: var(--primary);
}
.admin-sidebar .nav-item .nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.admin-sidebar .nav-section { padding: 14px 24px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #666; }

.admin-content { flex: 1; background: #f4f6f9; overflow-y: auto; }
.admin-topbar {
  background: #fff; padding: 14px 28px;
  border-bottom: 1px solid #e0e0e0;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.admin-topbar .page-title { font-size: 1.15rem; font-weight: 700; color: var(--dark); margin: 0; }
.admin-main { padding: 28px; }

/* ── STAT CARDS ── */
.stat-card { border-radius: 16px; padding: 24px; color: #fff; position: relative; overflow: hidden; }
.stat-card .stat-icon { font-size: 2.5rem; opacity: .25; position: absolute; right: 20px; top: 16px; }
.stat-card .stat-number { font-size: 2.2rem; font-weight: 800; }
.stat-card .stat-label  { font-size: .9rem; opacity: .9; }
.stat-card-orange { background: linear-gradient(135deg, var(--primary), #e86010); }
.stat-card-dark   { background: linear-gradient(135deg, #3d3d3d, #1a1a1a); }
.stat-card-green  { background: linear-gradient(135deg, #43a047, #2e7d32); }
.stat-card-blue   { background: linear-gradient(135deg, #1e88e5, #1565c0); }

/* ── TABLES ── */
.table-pet thead { background: var(--primary); color: #fff; }
.table-pet thead th { font-weight: 600; border: none; }
.table-pet tbody tr:hover { background: #fff8f2; }

/* ── FORM CONTROLS ── */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(244,121,32,.2);
}
.form-label { font-weight: 600; color: var(--dark); font-size: .9rem; }

/* ── DRAW ANIMATION ── */
.draw-wheel {
  width: 220px; height: 220px; border-radius: 50%;
  border: 6px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 900; color: var(--primary);
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.draw-wheel.spinning { animation: spin 0.08s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── WINNER CARD ── */
.winner-card {
  background: linear-gradient(135deg, #fff8ec, #fff);
  border: 3px solid gold;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(244,121,32,.2);
}
.winner-number { font-size: 4rem; font-weight: 900; color: var(--primary); }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 40px 0 24px;
}
.site-footer a { color: var(--primary); text-decoration: none; }
.site-footer .footer-brand { font-size: 1.2rem; font-weight: 700; color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .admin-sidebar { display: none; }
  .admin-sidebar.show { display: flex; position: fixed; z-index: 1050; height: 100vh; left: 0; top: 0; width: 260px; }
  .numbers-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
}
@media (max-width: 576px) {
  .hero-section { padding: 60px 0 50px; }
  .admin-main { padding: 16px; }
  .numbers-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; }
  .num-btn { font-size: .75rem; }
}
