/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


*/

/* ============================================
   DESIGN TOKENS - Standardized Values
   ============================================ */

/* Spacing Scale (reduced by 20-30% for tighter feel) */
:root {
  --spacing-xs: 0.25rem;  /* 4px */
  --spacing-sm: 0.5rem;   /* 8px */
  --spacing-md: 1rem;     /* 16px */
  --spacing-lg: 1.5rem;   /* 24px */
  --spacing-xl: 2rem;     /* 32px */
}

/* Border Radius */
:root {
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

/* ============================================
   BASE STYLES
   ============================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 1.5rem; /* 24px - reduced from 30px */
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
}

body>.container {
  margin: 1.25rem auto; /* 20px - reduced from 20px */
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 1.5rem; /* 24px - reduced from 30px */
}

h2 {
  color: #34495e;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.625rem; /* 10px */
}

.info {
  background: #f8f9fa;
  padding: 1.5rem; /* 24px - reduced from 20px */
  border-radius: var(--radius-md);
  margin-top: 1.5rem; /* 24px - reduced from 20px */
}

.info ul {
  list-style: none;
  padding: 0;
}

.info li {
  padding: 8px 0;
  border-bottom: 1px solid #dee2e6;
}

.info li:last-child {
  border-bottom: none;
}

.info strong {
  color: #2c3e50;
  display: inline-block;
  width: 120px;
}

/* Navigation */
.navbar {
  background: #2c3e50 !important;
  padding: 1rem 0;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1000;
  width: 100%;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: white !important;
}

.navbar .container {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 50px;
  background: transparent;
  color: white;
}

.navbar a {
  color: white !important;
  text-decoration: none;
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
  display: inline-block;
}

.navbar a:hover {
  background-color: #34495e;
  color: white !important;
}

.navbar-right {
  margin-left: auto;
}

/* ============================================
   BUTTON SYSTEM - Consolidated
   ============================================ */

/* Base Button */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: var(--spacing-xs);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

/* Button Variants */
.btn-primary {
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  border: 1px solid #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-outline {
  background-color: transparent;
  color: #6c757d;
  border: 1px solid #6c757d;
}

.btn-outline:hover {
  background-color: #6c757d;
  color: white;
}

/* Button Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Button Modifiers */
.btn-block {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.btn-group .btn {
  min-width: auto;
  margin: 0;
}

.card-body .btn-block {
  max-width: 250px;
}

/* ============================================
   FORM SYSTEM - Consolidated
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-md); /* 1rem - reduced from 1.5rem */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: #2c3e50;
}

.form-control {
  width: 100%;
  max-width: 500px;
  padding: 0.625rem; /* 10px - reduced from 0.75rem */
  border: 1px solid #ced4da;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Form Layout */
form {
  max-width: 600px;
  margin: 0 auto;
}

.card form {
  max-width: none;
}

/* Content Settings form - SPECIAL 75% WIDTH */
.content_settings form,
.content_settings .edit form,
[class*="content_settings"] form,
body.content_settings form,
body.content_settings .edit form,
form[action*="content_settings"] {
  max-width: 75% !important;
  margin: 0 auto !important;
}

.content_settings .form-control,
.content_settings .edit .form-control,
[class*="content_settings"] .form-control,
body.content_settings .form-control,
form[action*="content_settings"] .form-control {
  max-width: none !important;
  width: 100% !important;
}

.form-actions {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-start;
}

.form-actions .btn {
  margin-right: var(--spacing-sm);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.form-checkbox {
  margin: 0;
}

.form-checkbox-label {
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

/* Admin Panel */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ecf0f1;
}

/* ============================================
   TABLE SYSTEM - Consolidated
   ============================================ */

/* Base Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
}

.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  padding: 0.875rem 0.75rem; /* reduced from 1rem */
  border-bottom: 2px solid #e9ecef;
  text-align: left;
  vertical-align: middle;
}

.admin-table td {
  padding: 0.875rem 0.75rem; /* reduced from 1rem */
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.admin-table tr:hover {
  background-color: #f8f9fa;
}

/* Table Container */
.users-table,
.connections-table-container,
.admin-table-container {
  overflow-x: auto;
}

.users-table table,
.connections-table-container table {
  /* inherits from .admin-table */
}

.users-table th,
.users-table td {
  /* inherits from .admin-table */
}

.role-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.role-badge.admin {
  background-color: #e74c3c;
  color: white;
}

.role-badge.user {
  background-color: #27ae60;
  color: white;
}

/* Dashboard */
.dashboard-header {
  text-align: center;
  margin-bottom: 1.5rem; /* reduced from 2rem */
  padding: 1.5rem; /* reduced from 2rem */
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border-radius: var(--radius-lg);
}

.dashboard-header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.user-role {
  margin: 0;
  font-size: 1.1rem;
}

.dashboard-content {
  display: grid;
  gap: 1.5rem; /* reduced from 2rem */
}

/* ============================================
   CARD SYSTEM - Consolidated
   ============================================ */

/* Base Card */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card Variants */
.user-info-card,
.stat-card,
.connection-card,
.service-card,
.detail-card {
  padding: 1.5rem; /* reduced from 2rem */
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: white;
}

.user-info-card {
  /* inherits from .card */
}

.info-grid {
  display: grid;
  gap: 1rem;
}

.info-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #ecf0f1;
}

.info-item:last-child {
  border-bottom: none;
}

.dashboard-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem; /* reduced from 2rem */
  margin-bottom: 1.5rem; /* reduced from 2rem */
}

