/* ═════════════════════════════════════════════════════
   Roamlinx Portal Design System  v2.0
   Shared across all storefronts (roamlinx.pl / .com / proland.lv)
   ═════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ─────────────────────────────── */
:root {
  /* Brand */
  --rlx-red:          #D32011;
  --rlx-red-hover:    #B11B0E;
  --rlx-red-light:    rgba(211, 32, 17, 0.08);
  --rlx-red-focus:    rgba(211, 32, 17, 0.28);

  /* Neutrals */
  --rlx-ink:          #111111;
  --rlx-text:         #374151;
  --rlx-muted:        #6B7280;
  --rlx-accent:       #6A6F76;
  --rlx-border:       #E5E7EB;
  --rlx-border-light: #F3F4F6;
  --rlx-surface:      #FFFFFF;
  --rlx-surface-muted:#F9FAFB;
  --rlx-bg:           #F3F4F6;
  --rlx-bg-secondary: #F3F4F6;

  /* Semantic */
  --rlx-success:      #059669;
  --rlx-success-bg:   #D1FAE5;
  --rlx-success-border:#A7F3D0;
  --rlx-warning:      #D97706;
  --rlx-warning-bg:   #FEF3C7;
  --rlx-warning-border:#FDE68A;
  --rlx-error:        #DC2626;
  --rlx-error-bg:     #FEE2E2;
  --rlx-error-border: #FECACA;
  --rlx-info:         #2563EB;
  --rlx-info-bg:      #DBEAFE;
  --rlx-info-border:  #BFDBFE;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 24px rgba(0,0,0,0.05);
  --shadow-xl:  0 14px 30px rgba(0,0,0,0.08);

  /* Transitions */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
}

/* ── 2. Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem; line-height: 1.5;
  color: var(--rlx-text);
  background: #f5f5f7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.auth-mode {
  background: #f5f5f7;
}
body.portal-mode {
  background: #f5f5f7;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--rlx-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 3. Layout ────────────────────────────────────── */
.container   { max-width: 1120px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); }
.auth-wrap   { max-width: 480px;  margin: 4rem auto; padding: 0 var(--space-lg); }

