/* =============================================================================
   GoldPro Design System — POC Stylesheet
   Matches v1 app design tokens exactly.
   ============================================================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =============================================================================
   1. CSS Reset
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* =============================================================================
   2. Root Variables — Light Mode (Default)
   ============================================================================= */

:root {
  --background: 220 20% 97%;
  --foreground: 222.2 84% 4.9%;
  --card: 220 20% 97%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 220 20% 98%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 224 71% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 20% 93%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 220 20% 93%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 220 20% 93%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 220 15% 88%;
  --input: 220 15% 88%;
  --ring: 224 71% 40%;
  --radius: 0.75rem;

  --sidebar-background: 220 25% 95%;
  --sidebar-foreground: 240 5.3% 26.1%;
  --sidebar-primary: 224 71% 40%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 220 15% 91%;
  --sidebar-accent-foreground: 240 5.9% 10%;
  --sidebar-border: 220 13% 88%;

  /* Semantic colors */
  --success: 142 71% 45%;
  --success-foreground: 0 0% 100%;
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 100%;
  --info: 217 91% 60%;
  --info-foreground: 0 0% 100%;
}

/* =============================================================================
   3. Dark Mode Variables
   ============================================================================= */

[data-theme="dark"] {
  --background: 228 33% 5%;
  --foreground: 210 40% 98%;
  --card: 228 30% 8%;
  --card-foreground: 210 40% 98%;
  --popover: 228 30% 8%;
  --popover-foreground: 210 40% 98%;
  --primary: 224 71% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 228 25% 13%;
  --secondary-foreground: 210 40% 98%;
  --muted: 228 25% 13%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 228 25% 13%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 228 20% 16%;
  --input: 228 20% 16%;
  --ring: 224 71% 40%;

  --sidebar-background: 228 33% 6%;
  --sidebar-foreground: 240 4.8% 95.9%;
  --sidebar-primary: 224 71% 40%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 228 20% 12%;
  --sidebar-accent-foreground: 240 4.8% 95.9%;
  --sidebar-border: 228 20% 12%;

  --success: 142 71% 35%;
  --warning: 38 92% 40%;
  --info: 217 91% 50%;
}

/* =============================================================================
   4. Base Typography
   ============================================================================= */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-feature-settings: "rlig" 1, "calt" 1;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
}

/* =============================================================================
   5. Layout Classes
   ============================================================================= */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background-color: hsl(var(--sidebar-background) / 0.8);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-right: 1px solid hsl(var(--sidebar-border));
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width 200ms ease;
}

.sidebar-collapsed {
  width: 72px;
}

.sidebar-collapsed .nav-item span,
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .sidebar-logo-text {
  display: none;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid hsl(var(--border));
}

.content-area {
  padding: 24px 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* =============================================================================
   6. Glass-morphism Classes
   ============================================================================= */

.glass {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: hsl(var(--background) / 0.6);
}

.glass-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: hsl(var(--card) / 0.8);
  box-shadow:
    0 1px 3px 0 hsl(var(--foreground) / 0.04),
    0 1px 2px -1px hsl(var(--foreground) / 0.04);
}

.glass-nav {
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  background-color: hsl(var(--background) / 0.8);
}

/* =============================================================================
   7. Component Classes — Buttons
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 150ms ease;
  user-select: none;
  text-decoration: none;
}

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

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

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 3px 0 hsl(var(--primary) / 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

.btn-secondary:hover {
  background-color: hsl(var(--accent));
}

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

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

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
  opacity: 0.9;
}

.btn-blu {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(224 71% 50%));
  color: hsl(var(--primary-foreground));
  box-shadow:
    0 1px 3px 0 hsl(var(--primary) / 0.4),
    0 0 16px -2px hsl(var(--primary) / 0.25);
}

.btn-blu:hover {
  box-shadow:
    0 2px 6px 0 hsl(var(--primary) / 0.5),
    0 0 24px -2px hsl(var(--primary) / 0.35);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-icon {
  height: 40px;
  width: 40px;
  padding: 0;
}

.btn-icon.btn-sm {
  height: 32px;
  width: 32px;
}

.btn-icon.btn-lg {
  height: 48px;
  width: 48px;
}

/* =============================================================================
   8. Component Classes — Card
   ============================================================================= */

