/* =========================================================
   RAZZBERY SOLUTIONS — LIVE PAYMENT COUNTER
   Design tokens
   ========================================================= */
:root{
  --navy-deep:   #021024;
  --navy-base:   #021e47;
  --navy-panel:  #06285a;
  --navy-panel2: #0a3268;
  --navy-line:   #123a6b;
  --navy-line-soft: rgba(255,255,255,.08);

  --orange:      #fc8503;
  --orange-soft: #ffb35c;
  --orange-dim:  rgba(252,133,3,.15);

  --green: #22c55e;
  --red: #f43f5e;

  --text-hi:     #f3f7fd;
  --text-mid:    #b9c8de;
  --text-muted:  #7d93b2;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  min-height:100vh;
  font-family: var(--font-body);
  color: var(--text-hi);
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(252,133,3,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(10,80,180,.25), transparent 55%),
    var(--navy-deep);
  background-attachment: fixed;
}

::selection{ background: var(--orange); color: var(--navy-deep); }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: var(--navy-deep); }
::-webkit-scrollbar-thumb{ background: var(--navy-line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover{ background: var(--orange); }

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar{
  position: sticky;
  top:0;
  z-index: 40;
  background: rgba(2,16,36,.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--navy-line-soft);
}

.brand-mark{
  width:42px; height:42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--orange), #d96900);
  color: var(--navy-deep);
  display:flex; align-items:center; justify-content:center;
  font-size: 1.1rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 20px -6px rgba(252,133,3,.6);
}

.brand-name{
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .95rem;
  line-height: 1.1;
}
.brand-sub{
  font-size: .72rem;
  color: var(--text-muted);
  letter-spacing: .03em;
}

.status-pill{
  display:flex; align-items:center; gap:8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--navy-line-soft);
  font-size: .78rem;
  color: var(--text-mid);
}
.status-pill .dot{
  width:8px; height:8px; border-radius:50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
}
.status-pill.live .dot{
  background: var(--green);
  animation: pulse-dot 1.6s infinite;
}
.status-pill.offline .dot{ background: var(--red); }

@keyframes pulse-dot{
  0%{ box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70%{ box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.clock-box{ text-align:right; }
.clock-time{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--orange-soft);
}
.clock-date{ font-size: .72rem; color: var(--text-muted); }

/* =========================================================
   HERO / ODOMETER PANEL
   ========================================================= */
.hero-panel{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 2.4rem 2rem;
  background:
    linear-gradient(180deg, var(--navy-panel2) 0%, var(--navy-panel) 100%);
  border: 1px solid var(--navy-line-soft);
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
}

.hero-glow{
  position:absolute; inset:0;
  background: radial-gradient(650px 260px at 15% 0%, rgba(252,133,3,.16), transparent 65%);
  pointer-events:none;
}

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size: .72rem;
  letter-spacing:.14em;
  text-transform: uppercase;
  color: var(--orange-soft);
  font-weight: 600;
  margin-bottom: 1rem;
}

.odometer-wrap{
  display:flex; align-items:flex-end; gap:12px;
  flex-wrap: wrap;
}
.odo-currency{
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1.4rem;
  margin-bottom: .6rem;
  letter-spacing: .05em;
}

.odometer{
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1;
  color: var(--text-hi);
  letter-spacing: .01em;
 
  transition: color .15s ease;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.odometer .accent{ color: var(--orange); }
.odometer .decimals{ color: var(--orange-soft); font-size: .62em; }

.cycle-row{
  margin-top: 1.6rem;
  display:flex; align-items:center; gap:14px;
}
.cycle-progress{
  flex:1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--navy-line-soft);
  overflow: hidden;
}
.cycle-progress-fill{
  height:100%;
  background: linear-gradient(90deg, #d96900, var(--orange), var(--orange-soft));
  box-shadow: 0 0 12px rgba(252,133,3,.7);
  transition: width .6s ease;
  border-radius: 999px;
}
.cycle-label{
  font-size: .8rem;
  color: var(--text-mid);
  white-space: nowrap;
  font-weight:600;
}

.rate-strip{
  margin-top: 1.6rem;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.rate-chip{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--navy-line-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align:center;
}
.rate-value{
  display:block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--orange-soft);
  font-size: 1.02rem;
}
.rate-tag{
  display:block;
  font-size: .66rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}

.summary-card{
  background: rgba(2,16,36,.55);
  border: 1px solid var(--navy-line-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}
.summary-row{
  display:flex; align-items:center; justify-content:space-between;
  padding: .65rem 0;
  border-bottom: 1px dashed var(--navy-line-soft);
}
.summary-row:last-child{ border-bottom:none; }
.summary-label{
  font-size: .82rem;
  color: var(--text-mid);
  display:flex; align-items:center; gap:8px;
}
.summary-label i{ color: var(--orange); width:16px; text-align:center; }
.summary-value{
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-hi);
  font-size: .92rem;
}

/* =========================================================
   SOURCES SECTION
   ========================================================= */
.section-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
}
.section-sub{
  color: var(--text-muted);
  font-size: .85rem;
  margin: 2px 0 0;
}

.search-box{
  display:flex; align-items:center; gap:8px;
  background: var(--navy-panel);
  border: 1px solid var(--navy-line-soft);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 220px;
}
.search-box i{ color: var(--text-muted); font-size:.85rem; }
.search-box input{
  background: transparent; border: none; outline:none;
  color: var(--text-hi); font-size:.85rem; width: 100%;
}
.search-box input::placeholder{ color: var(--text-muted); }

.btn-add{
  background: linear-gradient(135deg, var(--orange), #e07300);
  border: none;
  color: var(--navy-deep);
  font-weight: 700;
  font-size: .85rem;
  padding: 9px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(252,133,3,.8);
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-add:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(252,133,3,.9);
  color: var(--navy-deep);
}

.source-card{
  height:100%;
  background: linear-gradient(180deg, var(--navy-panel2), var(--navy-panel));
  border: 1px solid var(--navy-line-soft);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  position: relative;
  overflow:hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.source-card::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height:3px;
  background: var(--card-accent, var(--orange));
}
.source-card:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
}
.source-card.inactive{ opacity:.55; }

.source-top{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap: 10px;
}
.source-icon{
  width:42px; height:42px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: color-mix(in srgb, var(--card-accent, var(--orange)) 18%, transparent);
  color: var(--card-accent, var(--orange));
  font-size: 1.05rem;
  flex-shrink:0;
}
.source-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  color: var(--text-hi);
}
.source-meta{
  font-size: .74rem;
  color: var(--text-muted);
  margin-top:2px;
}
.source-badge{
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--navy-line-soft);
  color: var(--text-mid);
}
.source-badge.active{ background: rgba(34,197,94,.15); color: var(--green); }
.source-badge.inactive{ background: rgba(244,63,94,.15); color: var(--red); }

