:root{
    --primary-color:#7c3aed;
    --accent-color:#ec4899;
    --bg:#f8fafc;
    --text:#0f172a;
    --muted:#64748b;
    --border:#e5e7eb;
    --card:#ffffff;
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background:var(--bg);
    color:var(--text);
    padding-bottom:82px;
}

.sx-container{
    max-width:1080px;
    margin:0 auto;
    padding:20px;
}

.sx-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:22px;
    padding:22px;
    box-shadow:0 10px 28px rgba(15,23,42,.05);
}

.sx-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.sx-btn{
    height:52px;
    border:none;
    border-radius:16px;
    background:linear-gradient(135deg,var(--primary-color),var(--accent-color));
    color:#fff;
    font-size:16px;
    font-weight:800;
    cursor:pointer;
    padding:0 18px;
}

.sx-input,
.sx-textarea{
    width:100%;
    border:1px solid #ddd;
    border-radius:14px;
    font-size:16px;
}

.sx-input{
    height:48px;
    padding:0 14px;
}

.sx-textarea{
    padding:14px;
}

.sx-label{
    font-weight:700;
    display:block;
    margin-bottom:8px;
}

.sx-alert{
    padding:14px 16px;
    border-radius:16px;
    margin-bottom:16px;
    font-weight:700;
}

.sx-alert-error{
    background:#fee2e2;
    color:#991b1b;
}

.sx-alert-success{
    background:#dcfce7;
    color:#166534;
}

.sx-badge{
    background:#f5f3ff;
    color:var(--primary-color);
    padding:10px 14px;
    border-radius:999px;
    font-weight:900;
    font-size:13px;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.sx-muted{
    color:var(--muted);
    line-height:1.7;
}

.sx-section{
    margin-top:18px;
}

.sx-avatar{
    width:88px;
    height:88px;
    border-radius:50%;
    object-fit:cover;
    margin-bottom:12px;
}

.sx-logo-preview{
    width:88px;
    height:88px;
    border-radius:18px;
    object-fit:cover;
    margin-bottom:12px;
}

@media(max-width:640px){
    .sx-container{
        padding:14px;
    }

    .sx-card{
        padding:18px;
        border-radius:20px;
    }
}

.sx-team-page{
  padding-bottom:84px;
}

.sx-page-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.sx-stats-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:18px 0;
}

.sx-stat-card{
  background:#fff;
  border:1px solid rgba(226,232,240,.9);
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}

.sx-stat-card span{
  display:block;
  color:#64748b;
  font-size:13px;
  margin-bottom:8px;
}

.sx-stat-card strong{
  color:#0f172a;
  font-size:28px;
  line-height:1;
}

.sx-team-layout{
  align-items:start;
}

.sx-member-list,
.sx-activity-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.sx-member-row{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  border:1px solid rgba(226,232,240,.95);
  border-radius:18px;
  background:#fff;
  transition:.18s ease;
}

.sx-member-row:hover{
  border-color:rgba(99,102,241,.35);
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}

.sx-avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,var(--sx-primary,#6366f1),#8b5cf6);
  flex:0 0 auto;
}

.sx-member-main{
  flex:1;
  min-width:0;
}

.sx-member-name{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:800;
  color:#0f172a;
}

.sx-member-email,
.sx-member-meta,
.sx-activity-time{
  font-size:13px;
  color:#64748b;
}

.sx-member-email{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sx-member-meta{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:3px;
  flex-wrap:wrap;
}

.sx-member-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.sx-inline-form{
  margin:0;
}

.sx-select{
  min-width:120px;
  height:40px;
  border:1px solid #e2e8f0;
  border-radius:13px;
  padding:0 12px;
  background:#fff;
  color:#0f172a;
  font-size:14px;
}

.sx-select:disabled{
  background:#f8fafc;
  color:#94a3b8;
}

.sx-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
  background:#94a3b8;
}

.sx-dot.online{
  background:#22c55e;
  box-shadow:0 0 0 4px rgba(34,197,94,.13);
}

.sx-dot.offline{
  background:#94a3b8;
}

.sx-mini-badge,
.sx-role-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:800;
  background:#eef2ff;
  color:#4f46e5;
}

.sx-role-pill{
  padding:8px 12px;
  font-size:13px;
}

.sx-btn-danger{
  background:#fee2e2 !important;
  color:#b91c1c !important;
  border:1px solid #fecaca !important;
}

.sx-activity-item{
  display:flex;
  gap:12px;
  padding:14px;
  border:1px solid rgba(226,232,240,.95);
  border-radius:18px;
  background:#fff;
}

.sx-activity-icon{
  width:30px;
  height:30px;
  border-radius:50%;
  background:#eef2ff;
  color:var(--sx-primary,#6366f1);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  flex:0 0 auto;
}

.sx-activity-text{
  color:#0f172a;
  font-weight:700;
  line-height:1.45;
}

@media(max-width:900px){
  .sx-stats-grid{
    grid-template-columns:1fr;
  }

  .sx-team-layout{
    grid-template-columns:1fr !important;
  }

  .sx-page-header{
    gap:14px;
  }

  .sx-page-actions{
    width:100%;
  }

  .sx-page-actions .sx-btn{
    width:100%;
  }

  .sx-member-row{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .sx-member-actions{
    width:100%;
    justify-content:space-between;
  }

  .sx-inline-form{
    flex:1;
  }

  .sx-select{
    width:100%;
  }
}