/* Dashboard Social Platforms */
.dashboard-social-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.dashboard-platform-link {
  text-decoration: none;
}

.dashboard-platform-link:hover .dashboard-platform-badge {
  opacity: 0.8;
  transform: translateY(-1px);
}

.dashboard-platform-badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: opacity 0.2s, transform 0.2s;
}

.dashboard-platform-badge.platform-linkedin {
  background-color: #0077b5;
  color: white;
}

.dashboard-platform-badge.platform-bluesky {
  background-color: #0085ff;
  color: white;
}

.dashboard-platform-badge.no-link {
  opacity: 0.6;
}

/* Dashboard Connection Health */
.connection-health {
  padding: 1.5rem; /* reduced from 1.5rem */
}

.health-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.health-item {
  display: inline-block;
}

.connection-list {
  margin-bottom: var(--spacing-md);
}

.connection-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid #f1f3f4;
}

.connection-item:last-child {
  border-bottom: none;
}

.connection-actions {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid #f1f3f4;
}

.view-all-row {
  background: #f8f9fa !important;
  border-top: 1px solid #e1e5e9 !important;
  text-align: center;
  font-style: italic;
}

.view-all-link {
  font-weight: 500;
  color: #007bff !important;
}

.view-all-link:hover {
  color: #0056b3 !important;
  text-decoration: none;
}

