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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dashboard-container {
  min-height: 100vh;
  background: linear-gradient(to bottom right, #020617, #0f172a, #020617);
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 16rem;
  background-color: rgba(15, 23, 42, 0.8);
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #1e293b;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, #3b82f6, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Team Info */
.team-info {
  padding: 1rem;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, rgba(37, 99, 235, 0.3), rgba(147, 51, 234, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #60a5fa;
}

.team-details {
  flex: 1;
}

.team-name {
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
}

.team-members {
  color: #64748b;
  font-size: 0.75rem;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-item:hover {
  color: white;
  background-color: rgba(30, 41, 59, 0.5);
}

.nav-item.active {
  background-color: #2563eb;
  color: white;
}

.nav-item .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* User Profile */
.user-profile {
  padding: 1rem;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.user-details {
  flex: 1;
}

.user-name {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.user-role {
  color: #64748b;
  font-size: 0.75rem;
}

.btn-icon {
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: white;
}

.btn-icon .icon {
  width: 1rem;
  height: 1rem;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.stat-header .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.stat-label {
  color: #94a3b8;
  font-size: 0.875rem;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}

/* Roles Overview */
.roles-overview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-overview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.role-overview-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-color-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.role-overview-name {
  color: #cbd5e1;
}

.role-overview-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.role-overview-stat {
  color: #64748b;
  font-size: 0.875rem;
}

/* Online Staff List */
.online-staff-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.online-staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.online-staff-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.online-avatar-container {
  position: relative;
}

.online-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.online-indicator {
  position: absolute;
  bottom: -0.125rem;
  right: -0.125rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: #22c55e;
  border: 2px solid #0f172a;
}

.online-staff-name {
  color: #cbd5e1;
}

.role-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

/* Add Staff Card */
.add-staff-card {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
}

.form-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.375rem;
  color: white;
  font-size: 1rem;
  outline: none;
}

.form-input:focus {
  border-color: #3b82f6;
}

.form-input::placeholder {
  color: #64748b;
}

.form-select {
  padding: 0.5rem 1rem;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.375rem;
  color: white;
  font-size: 1rem;
  outline: none;
}

.form-select:focus {
  border-color: #3b82f6;
}

/* Staff Table */
.staff-table {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  align-items: center;
}

.member-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.member-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, rgba(30, 58, 138, 0.5), rgba(88, 28, 135, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.member-name {
  color: white;
  font-weight: 500;
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.status-dot.online {
  background-color: #22c55e;
}

.status-dot.offline {
  background-color: #475569;
}

.status-text {
  font-size: 0.875rem;
}

.status-text.online {
  color: #4ade80;
}

.status-text.offline {
  color: #64748b;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-edit {
  color: #94a3b8;
}

.btn-edit:hover {
  color: white;
}

.btn-delete {
  color: #f87171;
}

.btn-delete:hover {
  color: #fca5a5;
  background-color: rgba(220, 38, 38, 0.2);
}

/* Roles Section */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.roles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.role-management-card {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

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

.role-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-picker {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

.role-name-input {
  width: 12rem;
  font-weight: 600;
}

.role-member-count {
  color: #64748b;
  font-size: 0.875rem;
}

.role-quota-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quota-label {
  color: #94a3b8;
  font-size: 0.875rem;
}

.quota-input {
  width: 5rem;
}

.quota-unit {
  color: #64748b;
  font-size: 0.875rem;
}

/* Settings Section */
.settings-card {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.settings-group {
  margin-bottom: 1.5rem;
}

.settings-label {
  display: block;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.max-width {
  max-width: 28rem;
}

.settings-toggles {
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: rgba(30, 41, 59, 0.3);
  border-radius: 0.5rem;
}

.toggle-info {
  flex: 1;
}

.toggle-title {
  color: white;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.toggle-description {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2563eb;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.save-btn {
  margin-top: 0.5rem;
}

/* Color Utilities */
.text-blue-400 { color: #60a5fa; }
.text-green-400 { color: #4ade80; }
.text-purple-400 { color: #a78bfa; }
.text-cyan-400 { color: #22d3ee; }