/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans Ethiopic", -apple-system, "SF Pro Text", Roboto, system-ui, sans-serif;
  background: #EFEFF4;
  color: #000;
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ===== LAYOUT ===== */
.app {
  width: 100%;
  background: #EFEFF4;
  min-height: 100vh;
  position: relative;
}

/* ===== TOP BAR ===== */
.tg-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid #E6E6EA;
}
.tg-bar-inner {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  position: relative;
}
.tg-bar-back {
  color: #3390EC;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  cursor: pointer;
  background: none;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 1;
}
.tg-bar-titles {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  pointer-events: none;
}
.tg-bar-name {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 80px;
}
.tg-bar-sub {
  font-size: 12px;
  color: #707579;
  margin-top: 1px;
}
.tg-bar-right {
  margin-left: auto;
  z-index: 1;
}
.tg-bar-right a, .tg-bar-right button {
  color: #3390EC;
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  font-family: inherit;
  font-weight: 400;
}

/* ===== GROUP LABEL ===== */
.tg-label {
  font-size: 13px;
  color: #707579;
  padding: 18px 16px 7px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

/* ===== SECTION ===== */
.tg-section {
  background: #fff;
  border-top: 0.5px solid #E6E6EA;
  border-bottom: 0.5px solid #E6E6EA;
}

/* ===== ROW ===== */
.tg-row {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0.5px solid #E6E6EA;
}
.tg-row:last-child { border-bottom: none; }

/* ===== COVER ===== */
.cover-blue   { background: #3390EC; }
.cover-green  { background: #4FAE4E; }
.cover-gold   { background: #E0A93C; }
.cover-red    { background: #E2533A; }
.cover-purple { background: #9C6ADE; }

.raffle-cover {
  height: 130px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.raffle-cover svg { opacity: 0.9; }
.cover-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}
.cover-full {
  height: 150px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.cover-deco-circle1 {
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.cover-deco-circle2 {
  position: absolute;
  left: -20px; bottom: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
}

/* ===== RAFFLE CARD ===== */
.raffle-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin: 12px 16px 0;
  transition: opacity 0.15s;
}
.raffle-card:active { opacity: 0.85; }
.raffle-body { padding: 14px; }
.raffle-body-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.raffle-title { font-size: 17px; font-weight: 700; color: #000; }
.raffle-cd { font-size: 12.5px; color: #E2533A; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.raffle-meta { display: flex; gap: 16px; margin-top: 8px; }
.raffle-meta span { font-size: 13px; color: #707579; }
.raffle-meta b { color: #000; }
.ticket-blue { color: #3390EC; }

/* ===== PROGRESS ===== */
.progress-bar {
  height: 5px;
  background: #EFEFF4;
  border-radius: 99px;
  margin-top: 12px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s;
}
.fill-blue   { background: #3390EC; }
.fill-green  { background: #4FAE4E; }
.fill-gold   { background: #E0A93C; }
.fill-red    { background: #E2533A; }
.fill-purple { background: #9C6ADE; }
.progress-text { font-size: 12px; color: #707579; margin-top: 6px; }

/* ===== PAST DRAW ROW ===== */
.past-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid #E6E6EA;
  cursor: pointer;
  transition: background 0.1s;
}
.past-row:last-child { border-bottom: none; }
.past-row:active { background: #EFEFF4; }
.past-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.past-info { flex: 1; min-width: 0; }
.past-title { font-size: 15px; font-weight: 600; color: #000; }
.past-sub { font-size: 12.5px; color: #707579; margin-top: 1px; }
.past-num {
  font-size: 12.5px;
  color: #E0A93C;
  font-weight: 700;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
}

/* ===== NUMBER GRID ===== */
.number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 14px 16px 18px;
  background: #fff;
  border-top: 0.5px solid #E6E6EA;
  border-bottom: 0.5px solid #E6E6EA;
}
.num-btn {
  aspect-ratio: 1;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
}
.num-free  { background: #EAF3FC; color: #3390EC; }
.num-free:hover { background: #D4E8F8; }
.num-taken   { background: #EFEFF4; color: #A8A8A8; text-decoration: line-through; cursor: default; pointer-events: none; }
.num-pending { background: #FEF9EC; color: #C8911A; cursor: default; pointer-events: none; border: 1px solid #F0D080; }
.num-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 14px;
}
.num-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #707579; }
.num-legend-dot { width: 16px; height: 16px; border-radius: 4px; }

/* ===== PRIZE ROWS ===== */
.prize-section { background: #fff; padding: 16px; border-top: 0.5px solid #E6E6EA; border-bottom: 0.5px solid #E6E6EA; }
.prize-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #EFEFF4;
  margin-bottom: 8px;
}
.prize-row:last-child { margin-bottom: 0; }
.prize-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.prize-place { flex: 1; font-size: 15px; color: #000; }
.prize-amount { font-size: 18px; font-weight: 700; color: #000; }

/* ===== COPY ROW ===== */
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 0.5px solid #E6E6EA;
}
.copy-row:last-child { border-bottom: none; }
.copy-label { font-size: 15px; color: #707579; }
.copy-value { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #000; }
.copy-btn { background: none; border: none; cursor: pointer; color: #3390EC; padding: 2px; }

/* ===== BUTTONS ===== */
.btn {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary  { background: #3390EC; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2B7CD3; }
.btn-green    { background: #4FAE4E; color: #fff; }
.btn-red-soft { background: #FCEAE5; color: #E2533A; }
.btn-ghost    { background: #EFEFF4; color: #3390EC; }
.btn-sm {
  width: auto;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 15px;
}

/* ===== FORM FIELDS ===== */
.tg-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 0.5px solid #E6E6EA;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: #000;
  outline: none;
  display: block;
}
.tg-input:focus { border-bottom-color: #3390EC; }
.tg-input:last-child { border-bottom: none; }
.tg-input::placeholder { color: #A8A8A8; }
textarea.tg-input { resize: vertical; min-height: 80px; }
select.tg-input { appearance: none; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  width: 100%;
  padding: 28px 16px;
  border-radius: 12px;
  background: #EFEFF4;
  border: 1.5px dashed #C8C8CE;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  color: #3390EC;
  font-weight: 500;
  transition: background 0.2s;
}
.upload-zone:hover { background: #E4E4EB; }
.upload-zone.uploaded { background: #E8F5E8; border-style: solid; border-color: #4FAE4E; color: #2D6A2D; }
#screenshot-input { display: none; }

/* ===== FLASH MESSAGES ===== */
.flash {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}
.flash-success { background: #E8F5E8; color: #2D6A2D; }
.flash-error   { background: #FCEAE5; color: #E2533A; }

/* ===== PENDING ENTRY ===== */
.pending-entry {
  padding: 14px 16px;
  border-bottom: 0.5px solid #E6E6EA;
  transition: opacity 0.3s;
}
.pending-entry:last-child { border-bottom: none; }
.pending-header { display: flex; align-items: center; gap: 12px; }
.num-badge {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: #EAF3FC;
  color: #3390EC;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.num-badge-green { background: #E8F5E8; color: #4FAE4E; }
.pending-name { font-size: 15px; font-weight: 600; color: #000; }
.pending-phone { font-size: 13px; color: #707579; font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace; }
.pending-time { font-size: 12px; color: #A8A8A8; margin-left: auto; flex-shrink: 0; }
.pending-actions { display: flex; gap: 10px; margin-top: 12px; }
.pending-screenshot {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: #EFEFF4;
  border: 0.5px solid #E6E6EA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
}
.pending-screenshot img { width: 100%; height: 100%; object-fit: cover; }

/* ===== CONFIRMED ROW ===== */
.confirmed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid #E6E6EA;
}
.confirmed-row:last-child { border-bottom: none; }
.confirmed-name { flex: 1; font-size: 15px; color: #000; }
.confirmed-via { font-size: 12.5px; color: #707579; }

/* ===== ADMIN STATS ===== */
.stats-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
}
.stat-card {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.stat-val { font-size: 20px; font-weight: 700; color: #000; }
.stat-lbl { font-size: 11px; color: #707579; margin-top: 2px; }

/* ===== ADMIN RAFFLE ROW ===== */
.admin-raffle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid #E6E6EA;
  cursor: pointer;
}
.admin-raffle:last-child { border-bottom: none; }
.admin-raffle:active { background: #EFEFF4; }
.raffle-action-bar a:active { opacity: 0.75; }
.admin-raffle-info { flex: 1; min-width: 0; }
.admin-raffle-title { font-size: 16px; font-weight: 600; color: #000; }
.admin-raffle-sub   { font-size: 13px; color: #707579; margin-top: 2px; }
.admin-raffle-rev   { font-size: 15px; font-weight: 700; color: #4FAE4E; white-space: nowrap; }
.chevron { color: #C8C8CE; font-size: 18px; }

/* ===== ADMIN NAV ===== */
.admin-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255,255,255,0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 0.5px solid #E6E6EA;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 env(safe-area-inset-bottom, 12px);
  z-index: 100;
}
.admin-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #707579;
  font-size: 10.5px;
  cursor: pointer;
  padding: 4px 16px;
  text-decoration: none;
}
.admin-nav-item.active { color: #3390EC; }
.admin-nav-item svg { transition: opacity 0.15s; }

/* ===== CONFIRMATION PAGE ===== */
.confirm-center {
  padding: 60px 28px 0;
  text-align: center;
}
.confirm-icon {
  width: 76px; height: 76px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EAF3FC;
}
.confirm-title {
  font-size: 24px;
  font-weight: 700;
  color: #000;
  margin: 22px 0 8px;
}
.confirm-text {
  font-size: 15px;
  color: #707579;
  line-height: 1.5;
}

/* ===== BOTTOM STICKY BUTTON ===== */
.bottom-pad { height: 90px; }
.bottom-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 12px 16px env(safe-area-inset-bottom, 16px);
  background: #EFEFF4;
  border-top: 0.5px solid #E6E6EA;
  z-index: 50;
}

/* ===== WINNING NUMBER ===== */
.win-block {
  background: #fff;
  border-top: 0.5px solid #E6E6EA;
  border-bottom: 0.5px solid #E6E6EA;
  padding: 20px 16px;
  text-align: center;
}
.win-label { font-size: 13px; color: #707579; }
.win-num {
  font-size: 56px;
  font-weight: 700;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  line-height: 1.1;
  margin-top: 4px;
}

/* ===== DRAW PAGE ===== */
.draw-box {
  margin: 16px;
  padding: 28px 20px;
  background: #fff;
  border-radius: 14px;
  text-align: center;
}
.draw-box h2 { font-size: 19px; color: #000; margin-bottom: 8px; }
.draw-box p  { font-size: 14px; color: #707579; margin-bottom: 20px; }

/* ===== TELEGRAM LOGO STYLE ===== */
.tg-logo {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2AABEE, #229ED9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== MISC ===== */
.spacer-24 { height: 24px; }
.pad-16    { padding: 16px; }
.text-sub  { color: #707579; font-size: 14px; line-height: 1.5; }
.text-hint { color: #A8A8A8; font-size: 12.5px; text-align: center; margin-top: 10px; }
.label-sm  {
  font-size: 12px;
  color: #707579;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  padding: 16px 16px 6px;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg-btn {
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  transition: background 0.1s;
}
.seg-btn.active { background: #3390EC; color: #fff; }
.seg-btn:not(.active) { background: #fff; color: #707579; border: 0.5px solid #E6E6EA; }

/* ===== ICON BUTTONS ===== */
.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.1s;
}
.btn-icon-red { background: #FCEAE5; }
.btn-icon-red:hover { background: #f5d5cc; }
