/* ==================== MyLBB Design System ==================== */
/* Tailwind CSS + LBB Brand Tokens + shadcn/ui Patterns */

@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700&display=swap");

/* ==================== CSS Variables (Design Tokens) ==================== */
:root {
  /* LBB Brand Colors - Official Palette */
  --lbb-red: #E66E6E;
  --lbb-red-dark: #D15259;
  --lbb-red-light: #FF9999;
  --lbb-green: #56B987;
  --lbb-green-dark: #397B59;
  --lbb-lightgreen: #A3A62D;
  --lbb-lightgreen-dark: #788911;
  --lbb-blue: #5FB4BF;
  --lbb-blue-dark: #5C8EBB;
  --lbb-purple: #B487BC;
  --lbb-purple-dark: #AF438B;
  --lbb-yellow: #D6A43D;
  --lbb-yellow-dark: #D8862B;
  --lbb-people: #DD824E;
  --lbb-black: #333333;
  --lbb-grey: #404141;

  /* LBB Standard Backgrounds */
  --background: #F4F3EE;
  --background-light: #FBFAF7;
  --foreground: #333333;
  --card: #FFFFFF;
  --card-foreground: #333333;
  --popover: #FFFFFF;
  --popover-foreground: #333333;
  --primary: #333333;
  --primary-foreground: #FFFFFF;
  --secondary: #E2E1DB;
  --secondary-foreground: #333333;
  --muted: #E2E1DB;
  --muted-foreground: #606060;
  --accent: #D6D3CB;
  --accent-foreground: #333333;
  --destructive: #EF4444;
  --destructive-foreground: #FFFFFF;
  --border: #D6D6D6;
  --input: #D6D6D6;
  --ring: #333333;
  --image-bg: #DCDBD6;

  /* Sidebar specific */
  --sidebar-bg: #333333;
  --sidebar-foreground: #FFFFFF;
  --sidebar-muted: rgba(255, 255, 255, 0.6);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-accent: rgba(255, 255, 255, 0.1);

  /* Radius */
  --radius: 0.375rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Typography */
  --font-sans: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-condensed: 'Barlow Condensed', sans-serif;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Base Reset ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--foreground);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-muted { color: var(--muted-foreground); }

/* ==================== Layout ==================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ==================== Spacing ==================== */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* ==================== Buttons (shadcn-style) ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-primary {
  background-color: var(--lbb-red);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  background-color: var(--lbb-red-dark);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background-color: var(--accent);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  background-color: var(--accent);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}
.btn-ghost:hover {
  background-color: var(--accent);
}

.btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}
.btn-destructive:hover {
  background-color: #DC2626;
}

.btn-link {
  background-color: transparent;
  color: var(--lbb-red);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-link:hover {
  text-decoration: none;
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  height: 3rem;
  padding: 0 2rem;
  font-size: 1rem;
}

.btn-icon {
  width: 2.5rem;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 2rem;
}

/* ==================== Cards (shadcn-style) ==================== */
.card {
  background-color: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.card-content {
  padding: 0 1.5rem 1.5rem;
}

.card-footer {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ==================== Form Inputs (shadcn-style) ==================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--input);
  background-color: transparent;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(230, 110, 110, 0.1);
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.input-error {
  border-color: var(--destructive);
}

.textarea {
  min-height: 5rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
}

.form-description {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--destructive);
}

/* Select */
.select {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--input);
  background-color: var(--card);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  padding-right: 2rem;
}

.select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(230, 110, 110, 0.1);
}

/* Checkbox & Radio */
.checkbox, .radio {
  width: 1rem;
  height: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--input);
  appearance: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio {
  border-radius: 50%;
}

.checkbox:checked, .radio:checked {
  background-color: var(--lbb-red);
  border-color: var(--lbb-red);
}

.checkbox:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem;
}

