:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(20, 20, 20, 0.75);
  --accent: #b22222;
  --accent-dark: #8b0000;
  --accent-hover: #dc2626;
  --accent-muted: rgba(178, 34, 34, 0.15);
  --accent-glow: rgba(178, 34, 34, 0.35);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.12);
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 0, 0, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(178, 34, 34, 0.08), transparent);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

.container { width: min(1140px, 92%); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 10, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  transition: opacity 0.2s;
}

.logo:hover { color: var(--text-primary); opacity: 0.92; }

.logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(178, 34, 34, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 14px rgba(178, 34, 34, 0.5));
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 0.15rem;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  white-space: nowrap;
}

.brand-nick {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-ebank {
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fca5a5, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-mark--default .brand-nick { font-size: 1.2rem; }
.brand-mark--default .brand-ebank { font-size: 1.2rem; }

.brand-mark--hero {
  flex-wrap: wrap;
  gap: 0;
  align-items: baseline;
}

.hero-brand {
  margin-bottom: 0.5rem;
  line-height: 1.05;
  font-size: inherit;
  font-weight: inherit;
}

.hero-brand .brand-mark--hero .brand-nick {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
  background-clip: unset;
}

.hero-brand .brand-mark--hero .brand-ebank {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fca5a5, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-tagline {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.logo-footer .logo-icon { width: 36px; height: 36px; }
.logo-footer .brand-mark--default .brand-nick,
.logo-footer .brand-mark--default .brand-ebank { font-size: 1.05rem; }
.logo-footer .logo-tagline { font-size: 0.58rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a,
.nav-links button {
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.925rem;
  font-weight: 500;
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--accent-muted);
}

.nav-user {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 0.5rem;
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Hero */
.hero { padding: 5rem 0 4rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-muted);
  border: 1px solid rgba(178, 34, 34, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-slogan {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual { position: relative; }

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(178, 34, 34, 0.06);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(178, 34, 34, 0.35);
  color: #fff;
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--accent-dark);
  color: #fff;
}

.btn-danger:hover {
  background: var(--accent);
  color: #fff;
}

.btn-warning {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.btn-success {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.admin-user-actions-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: center;
  margin: 0;
}

.admin-user-actions-form .btn-sm {
  flex: 0 0 auto;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* Sections */
section { padding: 4rem 0; }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.section-header p { color: var(--text-secondary); }

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s;
}

/* Landing feature cards — bez backdrop-filter (Chrome hover+scroll compositing bug) */
.cards-grid > .card {
  background: #141414;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (hover: hover) and (pointer: fine) {
  .cards-grid > .card:hover {
    border-color: rgba(178, 34, 34, 0.45);
  }
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-muted);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-secondary); font-size: 0.925rem; }

/* Package / rate cards */
.packages-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.package-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.packages-cards-grid > .package-card {
  background: #141414;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (hover: hover) and (pointer: fine) {
  .packages-cards-grid > .package-card:hover {
    border-color: rgba(178, 34, 34, 0.45);
  }
}

.package-card.featured {
  border-color: rgba(178, 34, 34, 0.45);
  background: linear-gradient(160deg, rgba(139, 0, 0, 0.1), var(--bg-card));
}

.package-card-tier {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.package-card-badge {
  font-size: 0.65rem;
  background: var(--accent);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.package-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.package-card-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.package-card-features {
  list-style: none;
  flex: 1;
}

.package-card-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
}

.offer-check { color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  isolation: isolate;
}

.review-stars { color: var(--warning); margin-bottom: 1rem; font-size: 0.95rem; }

.review-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.review-author { display: flex; align-items: center; gap: 0.85rem; }

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.review-name { font-weight: 600; font-size: 0.95rem; }
.review-role { font-size: 0.8rem; color: var(--text-muted); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.18), rgba(178, 34, 34, 0.1));
  border: 1px solid rgba(178, 34, 34, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
}

.cta-banner h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }

.cta-banner p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 520px;
  margin-inline: auto;
}

/* Trust bar */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.trust-item { text-align: center; }
.trust-item .trust-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.trust-item strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.trust-item span { font-size: 0.8rem; color: var(--text-muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
  box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary);
  transition: background-color 9999s ease-out 0s;
}

.form-group.field-error input:-webkit-autofill,
.form-group.field-error input:-webkit-autofill:hover,
.form-group.field-error input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(139, 0, 0, 0.08) inset !important;
  box-shadow: 0 0 0 1000px rgba(139, 0, 0, 0.08) inset !important;
}

.form-group input:autofill {
  box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary);
}

