/* URBET99 — mobile-first LIGHT theme (white / blue / green) */
:root {
  --bg: #f0f7ff;
  --bg-card: #ffffff;
  --header-bg: linear-gradient(135deg, #1e6fd9 0%, #0d4a9c 100%);
  --accent: #1e6fd9;
  --accent-soft: #e8f2ff;
  --green: #0d9f6e;
  --green-soft: #e6faf3;
  --text: #1a2744;
  --muted: #5c6b8a;
  --border: rgba(30, 111, 217, 0.15);
  --danger: #dc2626;
  --success: #0d9f6e;
  --yellow-btn: #f0b429;
  --yellow-text: #1a2744;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --shadow: 0 4px 24px rgba(30, 111, 217, 0.08);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  transition: opacity .35s ease;
}

a {
  color: var(--accent);
}

.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 80px;
  background: linear-gradient(180deg, #4ba6e3 0%, #4091c6 40%, #3f5eb8 100%);
}

.login-wrap {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
}

.login-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  text-align: center;
  color: var(--text);
}

.logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.logo-row img {
  max-height: 56px;
  width: auto;
}

.input-row {
  display: flex;
  align-items: stretch;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.input-row .icon-slot {
  width: 44px;
  background: var(--yellow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--yellow-text);
}

.input-row .icon-slot i {
  font-size: 1rem;
}

.input-row input {
  flex: 1;
  border: 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.input-row input::placeholder {
  color: #7a8aad;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--yellow-btn);
  color: var(--yellow-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

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

.alert-success {
  background: var(--green-soft);
  border: 1px solid rgba(13, 159, 110, 0.35);
  color: #047857;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* App header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: #fff;
  box-shadow: 0 4px 20px rgba(13, 74, 156, 0.25);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.app-header .logo-sm {
  height: 46px;
  width: auto;
  display: block;
  background: transparent;
  border-radius: 0;
  padding: 0;
  object-fit: contain;
}

.header-user {
  text-align: right;
  position: relative;
}

.header-user .name {
  font-size: 0.85rem;
  font-weight: 600;
}

.role-tag {
  font-weight: 500;
  opacity: 0.9;
  font-size: 0.78rem;
}

.header-user .bal {
  font-size: 0.75rem;
  opacity: 0.92;
}

.pool-label {
  font-weight: 600;
}

.menu-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  z-index: 999;
}

.dropdown.open {
  display: flex;
}

.dropdown a {
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown a:last-child {
  border-bottom: 0;
}

.dropdown a:hover {
  background: var(--accent-soft);
}

/* Marquee ticker */
.ticker-marquee {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 22s linear infinite;
  padding: 8px 0;
  font-size: 0.82rem;
  color: #fff;
  opacity: 0.95;
}

.ticker-track span {
  flex-shrink: 0;
  padding-right: 2rem;
  white-space: nowrap;
}

.ticker-track i {
  margin-right: 6px;
  opacity: 0.9;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.main-pad {
  padding: 14px 14px calc(var(--nav-h) + 24px);
  max-width: 1100px;
  margin: 0 auto;
}

.section-head {
  background: linear-gradient(90deg, var(--accent), var(--green));
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: 16px;
}

.section-head:first-child {
  margin-top: 0;
}

.card {
  background: #82b7fe;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.game-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.game-card img {
  display: block;
  width: 120%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef4ff;
}

.game-card .label {
  padding: 4px 6px;

  display: flex;
  align-items: flex-end;   /* नीचे ही रहेगा */
  justify-content: center;

  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;

  background: linear-gradient(180deg, #1e6fd9, #0d4a9c);
  color: #fff;

  letter-spacing: 0.03em;

  white-space: nowrap;     /* एक लाइन */
  overflow: hidden;
  text-overflow: ellipsis;

  height: auto;            /* 🔥 auto height */
  min-height: unset;       /* 🔥 remove fix height */
  line-height: 1.1;
}

.table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  color: var(--text);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid var(--border);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

table.data th {
  background: #1a2744;
  color: #fff;
  padding: 8px 6px;
  text-align: left;
  white-space: nowrap;
}

table.data td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data tr:last-child td {
  border-bottom: 0;
}

.credit {
  color: var(--success);
  font-weight: 700;
}

.debit {
  color: var(--danger);
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  min-height: var(--nav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 4px 10px;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 -4px 20px rgba(30, 111, 217, 0.08);
}

.bottom-nav--panel {
  max-width: 1100px;
}

.bottom-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  text-align: center;
}

.bottom-nav a .ic {
  font-size: 1.1rem;
  color: var(--accent);
}

.bottom-nav a.active {
  color: var(--green);
  font-weight: 700;
}

.bottom-nav a.active .ic {
  color: var(--green);
}

.page-form h1 {
  font-size: 1.2rem;
  margin: 0 0 14px;
}

.panel-intro {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.panel-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.panel-table th,
.panel-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.panel-table th {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
}

code {
  font-size: 0.85em;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.rules-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 22, 54, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
}

.rules-modal.open {
  display: flex;
}

.rules-card {
  width: min(100%, 520px);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  color: #14213d;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(10, 20, 45, 0.25);
}

.rules-head {
  padding: 12px 14px;
  background: linear-gradient(90deg, #5b1876, #8e2eb0);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

.rules-list {
  margin: 0;
  padding: 10px 18px 2px 30px;
}

.rules-list li {
  margin: 0 0 10px;
  font-size: 0.96rem;
  line-height: 1.5;
}

.rules-actions {
  padding: 12px 14px 16px;
}

body.reloading {
  opacity: 0.75;
}

@media (min-width: 640px) {
  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1100px;
  }
}
