/* geo.css - Design Tokens and Component Classes for GEO Audit Studio */

/* --- TOKENS --- */
:root {
  --geo-brand-gold: var(--brand-gold);
  --geo-brand-gold-soft: var(--brand-gold-soft);
  --geo-brand-gold-deep: var(--brand-gold-deep);
  --geo-primary-blue: var(--brand-primary);
  --geo-primary-blue-hover: var(--brand-primary-hover);
  --geo-cyan-accent: var(--brand-cyan);
  --geo-app-bg: var(--app-bg);
  --geo-shell-bg: var(--sidebar-bg);
  --geo-sidebar-bg: var(--sidebar-bg);
  --geo-surface: var(--surface);
  --geo-surface-elevated: var(--surface-subtle);
  --geo-surface-gold-soft: var(--brand-gold-soft);
  --geo-border: var(--border);
  --geo-text-primary: var(--text-primary);
  --geo-text-secondary: var(--text-secondary);
  --geo-success: var(--success);
  --geo-warning: var(--warning);
  --geo-danger: var(--danger);
}

/* --- COMPONENTS --- */

/* Pages & Headers */
.geo-page {
  background-color: var(--geo-app-bg);
  color: var(--geo-text-primary);
  min-height: 100%;
  padding: 24px;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.geo-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.geo-page-header-info {
  flex: 1;
  min-width: 250px;
}

.geo-eyebrow {
  font-size: var(--font-size-badge);
  font-weight: var(--font-weight-badge);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--geo-brand-gold);
  margin-bottom: 6px;
}

.geo-title {
  font-size: var(--font-size-page-title);
  font-weight: var(--font-weight-page-title);
  margin: 0 0 4px 0;
  color: var(--geo-text-primary);
  line-height: var(--line-height-page-title);
}

.geo-subtitle {
  font-size: var(--font-size-meta);
  color: var(--geo-text-secondary);
  margin: 0;
  line-height: var(--line-height-meta);
}

/* Toolbar */
.geo-action-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background-color: var(--geo-surface);
  border: 1px solid var(--geo-border);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Metric Grid & Card */
.geo-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.geo-metric-card {
  background-color: var(--geo-surface);
  border: 1px solid var(--geo-border);
  border-top: 3px solid var(--geo-primary-blue); /* Default tech-blue accent top border */
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 1px 3px rgba(8, 17, 31, 0.04);
}
.geo-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 140, 255, 0.08);
}
.geo-metric-card.geo-accent-gold {
  border-top-color: var(--geo-brand-gold);
}
.geo-metric-card.geo-accent-cyan {
  border-top-color: var(--geo-cyan-accent);
}
.geo-metric-card.geo-accent-blue {
  border-top-color: var(--geo-primary-blue);
}

.geo-metric-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--geo-app-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.geo-metric-card-content {
  flex: 1;
}

.geo-metric-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--geo-text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.geo-metric-card-value {
  font-size: var(--font-size-metric-value);
  font-weight: var(--font-weight-page-title);
  color: var(--geo-text-primary);
  margin: 0;
}

.geo-metric-card-hint {
  font-size: var(--font-size-meta);
  color: var(--geo-text-secondary);
  margin-top: 4px;
}

/* Card */
.geo-card {
  background-color: var(--geo-surface);
  border: 1px solid var(--geo-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(8, 17, 31, 0.02);
  transition: box-shadow 0.2s, transform 0.2s;
}
html[data-theme="dark"] .geo-card {
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

.geo-card-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--geo-border);
  background-color: var(--geo-surface-elevated, var(--geo-surface));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.geo-card-title {
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-card-title);
  margin: 0;
  color: var(--geo-text-primary);
  line-height: var(--line-height-card-title);
}

.geo-card-body {
  padding: 10px 14px;
}

/* Data Table */
.geo-data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--geo-border);
  border-radius: 8px;
  background-color: var(--geo-surface);
}

.geo-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--font-size-table-cell);
}

.geo-data-table th {
  background-color: var(--geo-surface-elevated);
  color: var(--geo-text-primary);
  font-weight: var(--font-weight-badge);
  padding: 8px 12px;
  border-bottom: 2px solid var(--geo-border);
  text-transform: uppercase;
  font-size: var(--font-size-table-header);
  letter-spacing: 0.06em;
}