/* Status Pill (used in dashboard) */
.status-pill {
  display: inline-block;
  padding: var(--spacing-xs) 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-pill.active {
  background: #d4edda;
  color: #155724;
}

.status-pill.expired {
  background: #fff3cd;
  color: #856404;
}

.status-pill.error {
  background: #f8d7da;
  color: #721c24;
}

.status-pill.missing {
  background: #e2e3e5;
  color: #383d41;
}

/* Utility Classes for Inline Style Replacement */
.text-center {
  text-align: center;
}

.block-center {
  display: block;
  text-align: center;
}

.col-number {
  width: 30px;
}

/* Dashboard Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .admin-actions {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .health-stats {
    flex-direction: column;
  }
}

/* Error messages */
.error-messages {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid #f5c6cb;
}

.error-messages h3 {
  margin-top: 0;
  color: #721c24;
}

.error-messages ul {
  margin-bottom: 0;
}

/* Flash messages */
.notice,
.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.notice {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert:not(.alert-success):not(.alert-info):not(.alert-warning):not(.alert-danger) {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Ensure Bootstrap alert colors work properly */
.alert-success {
  background-color: #d4edda !important;
  color: #155724 !important;
  border-color: #c3e6cb !important;
}

.alert-danger {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border-color: #f5c6cb !important;
}

/* Removed duplicate button and form definitions - consolidated above */

/* User Details */
.user-details {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.user-details .info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.user-details .info-item:last-child {
  border-bottom: none;
}

.user-details .info-item strong {
  color: #2c3e50;
  min-width: 150px;
}

.user-details .info-item span {
  color: #6c757d;
  text-align: left;
  flex: 1;
  margin-left: 1rem;
}

/* Form Container */
.form {
  background: white;
  padding: 1.5rem; /* reduced from 2rem */
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
  margin: 1.5rem 0; /* reduced from 2rem */
}

/* Removed duplicate form definitions - consolidated above */

/* Service Connections */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.page-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.inline-form {
  display: inline-block;
}

.inline-form input[type="submit"] {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  background-color: #6c757d;
  color: #fff;
  border-color: #6c757d;
}

.inline-form input[type="submit"]:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.page-header h1 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #6c757d;
  font-size: 1.1rem;
}

.connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem; /* reduced from 2rem */
  margin-bottom: 2rem; /* reduced from 3rem */
}

.connection-card {
  border-left: 4px solid #e9ecef;
}

.connection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* lighter shadow */
}

.connection-card.active {
  border-left-color: #28a745;
}

.connection-card.expired {
  border-left-color: #ffc107;
}

.connection-card.disconnected {
  border-left-color: #6c757d;
}

.connection-card.error {
  border-left-color: #dc3545;
}

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

.connection-header h3 {
  margin: 0;
  color: #2c3e50;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 25px; /* pill shape - intentionally rounded */
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.active {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.expired {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.disconnected {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-badge.error {
  background-color: #f8d7da;
  color: #721c24;
}

.connection-details {
  margin-bottom: 1.5rem;
  color: #6c757d;
}

.connection-details p {
  margin: 0.5rem 0;
}

.warning {
  color: #856404;
  font-weight: 500;
}

.connection-actions {
  display: flex;
  justify-content: flex-start;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--spacing-md);
}

/* Removed duplicate button definitions - consolidated above */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem; /* reduced from 4rem 2rem */
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem; /* reduced from 3rem */
}

.empty-state h3 {
  color: #6c757d;
  margin-bottom: 1rem;
}

.available-services {
  margin-top: 2rem; /* reduced from 3rem */
}

.available-services h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 1.5rem; /* reduced from 2rem */
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; /* reduced from 2rem */
}

.service-card {
  text-align: center;
}

.service-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: #3498db;
}

.service-card .service-icon {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: #6c757d;
}

.service-card h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-card p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Dashboard Service Connections */
.connections-summary {
  margin-bottom: 1rem;
}

.connections-summary p {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.connected-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #bbdefb;
}

/* Service Connections Table Styling */
.connections-table-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem; /* reduced from 3rem */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
}

.connection-row {
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
}

.connection-row:hover {
  background-color: #f8f9fa;
}

.connection-row.active {
  border-left: 4px solid #28a745;
}

.connection-row.expired {
  border-left: 4px solid #ffc107;
}

.connection-row.disconnected {
  border-left: 4px solid #6c757d;
}

.connection-row.error {
  border-left: 4px solid #dc3545;
}

.service-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-icon {
  font-size: 1.4rem;
  color: #495057;
}

.service-name {
  font-weight: 600;
  color: #212529;
  font-size: 1.1rem;
}

.no-expiry {
  color: #6c757d;
  font-style: italic;
}