.radio:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Switch/Toggle */
.switch {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  background-color: var(--input);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background-color: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.switch.active {
  background-color: var(--lbb-red);
}

.switch.active::after {
  transform: translateX(1.25rem);
}

/* ==================== Badge ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  transition: all var(--transition-fast);
}

.badge-default {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.badge-primary {
  background-color: var(--lbb-red);
  color: white;
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.badge-success {
  background-color: #DCFCE7;
  color: #166534;
}

.badge-warning {
  background-color: #FEF3C7;
  color: #92400E;
}

.badge-destructive {
  background-color: #FEE2E2;
  color: #991B1B;
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

/* LBB specific badges */
.badge-pro {
  background-color: var(--lbb-green);
  color: white;
}

.badge-verified {
  background-color: var(--lbb-blue);
  color: white;
}

.badge-award {
  background-color: var(--lbb-yellow);
  color: white;
}

/* ==================== Avatar ==================== */
.avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background-color: var(--muted);
}

.avatar-sm { width: 2rem; height: 2rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; }
.avatar-lg { width: 3rem; height: 3rem; }
.avatar-xl { width: 4rem; height: 4rem; }
.avatar-2xl { width: 6rem; height: 6rem; }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 500;
  color: var(--muted-foreground);
}

.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--card);
}

.avatar-status.online { background-color: var(--lbb-green); }
.avatar-status.offline { background-color: var(--muted-foreground); }
.avatar-status.away { background-color: var(--lbb-yellow); }

/* ==================== Tabs ==================== */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab:hover {
  color: var(--foreground);
}

.tab.active {
  color: var(--lbb-red);
  border-bottom-color: var(--lbb-red);
}

.tab-badge {
  background-color: var(--muted);
  color: var(--muted-foreground);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.tab.active .tab-badge {
  background-color: var(--lbb-red);
  color: white;
}

/* Tab Panels (for tab content switching) */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Settings-specific horizontal tabs */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.settings-tab:hover {
  color: var(--foreground);
  background: var(--muted);
}

.settings-tab.active {
  color: var(--lbb-red);
  border-bottom-color: var(--lbb-red);
}

.settings-tab svg {
  width: 18px;
  height: 18px;
}

/* ==================== Tables ==================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--muted);
}

/* ==================== Dropdown ==================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 12rem;
  background-color: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.25rem;
  z-index: 50;
  display: none;
}

.dropdown-content.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--foreground);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--accent);
}

.dropdown-item.destructive {
  color: var(--destructive);
}

.dropdown-separator {
  height: 1px;
  background-color: var(--border);
  margin: 0.25rem 0;
}

/* ==================== Modal ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  background-color: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow: auto;
  margin: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
}

.modal-close:hover {
  background-color: var(--accent);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ==================== Toast / Alert ==================== */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--card);
  box-shadow: var(--shadow-lg);
  max-width: 24rem;
}

.toast-success {
  border-color: var(--lbb-green);
}

.toast-error {
  border-color: var(--destructive);
}

.toast-warning {
  border-color: var(--lbb-yellow);
}

.alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.alert-info {
  background-color: #EFF6FF;
  border-color: var(--lbb-blue);
}

.alert-success {
  background-color: #F0FDF4;
  border-color: var(--lbb-green);
}

.alert-warning {
  background-color: #FFFBEB;
  border-color: var(--lbb-yellow);
}

.alert-error {
  background-color: #FEF2F2;
  border-color: var(--destructive);
}

