/* KCG Cooperative Platform Styles */
/* Base CSS Variables matching the React design system */

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 358 75% 45%; /* KCG red */
  --primary-foreground: 0 0% 100%;
  --secondary: 30 100% 60%; /* KCG orange */
  --secondary-foreground: 0 0% 100%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 30 100% 60%; /* KCG orange */
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 358 75% 45%; /* KCG red */
  --radius: 0.75rem;
  
  /* KCG Brand Colors */
  --kcg-red: 358 75% 45%;
  --kcg-red-light: 358 75% 55%;
  --kcg-red-dark: 358 75% 35%;
  --kcg-orange: 30 100% 60%;
  --kcg-orange-light: 30 100% 70%;
  --kcg-orange-dark: 30 100% 50%;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
}

/* Layout Classes */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Grid */
.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)); }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-28 { padding-top: 7rem; }
.pb-20 { padding-bottom: 5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-auto { margin-top: auto; }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.max-w-md { max-width: 28rem; }
.max-w-none { max-width: none; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Position */
.fixed { position: fixed; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }

/* Text */
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }
.text-white { color: #ffffff; }
.text-gray-600 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

/* Background */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-900 { background-color: #111827; }

/* Gradients */
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }
.from-kcgRed\/10 { --tw-gradient-from: hsl(var(--kcg-red) / 0.1); --tw-gradient-to: hsl(var(--kcg-red) / 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-white { --tw-gradient-to: #ffffff; }

/* Border Radius */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: var(--radius); }

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

/* Card Component */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
  padding: 1.5rem;
  padding-bottom: 0;
}

.card-content {
  padding: 1.5rem;
}

.card-footer {
  padding: 1.5rem;
  padding-top: 0;
}

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

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

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

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.5rem 1rem;
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 0.5rem 1rem;
}

.btn-outline {
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0.5rem 1rem;
}

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

.btn-ghost {
  padding: 0.5rem 1rem;
}

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

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* Form Elements */
.form-input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px hsl(var(--ring));
}

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

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

/* Custom KCG Classes */
.kcg-gradient-text {
  background: linear-gradient(to right, hsl(var(--kcg-red)), hsl(var(--kcg-orange)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kcg-gradient-bg {
  background: linear-gradient(to right, hsl(var(--kcg-red)), hsl(var(--kcg-orange)));
}

.hover-card {
  transition: all 0.3s ease;
}

.hover-card:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.glass-card {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Backdrop Blur */
.backdrop-blur-lg {
  backdrop-filter: blur(16px);
}

/* Object Fit */
.object-contain {
  object-fit: contain;
}

/* Space Between */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Responsive Design */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:text-5xl { font-size: 3rem; }
  .md\:flex-row { flex-direction: row; }
  .md\:text-right { text-align: right; }
  .md\:mb-0 { margin-bottom: 0; }
}

/* Animations */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.animate-shimmer {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
  background-size: 1000px 100%;
}

/* Loading Spinner */
.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 4px solid hsl(var(--primary));
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Alert Styles */
.alert {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.alert-success {
  background-color: hsl(142, 76%, 96%);
  border-color: hsl(142, 76%, 36%);
  color: hsl(142, 76%, 16%);
}

.alert-error {
  background-color: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive));
  color: hsl(var(--destructive));
}

.alert-warning {
  background-color: hsl(38, 92%, 96%);
  border-color: hsl(38, 92%, 50%);
  color: hsl(38, 92%, 20%);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  text-decoration: none;
  color: hsl(var(--foreground));
  transition: all 0.2s;
}

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

/* Icon classes */
.icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm { width: 0.75rem; height: 0.75rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }

/* Hide/Show utilities */
.hidden { display: none; }
.block { display: block; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.left-3 { left: 0.75rem; }
.right-3 { right: 0.75rem; }
.top-1\/2 { top: 50%; }
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

/* Input with icon wrapper */
.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-left: 2.5rem;
}

.input-with-icon .icon-left {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
}

.input-with-icon .icon-right {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}