/* Password visibility toggle */
.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-muted);
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

/* Hidden decoy fields for autofill suppression */
.autofill-decoy {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.form-group.field-error input,
.form-group.field-error select {
  border-color: var(--accent);
  background: rgba(139, 0, 0, 0.08);
  box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.25);
}

.form-group.field-error label {
  color: #fca5a5;
}

.field-error-msg {
  display: block;
  color: #fca5a5;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.field-error-card {
  border-color: rgba(178, 34, 34, 0.45);
}

.auth-container {
  max-width: 440px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(8px);
}

.form-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(139, 0, 0, 0.2);
  border: 1px solid var(--accent-dark);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

/* App pages — dashboard, exchange, admin */
.app-page { padding: 2.5rem 0 4rem; }

.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.balance-card:hover { border-color: rgba(178, 34, 34, 0.3); }

.balance-card .currency {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.balance-card .amount {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.balance-card.eur .amount { color: var(--text-primary); }
.balance-card.btc .amount { color: #f7931a; }
.balance-card.eth .amount { color: #627eea; }
.balance-card.usdt .amount { color: #26a17b; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.stat-value-sm {
  font-size: 1rem !important;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

tr:hover { background: rgba(255, 255, 255, 0.02); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-buy { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-sell { background: rgba(178, 34, 34, 0.2); color: var(--accent); }
.badge-send { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-receive { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
.badge-admin { background: rgba(178, 34, 34, 0.3); color: #fca5a5; }
.badge-user { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); }
.badge-active { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-locked { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-inactive { background: rgba(139, 0, 0, 0.2); color: #fca5a5; }

.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.rate-card .crypto-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }

.rate-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}

.rate-row .buy { color: var(--success); }
.rate-row .sell { color: var(--accent); }

.payment-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.payment-method .info { display: flex; align-items: center; gap: 0.75rem; }

.payment-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-muted);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 0.925rem;
  font-family: inherit;
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.mono-block {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.8;
  overflow-x: auto;
}

.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-75 { margin-bottom: 0.75rem; }

/* Utilities — zamenjuju ponavljane inline stilove */
.text-muted { color: var(--text-muted); }
.text-muted-sm { color: var(--text-muted); font-size: 0.8rem; }
.btn-block { width: 100%; box-sizing: border-box; }
.form-inline { margin: 0; }
.alert-flush { margin: 0 0 1rem; }
.card-title { margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.35; }
.card-title-tight { margin-bottom: 0.75rem; }
.card-title-sm {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}
.card-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.app-section-header {
  margin-bottom: 2rem;
  text-align: left;
  max-width: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 10, 10, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    backdrop-filter: blur(16px);
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }

  .nav-links a,
  .nav-links button {
    width: 100%;
    text-align: left;
  }

  .nav-user {
    padding: 0.5rem 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-inner { position: relative; flex-wrap: wrap; }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .card-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .card-toolbar .admin-search,
  .card-toolbar .partner-search {
    max-width: none;
    width: 100%;
  }

  .tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .tab {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .cmd-shell {
    height: min(70vh, calc(100vh - 280px));
    min-height: 320px;
  }
}

@media (max-width: 600px) {
  .hero { padding: 3rem 0 2.5rem; }
  section { padding: 2.5rem 0; }
  .hero-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-bar { grid-template-columns: 1fr; }

  .container {
    width: min(1140px, 94%);
  }

  .logo-tagline {
    letter-spacing: 0.12em;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .packages-cards-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .partner-picker-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-user-actions-form {
    flex-wrap: wrap;
  }

  .form-card {
    padding: 1.25rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 2rem 1.25rem;
  }

  .legal-section {
    padding: 2.5rem 0;
  }
}

/* Admin panel */
.admin-page {
  max-width: 100%;
}

.admin-page .page-subtitle { margin-bottom: 0; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  max-width: none;
  margin-bottom: 1.5rem;
}

.admin-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.65rem;
  }
}

.admin-tab {
  padding: 0.5rem 1rem;
  border-radius: 8px 8px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.admin-tab:hover { color: var(--text-primary); background: var(--accent-muted); }
.admin-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); background: var(--accent-muted); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }

  .payment-method {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .payment-method .info {
    min-width: 0;
  }

  .payment-method form {
    align-self: flex-start;
  }

  .partner-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .partner-card-account {
    word-break: break-all;
  }

  .balance-card .amount {
    font-size: 1.25rem;
    word-break: break-word;
  }

  .legal-card {
    padding: 1.25rem 1.25rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .auth-container {
    padding-left: 0;
    padding-right: 0;
  }

  .page-hero {
    padding: 2.5rem 0 1.75rem;
  }

  .app-page {
    padding: 1.75rem 0 3rem;
  }
}

.warnings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.warning-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

a.warning-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

a.warning-card:hover {
  border-color: rgba(178, 34, 34, 0.55);
  background: rgba(178, 34, 34, 0.08);
}

a.warning-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#audit-critical,
#log-error-panel {
  scroll-margin-top: 6rem;
}

.warning-card p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.warning-icon { font-size: 1.4rem; }

.warning-critical { border-color: rgba(220, 38, 38, 0.5); background: rgba(139, 0, 0, 0.12); }
.warning-warning { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.warning-info { border-color: rgba(148, 163, 184, 0.25); }
.warning-ok { border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.08); }

.log-panel { display: flex; flex-direction: column; }
.log-viewer {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.log-line { padding: 0.3rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); word-break: break-word; }
.log-line.log-err { color: #fca5a5; }
.log-line.log-info { color: var(--text-secondary); }
.log-ts { color: var(--text-muted); margin-right: 0.5rem; }
.log-empty { color: var(--text-muted); font-size: 0.85rem; padding: 1rem; }

.log-files-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.log-file-chip {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

a.log-file-chip:hover {
  color: var(--accent);
  border-color: rgba(178, 34, 34, 0.45);
  background: var(--accent-muted);
}

.sql-editor {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #7dd3fc;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}

.sql-editor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.sql-table-list { display: flex; flex-direction: column; gap: 0.5rem; }

.sql-table-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s;
}

.sql-table-btn span { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.sql-table-btn:hover { border-color: var(--accent); background: var(--accent-muted); }

.admin-sql-layout { align-items: start; }

.admin-search-wrap { margin-bottom: 1rem; }
.admin-search {
  width: 100%;
  max-width: 420px;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}
.admin-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.admin-search-hidden { display: none !important; }

.admin-search-form .admin-search { max-width: 100%; }

.admin-sql-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .admin-sql-grid { grid-template-columns: 1fr; }
}

/* CMD-style SQL shell */
.cmd-shell {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid #222222;
  background: #000000;
  height: calc(100vh - 240px);
  min-height: 420px;
  max-height: calc(100vh - 200px);
}

.cmd-shell-lg { grid-column: 1; }

.card.cmd-shell {
  padding: 0;
  background: #000000;
  backdrop-filter: none;
}

.card.cmd-shell:hover {
  transform: none;
  box-shadow: none;
  border-color: #222222;
}

.cmd-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 1rem;
  background: #000000;
  font-family: Consolas, 'Courier New', var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #cccccc;
  height: 100%;
  min-height: 0;
}

#cmd-history {
  flex: 0 0 auto;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
  margin: 0;
  border: none;
  padding: 0;
  background: #000000;
  font-family: Consolas, 'Courier New', var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.cmd-input-line {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 1.35em;
  background: #000000;
  font-family: Consolas, 'Courier New', var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.cmd-block { margin-bottom: 0.35rem; }

.cmd-line {
  display: flex;
  align-items: flex-start;
  white-space: pre-wrap;
  word-break: break-word;
}

.cmd-prompt {
  color: #cccccc;
  flex-shrink: 0;
  user-select: none;
  white-space: pre;
}

.cmd-echo { color: #cccccc; }

.cmd-out-text {
  margin: 0;
  padding: 0 0 0.35rem 0;
  white-space: pre;
  overflow-x: auto;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.3;
  color: #cccccc;
  background: transparent;
  border: none;
}

.cmd-out-text.cmd-err { color: #f87171; white-space: pre-wrap; }

.cmd-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #cccccc;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  outline: none;
  padding: 0;
  margin: 0;
}

.cmd-sidebar {
  align-self: stretch;
  overflow: visible;
}

/* Database schema panel */
.db-schema-panel { scroll-margin-top: 5rem; }

.db-schema-intro {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.db-schema-diagram-wrap {
  width: 100%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  border: 1px solid rgba(178, 34, 34, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(178, 34, 34, 0.08), transparent 55%),
    #080808;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.db-schema-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

.db-schema-canvas {
  fill: transparent;
}

.db-schema-grid-dot {
  fill: rgba(148, 163, 184, 0.1);
}

.db-schema-line {
  transition: opacity 0.2s;
}

.db-schema-arrow-head {
  fill: #60a5fa;
}

.db-schema-node-bg {
  transition: stroke 0.2s, filter 0.2s;
}

.db-schema-node-divider {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.db-schema-node-title {
  fill: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.db-schema-node-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.db-schema-node-meta-pk { fill: #fde68a; }
.db-schema-node-meta-fk { fill: #93c5fd; }
.db-schema-node-meta-count { fill: #64748b; }

.db-schema-meta-dot-pk { fill: #eab308; }
.db-schema-meta-dot-fk { fill: #60a5fa; }
.db-schema-meta-dot-muted { fill: #475569; }

.admin-table-wrap {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.admin-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
}

/* Jedan horizontalni scroll — ne duplirati sa .table-wrap na istom elementu */
.admin-table-wrap.admin-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
}

.admin-table-scroll > .admin-table {
  width: max-content;
  min-width: 100%;
}

.admin-table {
  table-layout: auto;
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-secondary);
}

.admin-table tbody tr {
  display: table-row;
}

.admin-table th,
.admin-table td {
  display: table-cell;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.admin-table td.admin-user-actions,
.admin-table th:last-child {
  white-space: normal;
}

.admin-cert-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.admin-cert-subject {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  word-break: break-all;
  white-space: normal;
  max-width: 22rem;
}

.admin-empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem !important;
  white-space: normal !important;
}

.admin-cell-details {
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  max-width: 28rem;
  min-width: 8rem;
}

.admin-cell-date {
  white-space: nowrap;
  font-size: 0.78rem;
}

.admin-cell-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
}

/* Korisnici — horizontalni scroll; kolone ne smeju da se preklapaju */
.admin-table-users {
  min-width: 1080px;
  table-layout: auto;
}

.admin-table-users th,
.admin-table-users td {
  overflow: visible;
  white-space: normal;
  vertical-align: middle;
}

.admin-table-users th:nth-child(1),
.admin-table-users td:nth-child(1) {
  width: 3rem;
  white-space: nowrap;
}

.admin-table-users th:nth-child(4),
.admin-table-users td:nth-child(4),
.admin-table-users th:nth-child(8),
.admin-table-users td:nth-child(8) {
  text-align: center;
  white-space: nowrap;
}

.admin-col-text {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.admin-col-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.admin-table-users th:nth-child(2),
.admin-table-users td:nth-child(2) {
  min-width: 7rem;
  max-width: 10rem;
}

.admin-table-users th:nth-child(3),
.admin-table-users td:nth-child(3) {
  min-width: 11rem;
  max-width: 16rem;
}

.admin-table-users th:nth-child(5),
.admin-table-users td:nth-child(5) {
  min-width: 8.5rem;
  max-width: 11rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.admin-table-users th:nth-child(6),
.admin-table-users td:nth-child(6),
.admin-table-users th:nth-child(7),
.admin-table-users td:nth-child(7) {
  min-width: 4.75rem;
  white-space: nowrap;
  text-align: right;
}

.admin-table-users th:nth-child(9),
.admin-table-users td:nth-child(9) {
  min-width: 11.5rem;
  white-space: nowrap;
}

.admin-table-users .admin-user-actions-form {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.admin-table-audit,
.admin-table-audit-compact {
  min-width: 760px;
}

.admin-table-audit-compact {
  min-width: 520px;
}

.admin-table-tx {
  min-width: 880px;
}

.admin-table-certs { min-width: 640px; }
.admin-table-audit-cert { min-width: 720px; }

.admin-table-certs .admin-user-actions-form .btn-sm,
.admin-table-audit-cert .admin-cert-subject {
  font-size: 0.72rem;
}

.db-schema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.db-schema-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.db-schema-table-name {
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--accent-muted);
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.db-schema-columns {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.db-schema-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.db-schema-col:last-child { border-bottom: none; }

.db-schema-col-name {
  font-family: var(--font-mono);
  font-weight: 500;
  min-width: 6rem;
}

.db-schema-col-type {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.db-schema-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.db-schema-badge-pk {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.db-schema-badge-fk {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-size: 0.6rem;
}

.db-schema-badge-nn {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.db-schema-relations-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.db-schema-rel-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.25rem;
  border-radius: 999px;
  border: 1px solid #38bdf8;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.db-schema-relations {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.db-schema-rel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.db-schema-rel-from { color: #60a5fa; }
.db-schema-rel-to { color: #eab308; }
.db-schema-rel-arrow { color: var(--text-muted); }
.db-schema-rel-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Auth extras */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  color: #1f2937;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-weight: 600;
}
.btn-google:hover {
  background: #f8fafc;
  color: #111827;
}

/* Partner directory & payment picker */
.card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.card-toolbar h3 { margin: 0; }

.partner-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.partner-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  transition: border-color 0.2s;
}
.partner-card:hover { border-color: rgba(178, 34, 34, 0.35); }

.partner-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.partner-card-alias { font-size: 1rem; color: var(--text-primary); }
.partner-card-account { font-size: 0.8rem; }
.partner-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.partner-card-note { font-style: italic; }
.partner-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.partner-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}
.partner-picker-card {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: inherit;
  font: inherit;
}
.partner-picker-card:hover,
.partner-picker-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(178, 34, 34, 0.25);
}
.partner-picker-alias {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.partner-picker-account {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.partner-picker-user {
  display: block;
  font-size: 0.75rem;
  color: #60a5fa;
  margin-top: 0.2rem;
}
.partner-picker-note {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.partner-preview {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px dashed rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.08);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.partner-preview.hidden { display: none; }
.partner-preview strong { display: block; margin-bottom: 0.15rem; }
.partner-preview span { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem; word-break: break-all; }

/* Legal / compliance */
html {
  scroll-padding-top: 5.5rem;
}

.legal-anchor {
  scroll-margin-top: 5.5rem;
}

.legal-section {
  padding: 4rem 0;
  scroll-margin-top: 5.5rem;
}

.legal-section .section-title {
  margin-bottom: 1.5rem;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  backdrop-filter: blur(8px);
  isolation: isolate;
}

.legal-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card strong {
  color: var(--text-primary);
}

.kyc-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.kyc-notice strong {
  color: var(--warning);
}

.footer-compliance {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 220px;
}

/* Admin pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1 1 12rem;
  min-width: 0;
  text-align: center;
  line-height: 1.4;
  word-break: break-word;
}

.pagination-disabled {
  opacity: 0.45;
  pointer-events: none;
}

[data-admin-partial].admin-partial-loading {
  pointer-events: none;
}

[data-admin-partial] tbody.admin-partial-tbody-loading {
  opacity: 0.45;
  transition: opacity 0.12s ease;
}

/* Admin tables — uvek redovi; na uskom ekranu samo manji padding + scroll */
@media (max-width: 640px) {
  .admin-table th,
  .admin-table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  .admin-table thead th {
    position: static;
  }

  .admin-user-actions-form {
    flex-wrap: wrap;
  }
}