/* ==================== Progress ==================== */
.progress {
  height: 0.5rem;
  width: 100%;
  background-color: var(--secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--lbb-red);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ==================== Skeleton ==================== */
.skeleton {
  background: linear-gradient(90deg, var(--muted) 25%, var(--secondary) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================== App Layout ==================== */
body {
  display: flex;
  min-height: 100vh;
}

/* For pages using .app-layout wrapper */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==================== Sidebar Navigation ==================== */
.sidebar {
  width: 16rem;
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.sidebar-header {
  padding: 0.5rem 0.75rem 1.5rem;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-logo img {
  height: 48px;
  width: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.sidebar-link:hover {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-foreground);
}

.sidebar-link.active {
  background-color: var(--lbb-red);
  color: white;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 16rem;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Content padding for areas below page-header */
.main-content > *:not(.page-header):not(.page-content):not(script):not(style) {
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 1.5rem;
}

.main-content > *:not(.page-header):not(.page-content):not(script):not(style):last-of-type {
  padding-bottom: 2rem;
}

/* Page content wrapper - applies padding when using .page-content wrapper */
.main-content > .page-content {
  padding: 1.5rem 2rem 2rem 2rem;
}

/* ==================== Page Header (Full Width Top Bar) ==================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.page-header-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.page-header-btn svg {
  width: 20px;
  height: 20px;
}

.page-header-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--lbb-red);
  border-radius: 50%;
}

.page-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.page-header-avatar:hover {
  opacity: 0.8;
}

/* Notification Dropdown */
.notification-dropdown {
  position: relative;
}

.notification-dropdown-content {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.notification-dropdown-content.active {
  display: flex;
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notification-dropdown-title {
  font-size: 1rem;
  font-weight: 600;
}

.notification-dropdown-actions {
  display: flex;
  gap: 0.5rem;
}

.notification-dropdown-action {
  font-size: 0.8125rem;
  color: var(--lbb-red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.notification-dropdown-action:hover {
  background: var(--muted);
}

.notification-dropdown-list {
  flex: 1;
  overflow-y: auto;
}

.notification-dropdown-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.notification-dropdown-item:hover {
  background: var(--muted);
}

.notification-dropdown-item.unread {
  background: rgba(230, 110, 110, 0.04);
}

.notification-dropdown-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--lbb-red);
}

.notification-dropdown-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-dropdown-icon svg {
  width: 16px;
  height: 16px;
}

.notification-dropdown-icon.success { background: #DCFCE7; color: var(--lbb-green); }
.notification-dropdown-icon.info { background: #DBEAFE; color: var(--lbb-blue); }
.notification-dropdown-icon.warning { background: #FEF3C7; color: var(--lbb-yellow); }
.notification-dropdown-icon.primary { background: #FEE2E2; color: var(--lbb-red); }

.notification-dropdown-body {
  flex: 1;
  min-width: 0;
}

.notification-dropdown-text {
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.notification-dropdown-text strong {
  font-weight: 600;
}

.notification-dropdown-time {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.notification-dropdown-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  flex-shrink: 0;
}

.notification-dropdown-footer a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lbb-red);
  text-decoration: none;
}

.notification-dropdown-footer a:hover {
  text-decoration: underline;
}

/* Notification Dropdown Tabs */
.notification-dropdown-tabs {
  display: flex;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notification-dropdown-tab {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.notification-dropdown-tab:hover {
  color: var(--foreground);
}

.notification-dropdown-tab.active {
  color: var(--lbb-red);
}

.notification-dropdown-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--lbb-red);
  border-radius: 2px 2px 0 0;
}

/* Notification Promo Item */
.notification-dropdown-item.promo {
  background: linear-gradient(135deg, rgba(230, 110, 110, 0.08) 0%, rgba(230, 110, 110, 0.02) 100%);
  border-left: 3px solid var(--lbb-red);
  position: relative;
}

.notification-dropdown-item.promo:hover {
  background: linear-gradient(135deg, rgba(230, 110, 110, 0.12) 0%, rgba(230, 110, 110, 0.04) 100%);
}

.notification-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: var(--lbb-red);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  margin-bottom: 0.375rem;
}

.notification-promo-badge svg {
  width: 10px;
  height: 10px;
}

.notification-dropdown-title-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--lbb-red);
  margin-bottom: 0.25rem;
}

.notification-dropdown-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* Notification Action Buttons */
.notification-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  margin-top: 0.5rem;
}

.notification-dropdown-btn.primary {
  background: var(--lbb-red);
  color: white;
  border: none;
}

.notification-dropdown-btn.primary:hover {
  background: var(--lbb-red-dark, #D15259);
}

.notification-dropdown-btn.secondary {
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.notification-dropdown-btn.secondary:hover {
  background: var(--border);
}

/* ==================== Page Content Area ==================== */
.page-content {
  flex: 1;
  padding: 1.5rem 2rem;
}

/* ==================== Section Header (Within Page Content) ==================== */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Text link */
.text-link {
  font-size: 0.875rem;
  color: var(--lbb-red);
  text-decoration: none;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.sidebar-item:hover {
  background-color: var(--accent);
  color: var(--foreground);
}

.sidebar-item.active {
  background-color: var(--lbb-red);
  color: white;
}

.sidebar-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sidebar-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

/* Sub-navigation within sections - smaller, different active state */
.sidebar-subnav .sidebar-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.sidebar-subnav .sidebar-link svg {
  width: 16px;
  height: 16px;
}

/* Sub-nav uses accent background for active state (on dark sidebar) */
.sidebar-subnav .sidebar-link.active {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-foreground);
}

/* Badge in sidebar */
.sidebar-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--lbb-green);
  color: white;
}

/* ==================== Header ==================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1.5rem;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lbb-red);
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--foreground);
  background-color: var(--accent);
}

.nav-link.active {
  color: var(--lbb-red);
}

/* ==================== Stats Cards ==================== */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.stat-change.positive { color: var(--lbb-green); }
.stat-change.negative { color: var(--destructive); }

/* ==================== Empty State ==================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 24rem;
  margin-bottom: 1.5rem;
}

/* ==================== Utility Classes ==================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

.bg-card { background-color: var(--card); }
.bg-muted { background-color: var(--muted); }
.bg-primary { background-color: var(--lbb-red); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.transition { transition: all var(--transition-base); }

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .lg\:hidden { display: none; }
}

@media (max-width: 768px) {
  .md\:hidden { display: none; }
  .container { padding: 0 1rem; }
  .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .sm\:hidden { display: none; }
  .grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

/* ==================== Search Modal (Command Palette) ==================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  z-index: 1000;
}

.search-overlay.active {
  display: flex;
}

.search-modal {
  background: var(--card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.search-input-wrapper svg {
  width: 20px;
  height: 20px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.search-input-wrapper kbd {
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  color: var(--foreground);
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-group-title {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.search-result:hover,
.search-result.active {
  background: var(--muted);
}

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-result-icon svg {
  width: 18px;
  height: 18px;
  color: var(--foreground);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.search-result-description {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.search-result-shortcut {
  display: flex;
  gap: 0.25rem;
}

.search-result-shortcut kbd {
  padding: 0.125rem 0.375rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.search-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.search-footer-hints {
  display: flex;
  gap: 1rem;
}

.search-footer-hint {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.search-footer-hint kbd {
  padding: 0.125rem 0.375rem;
  background: var(--muted);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.625rem;
}

/* Sidebar home link styling */
.sidebar-home {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--sidebar-border);
  padding-bottom: 0.75rem;
}

/* Expandable sidebar nav items */
.sidebar-nav-group {
  margin-bottom: 0.25rem;
}

.sidebar-nav-parent {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  background: transparent;
  border: none;
}

.sidebar-nav-parent:hover {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-foreground);
}

.sidebar-nav-parent.active {
  color: var(--sidebar-foreground);
}

.sidebar-nav-parent svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-nav-parent .sidebar-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
  opacity: 0.6;
}

.sidebar-nav-group.expanded .sidebar-nav-parent .sidebar-chevron {
  transform: rotate(90deg);
}

.sidebar-nav-children {
  display: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.sidebar-nav-group.expanded .sidebar-nav-children {
  display: block;
}

.sidebar-nav-children .sidebar-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.sidebar-nav-children .sidebar-link svg {
  width: 16px;
  height: 16px;
}

.sidebar-nav-children .sidebar-link.active {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-foreground);
}

/* Ellbee AI special link styling */
.sidebar-ai-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.sidebar-ai-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.sidebar-ai-link:hover::before {
  opacity: 1;
}

.sidebar-ai-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-ai-link span {
  position: relative;
  z-index: 1;
  flex: 1;
}

.sidebar-ai-link .ai-sparkle {
  width: 16px;
  height: 16px;
  margin-left: auto;
  position: relative;
  z-index: 1;
  animation: sparkle-pulse 2s ease-in-out infinite;
}

@keyframes sparkle-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.sidebar-ai-link.active {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(102, 126, 234, 0.3);
}
