/* NF Metadata Dictionary - Design System */
/* Aligned with NF Portal visual identity */

:root {
  --color-primary: #125e81;
  --color-primary-light: #1a7ba8;
  --color-primary-dark: #0d4660;
  --color-secondary: #404b63;
  --color-secondary-light: #5a6580;
  --color-accent: #2196F3;
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-text: #1a202c;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-required-bg: lemonchiffon;
  --color-success: #22c55e;
  --color-warning: #f59e0b;

  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 30px;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 6px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);

  --header-height: 64px;
  --tab-height: 48px;
  --sidebar-width: 360px;
}

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

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.header-left { display: flex; align-items: baseline; gap: 12px; }

.site-title {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.site-subtitle {
  font-size: var(--fs-sm);
  opacity: 0.8;
}

.site-updated {
  font-size: var(--fs-xs);
  opacity: 0.6;
  margin-left: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  color: white;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.portal-link:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-2px);
  text-decoration: none;
}

.portal-link-icon {
  font-size: 18px;
  transition: transform 0.2s;
}

.portal-link:hover .portal-link-icon {
  transform: translateX(-2px);
}

.global-search-wrapper { position: relative; }

.global-search {
  width: 320px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.global-search::placeholder { color: rgba(255,255,255,0.65); }
.global-search:focus {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}

.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 420px;
  max-height: 450px;
  overflow-y: auto;
  margin-top: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--fs-sm);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-bg); }

.search-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.search-badge.template { background: #dbeafe; color: #1e40af; }
.search-badge.slot { background: #dcfce7; color: #166534; }
.search-badge.vocab { background: #fef3c7; color: #92400e; }
.search-badge.value { background: #f3e8ff; color: #6b21a8; }

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 0;
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  padding: 0 24px;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.tab-btn {
  padding: 14px 24px;
  border: none;
  background: none;
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tab-btn:hover {
  color: var(--color-text);
  background: rgba(18, 94, 129, 0.05);
}
.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: rgba(18, 94, 129, 0.08);
}

/* Tab Panels */
.tab-panel { padding: 24px; }
.tab-panel[hidden] { display: none; }

/* Templates Layout */
.templates-layout {
  display: flex;
  gap: 24px;
  min-height: calc(100vh - var(--header-height) - var(--tab-height) - 80px);
}

.templates-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-height) - var(--tab-height) - 80px);
  position: sticky;
  top: calc(var(--header-height) + var(--tab-height) + 24px);
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
}

.templates-main { flex: 1; min-width: 0; }

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  background: var(--color-bg);
  outline: none;
  transition: all 0.2s;
}

.filter-search:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(18, 94, 129, 0.1);
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.filter-toggle input { cursor: pointer; }

.filter-select {
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: 500;
  background: var(--color-bg);
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-select:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface);
}
.filter-select:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(18, 94, 129, 0.1);
}
.filter-select#filter-usage {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
  color: var(--color-primary);
  font-weight: 600;
}

.filter-number {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  background: var(--color-surface);
  outline: none;
  transition: border-color 0.15s;
}
.filter-number:focus { border-color: var(--color-primary); }

/* Filter Notice */
.filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  color: var(--color-secondary);
  box-shadow: var(--shadow-sm);
}

