/* ===================================
   INTENTIV DESIGN SYSTEM
   Core styles, variables, and components
   =================================== */

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

:root {
  /* Color Palette - Deep Indigo Monochromatic */
  --primary-indigo: #4338ca;
  --primary-indigo-dark: #3730a3;
  --primary-indigo-light: #6366f1;
  --accent-indigo: #818cf8;
  --accent-indigo-dark: #6366f1;
  --accent-indigo-light: #a5b4fc;

  /* Neutrals */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;

  /* Status Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --error: #ef4444;
  --error-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #3b82f6;
  --info-light: #dbeafe;

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

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-display: 'Inter', var(--font-sans);

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ===================================
   BASE STYLES
   =================================== */

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   ICON SIZING SYSTEM
   =================================== */

.icon-sm {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.icon-md {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.icon-lg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.icon-xl {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.icon-2xl {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}

/* Icon wrapper for gradient backgrounds */
.icon-wrapper {
  background: linear-gradient(135deg, var(--primary-indigo) 0%, var(--primary-indigo-light) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.icon-wrapper-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.icon-wrapper-md {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
}

.icon-wrapper-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
}

.icon-wrapper-xl {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
}

/* ===================================
   BUTTON SYSTEM
   =================================== */

.btn {
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all var(--transition-slow);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  line-height: 1;
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-md {
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--primary-indigo);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-indigo-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--primary-indigo);
  border: 2px solid var(--primary-indigo);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-indigo);
  color: white;
  transform: translateY(-1px);
}

.btn-tertiary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-tertiary:hover:not(:disabled) {
  background: var(--bg-tertiary);
  border-color: var(--primary-indigo-light);
}

.btn-text {
  color: var(--text-secondary);
  background: transparent;
  padding: 0.625rem 1rem;
}

.btn-text:hover:not(:disabled) {
  color: var(--primary-indigo);
}

.btn-icon {
  padding: 0.625rem;
  aspect-ratio: 1;
}

.btn-icon-sm {
  padding: 0.5rem;
}

.btn-icon-lg {
  padding: 0.875rem;
}

/* Button with icon */
.btn .btn-icon-left {
  margin-right: 0.5rem;
}

.btn .btn-icon-right {
  margin-left: 0.5rem;
}

/* ===================================
   CARD COMPONENTS
   =================================== */

.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all var(--transition-slow);
}

.card-sm {
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
}

.card-lg {
  padding: var(--spacing-xl);
}

.card-hover {
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-indigo-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.card-body {
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-footer {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Card with gradient accent */
.card-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-indigo) 0%, var(--primary-indigo-light) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ===================================
   FORM ELEMENTS
   =================================== */

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-label-optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-indigo);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
  background: var(--bg-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-helper {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-error {
  font-size: 0.875rem;
  color: var(--error);
  margin-top: 0.5rem;
}

.form-success {
  font-size: 0.875rem;
  color: var(--success);
  margin-top: 0.5rem;
}

/* Checkbox & Radio */
.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 0;
}

.form-checkbox input,
.form-radio input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-indigo);
}

.form-checkbox label,
.form-radio label {
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin: 0;
}

/* ===================================
   BADGE COMPONENTS
   =================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-primary {
  background: rgba(67, 56, 202, 0.1);
  color: var(--primary-indigo);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-error {
  background: var(--error-light);
  color: var(--error);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-neutral {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* ===================================
   AVATAR COMPONENT
   =================================== */

.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-tertiary);
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-md {
  width: 40px;
  height: 40px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

.avatar-xl {
  width: 80px;
  height: 80px;
}

.avatar-2xl {
  width: 120px;
  height: 120px;
}

.avatar-3xl {
  width: 200px;
  height: 200px;
}

/* Avatar with border */
.avatar-bordered {
  border: 3px solid white;
  box-shadow: var(--shadow-md);
}

/* ===================================
   DIVIDER
   =================================== */

.divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--spacing-lg) 0;
}

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

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-indigo { color: var(--primary-indigo); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

/* Font Weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Font Sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 0.9375rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-4xl { font-size: 2.5rem; }

/* Spacing - Margin */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.ml-1 { margin-left: var(--spacing-xs); }
.ml-2 { margin-left: var(--spacing-sm); }
.mr-1 { margin-right: var(--spacing-xs); }
.mr-2 { margin-right: var(--spacing-sm); }

/* Spacing - Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

/* Border Radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Tablet and below */
@media (max-width: 968px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Desktop and above */
@media (min-width: 969px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Small mobile */
@media (max-width: 640px) {
  .hide-sm {
    display: none !important;
  }
}