.grid        { display: grid; gap: var(--space-lg); }
.grid-2      { grid-template-columns: repeat(2, 1fr); }
.grid-3      { grid-template-columns: repeat(3, 1fr); }
.grid-4      { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .container { padding: var(--space-lg) var(--space-md); }
  .auth-wrap { margin: var(--space-xl) auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }
.gap-lg      { gap: var(--space-lg); }
.justify-end { justify-content: flex-end; }
.flex-wrap   { flex-wrap: wrap; }

/* ── 4. Navbar ────────────────────────────────────── */
.navbar {
  background: rgba(4, 4, 6, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  padding: 1rem 2rem;
  position: sticky; top: 0; z-index: 100;
  width: 100%;
  box-sizing: border-box;
}
.navbar-inner {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: var(--space-md); }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: auto; }
.nav-brand span { color: rgba(255,255,255,0.78); font-size: 0.875rem; font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: var(--space-md); }

.logo-img { display: block; width: auto; }
.logo-img--nav {
  height: 60px;
  max-height: 72px;
  object-fit: contain;
  padding-bottom: 4px;
}
.logo-img--auth { height: 48px; margin: 0 auto var(--space-md); }

/* User menu dropdown */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 0.5rem 1rem; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-full);
  cursor: pointer; transition: all var(--duration-normal) var(--ease-default);
  font: inherit; font-weight: 600; font-size: 0.875rem; color: #fff;
}
.user-btn:hover { border-color: rgba(255,255,255,0.36); background: rgba(255,255,255,0.14); box-shadow: var(--shadow-sm); }
.user-btn .chevron { font-size: 0.625rem; color: rgba(255,255,255,0.72); transition: transform var(--duration-fast); }
.user-btn i { color: rgba(255,255,255,0.9); }
.user-menu.open .chevron { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  background: var(--rlx-surface); border: 1px solid var(--rlx-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 200px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all var(--duration-normal) var(--ease-default);
}
.user-menu.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; color: var(--rlx-text); font-size: 0.875rem;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  transition: background var(--duration-fast);
  font: inherit;
}
.dropdown-item:hover { background: var(--rlx-surface-muted); text-decoration: none; }
.dropdown-item i { width: 16px; text-align: center; color: var(--rlx-muted); }
.dropdown-divider { height: 1px; background: var(--rlx-border); margin: 0.25rem 0; }
.dropdown-item--danger { color: var(--rlx-error); }
.dropdown-item--danger i { color: var(--rlx-error); }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: 0.4rem 0.75rem; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-full);
  cursor: pointer; transition: all var(--duration-normal) var(--ease-default);
  font: inherit; font-size: 0.875rem; color: #fff;
}
.lang-btn:hover { border-color: rgba(255,255,255,0.36); background: rgba(255,255,255,0.14); box-shadow: var(--shadow-sm); }
.lang-btn .chevron { font-size: 0.625rem; color: rgba(255,255,255,0.72); transition: transform var(--duration-fast); }
.lang-switcher.open .chevron { transform: rotate(180deg); }
.lang-flag { font-size: 1.1rem; line-height: 1; }
.lang-code { font-weight: 600; letter-spacing: 0.02em; }
.lang-dropdown {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  background: var(--rlx-surface); border: 1px solid var(--rlx-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 160px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all var(--duration-normal) var(--ease-default);
  z-index: 100;
}
.lang-switcher.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown .dropdown-item.active { background: var(--rlx-surface-muted); font-weight: 600; }
.lang-dropdown .lang-flag { margin-right: 0.25rem; }

/* ── 5. Cards ─────────────────────────────────────── */
.card {
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-border);
  border-radius: var(--radius-xl);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.06),
    0 3px 8px rgba(0, 0, 0, 0.03);
  padding: var(--space-xl);
}
.card--hover {
  transition: transform var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.card--flat { box-shadow: none; border-radius: var(--radius-md); }
.card--padded { padding: var(--space-2xl); }
.card--surface-muted { background: var(--rlx-bg-secondary); }
.card--note {
  border: 1px dashed var(--rlx-red);
  background: var(--rlx-red-light);
}

/* ── 6. Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-full);
  font: inherit; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; border: none;
  transition: all var(--duration-normal) var(--ease-default);
  white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--rlx-red); color: #fff; }
.btn-primary:hover:not(:disabled) {
  background: var(--rlx-red-hover);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(211,32,17,0.3);
}

.btn-secondary {
  background: var(--rlx-surface); color: var(--rlx-ink);
  border: 1px solid var(--rlx-border);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--rlx-red); color: var(--rlx-red); }

.btn-ghost { background: transparent; color: var(--rlx-text); }
.btn-ghost:hover:not(:disabled) { background: var(--rlx-surface-muted); color: var(--rlx-red); }

.btn-danger { background: var(--rlx-error); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #B91C1C; }

.btn-success { background: var(--rlx-success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #047857; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.625rem; border-radius: var(--radius-md); }

/* ── 7. Forms ─────────────────────────────────────── */
.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block; font-weight: 600; font-size: 0.8125rem;
  margin-bottom: var(--space-sm); color: var(--rlx-ink);
  letter-spacing: 0.01em;
}
.form-input {
  width: 100%; padding: 0.75rem 1rem;
  border: 1px solid var(--rlx-border); border-radius: var(--radius-md);
  font: inherit; font-size: 0.9375rem; color: var(--rlx-ink);
  background: var(--rlx-surface);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.form-input:focus {
  outline: none; border-color: var(--rlx-red);
  box-shadow: 0 0 0 3px var(--rlx-red-focus);
}
.form-input:disabled, .form-input[readonly] {
  background: var(--rlx-surface-muted); color: var(--rlx-muted); cursor: not-allowed;
}
.form-input--readonly {
  background: var(--rlx-surface-muted);
  border-color: var(--rlx-border);
}
.form-input::placeholder { color: var(--rlx-muted); }
.form-hint { font-size: 0.75rem; color: var(--rlx-muted); margin-top: 0.375rem; }
.form-error { font-size: 0.75rem; color: var(--rlx-error); margin-top: 0.375rem; }
.form-grid { display: flex; flex-direction: column; gap: 0; }
select.form-input { appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}

/* ── 8. Alerts / Toasts ───────────────────────────── */
.alert {
  padding: 0.875rem 1rem; border-radius: var(--radius-md);
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.875rem; line-height: 1.5;
}
.alert-success { background: var(--rlx-success-bg); color: #065F46; border: 1px solid var(--rlx-success-border); }
.alert-error   { background: var(--rlx-error-bg);   color: #991B1B; border: 1px solid var(--rlx-error-border); }
.alert-warning { background: var(--rlx-warning-bg); color: #92400E; border: 1px solid var(--rlx-warning-border); }
.alert-info    { background: var(--rlx-info-bg);    color: #1E40AF; border: 1px solid var(--rlx-info-border); }

/* Toast container */
.toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: var(--space-sm);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 0.875rem 1.25rem; border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.75rem;
  animation: toast-in var(--duration-slow) var(--ease-default);
  max-width: 380px;
}
.toast-success { background: #065F46; color: #fff; }
.toast-error   { background: #991B1B; color: #fff; }
.toast-info    { background: #1E40AF; color: #fff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast-out { animation: toast-out var(--duration-normal) var(--ease-default) forwards; }
@keyframes toast-out {
  to { opacity: 0; transform: translateX(100%); }
}

/* ── 9. Tabs ──────────────────────────────────────── */
.tab-nav {
  display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid #d1d5db; margin-bottom: var(--space-xl);
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 0.75rem 1.25rem; background: none; border: none;
  color: #6b7280; font: inherit; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.tab-btn:hover { color: #111111; }
.tab-btn.active { color: var(--rlx-red); border-bottom-color: var(--rlx-red); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in var(--duration-normal) var(--ease-default); }
.tab-content { animation: fade-in var(--duration-normal) var(--ease-default); }

/* ── 10. Stat Cards ───────────────────────────────── */
.stat { display: flex; flex-direction: column; gap: 0.375rem; }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--rlx-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--rlx-ink); }
.stat-change { font-size: 0.75rem; font-weight: 600; }
.stat-change.up { color: var(--rlx-success); }
.stat-change.down { color: var(--rlx-error); }

/* ── 11. Badges ───────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.75rem; border-radius: var(--radius-full);
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; white-space: nowrap;
}
.badge-success { background: var(--rlx-success-bg); color: var(--rlx-success); }
.badge-warning { background: var(--rlx-warning-bg); color: var(--rlx-warning); }
.badge-error   { background: var(--rlx-error-bg);   color: var(--rlx-error); }
.badge-info    { background: var(--rlx-info-bg);    color: var(--rlx-info); }
.badge-neutral { background: var(--rlx-surface-muted); color: var(--rlx-muted); }
.badge-red     { background: var(--rlx-red-light);  color: var(--rlx-red); }

/* ── 12. Tables ───────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 0.75rem 1rem;
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--rlx-muted);
  border-bottom: 2px solid var(--rlx-border);
}
.table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--rlx-border-light); font-size: 0.875rem; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--rlx-surface-muted); }

/* ── 13. Empty States ─────────────────────────────── */
.empty-state {
  text-align: center; padding: var(--space-2xl) var(--space-lg);
}
.empty-state-icon {
  font-size: 3rem; color: var(--rlx-border); margin-bottom: var(--space-md);
}
.empty-state-title { font-size: 1.125rem; font-weight: 600; color: var(--rlx-ink); margin-bottom: 0.375rem; }
.empty-state-text  { font-size: 0.875rem; color: var(--rlx-muted); margin-bottom: var(--space-lg); max-width: 320px; margin-left: auto; margin-right: auto; }

/* ── 14. Skeleton Loaders ─────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--rlx-surface-muted) 25%, var(--rlx-border-light) 50%, var(--rlx-surface-muted) 75%);
  background-size: 300% 100%; border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse { 0%{background-position:300% 0} 100%{background-position:-300% 0} }
.skeleton-text  { height: 0.875rem; margin-bottom: 0.5rem; }
.skeleton-text--w80 { width: 80%; }
.skeleton-text--w60 { width: 60%; }
.skeleton-title { height: 1.25rem; width: 50%; margin-bottom: 0.75rem; }
.skeleton-card  { height: 120px; border-radius: var(--radius-md); }
.skeleton-row   { height: 3.5rem; margin-bottom: 0.5rem; border-radius: var(--radius-sm); }

/* ── 15. Progress Bar ─────────────────────────────── */
.progress, .progress-track { height: 8px; background: var(--rlx-border-light); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar, .progress-fill { height: 100%; border-radius: var(--radius-full); transition: width var(--duration-slow) var(--ease-default); background: var(--rlx-success); }
.progress-bar-red, .progress-fill--danger { background: var(--rlx-error); }
.progress-bar-green  { background: var(--rlx-success); }
.progress-bar-yellow { background: var(--rlx-warning); }

/* ── 16. Modal ────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg);
  opacity: 0; visibility: hidden;
  transition: all var(--duration-normal) var(--ease-default);
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--rlx-surface); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.95); transition: transform var(--duration-normal) var(--ease-default);
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header {
  padding: var(--space-lg) var(--space-xl); border-bottom: 1px solid var(--rlx-border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.125rem; font-weight: 700; color: var(--rlx-ink); }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: none; background: none; cursor: pointer; font-size: 1.25rem; color: var(--rlx-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--duration-fast);
}
.modal-close:hover { background: var(--rlx-surface-muted); }
.modal-body { padding: var(--space-xl); }
.modal-footer {
  padding: var(--space-lg) var(--space-xl); border-top: 1px solid var(--rlx-border);
  display: flex; justify-content: flex-end; gap: var(--space-sm);
}

/* ── 17. Spinners ─────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
.spinner-dark { border-color: var(--rlx-border); border-top-color: var(--rlx-red); }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 18. Dividers & Separators ────────────────────── */
.divider { height: 1px; background: var(--rlx-border); margin: var(--space-lg) 0; }
.section-title {
  font-size: 1.25rem; font-weight: 700; color: #111111;
  margin-bottom: var(--space-lg);
}
.card .section-title,
.modal .section-title {
  color: var(--rlx-ink);
}
.page-title {
  font-size: 1.75rem; font-weight: 700; color: #111111;
  margin-bottom: var(--space-lg);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* ── 19. Utility Classes ──────────────────────────── */
.hidden     { display: none !important; }
.sr-only    { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--rlx-muted); font-size: 0.875rem; }
.text-sm     { font-size: 0.8125rem; }
.text-xs     { font-size: 0.75rem; }
.text-red    { color: var(--rlx-red); }
.text-green  { color: var(--rlx-success); }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.rounded-full { border-radius: var(--radius-full); }
.w-full { width: 100%; }
.ml-sm { margin-left: var(--space-sm); }
.pre-wrap { white-space: pre-wrap; }

/* ── 20. Animations ───────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in var(--duration-normal) var(--ease-default); }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slide-up var(--duration-slow) var(--ease-default); }

/* ── 21. List Items (orders, eSIMs, tickets) ──────── */
.list-item {
  padding: var(--space-lg); border-bottom: 1px solid var(--rlx-border-light);
  transition: background var(--duration-fast);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--rlx-surface-muted); }
.list-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-md); }
.list-item-title { font-weight: 600; color: var(--rlx-ink); }
.list-item-meta { font-size: 0.8125rem; color: var(--rlx-muted); margin-top: 0.25rem; }
.list-item-amount { font-size: 1.375rem; font-weight: 700; color: var(--rlx-red); }
.mini-list-item {
  padding: var(--space-sm) 0;
  cursor: pointer;
}

.metric-skeleton {
  display: inline-block;
  height: 1.75rem;
  border-radius: var(--radius-sm);
}
.metric-skeleton--wallet { width: 80px; }
.metric-skeleton--default { width: 44px; }

.icon-chip {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-chip--red {
  background: var(--rlx-red-light);
  color: var(--rlx-red);
}
.icon-chip--success {
  background: var(--rlx-success-bg);
  color: var(--rlx-success);
}
.icon-chip--info {
  background: var(--rlx-info-bg);
  color: var(--rlx-info);
}
.icon-chip i { font-size: 1.25rem; }

.item-main {
  flex: 1;
  min-width: 0;
}
.item-title-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rlx-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-meta {
  flex: 1;
  min-width: 200px;
}
.profile-email {
  font-size: 1.125rem;
  color: var(--rlx-ink);
}

.wallet-balances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.balance-card {
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  background:
    radial-gradient(circle at 82% -12%, rgba(211, 32, 17, 0.28), transparent 45%),
    linear-gradient(135deg, #0b0b11 0%, #171921 100%);
}
.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(211, 32, 17, 0.92);
}
.balance-card--default::before { background: rgba(211, 32, 17, 0.92); }
.balance-card--pln::before { background: rgba(211, 32, 17, 0.92); }
.balance-card--eur::before { background: rgba(156, 163, 175, 0.95); }
.balance-card--usd::before { background: rgba(16, 185, 129, 0.95); }
.balance-card--gbp::before { background: rgba(245, 158, 11, 0.95); }
.balance-card__label {
  opacity: 0.72;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.375rem;
}
.balance-card__value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.balance-card__meta {
  opacity: 0.58;
  margin-top: var(--space-sm);
}
.balance-card__frozen {
  color: #ff9a9a;
  margin-top: var(--space-sm);
}

.tx-amount {
  font-size: 1.125rem;
  font-weight: 700;
}
.tx-amount--credit { color: var(--rlx-success); }
.tx-amount--debit { color: var(--rlx-error); }

.detail-table {
  width: 100%;
  font-size: 0.875rem;
}
.detail-table td {
  padding: 0.25rem 0;
  vertical-align: top;
}
.detail-table td:last-child {
  word-break: break-word;
}

.ticket-body {
  background: var(--rlx-bg-secondary);
  white-space: pre-wrap;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.ticket-reply {
  background: var(--rlx-info-bg);
  white-space: pre-wrap;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.qr-preview {
  max-width: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--rlx-border);
}

.step-card {
  padding: var(--space-lg);
  text-align: center;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--rlx-ink);
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--rlx-muted);
  cursor: pointer;
  user-select: none;
}
.auth-remember input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--rlx-accent);
  cursor: pointer;
}

.auth-legal {
  margin-top: var(--space-lg);
}

/* ── 22. Radio option cards ────────────────────────── */
.radio-option {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  padding: var(--space-md); border: 2px solid var(--rlx-border);
  border-radius: var(--radius); margin-bottom: var(--space-sm);
  cursor: pointer; transition: border-color var(--duration-fast), background var(--duration-fast);
}
.radio-option:hover { border-color: var(--rlx-red-light, #e88); background: var(--rlx-surface-muted); }
.radio-option:has(input:checked) { border-color: var(--rlx-red); background: rgba(211,32,17,0.04); }
.radio-option.disabled { opacity: 0.5; cursor: not-allowed; }
.radio-option input[type="radio"] { margin-top: 0.25rem; accent-color: var(--rlx-red); }

/* ── 23. Responsive helpers ───────────────────────── */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .navbar { padding: 0.5rem 0.75rem; }
  .navbar-inner { padding: 0 0.25rem; }
  .logo-img--nav {
    height: 34px;
    max-height: 34px;
    padding-bottom: 0;
  }
  .container { padding: var(--space-md); }
  .auth-wrap { margin: var(--space-lg) auto; }
  .card { padding: var(--space-lg); }
  .card--padded { padding: var(--space-xl); }
  .tab-btn { padding: 0.625rem 1rem; font-size: 0.8125rem; }
  .stat-value { font-size: 1.375rem; }
  .list-item-amount { font-size: 1.125rem; }
  .section-head { align-items: stretch; flex-direction: column; }
  .section-head .btn { width: 100%; }
  .list-item-header { flex-direction: column; align-items: flex-start; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .modal-header, .modal-body, .modal-footer {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
  .profile-header { align-items: flex-start; }
  .profile-meta { min-width: 0; }
  .balance-card__value { font-size: 1.75rem; }
  .wallet-balances { grid-template-columns: 1fr; }
  .auth-links { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 641px) {
  .hide-desktop { display: none !important; }
}
