/* RepairFlow Growth Engine Dashboard */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.5;
}

/* Auth Gate */
#auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.auth-form {
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.auth-form h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #60a5fa;
}

.auth-form p {
  color: #94a3b8;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.auth-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1e2030;
  color: #e2e8f0;
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
}

.auth-form input:focus {
  border-color: #2563eb;
}

.auth-form button {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
}

.auth-form button:hover {
  background: #1d4ed8;
}

.error-text {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Header */
header {
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

.accent {
  color: #60a5fa;
}

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 12px;
}

.tab {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: #1e2030;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  background: #2a2d42;
  color: #e2e8f0;
}

.tab.active {
  background: #2563eb;
  color: #fff;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#status-filter {
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1e2030;
  color: #e2e8f0;
  font-size: 0.9rem;
  outline: none;
}

#status-filter:focus {
  border-color: #2563eb;
}

/* Submission Cards */
.submission-card {
  background: #1a1c2e;
  border: 1px solid #2a2d42;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.submission-card .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.submission-card .card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.submission-card .meta {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 10px;
}

.submission-card .copy-preview {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 14px;
  line-height: 1.6;
}

.submission-card .copy-preview strong {
  color: #cbd5e1;
}

.submission-card .card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Directory info row */
.card-directory-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.directory-link {
  color: #60a5fa;
  text-decoration: none;
  word-break: break-all;
}

.directory-link:hover {
  text-decoration: underline;
}

.submit-link {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
}

.submit-link:hover {
  text-decoration: underline;
}

.info-tag {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

/* Card notes */
.card-notes {
  background: rgba(234, 179, 8, 0.08);
  border-left: 3px solid #eab308;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: #fde68a;
  border-radius: 0 4px 4px 0;
}

/* Required fields */
.card-required-fields {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 10px;
}

/* Expand button */
.btn-expand {
  background: none;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 8px;
}

.btn-expand:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

/* Long description */
.long-description {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.7;
  padding: 12px;
  background: #151725;
  border-radius: 6px;
  margin-bottom: 10px;
  white-space: pre-line;
}

/* Category tags */
.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag-chip {
  background: rgba(37, 99, 235, 0.12);
  color: #93c5fd;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
}

/* Category badge */
.badge-category {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-high {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge-medium {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.badge-low {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.badge-status {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* Action Buttons */
.card-actions button {
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.card-actions button:hover {
  opacity: 0.85;
}

.btn-approve {
  background: #16a34a;
  color: #fff;
}

.btn-submit {
  background: #2563eb;
  color: #fff;
}

.btn-live {
  background: #7c3aed;
  color: #fff;
}

.btn-skip {
  background: #334155;
  color: #94a3b8;
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: #1a1c2e;
  border: 1px solid #2a2d42;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #60a5fa;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
}

.stat-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 12px;
  margin-top: 8px;
}

/* Placeholder tabs */
.placeholder-tab {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.placeholder-tab h2 {
  font-size: 1.2rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

/* Loading / empty states */
.loading-text,
.empty-text {
  text-align: center;
  color: #64748b;
  padding: 40px 0;
  font-size: 0.95rem;
}