.card {
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 2px 0 hsl(var(--foreground) / 0.04);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.card:hover {
  box-shadow: 0 4px 12px 0 hsl(var(--foreground) / 0.06);
}

.card-header {
  padding: 24px;
  border-bottom: 1px solid hsl(var(--border));
}

.card-content {
  padding: 24px;
}

.card-footer {
  padding: 24px;
  border-top: 1px solid hsl(var(--border));
}

/* =============================================================================
   9. Component Classes — Input / Select / Textarea
   ============================================================================= */

.input {
  display: flex;
  height: 44px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0 12px;
  font-size: 14px;
  color: hsl(var(--foreground));
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

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

.select {
  display: flex;
  height: 44px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0 36px 0 12px;
  font-size: 14px;
  color: hsl(var(--foreground));
  appearance: none;
  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='%236b7280' 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 12px center;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  border-radius: 8px;
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 10px 12px;
  font-size: 14px;
  color: hsl(var(--foreground));
  resize: vertical;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* =============================================================================
   10. Component Classes — Badge
   ============================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}

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

.badge-success {
  background-color: hsl(var(--success) / 0.12);
  color: hsl(142 71% 35%);
  border-color: hsl(var(--success) / 0.2);
}

[data-theme="dark"] .badge-success {
  color: hsl(142 71% 55%);
}

.badge-warning {
  background-color: hsl(var(--warning) / 0.12);
  color: hsl(38 92% 40%);
  border-color: hsl(var(--warning) / 0.2);
}

[data-theme="dark"] .badge-warning {
  color: hsl(38 92% 60%);
}

.badge-error {
  background-color: hsl(var(--destructive) / 0.12);
  color: hsl(0 84% 50%);
  border-color: hsl(var(--destructive) / 0.2);
}

[data-theme="dark"] .badge-error {
  color: hsl(0 84% 65%);
}

.badge-info {
  background-color: hsl(var(--info) / 0.12);
  color: hsl(217 91% 50%);
  border-color: hsl(var(--info) / 0.2);
}

[data-theme="dark"] .badge-info {
  color: hsl(217 91% 70%);
}

/* =============================================================================
   11. Component Classes — Table
   ============================================================================= */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid hsl(var(--border));
}

.table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.table tr:hover td {
  background-color: hsl(var(--accent));
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =============================================================================
   12. Component Classes — Modal
   ============================================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: hsl(0 0% 0% / 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  position: relative;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: hsl(var(--card) / 0.95);
  border: 1px solid hsl(var(--border));
  max-width: 640px;
  width: 100%;
  box-shadow:
    0 20px 25px -5px hsl(var(--foreground) / 0.1),
    0 8px 10px -6px hsl(var(--foreground) / 0.1);
  animation: modal-enter 200ms ease;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 24px 24px 0;
}

.modal-body {
  padding: 16px 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* =============================================================================
   13. Component Classes — Toast
   ============================================================================= */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 8px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 12px 16px;
  box-shadow:
    0 10px 15px -3px hsl(var(--foreground) / 0.1),
    0 4px 6px -4px hsl(var(--foreground) / 0.1);
  min-width: 300px;
  max-width: 420px;
  font-size: 14px;
  animation: toast-enter 300ms ease;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================================
   14. Component Classes — Tooltip
   ============================================================================= */

.tooltip {
  position: absolute;
  border-radius: 6px;
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 12px;
  padding: 4px 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 2px 4px hsl(var(--foreground) / 0.15);
}

/* =============================================================================
   15. Sidebar Navigation
   ============================================================================= */

.sidebar-header {
  padding: 16px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid hsl(var(--sidebar-border));
  margin-bottom: 8px;
}
.sidebar-spacer { flex: 1; }
.nav-bottom { border-top: 1px solid hsl(var(--sidebar-border)); padding-top: 8px; margin-top: 8px; }
.nav-label { white-space: nowrap; }
.nav-section { padding: 0 8px; }

/* Header layout */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-title {
  font-size: 20px;
  font-weight: 700;
  color: hsl(var(--foreground));
}
.mobile-menu-btn {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
}
@media (max-width: 1024px) {
  .mobile-menu-btn { display: flex; }
}

/* Mobile overlay */
#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 79;
}
#mobile-overlay.active { display: block; }
.sidebar.mobile-open {
  transform: translateX(0) !important;
  display: flex !important;
}
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 80;
    transform: translateX(-100%);
    transition: transform 300ms ease;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
}

.sidebar-nav {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
}

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid hsl(var(--sidebar-border));
}

