/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f0f1f3;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-dim: #666;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #ca8a04;
  --blue: #2563eb;
  --gray: #6b7280;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header h1 {
  font-size: 18px;
  font-weight: 600;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn:hover { background: var(--surface-2); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Filters bar */
.filters {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  align-items: center;
}
.filters select, .filters input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
.filters input { width: 240px; }

/* Stats bar */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.stat-value {
  font-size: 14px;
  font-weight: 700;
}
.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* Focus bar */
.focus-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  font-size: 12px;
}
.focus-group {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.focus-title {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-right: 2px;
}
.focus-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 11px;
}
.focus-tag b {
  color: var(--accent);
  font-weight: 700;
}
.focus-tag.clickable {
  cursor: pointer;
  transition: all 0.15s;
}
.focus-tag.clickable:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.focus-tag.clickable:hover b {
  color: white;
}
.focus-tag.clickable.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.focus-tag.clickable.active b {
  color: white;
}
.focus-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* Data grid container */
.grid-container {
  flex: 1 1;
  overflow: auto;
}

/* AG Grid light theme overrides */
.ag-theme-alpine {
  --ag-background-color: var(--surface);
  --ag-header-background-color: var(--surface-2);
  --ag-odd-row-background-color: #fafbfc;
  --ag-row-hover-color: #f0f4ff;
  --ag-border-color: var(--border);
  --ag-header-foreground-color: var(--text-dim);
  --ag-row-height: 28px;
  --ag-header-height: 30px;
  --ag-foreground-color: var(--text);
  --ag-font-size: 11px;
  --ag-cell-horizontal-padding: 6px;
  --ag-line-height: 1.4;
}
.ag-theme-alpine .ag-cell {
  display: flex;
  align-items: center;
}

/* Status badges */
.status-won { color: var(--green); font-weight: 600; }
.status-lost { color: var(--red); font-weight: 600; }
.status-going { color: var(--blue); font-weight: 600; }
.status-cancelled { color: var(--gray); }
.status-pending { color: var(--yellow); font-weight: 600; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin: 16px;
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: #f0f4ff;
}
.upload-zone p { color: var(--text-dim); margin-top: 8px; }

/* Upload preview */
.upload-preview {
  margin: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.upload-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.upload-preview th {
  background: var(--surface-2);
  padding: 8px 12px;
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
}
.upload-preview td {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

/* Warnings */
.warnings {
  margin: 12px 16px;
  padding: 12px 16px;
  background: #fef9e7;
  border: 1px solid #f0d060;
  border-radius: 8px;
}
.warnings p {
  color: #92600a;
  font-size: 13px;
  margin: 4px 0;
}

/* Analytics */
.analytics {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.stat-card h3 {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 700;
}
.stat-card .sub { color: var(--text-dim); font-size: 12px; margin-top: 4px; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  grid-column: span 1;
}
.chart-card h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.chart-card-wide { grid-column: span 2; }

/* Bar chart inline */
.bar-list { display: flex; flex-direction: column; gap: 6px; }
.bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.bar-item .label { width: 120px; color: var(--text-dim); text-align: right; flex-shrink: 0; }
.bar-item .bar {
  flex: 1 1;
  height: 24px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-item .bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.bar-item .count { width: 40px; text-align: right; font-weight: 500; }

/* Tender view */
.tender-view {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  overflow: hidden;
}
.tender-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.tender-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tender-filters select, .tender-filters input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
.tender-filters input { width: 200px; }
.tender-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tender-badge {
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.tender-notice {
  padding: 8px 16px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.tender-stats-row {
  display: flex;
  gap: 16px;
  padding: 6px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}
.tender-stats-row b { color: var(--text); }
.tender-table-wrap {
  flex: 1 1;
  overflow: auto;
}
.tender-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tender-table th {
  background: var(--surface-2);
  padding: 8px 10px;
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border);
}
.tender-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tender-table tr:hover { background: #f0f4ff; }
.tender-table tr.tender-new { background: #fffde7; }
.tender-table tr.tender-new:hover { background: #fff9c4; }
.tender-table a {
  color: var(--accent);
  text-decoration: none;
}
.tender-table a:hover { text-decoration: underline; }
.tender-status-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.tender-status-tag.open {
  background: #e3f2fd;
  color: #1565c0;
}
.tender-status-tag.awarded {
  background: #e8f5e9;
  color: #2e7d32;
}
.tender-keyword-tag {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--text-dim);
}
.tender-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  color: var(--text-dim);
  text-align: center;
}

/* Search panel */
.search-panel {
  margin: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.search-panel input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 12px;
}
.search-results {
  max-height: 400px;
  overflow-y: auto;
}
.search-result {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.search-result a {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.search-result a:hover { text-decoration: underline; }
.search-result p {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 4px;
}

/* Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-dim);
}

/* Dealer tabs in grid view */
.dealer-tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  background: var(--surface);
  overflow-x: auto;
}
.dealer-tab {
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.dealer-tab:hover { color: var(--text); }
.dealer-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.dealer-winrate {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  margin-left: 2px;
}

/* Context menu */
.ctx-menu {
  position: fixed;
  z-index: 999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 180px;
  padding: 4px 0;
  font-size: 13px;
}
.ctx-menu-header {
  padding: 8px 12px 4px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.ctx-menu-label {
  padding: 4px 12px 2px;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ctx-menu-group {
  padding: 2px 0;
}
.ctx-menu-item {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border: none;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.ctx-menu-item:hover {
  background: var(--surface-2);
}
.ctx-menu-item.active {
  background: #e8f0fe;
  font-weight: 500;
}
.ctx-menu-item.danger {
  color: var(--red);
}
.ctx-menu-item.danger:hover {
  background: #fef2f2;
}
.ctx-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 { margin-bottom: 16px; }
.modal .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Analysis side panel */
.analysis-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  z-index: 900;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.analysis-header h2 {
  font-size: 16px;
  font-weight: 600;
}
.analysis-actions {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px;
  gap: 16px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}
.analysis-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.analysis-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 16px;
}
.analysis-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.analysis-tokens {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
}
.analysis-body {
  font-size: 13px;
  line-height: 1.7;
}
.analysis-body h2 {
  font-size: 15px;
  margin: 16px 0 8px;
  color: var(--accent);
}
.analysis-body h3 {
  font-size: 14px;
  margin: 14px 0 6px;
  color: var(--text);
}
.analysis-body h4 {
  font-size: 13px;
  margin: 12px 0 4px;
  color: var(--text);
}
.analysis-body ul {
  margin: 4px 0 8px 0;
  padding-left: 18px;
}
.analysis-body li {
  margin: 3px 0;
  list-style: disc;
}
.analysis-body strong {
  color: var(--text);
}
.analysis-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