.geo-data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--geo-border);
  color: var(--geo-text-primary);
  vertical-align: middle;
  line-height: var(--line-height-table-cell);
}

.geo-data-table tbody tr:last-child td {
  border-bottom: none;
}

.geo-data-table tbody tr:hover td {
  background-color: rgba(0, 0, 0, 0.015);
}

html[data-theme="dark"] .geo-data-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.015);
}

/* Forms & Inputs */
.geo-form-field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.geo-form-field label {
  font-size: var(--font-size-form-label);
  font-weight: 600;
  color: var(--geo-text-primary);
}

.geo-input, .geo-select {
  background-color: var(--geo-app-bg);
  border: 1px solid var(--geo-border);
  color: var(--geo-text-primary);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: var(--font-size-form-control);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: var(--line-height-form-control);
}

.geo-input:focus, .geo-select:focus {
  border-color: var(--geo-primary-blue);
  box-shadow: 0 0 0 3px rgba(20, 147, 245, 0.15);
}

/* Checkbox List */
.geo-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--geo-border);
  border-radius: 6px;
  background-color: var(--geo-surface);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.geo-checkbox-row:hover {
  background-color: var(--geo-app-bg);
}

.geo-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--geo-primary-blue);
  cursor: pointer;
}

.geo-checkbox-label {
  font-size: var(--font-size-body);
  font-weight: 500;
  color: var(--geo-text-primary);
}

/* Badges */
.geo-provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: var(--font-size-badge);
  font-weight: var(--font-weight-badge);
  text-transform: uppercase;
  background-color: var(--geo-surface-elevated);
  color: var(--geo-text-secondary);
  border: 1px solid var(--geo-border);
}
.geo-provider-badge.geo-ai-signal {
  border-color: var(--geo-cyan-accent);
  color: var(--geo-cyan-accent);
  background-color: rgba(0, 209, 199, 0.08);
}
html[data-theme="dark"] .geo-provider-badge.geo-ai-signal {
  background-color: rgba(20, 226, 208, 0.08);
}

.geo-quota-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: var(--font-size-badge);
  font-weight: var(--font-weight-badge);
  background-color: var(--geo-brand-gold-soft);
  color: var(--geo-brand-gold-deep);
  border: 1px solid var(--geo-brand-gold);
}

/* States */
.geo-empty-state, .geo-error-state {
  text-align: center;
  padding: 48px 24px;
}

.geo-empty-state-icon, .geo-error-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.geo-empty-state-title, .geo-error-state-title {
  font-size: var(--font-size-card-title);
  font-weight: var(--font-weight-card-title);
  margin: 0 0 10px 0;
  color: var(--geo-text-primary);
}

.geo-empty-state-desc, .geo-error-state-desc {
  font-size: var(--font-size-meta);
  color: var(--geo-text-secondary);
  margin: 0 0 20px 0;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-meta);
}

/* Module Tabs */
.geo-module-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--geo-border);
  margin-bottom: 24px;
}