.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  padding: 8px 12px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--sidebar-foreground));
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}

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

.nav-item.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 4px 6px -1px hsl(var(--primary) / 0.25);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* =============================================================================
   16. KPI Stat Cards
   ============================================================================= */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  padding: 20px 24px;
  box-shadow: 0 1px 2px 0 hsl(var(--foreground) / 0.04);
}

.kpi-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}

.kpi-trend {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-weight: 500;
}

.kpi-trend.up {
  color: hsl(var(--success));
}

.kpi-trend.down {
  color: hsl(var(--destructive));
}

/* =============================================================================
   17. Form Styling
   ============================================================================= */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: hsl(var(--foreground));
}

.form-error {
  font-size: 12px;
  color: hsl(var(--destructive));
  margin-top: 4px;
}

.form-hint {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

/* =============================================================================
   18. Responsive Breakpoints
   ============================================================================= */

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: hsl(var(--foreground));
  border-radius: 8px;
}

.sidebar-toggle:hover {
  background-color: hsl(var(--accent));
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: -240px;
    z-index: 50;
    transition: left 200ms ease;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: hsl(0 0% 0% / 0.4);
    z-index: 45;
  }

  .sidebar.open ~ .sidebar-overlay {
    display: block;
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .content-area {
    padding: 16px;
  }

  .header {
    padding: 0 16px;
  }

  .modal {
    max-width: 100%;
    margin: 16px;
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .table-wrapper {
    margin: 0 -16px;
    padding: 0 16px;
  }
}

/* =============================================================================
   19. Utility Classes — Text Colors
   ============================================================================= */

.text-success { color: hsl(var(--success)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-warning { color: hsl(var(--warning)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-foreground { color: hsl(var(--foreground)); }

/* =============================================================================
   20. Utility Classes — Background Colors
   ============================================================================= */

.bg-success-10 { background-color: hsl(var(--success) / 0.1); }
.bg-destructive-10 { background-color: hsl(var(--destructive) / 0.1); }
.bg-warning-10 { background-color: hsl(var(--warning) / 0.1); }
.bg-info-10 { background-color: hsl(var(--info) / 0.1); }
.bg-primary-10 { background-color: hsl(var(--primary) / 0.1); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-background { background-color: hsl(var(--background)); }

/* =============================================================================
   21. Utility Classes — Flexbox
   ============================================================================= */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.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; }
.justify-start { justify-content: flex-start; }

/* =============================================================================
   22. Utility Classes — Gap
   ============================================================================= */

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* =============================================================================
   23. Utility Classes — Spacing (Margin & Padding)
   ============================================================================= */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.px-1 { padding-left: 4px; padding-right: 4px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-8 { padding-left: 32px; padding-right: 32px; }

.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }

/* =============================================================================
   24. Utility Classes — Display & Visibility
   ============================================================================= */

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

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

/* =============================================================================
   25. Utility Classes — Typography
   ============================================================================= */

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

.text-xs { font-size: 12px; line-height: 1.5; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-base { font-size: 16px; line-height: 1.5; }
.text-lg { font-size: 18px; line-height: 1.5; }
.text-xl { font-size: 20px; line-height: 1.4; }
.text-2xl { font-size: 24px; line-height: 1.3; }
.text-3xl { font-size: 30px; line-height: 1.25; }
.text-4xl { font-size: 36px; line-height: 1.2; }
.text-5xl { font-size: 48px; line-height: 1.1; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wide { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.75; }

/* =============================================================================
   26. Utility Classes — Borders & Radius
   ============================================================================= */

.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }
.rounded-none { border-radius: 0; }

.border { border: 1px solid hsl(var(--border)); }
.border-t { border-top: 1px solid hsl(var(--border)); }
.border-b { border-bottom: 1px solid hsl(var(--border)); }
.border-l { border-left: 1px solid hsl(var(--border)); }
.border-r { border-right: 1px solid hsl(var(--border)); }

/* =============================================================================
   27. Utility Classes — Shadows
   ============================================================================= */

.shadow-sm { box-shadow: 0 1px 2px 0 hsl(var(--foreground) / 0.04); }
.shadow-md { box-shadow: 0 4px 6px -1px hsl(var(--foreground) / 0.07), 0 2px 4px -2px hsl(var(--foreground) / 0.07); }
.shadow-lg { box-shadow: 0 10px 15px -3px hsl(var(--foreground) / 0.08), 0 4px 6px -4px hsl(var(--foreground) / 0.08); }
.shadow-xl { box-shadow: 0 20px 25px -5px hsl(var(--foreground) / 0.1), 0 8px 10px -6px hsl(var(--foreground) / 0.1); }
.shadow-none { box-shadow: none; }

/* =============================================================================
   28. Utility Classes — Width
   ============================================================================= */

.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-sm { max-width: 384px; }
.max-w-md { max-width: 448px; }
.max-w-lg { max-width: 512px; }
.max-w-xl { max-width: 576px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.max-w-4xl { max-width: 896px; }
.max-w-5xl { max-width: 1024px; }
.max-w-6xl { max-width: 1152px; }
.max-w-7xl { max-width: 1280px; }
.max-w-full { max-width: 100%; }
.min-w-0 { min-width: 0; }

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

/* =============================================================================
   29. Utility Classes — Misc
   ============================================================================= */

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

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

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

.transition { transition: all 150ms ease; }
.transition-colors { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
.transition-opacity { transition: opacity 150ms ease; }
.transition-transform { transition: transform 150ms ease; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* =============================================================================
   30. Scrollbar Styling
   ============================================================================= */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(var(--muted-foreground) / 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--muted-foreground) / 0.5);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.3) transparent;
}

/* =============================================================================
   31. Print Styles
   ============================================================================= */

@media print {
  .sidebar,
  .header,
  .btn,
  .sidebar-toggle,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }

  .main-content {
    width: 100% !important;
  }

  .content-area {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    backdrop-filter: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* =============================================================================
   32. Landing Page
   ============================================================================= */

/* --- Landing Nav --- */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: hsla(var(--background) / 0.8);
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.landing-nav-links {
  display: flex;
  gap: 32px;
}
.landing-nav-links a {
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 150ms;
}
.landing-nav-links a:hover { opacity: 1; }
@media (max-width: 768px) {
  .landing-nav-links { display: none; }
}

/* --- Logo --- */
.landing-logo, .sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.logo-diamond {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(224 71% 30%));
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}
.logo-accent {
  color: hsl(var(--primary));
}

/* --- Landing Container --- */
.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.section-header p {
  font-size: 18px;
  color: hsl(var(--muted-foreground));
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}
.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--primary));
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.1);
}

/* --- Hero Extras --- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: hsla(0, 0%, 100%, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid hsla(0, 0%, 100%, 0.2);
}
.hero-accent { color: #FFD700; }
.hero-secondary {
  color: white !important;
  border: 1px solid hsla(0, 0%, 100%, 0.3) !important;
}
.hero-secondary:hover { background: hsla(0, 0%, 100%, 0.1) !important; }
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stat-value {
  font-size: 32px;
  font-weight: 800;
}
.hero-stat-label {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
}

/* --- Problem Grid --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.problem-card {
  padding: 32px;
  text-align: center;
}
.problem-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 16px;
}
.problem-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.problem-card p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* --- Modules Grid --- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.module-item {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  transition: transform 200ms, box-shadow 200ms;
}
.module-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px hsl(var(--foreground) / 0.08);
}
.module-number {
  font-size: 36px;
  font-weight: 800;
  color: hsl(var(--primary) / 0.15);
  display: block;
  margin-bottom: 8px;
}
.module-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.module-item p {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

/* --- About Features --- */
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.about-item {
  text-align: center;
  padding: 24px;
}
.about-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 16px;
}
.about-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.about-item p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* --- Landing CTA --- */
.landing-cta {
  padding: 80px 32px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(224 71% 30%));
  color: white;
  text-align: center;
}
.cta-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* --- Landing Section Alt (light bg) --- */
.landing-section-alt {
  background: hsl(var(--card));
}

