/* RocxPay — Design system (dashboard dark + glass) */

:root {
  --ink-950: #07090f;
  --ink-900: #0b0f1a;
  --accent: #5b8cff;
  --mint: #3dd6c6;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 1rem;
}

* { box-sizing: border-box; }

.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(91, 140, 255, 0.18), transparent 55%),
    radial-gradient(700px 400px at 90% 0%, rgba(61, 214, 198, 0.12), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(91, 140, 255, 0.08), transparent 55%),
    var(--ink-950);
}

/* Cards / glass panels */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  backdrop-filter: blur(16px);
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.35rem;
  transition: transform .25s ease, border-color .25s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 140, 255, 0.35);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-glow, rgba(91,140,255,.2)), transparent 70%);
  pointer-events: none;
}

/* Navigation */
.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .9rem;
  border-radius: .85rem;
  color: #94a3b8;
  font-size: .875rem;
  font-weight: 500;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-link:hover {
  background: rgba(255,255,255,.04);
  color: #e2e8f0;
}

.nav-link-active {
  background: linear-gradient(90deg, rgba(91,140,255,.18), rgba(91,140,255,.05));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(91,140,255,.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border-radius: .75rem;
  font-size: .875rem;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, #5b8cff, #3d6ef5);
  color: #fff;
  box-shadow: 0 8px 24px rgba(91,140,255,.28);
}

.btn-primary:hover { box-shadow: 0 10px 28px rgba(91,140,255,.4); }

.btn-secondary {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
  color: #e2e8f0;
}

.btn-secondary:hover { background: rgba(255,255,255,.07); }

.btn-danger {
  background: rgba(244, 63, 94, .12);
  border-color: rgba(244, 63, 94, .25);
  color: #fda4af;
}

.btn-danger:hover { background: rgba(244, 63, 94, .2); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: .7rem;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #cbd5e1;
}

.btn-icon:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Forms */
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: .4rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .75rem;
  color: #f1f5f9;
  padding: .7rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(91,140,255,.55);
  box-shadow: 0 0 0 3px rgba(91,140,255,.15);
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-hint { font-size: .75rem; color: #64748b; margin-top: .35rem; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.2rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.badge-success {
  background: rgba(61, 214, 198, .12);
  color: #5eead4;
  border: 1px solid rgba(61, 214, 198, .25);
}

.badge-muted {
  background: rgba(148, 163, 184, .1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, .2);
}

.badge-warning {
  background: rgba(251, 191, 36, .12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, .25);
}

/* Table */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  text-align: left;
  padding: .85rem 1rem;
  color: #64748b;
  font-weight: 500;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.data-table td {
  padding: .95rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255,255,255,.02);
}

.product-thumb {
  height: 2.75rem;
  width: 2.75rem;
  border-radius: .65rem;
  object-fit: cover;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.product-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: .7rem;
}

/* Flash */
.flash {
  padding: .85rem 1rem;
  border-radius: .85rem;
  font-size: .875rem;
  border: 1px solid transparent;
}

.flash-success {
  background: rgba(61, 214, 198, .1);
  border-color: rgba(61, 214, 198, .25);
  color: #99f6e4;
}

.flash-error {
  background: rgba(244, 63, 94, .1);
  border-color: rgba(244, 63, 94, .25);
  color: #fecdd3;
}

.flash-info {
  background: rgba(91, 140, 255, .1);
  border-color: rgba(91, 140, 255, .25);
  color: #bfdbfe;
}

/* Auth pages */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
}

.auth-logo {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: .8rem;
  background: linear-gradient(135deg, #5b8cff, #3dd6c6);
  display: grid;
  place-items: center;
  font-family: Sora, sans-serif;
  font-weight: 700;
  color: #07090f;
  box-shadow: 0 8px 24px rgba(91,140,255,.3);
}

/* Delivery type picker */
.delivery-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

@media (max-width: 640px) {
  .delivery-options { grid-template-columns: 1fr; }
}

.delivery-option input { display: none; }

.delivery-option label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem;
  border-radius: .85rem;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.25);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
  text-align: center;
  font-size: .85rem;
  color: #94a3b8;
}

.delivery-option input:checked + label {
  border-color: rgba(91,140,255,.55);
  background: rgba(91,140,255,.1);
  color: #e2e8f0;
  box-shadow: 0 0 0 3px rgba(91,140,255,.12);
}

.delivery-panel { display: none; }
.delivery-panel.active { display: block; }

/* Animations */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in .35s ease both;
}

.stagger > * {
  animation: fade-in .4s ease both;
}

.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
