/**
 * TesoroAI Harness Theme
 * Professional recruitment platform theme
 * Version: 1.0.0
 */

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Brand Colors */
  --tesoro-primary: #2563eb;      /* Blue */
  --tesoro-primary-dark: #1e40af;
  --tesoro-primary-light: #3b82f6;
  --tesoro-secondary: #7c3aed;    /* Purple */
  --tesoro-secondary-dark: #6d28d9;
  --tesoro-accent: #06b6d4;       /* Cyan */

  /* Status Colors */
  --tesoro-success: #10b981;      /* Green */
  --tesoro-success-light: #d1fae5;
  --tesoro-warning: #f59e0b;      /* Orange */
  --tesoro-warning-light: #fef3c7;
  --tesoro-danger: #ef4444;       /* Red */
  --tesoro-danger-light: #fee2e2;
  --tesoro-info: #0ea5e9;         /* Sky Blue */
  --tesoro-info-light: #e0f2fe;

  /* Neutral Colors */
  --tesoro-gray-50: #f9fafb;
  --tesoro-gray-100: #f3f4f6;
  --tesoro-gray-200: #e5e7eb;
  --tesoro-gray-300: #d1d5db;
  --tesoro-gray-400: #9ca3af;
  --tesoro-gray-500: #6b7280;
  --tesoro-gray-600: #4b5563;
  --tesoro-gray-700: #374151;
  --tesoro-gray-800: #1f2937;
  --tesoro-gray-900: #111827;

  /* Background Colors */
  --tesoro-bg-primary: #ffffff;
  --tesoro-bg-secondary: #f9fafb;
  --tesoro-bg-dark: #111827;
  --tesoro-bg-sidebar: #1f2937;

  /* Text Colors */
  --tesoro-text-primary: #111827;
  --tesoro-text-secondary: #6b7280;
  --tesoro-text-light: #9ca3af;
  --tesoro-text-inverse: #ffffff;

  /* Spacing */
  --tesoro-spacing-xs: 0.25rem;   /* 4px */
  --tesoro-spacing-sm: 0.5rem;    /* 8px */
  --tesoro-spacing-md: 1rem;      /* 16px */
  --tesoro-spacing-lg: 1.5rem;    /* 24px */
  --tesoro-spacing-xl: 2rem;      /* 32px */
  --tesoro-spacing-2xl: 3rem;     /* 48px */

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

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

  /* Layout */
  --tesoro-sidebar-width: 260px;
  --tesoro-header-height: 64px;
  --tesoro-right-sidebar-width: 320px;

  /* Transitions */
  --tesoro-transition-fast: 150ms ease-in-out;
  --tesoro-transition-normal: 250ms ease-in-out;
  --tesoro-transition-slow: 350ms ease-in-out;

  /* Z-index Layers */
  --tesoro-z-dropdown: 1000;
  --tesoro-z-sticky: 1020;
  --tesoro-z-fixed: 1030;
  --tesoro-z-modal-backdrop: 1040;
  --tesoro-z-modal: 1050;
  --tesoro-z-popover: 1060;
  --tesoro-z-tooltip: 1070;
}

/* ==================== GLOBAL STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--tesoro-text-primary);
  background-color: var(--tesoro-bg-secondary);
  overflow-x: hidden;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--tesoro-text-primary);
  margin-bottom: var(--tesoro-spacing-md);
}

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

p {
  margin-bottom: var(--tesoro-spacing-md);
}

a {
  color: var(--tesoro-primary);
  text-decoration: none;
  transition: color var(--tesoro-transition-fast);
}

a:hover {
  color: var(--tesoro-primary-dark);
}

/* ==================== LAYOUT ==================== */
.tesoro-app {
  display: flex;
  min-height: 100vh;
}

/* Left Sidebar */
.tesoro-sidebar {
  width: var(--tesoro-sidebar-width);
  background: var(--tesoro-bg-sidebar);
  color: var(--tesoro-text-inverse);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: var(--tesoro-z-fixed);
  transition: transform var(--tesoro-transition-normal);
  box-shadow: var(--tesoro-shadow-lg);
}