/* --- Landing Footer --- */
.landing-footer {
  padding: 32px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-text {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}
.footer-credit {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

/* --- Live Dot --- */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

/* --- Rate Badge (header) --- */
.rate-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.2);
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
}
.rate-label {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}
.rate-value {
  color: hsl(var(--primary));
  font-weight: 600;
}

/* --- User Avatar --- */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--primary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

/* --- Accent Icon BG --- */
.accent-icon-bg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15), hsl(var(--primary) / 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
}

/* --- Feature Card Text --- */
.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: hsl(var(--foreground));
}
.feature-card p {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

/* --- Responsive Landing --- */
@media (max-width: 768px) {
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .problem-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .about-features { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 12px; text-align: center; }
  .section-header h2 { font-size: 28px; }
}
@media (max-width: 480px) {
  .modules-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .hero-stat-value { font-size: 24px; }
}

.landing {
  min-height: 100vh;
  overflow-x: hidden;
}

.landing-section {
  padding: 80px 32px;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
  background: linear-gradient(
    135deg,
    hsl(var(--primary)) 0%,
    hsl(224 71% 30%) 50%,
    hsl(228 33% 10%) 100%
  );
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, hsl(var(--primary) / 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, hsl(224 71% 50% / 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 400;
  margin-top: 16px;
  max-width: 600px;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  padding: 32px;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px hsl(var(--foreground) / 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15), hsl(var(--primary) / 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: hsl(var(--primary));
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: hsl(var(--foreground));
}

.feature-description {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 18px;
  color: hsl(var(--muted-foreground));
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .landing-section {
    padding: 48px 16px;
  }
}

/* =============================================================================
   33. Animations & Transitions
   ============================================================================= */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-fade-in { animation: fade-in 300ms ease; }
.animate-slide-up { animation: slide-up 300ms ease; }
.animate-slide-down { animation: slide-down 300ms ease; }
.animate-scale-in { animation: scale-in 200ms ease; }
.animate-spin { animation: spin 1s linear infinite; }

/* =============================================================================
   34. Dark Mode Toggle
   ============================================================================= */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background-color: hsl(var(--background));
  cursor: pointer;
  color: hsl(var(--foreground));
  transition: all 150ms ease;
}

.theme-toggle:hover {
  background-color: hsl(var(--accent));
}

/* =============================================================================
   35. Divider / Separator
   ============================================================================= */

.divider {
  height: 1px;
  width: 100%;
  background-color: hsl(var(--border));
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background-color: hsl(var(--border));
}

/* =============================================================================
   36. Avatar
   ============================================================================= */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }

/* =============================================================================
   37. Progress Bar
   ============================================================================= */

.progress {
  height: 8px;
  width: 100%;
  border-radius: 9999px;
  background-color: hsl(var(--muted));
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 9999px;
  background-color: hsl(var(--primary));
  transition: width 300ms ease;
}

.progress-bar.success { background-color: hsl(var(--success)); }
.progress-bar.warning { background-color: hsl(var(--warning)); }
.progress-bar.destructive { background-color: hsl(var(--destructive)); }

/* =============================================================================
   38. Skeleton / Loading Placeholder
   ============================================================================= */

.skeleton {
  background: linear-gradient(
    90deg,
    hsl(var(--muted)) 25%,
    hsl(var(--muted-foreground) / 0.08) 50%,
    hsl(var(--muted)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 6px;
}

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

/* =============================================================================
   39. Dropdown Menu
   ============================================================================= */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  border-radius: 8px;
  background-color: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 15px -3px hsl(var(--foreground) / 0.1);
  padding: 4px;
  z-index: 50;
  animation: scale-in 150ms ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 100ms ease;
  color: hsl(var(--popover-foreground));
}

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

.dropdown-divider {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 4px 0;
}

/* =============================================================================
   40. Tabs
   ============================================================================= */

.tabs {
  display: flex;
  border-bottom: 1px solid hsl(var(--border));
  gap: 0;
}

.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}

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

.tab.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

.tab-content {
  padding: 16px 0;
}
