/* ============================================
   ClothingV Player UCP — narco.city style
   ============================================ */

/* --- Design Tokens --- */
:root {
  --accent-r: 48;
  --accent-g: 128;
  --accent-b: 255;
  --accent: rgb(var(--accent-r), var(--accent-g), var(--accent-b));

  --bg-root: #0a0a0a;
  --bg-deeper: #050505;
  --panel-bg: rgba(255,255,255,.035);
  --panel-bg-hover: rgba(255,255,255,.055);

  --border: rgba(255,255,255,.07);
  --border-subtle: rgba(255,255,255,.04);

  --text-primary: rgba(255,255,255,.90);
  --text-secondary: rgba(255,255,255,.50);
  --text-muted: rgba(255,255,255,.30);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --sidebar-width: 220px;
  --topbar-height: 48px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button, a { font: inherit; color: inherit; border: none; background: none; cursor: pointer; text-decoration: none; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-root);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.14); }

/* ========================================
   SHELL
   ======================================== */
.ucp-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  max-height: 100vh;
}

/* ========================================
   SIDEBAR
   ======================================== */
.ucp-sidebar {
  background: var(--bg-deeper);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Brand */
.ucp-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.ucp-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ucp-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ucp-brand-name {
  font-family: 'Quantico', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User Card */
.ucp-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.ucp-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .12);
  border: 2px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), .25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quantico', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.ucp-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ucp-level-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .12);
  color: var(--accent);
}

/* Navigation */
.ucp-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ucp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s ease;
  border-left: 3px solid transparent;
  margin-left: -3px;
}
.ucp-nav-item:hover {
  background: rgba(255,255,255,.04);
  color: var(--text-primary);
}
.ucp-nav-item.active {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .06);
  color: var(--text-primary);
  border-left-color: var(--accent);
}
.ucp-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .5;
}
.ucp-nav-item.active .ucp-nav-icon { opacity: 1; color: var(--accent); }
.ucp-nav-item:hover .ucp-nav-icon { opacity: .8; }
.ucp-nav-icon svg {
  width: 100%;
  height: 100%;
}
.ucp-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Footer */
.ucp-sidebar-footer {
  margin-top: auto;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ucp-footer-link {
  font-size: 11px;
  color: var(--text-muted);
  transition: color .2s ease;
}
.ucp-footer-link:hover { color: var(--text-secondary); }
.ucp-footer-copy {
  font-size: 10px;
  color: rgba(255,255,255,.18);
}

/* ========================================
   MAIN AREA
   ======================================== */
.ucp-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-root);
  overflow: hidden;
}

/* ========================================
   TOPBAR
   ======================================== */
.ucp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deeper);
  flex-shrink: 0;
}
.ucp-tabs {
  display: flex;
  gap: 0;
  height: 100%;
}
.ucp-tab {
  position: relative;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  height: 100%;
  display: flex;
  align-items: center;
  transition: color .2s ease;
}
.ucp-tab:hover {
  color: var(--text-secondary);
}
.ucp-tab.active {
  color: var(--text-primary);
}
.ucp-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.ucp-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ucp-notif {
  position: relative;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s ease;
}
.ucp-notif:hover { color: var(--text-primary); }
.ucp-notif svg { width: 100%; height: 100%; }
.ucp-notif-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid var(--bg-deeper);
}

/* ========================================
   CONTENT
   ======================================== */
.ucp-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
}
.ucp-content--hidden {
  display: none !important;
}

/* ========================================
   DASHBOARD GRID
   ======================================== */
.ucp-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ========================================
   TILES (shared)
   ======================================== */
.ucp-tile {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s ease;
}
.ucp-tile:hover {
  border-color: rgba(255,255,255,.10);
}
.ucp-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.ucp-tile-title {
  font-family: 'Quantico', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .02em;
}
.ucp-tile-count {
  font-family: 'Quantico', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .10);
  padding: 2px 8px;
  border-radius: 8px;
}
.ucp-tile-body {
  padding: 16px 18px;
}

/* Badges on tiles */
.ucp-tile-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}
.ucp-tile-badge--live {
  background: rgba(239,68,68,.12);
  color: #ef4444;
  animation: ucpPulse 2s ease-in-out infinite;
}
.ucp-tile-badge--count {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .10);
  color: var(--accent);
}

@keyframes ucpPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ========================================
   TILE: Statistiken
   ======================================== */
