/**
 * Tee Commerce Design System v1.0.0: tokens + base + components
 * Generated from tokens/tokens.json by scripts/build.mjs. Do not edit.
 * https://github.com/Teecommerce/design-system
 */

@import url('https://fonts.googleapis.com/css2?family=Rethink+Sans:wght@400;500;600;700&family=Young+Serif&display=swap');

/* ========================================
   CSS Variables
   ======================================== */

:root {
  /* Core Brand Colors */
  --tc-porcelain: #FFFCF9;
  --tc-onyx: #001109;
  --tc-pine: #204737;
  --tc-lemon: #CBEF44;

  /* Page Colors */
  --tc-bg: #F9F7F2; /* Mellow cream - approved background */
  --tc-surface: #ffffff; /* Cards, panels */
  --tc-border: #e4e8e5; /* Borders, dividers */
  --tc-border-light: #eef1ef; /* Lighter borders */
  --tc-text-muted: rgba(0, 17, 9, 0.5);

  /* Semantic aliases (for compatibility) */
  --tc-bg-card: var(--tc-surface);
  --tc-bg-subtle: #f5f6f3;
  --tc-text: var(--tc-onyx);
  --tc-text-secondary: var(--tc-pine);
  --tc-accent: var(--tc-lemon);
  --tc-accent-hover: #b8dc2e;
  --tc-accent-text: var(--tc-onyx);
  --tc-focus-ring: rgba(32, 71, 55, 0.25);

  /* Typography */
  --font-heading: 'Young Serif', Georgia, serif;
  --font-body: 'Rethink Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --tc-shadow-sm: 0 1px 3px rgba(0, 17, 9, 0.08);
  --tc-shadow-md: 0 4px 12px rgba(0, 17, 9, 0.08);
  --tc-shadow-lg: 0 12px 24px rgba(0, 17, 9, 0.08);
  --tc-shadow-xl: 0 20px 60px rgba(0, 17, 9, 0.12);
  --shadow-pine: 0 4px 16px rgba(32, 71, 55, 0.25);

  /* Border Radius */
  --tc-radius-xs: 6px;
  --tc-radius-sm: 8px;
  --tc-radius: 12px;
  --tc-radius-lg: 14px;
  --tc-radius-xl: 16px;
  --tc-radius-2xl: 20px;
  --tc-radius-pill: 100px;

  /* Spacing */
  --tc-space-xs: 4px;
  --tc-space-sm: 8px;
  --tc-space-md: 16px;
  --tc-space-lg: 24px;
  --tc-space-xl: 32px;
  --tc-space-2xl: 48px;
  --tc-space-3xl: 56px;

  /* Transitions */
  --tc-transition: 0.2s ease;
  --tc-transition-slow: 0.25s ease;
}

/* ========================================
   Base Styles
   ======================================== */

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

body {
  font-family: var(--font-body);
  background: var(--tc-bg);
  color: var(--tc-onyx);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6,
.tc-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--tc-onyx);
  margin: 0;
}

h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1.125rem; line-height: 1.4; }

.tc-h1 {
  font-size: 4.5rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.tc-h2 {
  font-size: 1.75rem;
  line-height: 1.3;
}

.tc-h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.tc-body {
  font-size: 1rem;
  line-height: 1.6;
}

.tc-small {
  font-size: 0.85rem;
  line-height: 1.4;
}

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

a {
  color: var(--tc-pine);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code, .mono {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}

/* ========================================
   Layout Utilities
   ======================================== */

.tc-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--tc-space-3xl);
}

.tc-section {
  padding: var(--tc-space-2xl) var(--tc-space-3xl);
  max-width: 1400px;
  margin: 0 auto;
}

.tc-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--tc-space-xl);
}

.tc-flex { display: flex; align-items: center; }
.tc-flex-col { display: flex; flex-direction: column; }
.tc-flex-between { display: flex; align-items: center; justify-content: space-between; }
.tc-flex-center { display: flex; align-items: center; justify-content: center; }
.tc-flex-wrap { flex-wrap: wrap; }

.tc-gap-xs { gap: var(--tc-space-xs); }
.tc-gap-sm { gap: var(--tc-space-sm); }
.tc-gap-md { gap: var(--tc-space-md); }
.tc-gap-lg { gap: var(--tc-space-lg); }

.tc-grid { display: grid; }

/* ========================================
   App Header / Top Bar
   ======================================== */

.app-header,
.tc-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--tc-space-md) var(--tc-space-lg);
  background: var(--tc-surface);
  border-bottom: 1px solid var(--tc-border);
}

.app-header h1,
.app-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--tc-onyx);
  letter-spacing: -0.02em;
}

/* ========================================
   Buttons
   ======================================== */

.btn,
.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--tc-radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--tc-transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  background: var(--tc-bg-subtle);
  color: var(--tc-onyx);
}

.btn:hover,
.tc-btn:hover {
  background: var(--tc-border);
}

.btn:active,
.tc-btn:active {
  transform: scale(0.98);
}

.btn:disabled,
.tc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary,
.tc-btn-pine {
  background: var(--tc-pine);
  color: var(--tc-porcelain);
}

.btn-primary:hover,
.tc-btn-pine:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-pine);
}

.btn-outline,
.tc-btn-outline {
  background: transparent;
  border: 1px solid var(--tc-border);
  color: var(--tc-onyx);
}

.btn-outline:hover,
.tc-btn-outline:hover {
  border-color: var(--tc-pine);
  color: var(--tc-pine);
}

