/* Admin Dashboard Styles */

:root {
  --primary: #1c9795;
  --primary-hover: #158583;
  --secondary: #971E20;
  --secondary-hover: #7a1819;
  --accent: #971E20;
  --success: #1c9795;
  --warning: #f59e0b;
  --danger: #971E20;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #231F20;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --sidebar-bg: #231F20;
  --sidebar-text: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 0.75rem;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}

/* Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sidebar */
.admin-logo {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  background: white;
  padding: 8px;
  border-radius: 8px;
}

.admin-logo h2 {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}

.admin-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(28, 151, 149, 0.15);
  border-left-color: var(--primary);
  color: white;
  font-weight: 600;
}

.nav-icon {
  margin-right: 0.75rem;
  font-size: 1.125rem;
}

/* Header */
.admin-header {
  background: var(--surface);
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-left p {
  color: var(--text-light);
}

.header-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.btn-secondary {
  background: var(--secondary);
  color: white;
}

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

.btn-success {
  background: var(--success);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
}

.btn-success:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-danger:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(151, 30, 32, 0.3);
}

/* Specific button styles */
.btn-logout,
.btn-back,
.btn-copy {
  background: #30261D;
  color: white;
}

.btn-logout:hover,
.btn-back:hover,
.btn-copy:hover {
  background: #231F20;
  transform: translateY(-1px);
}

.btn-view {
  background: #1c9795;
  color: white;
}

.btn-view:hover {
  background: #158583;
  transform: translateY(-1px);
}