.ucp-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.ucp-stat-row:last-child { border-bottom: none; }
.ucp-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}
.ucp-stat-value {
  font-family: 'Quantico', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.ucp-stat-value--warn {
  color: #ef4444;
}

/* XP Bar */
.ucp-xp-bar-wrap {
  padding: 8px 0 4px;
}
.ucp-xp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.ucp-xp-pct {
  font-family: 'Quantico', sans-serif;
  font-weight: 700;
  color: var(--accent);
}
.ucp-xp-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 2px;
  overflow: hidden;
}
.ucp-xp-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ========================================
   TILE: Fahrzeuge
   ======================================== */
.ucp-vehicle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.ucp-vehicle-item:last-child { border-bottom: none; }
.ucp-vehicle-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ucp-vehicle-icon svg {
  width: 18px;
  height: 18px;
}
.ucp-vehicle-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ucp-vehicle-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ucp-vehicle-plate {
  font-size: 10px;
  font-family: 'Quantico', sans-serif;
  color: var(--text-muted);
  letter-spacing: .04em;
}

/* ========================================
   TILE: Finanzen
   ======================================== */
.ucp-finance-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.ucp-finance-row:last-child { border-bottom: none; }
.ucp-finance-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ucp-finance-icon svg {
  width: 18px;
  height: 18px;
}
.ucp-finance-icon--cash {
  background: rgba(34,197,94,.10);
  color: #22c55e;
}
.ucp-finance-icon--bank {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .10);
  color: var(--accent);
}
.ucp-finance-detail {
  display: flex;
  flex-direction: column;
}
.ucp-finance-label {
  font-size: 11px;
  color: var(--text-muted);
}
.ucp-finance-amount {
  font-family: 'Quantico', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.ucp-finance-amount--accent {
  color: var(--accent);
}

/* ========================================
   TILE: Gangwar
   ======================================== */
.ucp-gangwar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.ucp-gangwar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,.4);
  animation: ucpPulse 2s ease-in-out infinite;
}
.ucp-gangwar-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.ucp-gangwar-team {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ucp-gangwar-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.ucp-gangwar-team-score {
  font-family: 'Quantico', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.ucp-gangwar-vs {
  font-family: 'Quantico', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .1em;
}
.ucp-gangwar-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.ucp-gangwar-timer svg {
  color: var(--text-muted);
}

/* ========================================
   TILE: Freunde einladen
   ======================================== */
.ucp-invite-code-wrap {
  margin-bottom: 16px;
}
.ucp-invite-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.ucp-invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ucp-invite-code code {
  font-family: 'Quantico', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .06em;
}
.ucp-invite-copy {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color .2s ease;
  padding: 0;
}
.ucp-invite-copy:hover { color: var(--text-primary); }
.ucp-invite-copy svg { width: 100%; height: 100%; }
.ucp-invite-stats {
  display: flex;
  gap: 0;
}
.ucp-invite-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  border-right: 1px solid rgba(255,255,255,.04);
}
.ucp-invite-stat:last-child { border-right: none; }
.ucp-invite-stat-num {
  font-family: 'Quantico', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.ucp-invite-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ========================================
   TILE: Live Streams
   ======================================== */
.ucp-stream-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ucp-stream-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: background .2s ease;
}
.ucp-stream-thumb:hover {
  background: rgba(255,255,255,.06);
}
.ucp-stream-placeholder {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(255,255,255,.02);
}
.ucp-stream-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: .4;
}
.ucp-stream-live {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 6px;
  border-radius: 3px;
  background: #ef4444;
  color: #fff;
}
.ucp-stream-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}
.ucp-stream-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.ucp-stream-viewers {
  font-size: 10px;
  color: var(--text-muted);
}

/* ========================================
   PROFILE PAGE
   ======================================== */
.ucp-profile {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sub-tabs */
.ucp-subtabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.ucp-subtab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color .2s ease;
}
.ucp-subtab:hover { color: var(--text-secondary); }
.ucp-subtab.active { color: var(--text-primary); }
.ucp-subtab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* Profile Header */
.ucp-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.ucp-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .12);
  border: 2px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), .25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quantico', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.ucp-profile-info {
  flex: 1;
}
.ucp-profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.ucp-profile-name {
  font-family: 'Quantico', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.ucp-level-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), .12);
  color: var(--accent);
  letter-spacing: .02em;
}
.ucp-profile-id {
  font-size: 12px;
  color: var(--text-muted);
}
.ucp-profile-money {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.ucp-profile-money-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.ucp-profile-money-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ucp-profile-money-val {
  font-family: 'Quantico', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.ucp-profile-money-val--accent {
  color: var(--accent);
}

/* Profile Grid */
.ucp-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Faction History */
.ucp-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.ucp-history-item:last-child { border-bottom: none; }
.ucp-history-faction {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.ucp-history-date {
  font-size: 11px;
  color: var(--text-muted);
}