.geo-tab-item {
  padding: 10px 16px;
  font-size: var(--font-size-body);
  font-weight: 600;
  color: var(--geo-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.geo-tab-item:hover {
  color: var(--geo-text-primary);
}

.geo-tab-item.active {
  color: var(--geo-primary-blue);
  border-bottom-color: var(--geo-primary-blue);
}

/* Legacy Notice */
.geo-legacy-notice {
  background-color: var(--geo-brand-gold-soft);
  border: 1px dashed var(--geo-brand-gold);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.geo-legacy-notice-title {
  font-weight: 700;
  font-size: var(--font-size-card-title);
  color: var(--geo-brand-gold-deep);
  margin: 0 0 8px 0;
}

.geo-legacy-notice-desc {
  font-size: var(--font-size-meta);
  color: var(--geo-text-secondary);
  margin: 0 0 16px 0;
  line-height: var(--line-height-meta);
}

/* Buttons */
.geo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: var(--font-size-body);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
  outline: none;
  font-family: inherit;
}

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

.geo-btn-primary {
  background: linear-gradient(135deg, var(--geo-primary-blue) 0%, var(--geo-primary-blue-hover) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 4px rgba(0, 140, 255, 0.15);
}

.geo-btn-primary:hover {
  background: linear-gradient(135deg, var(--geo-primary-blue-hover) 0%, #0056B3 100%);
  box-shadow: 0 4px 8px rgba(0, 140, 255, 0.25);
}

.geo-btn-secondary {
  background-color: var(--geo-app-bg);
  color: var(--geo-text-primary);
  border: 1px solid var(--geo-border);
}

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

.geo-btn-ghost {
  background-color: transparent;
  color: var(--geo-text-secondary);
}

.geo-btn-ghost:hover {
  color: var(--geo-text-primary);
  background-color: var(--geo-app-bg);
}

.geo-btn-danger {
  background-color: var(--geo-danger);
  color: #FFFFFF;
}

.geo-btn-danger:hover {
  opacity: 0.9;
}

/* Body / Shell Dynamic Background Override in GEO scope */
.geo-brand-context {
  background-color: var(--geo-app-bg) !important;
}
.geo-brand-context .sidebar {
  background-color: var(--geo-sidebar-bg) !important;
  border-right: 1px solid var(--geo-border) !important;
}
.geo-brand-context .main-header {
  background-color: var(--geo-surface) !important;
  border-bottom: 1px solid var(--geo-border) !important;
}

/* Typography and Density Enforcement Layer */
body.geo-brand-context h1,
body.geo-brand-context .geo-title,
body.geo-brand-context .geo-module-title,
body.geo-brand-context .geo-modal-title,
.geo-modal-overlay .geo-modal-title {
  font-size: var(--font-size-page-title) !important;
  font-weight: var(--font-weight-page-title) !important;
  line-height: var(--line-height-page-title) !important;
}

body.geo-brand-context h2,
body.geo-brand-context .geo-section-title {
  font-size: var(--font-size-section-title) !important;
  font-weight: var(--font-weight-section-title) !important;
  line-height: var(--line-height-section-title) !important;
}

body.geo-brand-context h3,
body.geo-brand-context h4,
body.geo-brand-context .geo-card-title,
body.geo-brand-context .app-card-title,
.geo-modal-overlay .geo-card-title,
.geo-modal-overlay .app-card-title {
  font-size: var(--font-size-card-title) !important;
  font-weight: var(--font-weight-card-title) !important;
  line-height: var(--line-height-card-title) !important;
}

body.geo-brand-context label,
.geo-modal-overlay label {
  font-size: var(--font-size-form-label) !important;
  font-weight: var(--font-weight-badge) !important;
  line-height: normal !important;
}

body.geo-brand-context .geo-checkbox-label,
.geo-modal-overlay .geo-checkbox-label {
  font-size: var(--font-size-form-label) !important;
  font-weight: normal !important;
  line-height: normal !important;
}

.geo-aeo-question-item {
  font-size: 11.5px !important;
  font-weight: normal !important;
}

body.geo-brand-context input,
body.geo-brand-context select,
body.geo-brand-context textarea,
.geo-modal-overlay input,
.geo-modal-overlay select,
.geo-modal-overlay textarea,
.geo-input,
.geo-select,
.geo-textarea {
  font-size: var(--font-size-form-control) !important;
  line-height: var(--line-height-form-control) !important;
}

body.geo-brand-context table thead th,
.geo-modal-overlay table thead th {
  font-size: var(--font-size-table-header) !important;
  font-weight: var(--font-weight-badge) !important;
  padding: 8px 12px !important;
}

body.geo-brand-context table tbody td,
.geo-modal-overlay table tbody td {
  font-size: var(--font-size-table-cell) !important;
  line-height: var(--line-height-table-cell) !important;
  padding: 8px 12px !important;
}

body.geo-brand-context .geo-badge,
body.geo-brand-context .geo-provider-badge,
body.geo-brand-context .app-badge-text,
.geo-modal-overlay .geo-badge {
  font-size: var(--font-size-badge) !important;
  font-weight: var(--weight-badge, 600) !important;
}

.geo-violation-title {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}