/* Tabs */
.admin-tab {
  display: none;
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Dashboard Charts */
.dashboard-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.chart-card h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.activity-subtitle {
  color: var(--text-light);
  font-size: 0.875rem;
}

.activity-time {
  color: var(--text-light);
  font-size: 0.75rem;
}

/* Progress Circle */
.completion-rate {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.progress-circle {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, var(--border) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-circle::before {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
}

.progress-text {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Table Controls */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.filters {
  display: flex;
  gap: 1rem;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
}

.search-box input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  width: 300px;
  background: var(--surface);
}

/* Data Table */
.data-table {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--background);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

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

.loading-row td {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-created {
  background: rgba(107, 114, 128, 0.1);
  color: var(--secondary);
}

.status-in_progress {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.status-completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-expired {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.status-reviewing {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* Progress Bar */
.progress-bar {
  width: 100px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-pagination {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pagination:hover:not(:disabled) {
  background: var(--background);
}

.btn-pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: var(--text-light);
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.content-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.content-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
}

.content-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.content-meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.content-preview {
  background: var(--background);
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-height: 150px;
  overflow: hidden;
}

.content-actions {
  display: flex;
  gap: 0.5rem;
}

/* Analytics */
.analytics-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.analytics-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.analytics-card h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.metric-label {
  font-weight: 500;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* Settings */
.settings-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  width: 100%;
}

.settings-form h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  position: relative;
}

.modal-large {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal form {
  padding: 0;
}

.modal form .modal-body {
  padding: 2rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.form-help {
  margin-top: 15px;
  padding: 15px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  color: #6b7280;
}

.form-help p {
  margin: 5px 0;
}

.form-help strong {
  color: #374151;
}

.conversational-instructions {
  line-height: 1.6;
}

.conversational-instructions h3 {
  color: #10b981;
  margin-bottom: 15px;
}

.conversational-instructions h4,
.conversational-instructions h5 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #374151;
}

.conversational-instructions ol,
.conversational-instructions ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.conversational-instructions li {
  margin: 8px 0;
}

.conversational-instructions code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.api-example {
  margin-top: 20px;
  padding: 15px;
  background: #1f2937;
  border-radius: 8px;
}

.api-example h5 {
  color: #10b981 !important;
  margin-bottom: 10px;
}

.api-example pre {
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: var(--background);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-light);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
  }

  .admin-nav {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }

  .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .admin-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .header-actions {
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-charts {
    grid-template-columns: 1fr;
  }

  .analytics-dashboard {
    grid-template-columns: 1fr;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filters {
    justify-content: center;
  }

  .search-box input {
    width: 100%;
  }
}

/* Interview Link Cell */
.interview-link-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 200px;
}

.interview-link-input {
  flex: 1;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-family: monospace;
  background: var(--background);
  cursor: pointer;
  min-width: 0;
  text-overflow: ellipsis;
}

.interview-link-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem;
  cursor: pointer;
}

/* Client Management Styles */
.clickable-row {
  cursor: pointer;
  transition: background 0.2s;
}

.clickable-row:hover {
  background: rgba(37, 99, 235, 0.05);
}

.client-details {
  padding: 0;
}

.client-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.client-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.client-subtitle {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.client-business {
  display: flex;
  align-items: center;
  gap: 1rem;
}


/* Client Summary Cards */
.client-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.summary-card {
  background: var(--background);
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}

.summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.summary-label {
  color: var(--text-light);
  font-size: 0.813rem;
  font-weight: 500;
}

/* Detail Sections */
.detail-section {
  background: var(--background);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
}

.detail-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Interview Cards */
.interviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.interview-card {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.interview-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.interview-info {
  margin-bottom: 0.75rem;
}

.interview-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.interview-links {
  margin-bottom: 0.75rem;
}

.interview-link {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.interview-link strong {
  font-size: 0.813rem;
  color: var(--text-light);
}

.interview-link a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  word-break: break-all;
}

.interview-link a:hover {
  text-decoration: underline;
}

.link-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.link-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.813rem;
  border-radius: 0.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.interview-actions {
  margin-top: 0.5rem;
}

.interview-actions .btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.813rem;
}

.interview-dates {
  color: var(--text-light);
  font-size: 0.813rem;
}

.expired-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.active-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.interview-stats {
  display: flex;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.813rem;
}

.interview-stats span {
  padding: 0.25rem 0.625rem;
  background: rgba(107, 114, 128, 0.1);
  border-radius: 1rem;
}

/* Content List */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.content-item {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.content-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.content-item .content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.content-item .content-header h5 {
  font-size: 0.938rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.content-item .content-meta {
  color: var(--text-light);
  font-size: 0.813rem;
  margin-bottom: 0.75rem;
}

.content-item .content-preview {
  color: var(--text);
  margin-bottom: 0.875rem;
  line-height: 1.5;
  font-size: 0.875rem;
  max-height: 3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.content-item .content-actions {
  display: flex;
  gap: 0.5rem;
}

.content-item .content-actions .btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.813rem;
}

/* Client Info Grid */
.client-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.client-info-grid > div {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.client-info-grid strong {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.client-info-grid p {
  color: var(--text);
  line-height: 1.5;
  font-size: 0.875rem;
  margin: 0;
}

/* Status Badges Extensions */
.status-no_interview {
  background: rgba(156, 163, 175, 0.1);
  color: #6b7280;
}

/* Additional Responsive Styles */
@media (max-width: 768px) {
  .client-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .client-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Conversation Modal Styles */
.conversation-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.conversation-header h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.conversation-meta {
  color: var(--text-light);
  font-size: 0.875rem;
}

.conversation-summary {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.summary-item strong {
  font-weight: 600;
  margin-right: 0.5rem;
}

.conversation-content {
  margin-bottom: 1.5rem;
}

.conversation-content h5 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.conversation-turns {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.conversation-turn {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
}

.turn-number {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.ai-message {
  background: var(--background);
  border: 1px solid var(--border);
}

.client-message {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.message strong {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.5rem;
}

.no-conversation {
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
  font-style: italic;
}

.topics-covered {
  margin-top: 1.5rem;
}

.topics-covered h5 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topic-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-radius: 1rem;
  font-size: 0.813rem;
}

/* Analytics Styles */
.analytics-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.conversation-rating-analytics {
  grid-column: 1 / -1;
}

.analytics-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.analytics-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-item {
  background: var(--background);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.recent-activity-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.recent-activity-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-timeline-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.activity-icon {
  width: 2rem;
  height: 2rem;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.activity-status {
  font-size: 0.75rem;
  color: var(--text-light);
}

.chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.chart-info {
  text-align: center;
  width: 100%;
}

.chart-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.performance-indicators {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.performance-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.indicator-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.loading.error {
  color: var(--danger);
  font-weight: 500;
}

/* Conversation Rating Styles */
.conversation-rating-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.rating-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
}

.rating-status {
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
}

.rating-status.rated {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.rating-status.unrated {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-light);
}

.rating-form {
  background: var(--background);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rating-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rating-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.rating-description {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.star-rating {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.star {
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #d1d5db;
  font-size: 1.25rem;
}

.star:hover,
.star.active {
  color: #fbbf24;
  transform: scale(1.1);
}

.star.active {
  color: #f59e0b;
}

.overall-rating {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid var(--border);
}

.overall-rating.excellent {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.overall-rating.good {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.03);
}

.overall-rating.average {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

.overall-rating.poor {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.overall-rating .star {
  width: 2rem;
  height: 2rem;
  font-size: 1.5rem;
}

.rating-feedback {
  margin-top: 1rem;
}

.rating-feedback textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
}

.rating-feedback textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.rating-tags {
  margin-top: 1rem;
}

.rating-tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-input {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  font-size: 0.75rem;
  background: var(--surface);
}

.tag-suggestion {
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 1rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-suggestion:hover {
  background: rgba(37, 99, 235, 0.2);
}

.rating-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.template-flag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.template-flag input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.rating-summary {
  background: var(--background);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.rating-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rating-summary-item {
  text-align: center;
}

.rating-summary-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.rating-summary-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.conversation-with-rating {
  position: relative;
}

.rating-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  border-radius: 1rem;
  font-size: 0.75rem;
  box-shadow: var(--shadow);
}

.rating-indicator .star {
  width: 0.875rem;
  height: 0.875rem;
  font-size: 0.75rem;
}

/* Quality Analytics Styles */
.quality-breakdown {
  margin-top: 1.5rem;
}

.quality-breakdown h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.quality-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metric-row {
  display: grid;
  grid-template-columns: 150px 1fr 60px;
  align-items: center;
  gap: 0.75rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

.metric-bar {
  height: 1.5rem;
  background: var(--border);
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  border-radius: 0.75rem;
  transition: width 0.3s ease;
}

.metric-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

.rating-distribution {
  margin-top: 1.5rem;
}

.rating-distribution h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.distribution-row {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 0.75rem;
}

.rating-stars {
  color: #f59e0b;
  font-size: 0.875rem;
}

.distribution-bar {
  height: 1.25rem;
  background: var(--border);
  border-radius: 0.625rem;
  position: relative;
  overflow: hidden;
}

.distribution-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 0.625rem;
  transition: width 0.3s ease;
}

.distribution-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.no-ratings {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

.no-ratings p {
  margin-bottom: 1rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .analytics-dashboard {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  
  .rating-grid {
    grid-template-columns: 1fr;
  }
  
  .rating-actions {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

/* Content Generation Buttons */
.content-generation-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.btn-content-type {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  min-width: 140px;
  height: 48px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  gap: 0.5rem;
}

.btn-content-type:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.btn-content-type:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-content-type.loading {
  pointer-events: none;
}

.btn-content-type i {
  font-size: 1.125rem;
  opacity: 0.8;
}

.btn-content-type span {
  transition: opacity 0.2s ease;
}

/* Content type specific colors */
.btn-content-type.social-post {
  border-color: #3b82f6;
}
.btn-content-type.social-post:hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.btn-content-type.social-post i {
  color: #3b82f6;
}

.btn-content-type.blog-post {
  border-color: #10b981;
}
.btn-content-type.blog-post:hover {
  border-color: #059669;
  background: #f0fdf4;
}
.btn-content-type.blog-post i {
  color: #10b981;
}

.btn-content-type.email-campaign {
  border-color: #f59e0b;
}
.btn-content-type.email-campaign:hover {
  border-color: #d97706;
  background: #fffbeb;
}
.btn-content-type.email-campaign i {
  color: #f59e0b;
}

.btn-content-type.newsletter {
  border-color: #8b5cf6;
}
.btn-content-type.newsletter:hover {
  border-color: #7c3aed;
  background: #f5f3ff;
}
.btn-content-type.newsletter i {
  color: #8b5cf6;
}

.btn-content-type.website-copy {
  border-color: #06b6d4;
}
.btn-content-type.website-copy:hover {
  border-color: #0891b2;
  background: #f0f9ff;
}
.btn-content-type.website-copy i {
  color: #06b6d4;
}

.btn-content-type.ad-copy {
  border-color: #ef4444;
}
.btn-content-type.ad-copy:hover {
  border-color: #dc2626;
  background: #fef2f2;
}
.btn-content-type.ad-copy i {
  color: #ef4444;
}

/* Icon styles (using CSS for simple icons) */
.icon-social::before {
  content: "👥";
  font-style: normal;
}

.icon-blog::before {
  content: "📝";
  font-style: normal;
}

.icon-email::before {
  content: "📧";
  font-style: normal;
}

.icon-newsletter::before {
  content: "📰";
  font-style: normal;
}

.icon-website::before {
  content: "🌐";
  font-style: normal;
}

.icon-ad::before {
  content: "📢";
  font-style: normal;
}

/* Loading spinner */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner.hidden {
  display: none;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Interview Summary Styles */
.interview-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.summary-content strong {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.summary-content p {
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}

.summary-actions {
  text-align: center;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.813rem;
}

/* Responsive design for content buttons */
@media (max-width: 768px) {
  .content-generation-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-content-type {
    min-width: 100%;
    height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.813rem;
  }
  
  .btn-content-type i {
    font-size: 1rem;
  }
  
  .btn-content-type span {
    font-size: 0.813rem;
  }
  
  .interview-summary {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }
}

/* Rated Questions Section */
.rated-questions-header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
}

.action-group {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.results-summary {
  font-size: 0.875rem;
  color: var(--text-light);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.filters-applied {
  margin-left: 1rem;
  font-style: italic;
}

.rated-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.question-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: all 0.2s;
}

.question-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.question-meta {
  flex: 1;
}

.question-meta .client-info {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}


.question-meta .turn-number {
  font-size: 0.75rem;
  color: var(--text-light);
  background: rgba(107, 114, 128, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  display: inline-block;
}

.overall-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.star-rating {
  display: flex;
  gap: 0.125rem;
}

.star {
  color: #fbbf24;
  font-size: 1.25rem;
}

.star.empty {
  color: var(--border);
}

.rating-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.question-content {
  margin-bottom: 1rem;
}

.question-text {
  background: rgba(37, 99, 235, 0.05);
  border-left: 3px solid var(--primary);
  padding: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 0.75rem;
}

.question-text h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.question-text p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.answer-text {
  background: rgba(34, 197, 94, 0.05);
  border-left: 3px solid #22c55e;
  padding: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.answer-text h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 0.5rem;
}

.answer-text p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.rating-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.rating-metric {
  background: var(--background);
  padding: 0.75rem;
  border-radius: var(--radius);
  text-align: center;
}

.rating-metric .metric-name {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.rating-metric .metric-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.feedback-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.feedback-section h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feedback-text {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.question-flags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.flag.template {
  background: rgba(139, 69, 19, 0.1);
  color: #8b4513;
}

.flag.high-confidence {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.flag.business-effective {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.question-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.question-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.813rem;
}

@media (max-width: 768px) {
  .header-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .action-group {
    margin-left: 0;
    justify-content: stretch;
  }
  
  .filter-group {
    min-width: 100%;
  }
  
  .question-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .rating-details {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ===============================
   6-Output Delivery System Styles
   =============================== */

/* Interview Outputs Grid */
.interview-outputs {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.outputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.output-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.output-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.output-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.output-icon {
  font-size: 1.5rem;
}

.output-header h5 {
  margin: 0;
  font-size: 1rem;
  color: #333;
  font-weight: 600;
}

.output-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.output-actions .btn {
  flex: 1;
}

.output-status {
  font-size: 0.875rem;
  color: #6c757d;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-ready {
  color: #28a745;
  font-weight: 600;
}

.status-pending {
  color: #ffc107;
  font-weight: 600;
}

.output-status small {
  color: #999;
}

/* Output Viewer Modal */
.output-viewer {
  max-height: 70vh;
  overflow-y: auto;
}

.output-metadata {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.output-metadata p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: #495057;
}

.output-content {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1.5rem;
  max-height: 50vh;
  overflow-y: auto;
}

.output-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

/* Detail Section Improvements */
.detail-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid #e9ecef;
}

.detail-section h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
}

/* Responsive adjustments for outputs */
@media (max-width: 768px) {
  .outputs-grid {
    grid-template-columns: 1fr;
  }

  .output-actions {
    flex-direction: column;
  }

  .output-actions .btn {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

/* ===============================
   Client Detail Page Styles
   =============================== */

.client-detail-page {
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.client-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.client-detail-header .btn {
  flex-shrink: 0;
}

.client-header-info {
  flex: 1;
}

.client-header-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem 0;
}

.client-header-info .client-email {
  color: var(--text-light);
  font-size: 0.875rem;
  margin: 0;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.client-detail-left,
.client-detail-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.detail-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.client-info-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.client-info-grid .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.client-info-grid .info-item label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-weight: 500;
}

.client-info-grid .info-item span,
.client-info-grid .info-item p {
  color: var(--text);
  font-size: 0.875rem;
  margin: 0;
}

/* Interview limit indicator */
.limit-reached {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--warning);
  font-size: 1rem;
  cursor: help;
}

/* Card header with action button */
.card-header-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-header-with-action h3 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.card-header-with-action .btn {
  white-space: nowrap;
  font-size: 0.875rem;
}

.card-header-with-action .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--secondary);
}

.card-header-with-action .btn:disabled:hover {
  background-color: var(--secondary);
}

.interviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.interview-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.2s;
}

.interview-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.interview-card .interview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.interview-card .interview-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.interview-card .interview-status {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.interview-card .interview-progress {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.interview-card .interview-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.interview-card .interview-dates {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.interview-card .btn {
  margin-top: 0.5rem;
}

/* Interview Actions - Button Container (now in header) */
.interview-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.interview-actions .btn {
  margin: 0;
  white-space: nowrap;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.interview-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--secondary);
}

/* Generate Content Section - Separate row below header */
.interview-generate-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.interview-generate-section .btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.interview-generate-section .btn-success {
  background-color: #10b981;
}

.interview-generate-section .btn-success:hover:not(:disabled) {
  background-color: #059669;
}

.interview-generate-section .btn-success:disabled {
  background-color: #10b981;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Interview Outputs - Content within Interview Cards */
.interview-outputs {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.interview-outputs .outputs-header {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
}

.interview-outputs .outputs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.output-item-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.output-item-compact .output-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.output-item-compact .output-info {
  flex: 1;
  min-width: 0;
}

.output-item-compact .output-title {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.output-item-compact .output-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.output-item-compact .output-actions .btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
}

/* Content Generation Section */
.content-generation-section {
  margin-top: 1rem;
}

.section-description {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.btn-generate-single {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.btn-generate-single:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-generate-single:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-generate-single .btn-text {
  font-size: 1rem;
}

.btn-generate-single .btn-spinner {
  font-size: 1.25rem;
}

.btn-generate-single .btn-spinner.hidden {
  display: none;
}

/* Generation Progress */
.generation-progress {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.generation-progress.hidden {
  display: none;
}

.generation-progress h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.progress-step.completed {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.progress-step.in-progress {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
}

.step-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.progress-step.completed .step-icon {
  background: rgba(16, 185, 129, 0.1);
}

.progress-step.in-progress .step-icon {
  background: rgba(37, 99, 235, 0.2);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.step-content {
  flex: 1;
}

.step-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.step-status {
  font-size: 0.75rem;
  color: var(--text-light);
}

.progress-step.completed .step-status {
  color: var(--success);
  font-weight: 500;
}

.progress-step.in-progress .step-status {
  color: var(--primary);
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  border-radius: 4px;
  transition: width 0.5s ease-out;
  width: 0%;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
}

/* Interview Outputs Section */
.outputs-section {
  grid-column: 1 / -1;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.outputs-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.outputs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.output-item {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.2s;
}

.output-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.output-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.output-item-icon {
  font-size: 1.25rem;
}

.output-item-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.output-item-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.output-item-actions {
  display: flex;
  gap: 0.5rem;
}

.output-item-actions .btn {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.75rem;
}

/* Generated Content and Interview Outputs Lists */
.generated-content-list,
.interview-outputs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.content-item,
.output-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.content-item:hover,
.output-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.output-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.output-info {
  flex: 1;
}

.output-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.output-date,
.content-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.content-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.content-type {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.content-item-actions {
  display: flex;
  gap: 0.5rem;
}

.no-completed-interviews {
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  padding: 1rem 0;
}

/* Responsive design for client detail page */
@media (max-width: 768px) {
  .client-detail-grid {
    grid-template-columns: 1fr;
  }

  .client-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .interview-card .interview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .interview-header-left {
    width: 100%;
  }

  .interview-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .interview-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .interview-generate-section {
    margin-top: 0.75rem;
    justify-content: flex-start;
  }

  .interview-generate-section .btn {
    flex: 1;
  }

  .output-item-compact {
    flex-wrap: wrap;
  }

  .output-item-compact .output-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .output-item-compact .output-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .outputs-section {
    grid-column: 1;
  }

  .outputs-list {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    gap: 0.75rem;
  }

  .step-icon {
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
  }

  .content-item,
  .output-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .content-item-header {
    width: 100%;
  }

  .content-item-actions {
    width: 100%;
  }

  .content-item-actions .btn {
    flex: 1;
  }
}

/* Extra small devices (phones) */
@media (max-width: 640px) {
  .client-detail-grid {
    gap: 1rem;
  }

  .detail-card {
    padding: 1rem;
  }

  .interview-card {
    padding: 0.75rem;
  }

  .interview-header-left {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .interview-status {
    font-size: 0.688rem;
    padding: 0.188rem 0.5rem;
  }

  .interview-progress {
    font-size: 0.813rem;
  }

  .interview-actions .btn {
    font-size: 0.813rem;
    padding: 0.5rem 0.75rem;
  }

  .output-item-compact {
    font-size: 0.813rem;
  }

  .output-item-compact .output-icon {
    font-size: 1rem;
  }

  .output-item-compact .output-actions .btn {
    font-size: 0.813rem;
    padding: 0.5rem 0.75rem;
  }

  .btn-xs {
    padding: 0.25rem 0.375rem;
    font-size: 0.688rem;
  }
}

/* Discovery Guide Formatting */
.discovery-guide-content {
  max-width: none !important;
}

.discovery-guide-formatted {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.discovery-guide-formatted .guide-section {
  background: #f8f9fa;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--primary);
}

.discovery-guide-formatted h4 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discovery-guide-formatted h5 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem 0;
}

.guide-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.guide-info-grid .info-item {
  background: white;
  padding: 0.75rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.guide-info-grid .info-item strong {
  display: block;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* Camp Badge */
.camp-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}

.camp-badge.camp-hero {
  background: #dbeafe;
  color: #1e40af;
}

.camp-badge.camp-guide {
  background: #d1fae5;
  color: #065f46;
}

.camp-badge.camp-achiever {
  background: #fef3c7;
  color: #92400e;
}

.camp-rationale {
  color: var(--text);
  margin-top: 0.75rem;
  font-style: italic;
}

/* Ideal Client */
.ideal-client-details {
  background: white;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-top: 0.75rem;
}

.ideal-client-details .detail-group {
  margin-bottom: 1rem;
}

.ideal-client-details .detail-group:last-child {
  margin-bottom: 0;
}

.ideal-client-details strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.ideal-client-details ul {
  margin-left: 1.5rem;
  color: var(--text);
}

.ideal-client-details li {
  margin-bottom: 0.25rem;
}

.ideal-client-details p {
  color: var(--text);
  margin-top: 0.25rem;
}

/* Story Elements */
.story-element {
  background: white;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
}

.story-element:first-child {
  margin-top: 0.75rem;
}

/* Moment Cards */
.moment-card {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary);
}

.moment-card:last-child {
  margin-bottom: 0;
}

.moment-header {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.moment-card p {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.moment-card p:last-child {
  margin-bottom: 0;
}

.moment-card strong {
  color: var(--text-light);
  font-size: 0.9rem;
}

.moment-card ul {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.moment-card li {
  margin-bottom: 0.25rem;
  color: var(--text);
}

/* Character Cards */
.character-card {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #10b981;
}

.character-card:last-child {
  margin-bottom: 0;
}

.character-card p {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.character-card p:last-child {
  margin-bottom: 0;
}

.character-card strong {
  color: var(--text-light);
  font-size: 0.9rem;
}

.character-card ul {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.character-card li {
  margin-bottom: 0.25rem;
  color: var(--text);
}

/* Dialogue Cards */
.dialogue-card {
  background: #fffbeb;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #f59e0b;
}

.dialogue-card:last-child {
  margin-bottom: 0;
}

.dialogue-speaker {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.dialogue-quote {
  color: var(--text);
  font-style: italic;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.dialogue-context {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Detail Groups */
.detail-group {
  margin-bottom: 1rem;
}

.detail-group:last-child {
  margin-bottom: 0;
}

.detail-group strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.detail-group ul {
  margin-left: 1.5rem;
  color: var(--text);
}

.detail-group li {
  margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .discovery-guide-formatted .guide-section {
    padding: 1rem;
  }

  .guide-info-grid {
    grid-template-columns: 1fr;
  }

  .discovery-guide-formatted h4 {
    font-size: 1.1rem;
  }

  .discovery-guide-formatted h5 {
    font-size: 1rem;
  }
}

/* User Management Styles */
.settings-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-section h4 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background-color: #667eea;
  color: white;
}

.badge-secondary {
  background-color: #6c757d;
  color: white;
}

.badge-success {
  background-color: #10b981;
  color: white;
}

.badge-danger {
  background-color: #ef4444;
  color: white;
}

/* Small Button Styles */
.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.btn-small.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-small.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-small.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-small.btn-danger:hover {
  background-color: #dc2626;
}

/* User Table Styles */
#users-table td {
  vertical-align: middle;
}

#users-table td:last-child {
  white-space: nowrap;
}

/* Form Small Text */
.form-group small {
  display: block;
  margin-top: 4px;
  color: #6c757d;
  font-size: 0.85rem;
}

/* Checkbox Label */
.form-group label input[type="checkbox"] {
  margin-right: 8px;
}

/* ===========================
   Logs Modal Styles
   =========================== */

/* Logs Modal Sizing */
#logs-modal .modal-content {
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#logs-modal .modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Logs Filters */
.logs-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  flex-wrap: wrap;
}

.logs-filters .filter-select {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logs-filters .filter-select:hover {
  border-color: #667eea;
}

.logs-filters .filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Logs Action Buttons */
.logs-filters .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Logs Tabs */
.logs-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}

.logs-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px;
}

.logs-tab:hover {
  color: #667eea;
  background: #f8fafc;
}

.logs-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: #f8fafc;
}

/* Logs Content Area */
.logs-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.logs-summary {
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #64748b;
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Log Entry */
.log-entry {
  padding: 16px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.log-entry:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transform: translateX(2px);
}

/* Severity-based border colors */
.log-entry.severity-debug {
  border-left-color: #94a3b8;
}

.log-entry.severity-info {
  border-left-color: #3b82f6;
}

.log-entry.severity-warning {
  border-left-color: #f59e0b;
}

.log-entry.severity-error {
  border-left-color: #ef4444;
}

.log-entry.severity-critical {
  border-left-color: #dc2626;
  background: #fef2f2;
}

/* Log Header */
.log-header {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.log-timestamp {
  color: #64748b;
  font-weight: 500;
}

.log-severity {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-debug {
  background: #94a3b8;
  color: white;
}

.badge-info {
  background: #3b82f6;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.badge-error {
  background: #ef4444;
  color: white;
}

.badge-critical {
  background: #dc2626;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.log-type, .log-category {
  padding: 3px 10px;
  background: #f1f5f9;
  border-radius: 4px;
  color: #475569;
  font-weight: 500;
}

/* Log Message */
.log-message {
  margin-bottom: 8px;
  color: #1e293b;
  line-height: 1.5;
}

.log-message strong {
  color: #0f172a;
  font-weight: 600;
}

/* Log Meta */
.log-meta {
  display: inline-block;
  margin-right: 12px;
  margin-top: 6px;
  padding: 4px 10px;
  background: #f8fafc;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #64748b;
}

/* Log Details (expandable) */
.log-details {
  margin-top: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.log-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #667eea;
  padding: 6px 0;
  user-select: none;
  transition: color 0.2s ease;
}

.log-details summary:hover {
  color: #5568d3;
}

.log-details pre {
  margin-top: 8px;
  padding: 12px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  font-family: 'Courier New', Courier, monospace;
}

/* Performance Metrics */
.performance-summary {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 20px;
}

.performance-summary h4 {
  margin: 0 0 12px 0;
  color: #1e293b;
  font-size: 1.1rem;
}

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

.category-avg {
  padding: 12px;
  background: white;
  border-radius: 6px;
  border-left: 4px solid #667eea;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-name {
  font-weight: 600;
  color: #475569;
}

.category-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #667eea;
}

.performance-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.performance-metric {
  padding: 16px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.metric-category {
  padding: 4px 12px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.metric-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

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

.metric-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #10b981;
}

/* Loading State */
.logs-content .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

.logs-content .loading::before {
  content: '⏳';
  margin-right: 12px;
  font-size: 1.5rem;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* No Logs State */
.no-logs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 1.1rem;
  text-align: center;
}

.no-logs::before {
  content: '📭';
  display: block;
  margin-bottom: 12px;
  font-size: 3rem;
}

/* Error Message */
.error-message {
  padding: 20px;
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: 8px;
  color: #dc2626;
  text-align: center;
}

.error-message p:first-child {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  #logs-modal .modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .logs-filters {
    flex-direction: column;
  }

  .logs-filters .filter-select {
    width: 100%;
  }

  .logs-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .logs-tab {
    white-space: nowrap;
  }

  .log-header {
    font-size: 0.8rem;
  }

  .category-averages {
    grid-template-columns: 1fr;
  }

  .metric-stats {
    grid-template-columns: 1fr;
  }
}