.source-amount{
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-hi);
  margin-top: .9rem;
}
.source-amount small{
  font-family: var(--font-body);
  font-weight:600;
  font-size: .68rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.source-live{
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--card-accent, var(--orange-soft));
  margin-top: .35rem;
  display:flex; align-items:center; gap:6px;
}
.source-live i{ font-size:.6rem; }

.source-actions{
  display:flex; gap:8px;
  margin-top: 1rem;
  border-top: 1px dashed var(--navy-line-soft);
  padding-top: .8rem;
}
.icon-btn{
  flex:1;
  display:flex; align-items:center; justify-content:center; gap:6px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--navy-line-soft);
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .76rem;
  font-weight: 600;
  transition: all .15s ease;
}
.icon-btn:hover{ background: rgba(255,255,255,.08); color: var(--text-hi); }
.icon-btn.danger:hover{ background: rgba(244,63,94,.15); color: var(--red); border-color: rgba(244,63,94,.4); }
.icon-btn.warn:hover{ background: rgba(252,133,3,.15); color: var(--orange); border-color: rgba(252,133,3,.4); }

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state{
  text-align:center;
  padding: 3.5rem 1rem;
  border: 1px dashed var(--navy-line-soft);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state i{ font-size: 2.4rem; color: var(--orange); margin-bottom: .8rem; }
.empty-state h4{ color: var(--text-hi); font-family: var(--font-display); }

/* =========================================================
   FAB
   ========================================================= */
.fab{
  position: fixed;
  right: 26px; bottom: 26px;
  width: 58px; height: 58px;
  border-radius: 50%;
  border:none;
  background: linear-gradient(135deg, var(--orange), #d96900);
  color: var(--navy-deep);
  font-size: 1.3rem;
  box-shadow: 0 14px 30px -8px rgba(252,133,3,.75);
  z-index: 45;
  display:flex; align-items:center; justify-content:center;
  transition: transform .18s ease;
}
.fab:hover{ transform: scale(1.08) rotate(90deg); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer-note{
  text-align:center;
  padding: 1.6rem 0 2.4rem;
  color: var(--text-muted);
  font-size: .78rem;
}

/* =========================================================
   MODAL (Bootstrap overrides)
   ========================================================= */
.modal-content{
  background: linear-gradient(180deg, var(--navy-panel2), var(--navy-base));
  border: 1px solid var(--navy-line-soft);
  border-radius: var(--radius-lg);
  color: var(--text-hi);
}
.modal-header, .modal-footer{ border-color: var(--navy-line-soft); }
.modal-title{ font-family: var(--font-display); font-weight:700; }

.form-label{ font-size:.82rem; color: var(--text-mid); font-weight:600; }
.form-control, .form-select, .input-group-text{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--navy-line-soft);
  color: var(--text-hi);
}
.form-control:focus, .form-select:focus{
  background: rgba(255,255,255,.06);
  border-color: var(--orange);
  box-shadow: 0 0 0 .2rem rgba(252,133,3,.18);
  color: var(--text-hi);
}
.form-control::placeholder{ color: var(--text-muted); }
.input-group-text{ color: var(--text-muted); }

.color-swatches{ display:flex; gap:10px; }
.swatch{
  width:28px; height:28px; border-radius: 50%;
  cursor:pointer;
  border: 2px solid transparent;
  display:inline-block;
  transition: transform .15s ease;
}
.swatch:hover{ transform: scale(1.1); }
.swatch.active{ border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }

.form-check-input:checked{ background-color: var(--orange); border-color: var(--orange); }

/* =========================================================
   MISC / ANIMATIONS
   ========================================================= */
.flash-update{ animation: flash 0.7s ease; }
@keyframes flash{
  0%{ text-shadow: 0 0 26px rgba(252,133,3,1), 0 0 60px rgba(252,133,3,.6); }
  100%{ text-shadow: 0 0 12px rgba(252,133,3,.55), 0 0 44px rgba(252,133,3,.25); }
}

.fade-in{ animation: fadeIn .35s ease both; }
@keyframes fadeIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}

/* SweetAlert2 theme tweaks */
.swal2-popup.razz-popup{
  background: var(--navy-panel2) !important;
  color: var(--text-hi) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--navy-line-soft);
}
.swal2-title, .swal2-html-container{ color: var(--text-hi) !important; }

@media (max-width: 576px){
  .rate-strip{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero-panel{ padding: 1.6rem 1.1rem; }
}
