/* ==========================================================================
   RumahOTP — Monochrome Premium Design System
   Palet: Hitam (#111111), Charcoal (#252525), Putih (#FFFFFF), Surface (#F7F7F8)
   Tipografi: Plus Jakarta Sans (Primary), Inter (Fallback)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #111318;
  --secondary-color: #17243B;
  --primary-blue: #356AE6;
  --primary-blue-hover: #2655CC;
  --light-blue: #EAF1FF;
  --bg-color: #FFFFFF;
  --page-bg: #F5F7FA;
  --surface-color: #F8FAFC;
  --surface-hover: #F1F5F9;
  --border-color: #E4E7EC;
  --border-dark: #D0D5DD;
  --text-primary: #111827;
  --text-secondary: #667085;
  --text-muted: #98A2B3;

  --navy-dark: #111318;
  --navy-secondary: #17243B;
  --accent-black: #111318;
  --accent-gray-dark: #344054;
  --accent-gray-light: #F2F4F7;

  /* Legacy color aliases */
  --accent-blue: #356AE6;
  --accent-blue-light: #EAF1FF;
  --accent-green: #107569;
  --accent-green-light: #F0FDF9;
  --accent-amber: #B54708;
  --accent-amber-light: #FFFAEB;
  --accent-red: #D92D20;
  --accent-red-light: #FEF3F2;

  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 84px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
}

/* ==========================================================================
   Header & Topbar
   ========================================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background-color: #FFFFFF;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--primary-color);
}

.brand-subtitle {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ==========================================================================
   Member / Balance Card (Navy Gradient #111318 to #17243B with Blue Accent)
   ========================================================================== */
.member-card {
  background: linear-gradient(135deg, #111318 0%, #17243B 100%);
  color: #FFFFFF;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 12px 28px -6px rgba(17, 19, 24, 0.4), 0 0 18px -4px rgba(53, 106, 230, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(53, 106, 230, 0.15) 0%, rgba(53, 106, 230, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.member-tier {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #94A3B8;
  text-transform: uppercase;
}

.member-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.member-saldo-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.saldo-label {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.saldo-amount {
  font-size: 27px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.6px;
}

.member-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(53, 106, 230, 0.2);
  color: #93C5FD;
  border: 1px solid rgba(53, 106, 230, 0.35);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}

/* Quick Actions in 3 Balanced Columns (Top Up, Riwayat, Referral) */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1;
}

.quick-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  min-height: 52px;
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(53, 106, 230, 0.4);
  transform: translateY(-1px);
}

.quick-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Cards & Layout Components
   ========================================================================== */
.card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.card:hover {
  border-color: #D1D5DB;
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  color: var(--text-primary);
}

/* ==========================================================================
   Buttons — Strict Monochrome
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  width: 100%;
  min-height: 48px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary-color);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.15);
}

.btn-primary:hover {
  background-color: #252525;
}

.btn-primary:disabled {
  background-color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1.5px solid var(--border-dark);
}

.btn-outline:hover {
  background-color: var(--surface-color);
  border-color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #EFEFEF;
}

.btn-google {
  background-color: #FFFFFF;
  color: #111827;
  border: 1.5px solid var(--border-color);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-google:hover {
  background-color: #F9FAFB;
  border-color: #D1D5DB;
}

.btn-google img, .btn-google svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Badges — Monochrome
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background-color: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.badge-dark, .badge-active, .badge-success {
  background-color: #111111;
  color: #FFFFFF;
  border: 1px solid #111111;
}

.badge-pending {
  background-color: var(--surface-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-dark);
}

.badge-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
}

/* ==========================================================================
   Service Catalog & Icon Containers (Strict Monochrome)
   No blue, yellow, green, purple, pink icons!
   ========================================================================== */
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 15px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 64px;
}

.catalog-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.catalog-item:active {
  transform: scale(0.99);
}

.catalog-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.catalog-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.catalog-item-info {
  flex: 1;
  min-width: 0;
}

.catalog-item-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
}

/* Modern Compact Service Card for Nokos */
.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
  transition: all 0.15s ease;
  user-select: none;
  min-height: 58px;
}

.service-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.service-card:active {
  transform: scale(0.99);
  background-color: var(--surface-color);
}

.service-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.service-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
}

.service-icon-box svg {
  width: 20px;
  height: 20px;
}

.service-monogram {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #1E293B;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.service-details {
  min-width: 0;
  flex: 1;
}

.service-name {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.service-stock strong {
  color: var(--text-primary);
  font-weight: 700;
}

.service-rate-badge {
  display: inline-flex;
  align-items: center;
  background: #F0FDF9;
  color: #027A48;
  font-size: 10px;
  font-weight: 750;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(2, 122, 72, 0.2);
}

.service-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.service-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
}

.btn-service-select {
  background: var(--primary-color);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  min-height: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
  pointer-events: none;
}

.service-card:hover .btn-service-select {
  background: #272C35;
}

/* Quick Filter Chip Buttons */
.filter-chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 650;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
}

/* All icon containers: White/Light Gray background + Subtle Border + Black Stroke */
.icon-box,
.catalog-logo-icon,
.box-blue,
.box-amber,
.box-purple,
.box-emerald,
.box-sky,
.box-indigo,
.box-slate,
.box-rose {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--surface-color) !important;
  color: #111111 !important;
  border: 1px solid var(--border-color) !important;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.icon-box svg,
