:root {
  --primary: #4F46E5; /* Modern Indigo */
  --primary-hover: #4338CA;
  --secondary: #10B981;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; font-family: 'Inter', system-ui, -apple-system, sans-serif; }
body { background: var(--bg); color: var(--text); }
.sidebar {
  position: fixed; top: 0; left: 0; width: 280px; height: 100%;
  background: linear-gradient(180deg, #1E1E2F 0%, #12121C 100%);
  border-right: 1px solid rgba(255,255,255,0.05); overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15); z-index: 100;
  color: #E2E8F0;
}
.sidebar .brand { 
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #fff; padding: 32px 24px; font-weight: 800; font-size: 1.5rem;
  letter-spacing: -0.5px; text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.sidebar hr { border-color: rgba(255,255,255,0.1); margin: 1.5rem 20px; }
.sidebar .nav-link { 
  color: #94A3B8; font-weight: 500; padding: 14px 20px; 
  border-radius: 12px; margin: 6px 16px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.sidebar .nav-link i { font-size: 1.1rem; width: 24px; text-align: center; transition: transform 0.3s ease; }
.sidebar .nav-link:hover {
  background: rgba(255,255,255,0.05); color: #fff; transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.sidebar .nav-link:hover i { transform: scale(1.15); color: var(--primary); }
.sidebar .nav-link.active { 
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)); 
  color: #fff; font-weight: 600; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}
.sidebar .nav-link.active i { color: #fff; }
.sidebar .nav-link.text-danger:hover { background: rgba(239, 68, 68, 0.1); color: #EF4444 !important; }
.sidebar .nav-link.text-danger:hover i { color: #EF4444; }

.content { margin-left: 280px; margin-right: 260px; padding: 32px; transition: all 0.3s ease; }
.right-sidebar {
  position: fixed; top: 0; right: 0; width: 260px; height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border); overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.05); z-index: 90;
  padding: 24px 16px;
}
.right-sidebar .role-group {
  margin-bottom: 24px;
}
.right-sidebar .role-title {
  font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.5px; margin-bottom: 12px; padding-left: 8px; border-bottom: 1px solid var(--border); padding-bottom: 4px;
}
.right-sidebar .staff-member {
  display: flex; align-items: center; padding: 8px; border-radius: 8px; transition: background 0.2s; cursor: pointer;
}
.right-sidebar .staff-member:hover { background: var(--bg); }
.right-sidebar .staff-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 12px;
  position: relative;
}
.right-sidebar .staff-status {
  width: 10px; height: 10px; border-radius: 50%; background: var(--secondary);
  position: absolute; bottom: -2px; right: -2px; border: 2px solid var(--surface);
}
.right-sidebar .staff-info { flex: 1; min-width: 0; }
.right-sidebar .staff-name { font-weight: 600; font-size: 0.9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right-sidebar .staff-role-badge { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-top: 2px; display: inline-block; }
.btn-primary { 
  background: var(--primary); border-color: var(--primary); 
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background: var(--primary-hover); border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}
.nav-link { 
  color: var(--text-muted); font-weight: 500; padding: 12px 20px; 
  border-radius: 8px; margin: 4px 12px; transition: all 0.2s ease;
}
.nav-link:hover {
  background: var(--bg); color: var(--primary); transform: translateX(4px);
}
.nav-link.active { 
  background: rgba(79, 70, 229, 0.1); color: var(--primary); font-weight: 600; 
}
.quick-shorten {
  background: var(--surface); padding: 24px; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 24px;
  box-shadow: var(--shadow); transition: all 0.3s ease;
}
.quick-shorten:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-2px);
}
.quick-shorten .form-control {
  border-radius: 8px; border: 1px solid var(--border);
  padding: 12px 16px; background: var(--bg);
  transition: all 0.2s ease;
}
.quick-shorten .form-control:focus {
  background: var(--surface); border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
.card { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: all 0.3s ease; }
.card:hover { box-shadow: var(--shadow); }
.card-metric {
  border: none; border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--surface);
  position: relative; overflow: hidden;
}
.card-metric::after {
  content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  border-radius: 50%; transform: translate(30%, -30%);
}
.loader {
  width: 64px; height: 64px; border: 6px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInSlide 0.5s ease-out forwards; }
@media (max-width: 1200px) {
  .right-sidebar { display: none; }
  .content { margin-right: 0; }
}
@media (max-width: 992px) {
  .sidebar {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
    z-index: 1050; transition: left 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.05);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .sidebar.show { left: 0; }
  .content { margin-left: 0; padding: 16px; margin-right: 0; margin-top: 60px; }
  .nav-link { margin: 2px 16px; }
  .right-sidebar { display: none; }

  .mobile-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 60px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; z-index: 1040;
  }
  .sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1045;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
}
.content-public { padding: 0; }
.navbar-public { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); padding: 16px 0; }