.tesoro-sidebar-header {
  padding: var(--tesoro-spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tesoro-logo {
  display: flex;
  align-items: center;
  gap: var(--tesoro-spacing-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tesoro-text-inverse);
}

.tesoro-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--tesoro-primary), var(--tesoro-secondary));
  border-radius: var(--tesoro-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Sidebar Navigation */
.tesoro-nav {
  padding: var(--tesoro-spacing-md);
}

.tesoro-nav-section {
  margin-bottom: var(--tesoro-spacing-lg);
}

.tesoro-nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tesoro-gray-400);
  margin-bottom: var(--tesoro-spacing-sm);
  padding: 0 var(--tesoro-spacing-sm);
}

.tesoro-nav-item {
  display: flex;
  align-items: center;
  gap: var(--tesoro-spacing-sm);
  padding: var(--tesoro-spacing-sm) var(--tesoro-spacing-md);
  border-radius: var(--tesoro-radius-md);
  cursor: pointer;
  transition: all var(--tesoro-transition-fast);
  color: var(--tesoro-gray-300);
  margin-bottom: var(--tesoro-spacing-xs);
}

.tesoro-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--tesoro-text-inverse);
}

.tesoro-nav-item.active {
  background: var(--tesoro-primary);
  color: var(--tesoro-text-inverse);
}

.tesoro-nav-item-icon {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
}

.tesoro-nav-item-badge {
  margin-left: auto;
  background: var(--tesoro-danger);
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--tesoro-radius-full);
  font-weight: 600;
}

/* Main Content Area */
.tesoro-main {
  flex: 1;
  margin-left: var(--tesoro-sidebar-width);
  margin-right: var(--tesoro-right-sidebar-width);
  min-height: 100vh;
  background: var(--tesoro-bg-secondary);
}

.tesoro-header {
  background: var(--tesoro-bg-primary);
  border-bottom: 1px solid var(--tesoro-gray-200);
  padding: var(--tesoro-spacing-md) var(--tesoro-spacing-xl);
  position: sticky;
  top: 0;
  z-index: var(--tesoro-z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--tesoro-header-height);
}

.tesoro-header-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--tesoro-text-primary);
}

.tesoro-header-actions {
  display: flex;
  align-items: center;
  gap: var(--tesoro-spacing-md);
}

.tesoro-content {
  padding: var(--tesoro-spacing-xl);
  max-width: 1400px;
}

/* Right Sidebar */
.tesoro-right-sidebar {
  width: var(--tesoro-right-sidebar-width);
  background: var(--tesoro-bg-primary);
  border-left: 1px solid var(--tesoro-gray-200);
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  overflow-y: auto;
  padding: var(--tesoro-spacing-lg);
  z-index: var(--tesoro-z-fixed);
}

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

/* Cards */
.tesoro-card {
  background: var(--tesoro-bg-primary);
  border-radius: var(--tesoro-radius-lg);
  box-shadow: var(--tesoro-shadow-sm);
  padding: var(--tesoro-spacing-lg);
  margin-bottom: var(--tesoro-spacing-lg);
  transition: box-shadow var(--tesoro-transition-fast);
}

.tesoro-card:hover {
  box-shadow: var(--tesoro-shadow-md);
}

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

.tesoro-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.tesoro-card-body {
  color: var(--tesoro-text-secondary);
}

