/* ============================================================
   MetaSense — icons.css
   Custom icon system: pure CSS + inline SVG data URIs
   No external icon font dependencies
   ============================================================ */

/* ---- Base icon element ---- */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  font-size: inherit;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* ---- Sized variants ---- */
.icon-xs  { font-size: 12px; }
.icon-sm  { font-size: 14px; }
.icon-md  { font-size: 18px; }
.icon-lg  { font-size: 22px; }
.icon-xl  { font-size: 28px; }
.icon-2xl { font-size: 36px; }

/* ---- Color variants ---- */
.icon-white  { color: #ffffff; }
.icon-muted  { color: var(--muted); }
.icon-green  { color: var(--green); }
.icon-red    { color: var(--red); }
.icon-gold   { color: var(--gold); }
.icon-blue   { color: #3b82f6; }
.icon-purple { color: #8b5cf6; }

/* ============================================================
   ROLE BADGE SYSTEM
   ============================================================ */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 6px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.role-badge .role-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Member */
.role-member {
  background: rgba(148,163,184,0.10);
  color: #94a3b8;
  border-color: rgba(148,163,184,0.20);
}
.role-member .role-icon {
  background: rgba(148,163,184,0.20);
}

/* Customer */
.role-customer {
  background: rgba(34,197,94,0.08);
  color: #4ade80;
  border-color: rgba(34,197,94,0.20);
}
.role-customer .role-icon {
  background: rgba(34,197,94,0.15);
}

/* Premium */
.role-premium {
  background: rgba(16,185,129,0.10);
  color: #10b981;
  border-color: rgba(16,185,129,0.25);
}
.role-premium .role-icon {
  background: rgba(16,185,129,0.18);
}

/* Staff */
.role-staff {
  background: rgba(59,130,246,0.10);
  color: #60a5fa;
  border-color: rgba(59,130,246,0.25);
}
.role-staff .role-icon {
  background: rgba(59,130,246,0.18);
}

/* Moderator */
.role-moderator {
  background: rgba(139,92,246,0.10);
  color: #a78bfa;
  border-color: rgba(139,92,246,0.25);
}
.role-moderator .role-icon {
  background: rgba(139,92,246,0.18);
}

/* Admin */
.role-admin {
  background: rgba(239,68,68,0.10);
  color: #f87171;
  border-color: rgba(239,68,68,0.25);
}
.role-admin .role-icon {
  background: rgba(239,68,68,0.18);
}

/* VIP+ */
.role-vip {
  background: rgba(217,119,6,0.12);
  color: #fbbf24;
  border-color: rgba(217,119,6,0.30);
}
.role-vip .role-icon {
  background: rgba(217,119,6,0.20);
}

/* ---- Role image badges (uses images/roles/*.png) ---- */
.role-img-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.role-img-badge img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

/* ============================================================
   STATUS INDICATORS
   ============================================================ */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online  { background: #22c55e; }
.status-dot.idle    { background: #eab308; }
.status-dot.offline { background: #6b7280; }
.status-dot.dnd     { background: #ef4444; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-pill.detected   { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.status-pill.undetected { background: rgba(34,197,94,0.10); color: #4ade80; border: 1px solid rgba(34,197,94,0.22); }
.status-pill.updating   { background: rgba(234,179,8,0.10); color: #fbbf24; border: 1px solid rgba(234,179,8,0.25); }
.status-pill.review     { background: rgba(139,92,246,0.10); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
.status-pill.approved   { background: rgba(16,185,129,0.10); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.status-pill.rejected   { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.status-pill.pending    { background: rgba(234,179,8,0.10); color: #fbbf24; border: 1px solid rgba(234,179,8,0.22); }

/* ============================================================
   FILE TYPE ICONS
   ============================================================ */
.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 42px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid;
  flex-shrink: 0;
  position: relative;
}
.file-icon::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 10px; height: 10px;
  border-bottom-left-radius: 4px;
  border-top-right-radius: 5px;
}

.file-cfg  { background: rgba(16,185,129,0.12); color: #10b981; border-color: rgba(16,185,129,0.3); }
.file-cfg::before  { background: rgba(16,185,129,0.3); }
.file-txt  { background: rgba(148,163,184,0.10); color: #94a3b8; border-color: rgba(148,163,184,0.25); }
.file-txt::before  { background: rgba(148,163,184,0.25); }
.file-lua  { background: rgba(139,92,246,0.12); color: #a78bfa; border-color: rgba(139,92,246,0.3); }
.file-lua::before  { background: rgba(139,92,246,0.3); }
.file-c    { background: rgba(59,130,246,0.12); color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.file-c::before    { background: rgba(59,130,246,0.3); }
.file-exe  { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.3); }
.file-exe::before  { background: rgba(239,68,68,0.3); }

/* ============================================================
   NAV ICONS — reusable SVG paths as CSS masks
   (used when you want icon on bg, not stroke)
   ============================================================ */
.icon-mask {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  flex-shrink: 0;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* ============================================================
   NOTIFICATION BADGE
   ============================================================ */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  background: var(--red, #dc2626);
  color: #fff;
  line-height: 1;
}

/* ============================================================
   AVATAR SYSTEM
   ============================================================ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  background: var(--green-dim, rgba(22,163,74,0.15));
  color: var(--green, #16a34a);
  border: 2px solid var(--border, rgba(255,255,255,0.08));
}
.avatar-sm  { width: 28px; height: 28px; font-size: 11px; }
.avatar-md  { width: 36px; height: 36px; font-size: 14px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl  { width: 64px; height: 64px; font-size: 24px; }

/* VIP avatar ring */
.avatar-vip   { border-color: #d97706; box-shadow: 0 0 0 2px rgba(217,119,6,0.3); }
.avatar-admin { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,0.3); }
.avatar-staff { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.3); }
.avatar-mod   { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.3); }
