/* RoleFerry Enterprise UI Styles */
/* Clean, modern design inspired by Jobright, Apollo, Simplify */

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

:root {
  /* Color Palette */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --fg-primary: #e6edf7;
  --fg-secondary: #9fb3c8;
  --fg-tertiary: #6b7280;
  
  /* Brand Colors */
  --brand-orange: #ff7a18;
  --brand-blue: #60a5fa;
  
  /* UI Colors */
  --card-bg: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.12);
  --hover-bg: rgba(255, 255, 255, 0.06);
  
  /* Status Colors */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  
  /* Borders */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body.light {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --fg-primary: #0a0a0a;
  --fg-secondary: #334155;
  --fg-tertiary: #9ca3af;
  --card-bg: rgba(0, 0, 0, 0.02);
  --border: rgba(0, 0, 0, 0.12);
  --hover-bg: rgba(0, 0, 0, 0.04);
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0a2a66 100%);
  color: var(--fg-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* Top Navigation */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo {
  height: 32px;
  width: auto;
}

.wordmark {
  height: 24px;
  width: auto;
}

.nav-center {
  display: none;
  gap: var(--space-md);
  flex: 1;
  justify-content: center;
}

@media (min-width: 1024px) {
  .nav-center {
    display: flex;
  }
}

.nav-link {
  color: var(--fg-secondary);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s;
  font-size: 14px;
}

.nav-link:hover {
  color: var(--fg-primary);
  background: var(--hover-bg);
}

.nav-link.active {
  color: var(--brand-orange);
  background: rgba(255, 122, 24, 0.1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
}

.mode-btn {
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  color: var(--fg-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.mode-btn.active {
  background: var(--brand-blue);
  color: white;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--fg-primary);
  cursor: pointer;
  transition: all 0.2s;
}

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

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--border);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main Layout with Copilot */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1920px;
  margin: 0 auto;
}

@media (min-width: 1280px) {
  .main-layout {
    grid-template-columns: 1fr 360px;
  }
}

.content-area {
  padding: var(--space-xl) var(--space-lg);
  overflow-y: auto;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

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

.view-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.view-subtitle {
  font-size: 14px;
  color: var(--fg-secondary);
  margin-top: var(--space-xs);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-tertiary {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-orange), #ffd25a);
  color: #000;
  border: none;
}

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

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--fg-primary);
}

.btn-secondary:hover {
  background: var(--hover-bg);
}

.btn-tertiary {
  background: transparent;
  color: var(--fg-secondary);
}

.btn-back {
  padding: var(--space-sm) var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.stat-label {
  font-size: 13px;
  color: var(--fg-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
}

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

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

.stat-change.neutral {
  color: var(--fg-tertiary);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.action-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.action-card:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-icon {
  font-size: 36px;
}

.action-label {
  font-weight: 600;
  font-size: 14px;
}

/* Activity */
.recent-activity {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.activity-item {
  display: flex;
  align-items: start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
}

.activity-icon {
  font-size: 24px;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  margin-bottom: var(--space-xs);
}

.activity-time {
  font-size: 12px;
  color: var(--fg-tertiary);
}

/* Jobs Layout */
.jobs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 1024px) {
  .jobs-layout {
    grid-template-columns: 260px 1fr;
  }
}

/* Jobs Filters */
.jobs-filters {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.filter-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-header {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-secondary);
  margin-bottom: var(--space-md);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 14px;
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-range {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
}

.range-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-orange);
}

/* Jobs List */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all 0.2s;
}

.job-card:hover {
  background: var(--hover-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.job-card-header {
  display: flex;
  align-items: start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.job-company-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: white;
  padding: var(--space-xs);
  object-fit: contain;
}

.job-card-info {
  flex: 1;
}

.job-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.job-company {
  font-size: 14px;
  color: var(--fg-secondary);
  margin-bottom: var(--space-xs);
}

.job-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 13px;
  color: var(--fg-tertiary);
  flex-wrap: wrap;
}

.job-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.match-score {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
}

.match-score.excellent {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.match-score.strong {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.match-score.fair {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.match-score.low {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.job-actions {
  display: flex;
  gap: var(--space-sm);
}

.job-action-btn {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--fg-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.job-action-btn:hover {
  background: var(--hover-bg);
}

.job-action-btn.primary {
  background: linear-gradient(135deg, var(--brand-orange), #ffd25a);
  color: #000;
  border: none;
}

/* Tracker */
.tracker-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
}

.view-toggle-btn {
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  color: var(--fg-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.view-toggle-btn.active {
  background: var(--brand-blue);
  color: white;
}

.tracker-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.tracker-column {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  min-height: 400px;
}

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

.column-title {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.column-count {
  background: var(--hover-bg);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.tracker-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tracker-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all 0.2s;
}

.tracker-card:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
}

.tracker-card-header {
  display: flex;
  align-items: start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.tracker-card-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: white;
  padding: 4px;
  object-fit: contain;
}

.tracker-card-info {
  flex: 1;
}

.tracker-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.tracker-card-company {
  font-size: 12px;
  color: var(--fg-tertiary);
}

.tracker-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 12px;
  color: var(--fg-tertiary);
}

.status-badge {
  display: inline-block;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.status-badge.replied {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.status-badge.sent {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Data Table */
.tracker-table {
  margin-top: var(--space-xl);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table thead {
  background: rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
}

.data-table th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: var(--space-md);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
  background: var(--hover-bg);
}

/* Copilot Rail */
.copilot-rail {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
}

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

.copilot-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 16px;
}

.copilot-icon {
  font-size: 20px;
}

.copilot-minimize {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--fg-primary);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copilot-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.copilot-message {
  display: flex;
  gap: var(--space-sm);
}

.copilot-message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 80%;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.copilot-message.assistant .message-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.copilot-message.user .message-content {
  background: var(--brand-blue);
  color: white;
}

.copilot-input-area {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.copilot-textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--fg-primary);
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.copilot-send {
  padding: var(--space-sm) var(--space-lg);
  background: var(--brand-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.copilot-send:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.copilot-suggestions {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.copilot-suggestion {
  padding: var(--space-sm) var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg-secondary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.copilot-suggestion:hover {
  background: var(--hover-bg);
  color: var(--fg-primary);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  z-index: 201;
  overflow-y: auto;
}

.modal-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-panel.modal-medium {
  max-width: 800px;
}

.modal-panel.modal-large {
  max-width: 1000px;
}

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

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--card-bg);
  color: var(--fg-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 18px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  gap: var(--space-md);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  font-size: 14px;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 1279px) {
  .copilot-rail {
    position: fixed;
    right: -360px;
    top: 0;
    width: 360px;
    height: 100vh;
    transition: right 0.3s;
    z-index: 150;
  }
  
  .copilot-rail.open {
    right: 0;
  }
}

@media (max-width: 768px) {
  .content-area {
    padding: var(--space-lg) var(--space-md);
  }
  
  .main-nav {
    flex-wrap: wrap;
  }
  
  .nav-center {
    display: none;
  }
  
  .jobs-layout {
    grid-template-columns: 1fr;
  }
  
  .jobs-filters {
    position: static;
  }
  
  .tracker-board {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .main-nav, .copilot-rail, .toast, .mode-toggle, .icon-btn, .user-avatar, .feedback-banner, .settings-link, .nav-button, .btn-back, .btn-primary, .btn-secondary, .btn-tertiary {
    display: none !important;
  }
  .document-container, .content-area {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
  /* Ensure text is black for print */
  p, li, div {
    color: #000 !important;
  }
} 