/* Buttons */
.tesoro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tesoro-spacing-sm);
  padding: var(--tesoro-spacing-sm) var(--tesoro-spacing-md);
  border-radius: var(--tesoro-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--tesoro-transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

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

.tesoro-btn-primary {
  background: var(--tesoro-primary);
  color: white;
}

.tesoro-btn-primary:hover:not(:disabled) {
  background: var(--tesoro-primary-dark);
}

.tesoro-btn-secondary {
  background: var(--tesoro-gray-200);
  color: var(--tesoro-text-primary);
}

.tesoro-btn-secondary:hover:not(:disabled) {
  background: var(--tesoro-gray-300);
}

.tesoro-btn-success {
  background: var(--tesoro-success);
  color: white;
}

.tesoro-btn-success:hover:not(:disabled) {
  background: #059669;
}

.tesoro-btn-danger {
  background: var(--tesoro-danger);
  color: white;
}

.tesoro-btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.tesoro-btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

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

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

.tesoro-badge-primary {
  background: var(--tesoro-primary-light);
  color: white;
}

.tesoro-badge-success {
  background: var(--tesoro-success-light);
  color: #065f46;
}

.tesoro-badge-warning {
  background: var(--tesoro-warning-light);
  color: #92400e;
}

.tesoro-badge-danger {
  background: var(--tesoro-danger-light);
  color: #991b1b;
}

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

/* Stats */
.tesoro-stat {
  text-align: center;
  padding: var(--tesoro-spacing-lg);
}

.tesoro-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--tesoro-primary);
  margin-bottom: var(--tesoro-spacing-xs);
}

.tesoro-stat-label {
  font-size: 0.875rem;
  color: var(--tesoro-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tesoro-stat-change {
  margin-top: var(--tesoro-spacing-xs);
  font-size: 0.75rem;
}

.tesoro-stat-change.positive {
  color: var(--tesoro-success);
}

.tesoro-stat-change.negative {
  color: var(--tesoro-danger);
}

/* Forms */
.tesoro-form-group {
  margin-bottom: var(--tesoro-spacing-lg);
}

.tesoro-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--tesoro-spacing-sm);
  color: var(--tesoro-text-primary);
}

.tesoro-input,
.tesoro-select,
.tesoro-textarea {
  width: 100%;
  padding: var(--tesoro-spacing-sm) var(--tesoro-spacing-md);
  border: 1px solid var(--tesoro-gray-300);
  border-radius: var(--tesoro-radius-md);
  font-size: 0.875rem;
  transition: all var(--tesoro-transition-fast);
  background: var(--tesoro-bg-primary);
}

.tesoro-input:focus,
.tesoro-select:focus,
.tesoro-textarea:focus {
  outline: none;
  border-color: var(--tesoro-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== UTILITIES ==================== */
.tesoro-flex {
  display: flex;
}

.tesoro-flex-col {
  flex-direction: column;
}

.tesoro-items-center {
  align-items: center;
}

.tesoro-justify-between {
  justify-content: space-between;
}

.tesoro-gap-sm {
  gap: var(--tesoro-spacing-sm);
}

.tesoro-gap-md {
  gap: var(--tesoro-spacing-md);
}

.tesoro-gap-lg {
  gap: var(--tesoro-spacing-lg);
}

.tesoro-mt-0 { margin-top: 0; }
.tesoro-mt-sm { margin-top: var(--tesoro-spacing-sm); }
.tesoro-mt-md { margin-top: var(--tesoro-spacing-md); }
.tesoro-mt-lg { margin-top: var(--tesoro-spacing-lg); }

.tesoro-mb-0 { margin-bottom: 0; }
.tesoro-mb-sm { margin-bottom: var(--tesoro-spacing-sm); }
.tesoro-mb-md { margin-bottom: var(--tesoro-spacing-md); }
.tesoro-mb-lg { margin-bottom: var(--tesoro-spacing-lg); }

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

.tesoro-text-primary { color: var(--tesoro-primary); }
.tesoro-text-secondary { color: var(--tesoro-text-secondary); }
.tesoro-text-success { color: var(--tesoro-success); }
.tesoro-text-warning { color: var(--tesoro-warning); }
.tesoro-text-danger { color: var(--tesoro-danger); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1280px) {
  .tesoro-right-sidebar {
    display: none;
  }

  .tesoro-main {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --tesoro-sidebar-width: 0;
  }

  .tesoro-sidebar {
    transform: translateX(-100%);
  }

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

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

  .tesoro-content {
    padding: var(--tesoro-spacing-md);
  }
}

/* ==================== ANIMATIONS ==================== */
@keyframes tesoro-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tesoro-fade-in {
  animation: tesoro-fadeIn var(--tesoro-transition-normal);
}

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

.tesoro-spin {
  animation: tesoro-spin 1s linear infinite;
}