.warning-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.action-buttons .btn {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 !important;
  display: inline-block !important;
  min-width: 120px !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.action-buttons .btn-outline {
  background: #f8f9fa;
  color: #495057;
  border-color: #dee2e6;
}

.action-buttons .btn-outline:hover {
  background: #e9ecef;
  color: #212529;
  border-color: #adb5bd;
}

/* Sitewide button colors */
.btn-outline.btn-edit,
a[href*="/edit"]:not(.btn-primary):not(.btn-secondary) {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.btn-outline.btn-edit:hover,
a[href*="/edit"]:not(.btn-primary):not(.btn-secondary):hover {
  background-color: #0056b3;
  color: white;
  border-color: #0056b3;
}

.btn-outline.btn-delete,
a[href*="method=delete"]:not(.btn-primary):not(.btn-secondary),
a[data-method="delete"]:not(.btn-primary):not(.btn-secondary) {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

.btn-outline.btn-delete:hover,
a[href*="method=delete"]:not(.btn-primary):not(.btn-secondary):hover,
a[data-method="delete"]:not(.btn-primary):not(.btn-secondary):hover {
  background-color: #c82333;
  color: white;
  border-color: #c82333;
}

.action-buttons .btn-primary {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.action-buttons .btn-primary:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.action-buttons .btn-warning {
  background: #ffc107;
  color: #212529;
  border-color: #ffc107;
}

.action-buttons .btn-warning:hover {
  background: #e0a800;
  border-color: #d39e00;
}

/* Content Queue Yes/No styling */

/* Admin Panel Styles */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem; /* reduced from 1rem */
  margin-bottom: 1.5rem; /* reduced from 2rem */
}

.stat-card {
  text-align: center;
  border: 1px solid #e0e0e0;
  /* inherits padding, border-radius, box-shadow from .card */
}

.stat-card h3 {
  margin: 0 0 0.5rem 0;
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

.stat-number a.stat-link {
  color: inherit;
  text-decoration: none;
}

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

.stat-number.active {
  color: #28a745;
}

.stat-number.expired {
  color: #ffc107;
}

.stat-number.disconnected {
  color: #6c757d;
}

.stat-number.error {
  color: #dc3545;
}

.admin-actions {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters-section {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filters-section h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.filter-form {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

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

.filter-group label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #555;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}

.connections-table-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.connections-table-container h3 {
  margin: 0;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
}

.clickable-status {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.clickable-status:hover {
  opacity: 0.7;
}

/* Removed duplicate admin-table definition - consolidated above */

.connection-row:hover {
  background: #f8f9fa;
}

.connection-row.active {
  border-left: 4px solid #28a745;
}

.connection-row.expired {
  border-left: 4px solid #ffc107;
}

.connection-row.disconnected {
  border-left: 4px solid #6c757d;
}

.connection-row.error {
  border-left: 4px solid #dc3545;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

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

.user-name {
  color: #666;
  font-size: 0.9rem;
}

.service-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-icon {
  font-size: 1.2rem;
}

.service-name {
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.expired {
  background: #fff3cd;
  color: #856404;
}

.status-badge.disconnected {
  background: #e2e3e5;
  color: #383d41;
}

.status-badge.error {
  background: #f8d7da;
  color: #721c24;
}

.warning-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.date-info {
  display: flex;
  flex-direction: column;
}

.time-info {
  color: #666;
  font-size: 0.8rem;
}

.no-expiry {
  color: #666;
  font-style: italic;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.recent-activity {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
}

.recent-activity h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

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

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.activity-icon {
  font-size: 1.2rem;
}

.activity-content {
  flex: 1;
}

.activity-text {
  color: #333;
  margin-bottom: 0.25rem;
}

.activity-time {
  color: #666;
  font-size: 0.8rem;
}

.no-activity {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Token Management Specific Styles */
.bulk-operations {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.bulk-operations h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

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

.bulk-form {
  margin: 0;
}

.token-status-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.token-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.token-status.active {
  background: #d4edda;
  color: #155724;
}

.token-status.missing {
  background: #f8d7da;
  color: #721c24;
}

.integrity-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.integrity-status.valid {
  background: #d4edda;
  color: #155724;
}

.integrity-status.invalid {
  background: #f8d7da;
  color: #721c24;
}

.expiry-warning {
  color: #856404;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Detail Cards */
.connection-details-grid,
.token-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem; /* reduced from 1.5rem */
  margin-bottom: 1.5rem; /* reduced from 2rem */
}

.detail-card {
  border: 1px solid #e0e0e0;
  /* inherits padding, border-radius, box-shadow from .card */
}

.detail-card h3 {
  margin: 0 0 1rem 0;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.detail-item {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item strong {
  color: #555;
  font-weight: 600;
}

.token-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.token-display {
  flex: 1;
  min-width: 200px;
}

.token-preview,
.token-full {
  font-family: monospace;
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  color: #666;
  word-break: break-all;
  display: block;
  margin-bottom: 0.5rem;
}

.token-full {
  color: #495057;
  background: #e9ecef;
  border-color: #adb5bd;
}

.token-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.role-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.role-badge.admin {
  background: #d1ecf1;
  color: #0c5460;
}

.role-badge.user {
  background: #e2e3e5;
  color: #383d41;
}

.metadata-content {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}

.metadata-content pre {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
}

.connection-actions,
.token-actions {
  margin-top: 1rem;
}

.btn-block {
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Sortable Table Headers */
.sortable {
  cursor: pointer;
  position: relative;
  user-select: none;
}

.sortable:hover {
  background-color: #f8f9fa;
}

.sort-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.sort-link:hover {
  text-decoration: none;
  color: inherit;
}

.sort-arrows {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  line-height: 0.8;
  flex-shrink: 0;
}

.sort-arrows .arrow {
  color: #ccc;
  transition: color 0.2s ease;
}

.sort-arrows .arrow.active {
  color: #007bff;
  font-weight: bold;
}

.sort-indicator {
  margin-left: 5px;
  font-weight: bold;
  color: #007bff;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-wrapper {
  margin-top: 2rem;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid #e9ecef;
}

.pagination-info {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.rows-per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rows-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rows-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
  white-space: nowrap;
}

.rows-select {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background-color: white;
  min-width: 70px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.rows-select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.pagination-links .pagination {
  margin: 0;
  display: flex;
  gap: 0.25rem;
}

.pagination-links .pagination .page-link {
  color: #007bff !important;
  background-color: white !important;
  border: 1px solid #dee2e6 !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 0.375rem !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  min-width: 40px !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
  margin: 0 0.125rem !important;
  box-shadow: none !important;
}

.pagination-links .pagination .page-link:hover {
  color: white !important;
  background-color: #007bff;
  border-color: #007bff;
  text-decoration: none !important;
}

.pagination-links .pagination .page-item.active .page-link {
  color: white !important;
  background-color: #007bff;
  border-color: #007bff;
  font-weight: 600;
  text-decoration: none !important;
}

.pagination-links .pagination .page-item.disabled .page-link {
  color: #6c757d !important;
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  text-decoration: none !important;
}

/* Force override Kaminari styles */
.pagination a,
.pagination span {
  color: #007bff !important;
  background-color: white !important;
  border: 1px solid #dee2e6 !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 0.375rem !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  min-width: 40px !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
  margin: 0 0.125rem !important;
  box-shadow: none !important;
}

.pagination a:hover {
  color: white !important;
  background-color: #007bff !important;
  border-color: #007bff !important;
  text-decoration: none !important;
}

.pagination .current {
  color: white !important;
  background-color: #007bff !important;
  border-color: #007bff !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.pagination .disabled {
  color: #6c757d !important;
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  text-decoration: none !important;
}

/* Override chunky pagination with clean, subtle style */
.pagination a,
.pagination span {
  background-color: transparent !important;
  border: none !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.25rem !important;
  min-width: auto !important;
}

.pagination a:hover {
  color: #0056b3 !important;
  background-color: #f8f9fa !important;
  border: none !important;
}

.pagination .current {
  background-color: #007bff !important;
  border: none !important;
}

.pagination .disabled {
  background-color: transparent !important;
  border: none !important;
  opacity: 0.5 !important;
}

.pagination-select {
  width: auto !important;
  min-width: 70px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 2px solid #007bff;
  border-radius: 0.375rem;
  background-color: white;
  color: #007bff;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.pagination-select:hover {
  background-color: #007bff;
  color: white;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.pagination-select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  border-color: #0056b3;
}

/* Removed duplicate admin-table definition - consolidated above */

.connection-row {
  transition: background-color 0.2s ease;
}

/* Worker Log Badge Styling */
.worker-type-badge {
  padding: 0.375rem 0.875rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: 16px !important;
  white-space: nowrap;
  display: inline-block;
  min-width: auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.worker-status-badge {
  padding: 0.375rem 0.875rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: 16px !important;
  white-space: nowrap;
  display: inline-block;
  min-width: auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.worker-status-badge.status-scheduled {
  background-color: #e3f2fd !important;
  color: #1976d2 !important;
}

.worker-status-badge.status-completed {
  background-color: #d4edda !important;
  color: #155724 !important;
}

.worker-status-badge.status-failed {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}

.worker-status-badge.status-running {
  background-color: #fff3cd !important;
  color: #856404 !important;
}

.worker-status-badge.status-started {
  background-color: #d1ecf1 !important;
  color: #0c5460 !important;
}

/* User Info Styling */
.user-info {
  min-width: 200px;
  max-width: 300px;
}

.user-info .user-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.user-info .user-email {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.user-info .worker-user-combo {
  font-size: 0.75rem;
  color: #adb5bd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.user-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Time Info Styling */
.time-info {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: #495057;
  font-weight: 500;
}

/* Test Results */
.test-results {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.test-results h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.test-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 1rem;
}

.test-success h4 {
  margin: 0 0 0.5rem 0;
  color: #155724;
}

.test-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 1rem;
}

.test-error h4 {
  margin: 0 0 0.5rem 0;
  color: #721c24;
}

.test-details {
  margin-top: 0.5rem;
}

.test-details pre {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.75rem;
  margin: 0.5rem 0 0 0;
  overflow-x: auto;
  font-size: 0.9rem;
}

.error-details {
  margin-top: 0.5rem;
}

.error-suggestions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f5c6cb;
}

.error-suggestions h5 {
  margin: 0 0 0.5rem 0;
  color: #721c24;
}

.error-suggestions ul {
  margin: 0;
  padding-left: 1.5rem;
}

.error-suggestions li {
  margin-bottom: 0.25rem;
  color: #721c24;
}

/* Audit Log Styles */
.audit-header {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.audit-info h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

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

.audit-log {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.audit-log h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.audit-entry {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #e0e0e0;
}

.audit-entry.success {
  background: #f8f9fa;
  border-left-color: #28a745;
}

.audit-entry.error {
  background: #fff5f5;
  border-left-color: #dc3545;
}

.audit-timestamp {
  min-width: 150px;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

.audit-content {
  flex: 1;
}

.audit-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.action-icon {
  font-size: 1.2rem;
}

.action-text {
  font-weight: 500;
  color: #333;
}

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

.status-error {
  color: #dc3545;
  font-weight: 600;
}

.audit-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #666;
}

.no-audit-logs {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.audit-actions {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.audit-actions h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.audit-notes {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
}

.audit-notes h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.audit-info-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.info-item {
  color: #666;
  font-size: 0.9rem;
}

.info-item strong {
  color: #333;
  font-weight: 600;
}

/* Security Information */
.security-notes {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.security-notes h3 {
  margin: 0 0 1rem 0;
  color: #0c5460;
}

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

.security-item {
  color: #0c5460;
  font-size: 0.9rem;
}

.security-item strong {
  font-weight: 600;
}

/* API Actions */
.api-actions {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.api-actions h3 {
  margin: 0 0 1.5rem 0;
  color: #2c3e50;
  font-size: 1.25rem;
}

.data-section,
.post-section {
  margin-bottom: 2rem;
}

.data-section h4,
.post-section h4 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

.post-form {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.post-form .form-group {
  margin-bottom: 1rem;
}

.post-form .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

.post-form .form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn-outline {
  background: transparent;
  border: 1px solid #6c757d;
  color: #6c757d;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: #6c757d;
  color: white;
  text-decoration: none;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.empty-state h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.empty-state p {
  color: #666;
  margin-bottom: 1.5rem;
}

.no-metadata {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* BlueSky-specific styles */
.bluesky-profile {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
  overflow: hidden;
  margin-bottom: 2rem;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  padding: 2rem;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: white;
}

.profile-avatar {
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
}

.avatar-text {
  font-size: 2rem;
  font-weight: bold;
  color: white;
}

.profile-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.handle {
  margin: 0 0 1rem 0;
  opacity: 0.9;
  font-size: 1rem;
}

.bio {
  margin: 0;
  line-height: 1.5;
  opacity: 0.95;
}

.profile-stats {
  display: flex;
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.stat-item {
  text-align: center;
  margin-right: 2rem;
}

.stat-item:last-child {
  margin-right: 0;
}

.stat-item strong {
  display: block;
  font-size: 1.25rem;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.stat-item span {
  color: #6c757d;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-banner {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-actions {
  padding: 1.5rem 2rem;
  background: white;
  border-top: 1px solid #e9ecef;
}

.profile-actions .btn {
  margin-right: 1rem;
}

.profile-actions .btn:last-child {
  margin-right: 0;
}

/* BlueSky Timeline */
.bluesky-timeline {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
  overflow: hidden;
}

.timeline-header {
  padding: 2rem;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: white;
  text-align: center;
}

.timeline-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.timeline-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

.posts-container {
  max-height: 600px;
  overflow-y: auto;
}

.post-card {
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.post-card:hover {
  background-color: #f8f9fa;
}

.post-card:last-child {
  border-bottom: none;
}

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

.post-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 0.75rem;
  object-fit: cover;
}

.author-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: #6c757d;
  font-weight: bold;
}

.author-info strong {
  display: block;
  color: #2c3e50;
  font-size: 0.9rem;
}

.author-handle {
  color: #6c757d;
  font-size: 0.8rem;
}

.post-meta {
  color: #6c757d;
  font-size: 0.8rem;
}

.post-content {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: #2c3e50;
}

.post-embed {
  margin: 1rem 0;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
}

.post-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}

.post-link {
  padding: 1rem;
  background: #f8f9fa;
}

.link-preview h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1rem;
}

.link-preview p {
  margin: 0 0 0.5rem 0;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.link-url {
  color: #00bcd4;
  font-size: 0.8rem;
  text-decoration: none;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
}

.post-stats {
  color: #6c757d;
  font-size: 0.8rem;
}

.post-stats strong {
  color: #2c3e50;
  margin-right: 0.5rem;
}

.timeline-actions {
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.timeline-actions .btn {
  margin: 0 0.5rem;
}

/* No data states */
.no-data {
  text-align: center;
  padding: 2rem; /* reduced from 3rem */
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
}

.no-data p {
  color: #6c757d;
  margin-bottom: 1rem;
}

.no-data ul {
  text-align: left;
  display: inline-block;
  color: #6c757d;
}

/* Service Connection Setup */
.connection-setup {
  max-width: 800px;
  margin: 0 auto;
}

.setup-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* lighter shadow */
  overflow: hidden;
}

.service-info {
  text-align: center;
  padding: 2rem 1.5rem; /* reduced from 3rem 2rem */
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
}

.service-info .service-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.service-info h2 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 2rem;
}

.service-info p {
  margin: 0;
  color: #6c757d;
  font-size: 1.1rem;
}

.connection-steps {
  padding: 1.5rem; /* reduced from 2rem */
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.connection-steps h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.25rem;
}

.connection-steps ol {
  margin: 0;
  padding-left: 1.5rem;
  color: #495057;
  line-height: 1.6;
}

.connection-steps li {
  margin-bottom: 0.5rem;
}

/* Override for specific connection-actions contexts */
.connection-actions.full-width {
  padding: 2rem;
  text-align: center;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.connection-actions .btn {
  margin: 0;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: bold;
}

.connection-info {
  padding: 1.5rem; /* reduced from 2rem */
  background: white;
}

.connection-info h4 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.connection-info ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #495057;
  line-height: 1.6;
}

.connection-info li {
  margin-bottom: 0.5rem;
}

/* BlueSky Credential Form */
.connection-form {
  padding: 1.5rem; /* reduced from 2rem */
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.credential-form {
  max-width: 500px;
  margin: 0 auto;
}

/* Removed duplicate form-group/form-control - consolidated above */

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: #2c3e50;
}

.form-control:focus {
  outline: none;
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.form-text a {
  color: #00bcd4;
  text-decoration: none;
}

.form-text a:hover {
  text-decoration: underline;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

.form-actions .btn {
  margin: 0 0.5rem;
}

/* Connection Options */
.connection-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.option-card {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.option-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.option-card h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.25rem;
}

.option-card p {
  margin: 0 0 1rem 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.option-card .btn {
  width: 100%;
}

@media (max-width: 768px) {
  .connection-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Admin Dashboard Styles */
.admin-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-header {
  text-align: center;
  margin-bottom: 3rem;
}

.admin-header h1 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
}

.admin-subtitle {
  color: #7f8c8d;
  font-size: 1.1rem;
  margin: 0;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
}

.stat-number.active {
  color: #28a745;
}

.stat-number.expired {
  color: #ffc107;
}

.stat-number.error {
  color: #dc3545;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
  border-color: #545b62;
}

.recent-activity {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.recent-activity h2 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
}

.activity-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item small {
  color: #6c757d;
}

.expiring-tokens {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.expiring-tokens h2 {
  margin: 0 0 1rem 0;
  color: #856404;
  font-size: 1.5rem;
  font-weight: 600;
}

.token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ffeaa7;
}

.token-item:last-child {
  border-bottom: none;
}

.token-info small {
  color: #856404;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .admin-dashboard {
    padding: 1rem;
  }

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

  .admin-actions {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .token-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Drag and Drop Styles */
.draggable-row {
  cursor: move;
  transition: all 0.2s ease;
}

.draggable-row:hover {
  background-color: #f8f9fa;
}

.draggable-row.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.drag-handle {
  cursor: grab;
  user-select: none;
  color: #6c757d;
  font-size: 1.2rem;
  line-height: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

.draggable-row:hover .drag-handle {
  color: #495057;
}

/* Sortable table styling */
#sortable-tbody {
  position: relative;
}

#sortable-tbody .draggable-row {
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

#sortable-tbody .draggable-row:hover {
  border-color: #dee2e6;
  background-color: #f8f9fa;
}

/* Order number styling */
.drag-handle {
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  min-width: 30px;
}

/* Worker Logs Styling */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background-color: #007bff;
  color: white;
}

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

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-success {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.status-failed {
  background-color: #f8d7da;
  color: #721c24;
}

.status-badge.status-running {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.status-started {
  background-color: #d1ecf1;
  color: #0c5460;
}

.time-info {
  font-size: 0.9rem;
  color: #6c757d;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

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

.user-name {
  color: #6c757d;
  font-size: 0.8rem;
}

.text-muted {
  color: #6c757d;
}

.status-info {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Authentication Pages Styling */
.auth-body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-title {
  margin: 0 0 2rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1A2B6D;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 1.75rem;
  font-weight: 600;
  border-bottom: 2px solid #3498db;
  padding-bottom: 1rem;
}

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

.auth-card .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.auth-card .form-control {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.auth-card .form-control:focus {
  outline: none;
  border-color: #3498db;
  background: white;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.auth-card .btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.auth-card .btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25); /* lighter shadow */
}

.auth-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

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

.auth-card .btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.auth-card .checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-card .form-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
}

.auth-card .form-checkbox-label {
  margin: 0;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
}

.auth-links {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.auth-links a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-links a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.auth-notice,
.auth-alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.auth-notice {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.auth-alert {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.auth-footer p {
  margin: 0;
}

/* Error messages in auth forms */
.field_with_errors .form-control {
  border-color: #dc3545;
  background-color: #fff5f5;
}

.field_with_errors .form-control:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

/* Responsive design for auth pages */
@media (max-width: 768px) {
  .auth-body {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem;
  }

  .brand-title {
    font-size: 2rem;
  }
}

/* Checkbox styling - checkbox to the left of label */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-input {
  margin: 0;
}

.checkbox-label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

/* Worker Logs Improvements */
.duration-success {
  color: #28a745;
  font-weight: 500;
}

.duration-running {
  color: #007bff;
  font-weight: 500;
}

.job-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  color: #495057;
  cursor: help;
}

.worker-status-badge.status-stuck {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  font-weight: 500;
}

.worker-status-badge.status-stuck:hover {
  background-color: #ffeaa7;
}

/* Job relationship indicators */
.job-execution-group {
  border-left: 3px solid #007bff;
  padding-left: 10px;
  margin-left: 5px;
}

.job-execution-group.stuck {
  border-left-color: #ffc107;
}

.job-execution-group.completed {
  border-left-color: #28a745;
}

.job-execution-group.failed {
  border-left-color: #dc3545;
}

/* Job flow indicators - removed from index view, now only in detail view */