.filter-notice-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-notice-text strong {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-notice-link {
  padding: 6px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.filter-notice-link:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.filter-notice.hidden {
  display: none;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

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

.template-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.template-card-name {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-primary);
  word-break: break-word;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.template-card-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-card-meta {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.template-card-fields {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-sm);
}

.badge-abstract { background: #f1f5f9; color: var(--color-text-secondary); border: 1px solid #e2e8f0; }
.badge-type { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-granularity { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }

/* Detail View */
.detail-view { }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}

.back-btn:hover { border-color: var(--color-border-hover); }

.detail-header {
  margin-bottom: 16px;
}

.detail-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-text);
}

.detail-display-name {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}

.detail-desc {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.detail-meta {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Slot Table */
.slot-table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.slot-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.slot-table-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
}

.slot-filter {
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--fs-xs);
  outline: none;
}

.slot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.slot-table th {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
}

.slot-table th:hover { color: var(--color-text); }
.slot-table th .sort-arrow { margin-left: 4px; font-size: 10px; }

.slot-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.slot-table tr:last-child td { border-bottom: none; }
.slot-table tr.required { background: var(--color-required-bg); }
.slot-table tr:hover { background: #f0f4f8; }
.slot-table tr.required:hover { background: #fdf5d3; }

.range-link {
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed var(--color-primary);
}

.range-link:hover { border-bottom-style: solid; }

.range-union { font-size: var(--fs-xs); }
.range-union .range-link { font-size: var(--fs-xs); }

/* Hierarchy Tree */
.hierarchy-tree ul {
  list-style: none;
  padding-left: 16px;
  margin: 0;
}

.hierarchy-tree > ul { padding-left: 0; }

.hierarchy-tree li { margin: 2px 0; }

.tree-toggle {
  display: inline-flex;
  align-items: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  color: var(--color-text-muted);
  cursor: pointer;
  justify-content: center;
  flex-shrink: 0;
}

.tree-group-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 3px 4px;
  border-radius: var(--radius-sm);
}

.tree-group-label:hover { color: var(--color-primary); }

.tree-label {
  font-size: var(--fs-sm);
  color: var(--color-text);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tree-label:hover { background: var(--color-bg); }
.tree-label.active { background: #dbeafe; color: var(--color-primary); font-weight: 500; }

.tree-children { overflow: hidden; }
.tree-children.collapsed { display: none; }

/* Vocabulary */
.vocab-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.vocab-select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  background: var(--color-surface);
  outline: none;
  min-width: 220px;
}

.vocab-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.enum-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.enum-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.enum-card-header:hover { background: var(--color-bg); }

.enum-card-name {
  font-weight: 600;
  color: var(--color-primary);
  font-size: var(--fs-base);
}

.enum-card-count {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.enum-card-desc {
  padding: 0 16px 8px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.enum-card-body {
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}

.enum-card-body.collapsed { display: none; }

.enum-value-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.enum-value-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.enum-value-item:last-child { border-bottom: none; }

.enum-value-name {
  font-weight: 500;
  min-width: 150px;
  flex-shrink: 0;
  word-break: break-word;
}

.enum-value-def {
  color: var(--color-text-secondary);
  flex: 1;
}

.enum-value-links {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ontology-link {
  font-size: var(--fs-xs);
  color: var(--color-accent);
  white-space: nowrap;
}

.synonym-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  margin-left: 4px;
}

/* SPARQL Explorer */
.sparql-layout {
  max-width: 1000px;
}

.sparql-info {
  margin-bottom: 16px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.sparql-info code {
  background: var(--color-bg);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.sparql-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: var(--fs-sm);
}

.sparql-examples-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  background: var(--color-surface);
}

.sparql-editor {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.5;
  resize: vertical;
  outline: none;
  background: var(--color-surface);
  tab-size: 2;
}

.sparql-editor:focus { border-color: var(--color-primary); }

.sparql-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover { background: var(--color-primary-light); }

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.btn-secondary:hover { border-color: var(--color-border-hover); }

.sparql-status {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.sparql-results {
  margin-top: 16px;
}

.sparql-results table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sparql-results th {
  text-align: left;
  padding: 8px 12px;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: var(--fs-xs);
  text-transform: uppercase;
}

.sparql-results td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--color-border);
  word-break: break-word;
}

.sparql-results tr:last-child td { border-bottom: none; }
.sparql-results tr:hover { background: var(--color-bg); }

.sparql-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #dc2626;
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

/* About */
.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-hero {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 48px;
  background: linear-gradient(135deg, rgba(18, 94, 129, 0.05) 0%, rgba(18, 94, 129, 0.02) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(18, 94, 129, 0.1);
}

.about-hero h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.about-lead {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 700px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 48px;
}

.about-section-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-secondary);
  letter-spacing: -0.3px;
}

.about-section-desc {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 20px;
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.about-card p {
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.stat-value {
  display: block;
  font-size: 42px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* App Cards */
.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.app-card-title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-secondary);
}

.app-card-desc {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 20px;
}

.app-card-link {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.app-card-link:hover {
  color: var(--color-primary-light);
  transform: translateX(4px);
}

/* Resource Links */
.resource-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.resource-link:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
  background: rgba(18, 94, 129, 0.02);
}

.resource-link-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.resource-link-title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.resource-link-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
  .templates-sidebar { display: none; }
  .templates-layout { flex-direction: column; }
  .site-header { flex-direction: column; height: auto; padding: 12px 16px; gap: 12px; }
  .header-left { flex-direction: column; align-items: flex-start; }
  .header-right { width: 100%; flex-direction: column; gap: 12px; }
  .portal-link { width: 100%; justify-content: center; }
  .global-search { width: 100%; }
  .search-results { width: 100%; }
  .tab-nav { padding: 0 12px; overflow-x: auto; }
  .tab-panel { padding: 16px; }
  .card-grid { grid-template-columns: 1fr; }
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}