.btn-secondary {
  background: var(--tc-bg-subtle);
  color: var(--tc-onyx);
  border: 1px solid var(--tc-border-light);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--tc-border);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--tc-radius-xs);
}

.btn-icon {
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1;
  background: var(--tc-bg-subtle);
  border: 1px solid var(--tc-border-light);
  border-radius: var(--tc-radius-xs);
  cursor: pointer;
  transition: all var(--tc-transition);
}

.btn-icon:hover {
  background: var(--tc-border);
}

.btn-icon.active {
  background: var(--tc-pine);
  border-color: var(--tc-pine);
  color: var(--tc-porcelain);
}

/* ========================================
   Cards
   ======================================== */

.card,
.tc-card {
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-xl);
  padding: var(--tc-space-lg);
  transition: all var(--tc-transition-slow);
}

.card:hover,
.tc-card:hover {
  border-color: var(--tc-pine);
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-lg);
}

.card--flat,
.card--flat:hover {
  transform: none;
  box-shadow: none;
}

.tc-card-lemon:hover {
  background: var(--tc-lemon);
}

/* ========================================
   Navigation Tabs
   ======================================== */

.tc-nav-tabs {
  display: flex;
  background: var(--tc-bg);
  padding: var(--tc-space-xs);
  border-radius: var(--tc-radius);
  gap: var(--tc-space-xs);
}

.tc-nav-tab {
  color: var(--tc-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--tc-radius-sm);
  transition: all var(--tc-transition-slow);
  border: none;
  background: none;
  cursor: pointer;
}

.tc-nav-tab:hover {
  color: var(--tc-onyx);
}

.tc-nav-tab.active {
  background: var(--tc-surface);
  color: var(--tc-onyx);
  box-shadow: var(--tc-shadow-sm);
}

/* ========================================
   Toggle Tabs
   ======================================== */

.tc-toggle-tabs {
  display: flex;
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  padding: var(--tc-space-xs);
  border-radius: var(--tc-radius);
  gap: var(--tc-space-xs);
}

.tc-toggle-tab {
  padding: 8px 18px;
  border-radius: var(--tc-radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--tc-text-muted);
  cursor: pointer;
  transition: all var(--tc-transition);
  border: none;
  background: none;
}

.tc-toggle-tab:hover {
  color: var(--tc-onyx);
}

.tc-toggle-tab.active {
  background: var(--tc-pine);
  color: var(--tc-porcelain);
}

/* ========================================
   Modals
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 17, 9, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--tc-surface);
  border-radius: var(--tc-radius-xl);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--tc-shadow-xl);
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--tc-onyx);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--tc-text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tc-radius-sm);
  transition: all var(--tc-transition);
}

.modal-close:hover {
  background: var(--tc-bg-subtle);
  color: var(--tc-onyx);
}

/* ========================================
   Form Inputs
   ======================================== */

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
select,
textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--tc-onyx);
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--tc-transition-slow), box-shadow var(--tc-transition-slow);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tc-pine);
  box-shadow: 0 0 0 3px var(--tc-focus-ring);
}

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

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

.search-input {
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  width: 260px;
  max-width: 100%;
  outline: none;
  transition: border-color var(--tc-transition-slow), box-shadow var(--tc-transition-slow);
}

.search-input:focus {
  border-color: var(--tc-pine);
  box-shadow: 0 0 0 3px var(--tc-focus-ring);
}

/* ========================================
   Badges
   ======================================== */

.badge,
.tc-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--tc-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #ffedd5; color: #ea580c; }
.badge-danger  { background: #fee2e2; color: #dc2626; }
.badge-neutral { background: var(--tc-bg-subtle); color: var(--tc-text-muted); }

.tc-eyebrow {
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  color: var(--tc-pine);
}

/* ========================================
   Toolbar
   ======================================== */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tc-space-md);
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  background: var(--tc-bg-subtle);
  border-radius: var(--tc-radius-sm);
  padding: 4px;
}

.view-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--tc-text-muted);
  display: flex;
  align-items: center;
  border-radius: var(--tc-radius-xs);
  transition: all var(--tc-transition-slow);
}

.view-btn.active {
  background: var(--tc-pine);
  color: var(--tc-porcelain);
  box-shadow: var(--tc-shadow-sm);
}

.view-btn:hover:not(.active) {
  color: var(--tc-onyx);
}

/* ========================================
   Spinner & Loading
   ======================================== */

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--tc-border);
  border-top-color: var(--tc-pine);
  border-radius: 50%;
  animation: tc-spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

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

/* ========================================
   Skeleton Loader
   ======================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--tc-bg-subtle) 25%,
    var(--tc-border) 50%,
    var(--tc-bg-subtle) 75%
  );
  background-size: 200% 100%;
  animation: tc-skeleton 1.5s ease infinite;
  border-radius: var(--tc-radius-xs);
}

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

/* ========================================
   Empty State
   ======================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 40px;
  text-align: center;
  color: var(--tc-text-muted);
}

.empty-state h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--tc-onyx);
  margin-bottom: var(--tc-space-sm);
}

.empty-state p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--tc-text-muted);
}

/* ========================================
   Avatar
   ======================================== */

.tc-avatar {
  width: 36px;
  height: 36px;
  background: var(--tc-lemon);
  border-radius: var(--tc-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--tc-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--tc-pine); }

/* ========================================
   Responsive Utilities
   ======================================== */

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

@media (max-width: 768px) {
  .tc-hide-mobile { display: none !important; }

  .tc-container {
    padding: 0 var(--tc-space-md);
  }
}

@media (min-width: 769px) {
  .tc-hide-desktop { display: none !important; }
}