.catalog-logo-icon svg,
.box-blue svg,
.box-amber svg,
.box-purple svg,
.box-emerald svg,
.box-sky svg,
.box-indigo svg,
.box-slate svg,
.box-rose svg {
  stroke: #111111 !important;
  stroke-width: 2.2px !important;
  width: 24px;
  height: 24px;
}

.catalog-item:hover .icon-box,
.catalog-item:hover .catalog-logo-icon {
  background-color: #FFFFFF !important;
  border-color: #111111 !important;
  transform: scale(1.05);
}

.catalog-info h4 {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 450;
}

.menu-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin: 20px 4px 8px 4px;
}

.quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.quick-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 12px;
  background-color: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  min-height: 48px;
  transition: all 0.15s ease;
}

.quick-btn:hover {
  background-color: #FFFFFF;
  border-color: #111111;
}

.quick-btn:active {
  transform: scale(0.97);
}

.quick-btn svg {
  stroke: #111111;
  stroke-width: 2.2px;
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.input-group {
  margin-bottom: 16px;
  text-align: left;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  background-color: #FFFFFF;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px;
}

.input-field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password-btn:hover {
  color: var(--text-primary);
}

.form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.form-divider:not(:empty)::before {
  margin-right: 12px;
}

.form-divider:not(:empty)::after {
  margin-left: 12px;
}

.form-error {
  background-color: #F7F7F8;
  border: 1.5px solid #111111;
  color: #111111;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.form-success {
  background-color: #F7F7F8;
  border: 1.5px solid #111111;
  color: #111111;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

/* ==========================================================================
   Mobile Bottom Navigation — 4 Buttons
   1. Dashboard  2. Transaksi  3. Informasi  4. Menu
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  max-width: 520px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  min-width: 64px;
  min-height: 48px;
  transition: color 0.15s ease;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  stroke-width: 2px;
  margin-bottom: 4px;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.nav-item.active {
  color: var(--primary-color);
  font-weight: 750;
}

.nav-item.active svg {
  stroke: var(--primary-color);
  stroke-width: 2.3px;
  transform: translateY(-1px);
}

.nav-item:hover {
  color: var(--primary-color);
}

.nav-item:hover svg {
  stroke: var(--primary-color);
}

/* ==========================================================================
   Empty States & Skeleton
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 36px 18px;
  background-color: var(--surface-color);
  border: 1px dashed var(--border-dark);
  border-radius: 16px;
  margin: 12px 0;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.empty-state-icon svg {
  stroke: #111111;
  stroke-width: 2.2px;
  width: 24px;
  height: 24px;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  max-width: 460px;
  width: 100%;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.animate-pop {
  animation: popIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  background-color: #111111;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-slide-down 0.25s ease;
  pointer-events: auto;
}

@keyframes toast-slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Loading Spinner & Elegant R-Logo (Strict Size: 48px-52px max)
   ========================================================================== */
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.loading-spinner-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(53, 106, 230, 0.12);
  border-top-color: var(--primary-blue);
  animation: rotpSpin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.loading-logo,
.loading-spinner-wrap img,
#loadingOverlay img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(17, 19, 24, 0.18);
  animation: rotpPulse 2s ease-in-out infinite;
  display: block;
}

@keyframes rotpSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotpPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.95); opacity: 0.88; }
}

/* ==========================================================================
   Modern In-App Bottom Sheet System (Replaces Native Popups)
   ========================================================================== */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bottom-sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background-color: #FFFFFF;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 12px 18px 24px 18px;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
}

.bottom-sheet-backdrop.active .bottom-sheet {
  transform: translateY(0);
}

.sheet-pill {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background-color: #D0D5DD;
  margin: 0 auto 12px auto;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.sheet-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.3px;
}

.sheet-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
}

.sheet-search-wrap {
  position: relative;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.sheet-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.sheet-search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sheet-search-input:focus {
  border-color: var(--primary-blue);
  background: #FFFFFF;
}

.sheet-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  max-height: calc(82vh - 150px);
}

.sheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sheet-item:hover,
.sheet-item:active {
  background: var(--surface-color);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

.sheet-item.selected {
  border-color: var(--primary-blue);
  background: var(--light-blue);
}

.sheet-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sheet-item-flag {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sheet-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-item-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Selector Trigger Button (Modern card look) */
.selector-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.selector-trigger:hover,
.selector-trigger:active {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(53, 106, 230, 0.08);
}

/* Order Confirmation Dialog (Rich & Detailed) */
.order-confirm-modal {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 48px -12px rgba(17, 24, 39, 0.25);
  border: 1px solid var(--border-color);
}

.order-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F2F4F7;
  font-size: 13px;
}

.order-detail-row:last-child {
  border-bottom: none;
}

.order-detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.order-detail-value {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

/* ==========================================================================
   Smooth Premium Animations (Micro-Interactions & Polished UX)
   ========================================================================== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.92) translateY(8px); }
  60% { opacity: 1; transform: scale(1.01) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: spin 0.75s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.animate-pop {
  animation: popIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-shake {
  animation: errorShake 0.4s ease-in-out;
}

/* Card & Button interactive polish */
.btn {
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:active {
  transform: scale(0.975);
}

.catalog-item {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.catalog-item:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 6px 18px -4px rgba(17, 24, 39, 0.08);
}

.catalog-item:active {
  transform: scale(0.985);
}

.input-field {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-field:focus {
  border-color: #356AE6;
  box-shadow: 0 0 0 3px rgba(53, 106, 230, 0.14);
}

