/*
 * 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.
 *


 */

/* Basic styling for the application */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

/* Logout button styling to match nav links */
.logout-form {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.logout-btn {
  background: none;
  border: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  margin: 0;
}

.logout-btn:hover {
  text-decoration: underline;
}

/* Authentication Pages Styling */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  height: 32px;
  width: auto;
  display: inline-block;
  margin-bottom: 12px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 8px 0;
}

.auth-subtitle {
  color: #718096;
  font-size: 16px;
  margin: 0;
}

.auth-form {
  margin-bottom: 30px;
}

.auth-errors {
  background: #fed7d7;
  border: 1px solid #feb2b2;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
}

.auth-errors h3 {
  color: #c53030;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.auth-errors ul {
  margin: 0;
  padding-left: 20px;
}

.auth-errors li {
  color: #c53030;
  font-size: 14px;
}

.field {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 6px;
  font-size: 14px;
}

.field-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.checkbox-input {
  margin-right: 8px;
  transform: scale(1.1);
}

.checkbox-label {
  font-size: 14px;
  color: #4a5568;
  margin: 0;
  cursor: pointer;
}

.auth-actions {
  margin-bottom: 0;
}

.auth-submit {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.auth-links {
  text-align: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.auth-link-text {
  margin: 8px 0;
  color: #718096;
  font-size: 14px;
}

.auth-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Sign-up page specific styles */
.field-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.field-half {
  flex: 1;
  margin-bottom: 0;
}

.password-hint {
  font-size: 12px;
  color: #718096;
  font-style: italic;
  margin-left: 4px;
}

/* Responsive adjustments for auth pages */
@media (max-width: 480px) {
  .auth-card {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .field-row {
    flex-direction: column;
    gap: 0;
  }
  
  .field-half {
    margin-bottom: 20px;
  }
  
  .auth-title {
    font-size: 24px;
  }
}

/* No template section styling */
.no-template-section {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  margin: 20px 0;
}

.no-template-icon {
  font-size: 48px;
  color: #ffc107;
  margin-bottom: 20px;
}

.no-template-title {
  font-size: 24px;
  font-weight: 600;
  color: #495057;
  margin: 0 0 12px 0;
}

.no-template-text {
  font-size: 16px;
  color: #6c757d;
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.no-template-subtext {
  font-size: 14px;
  color: #868e96;
  margin: 0 0 30px 0;
  line-height: 1.4;
}

.no-template-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.no-template-actions .btn {
  min-width: 160px;
}

/* Template selector styling */
.template-selector {
  margin-bottom: 20px;
}

.template-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.template-dropdown {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 14px;
  color: #374151;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.template-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.template-dropdown:hover {
  border-color: #9ca3af;
}

.template-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.template-actions .btn {
  font-size: 12px;
  padding: 6px 12px;
}

/* No template selected section styling */
.no-template-selected {
  text-align: center;
  padding: 30px 20px;
  background: #f1f3f4;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  margin: 20px 0;
}

.no-template-selected .no-template-icon {
  font-size: 32px;
  color: #4299e1;
  margin-bottom: 15px;
}

.no-template-selected .no-template-title {
  font-size: 18px;
  font-weight: 600;
  color: #4a5568;
  margin: 0 0 8px 0;
}

.no-template-selected .no-template-text {
  font-size: 14px;
  color: #718096;
  margin: 0;
  line-height: 1.4;
}

/* Existing requests section styling */
.existing-requests-section {
  text-align: center;
  padding: 30px 20px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin: 20px 0;
}

.existing-requests-title {
  font-size: 20px;
  font-weight: 600;
  color: #0369a1;
  margin: 0 0 12px 0;
}

.existing-requests-text {
  font-size: 14px;
  color: #0c4a6e;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.existing-requests-section .btn {
  font-size: 14px;
  padding: 8px 16px;
}

/* Link actions bottom styling */
.link-actions-bottom {
  margin-top: 15px;
  text-align: center;
}

.link-actions-bottom .btn {
  font-size: 12px;
  padding: 6px 12px;
}
  color: #333;
  margin: 0;
  padding: 20px;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1, h2, h3, h4 {
  color: #2c3e50;
  margin-top: 0;
}

/* Form styling */
.field {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.help-text {
  color: #6c757d;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

/* Button styling */
.btn {
  display: inline-block;
  padding: 8px 16px;
  margin: 4px 2px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

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

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

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

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

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

.btn-outline-primary {
  background-color: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.btn-outline-primary:hover {
  background-color: #007bff;
  color: white;
}

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

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

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

.btn-outline-danger:hover {
  background-color: #dc3545;
  color: white;
}

.btn-outline-info {
  background-color: transparent;
  color: #17a2b8;
  border: 1px solid #17a2b8;
}

.btn-outline-info:hover {
  background-color: #17a2b8;
  color: white;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

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

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

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

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

/* Table styling */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Template cards */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.template-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

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

.template-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.template-description {
  color: #6c757d;
  margin-bottom: 15px;
}

.template-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 12px;
  color: #6c757d;
}

.stat-value {
  font-weight: 600;
  color: #2c3e50;
}

.provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.provider-tag {
  background-color: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

/* Actions section */
.actions {
  margin: 20px 0;
}

/* Search and filter forms */
.search-form,
.filter-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.search-row,
.filter-row {
  display: flex;
  gap: 15px;
  align-items: end;
  flex-wrap: wrap;
}

.search-field,
.filter-field {
  flex: 1;
  min-width: 200px;
}

.search-actions,
.filter-actions {
  display: flex;
  gap: 10px;
}

/* Provider scopes */
.provider-scopes {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background: #f8f9fa;
}

.provider-section {
  margin-bottom: 20px;
}

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

.provider-section h4 {
  margin-bottom: 10px;
  color: #495057;
}

.scopes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.scope-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 0;
}

.scope-item input[type="checkbox"] {
  margin: 0;
}

.scopes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scope-badge {
  display: inline-block;
  padding: 4px 8px;
  background-color: #e9ecef;
  color: #495057;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail sections */
.detail-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

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

.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
}

.detail-list dt {
  font-weight: 600;
  color: #495057;
}

.detail-list dd {
  margin: 0;
  color: #6c757d;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat-card {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-number {
  font-size: 2em;
  font-weight: 600;
  color: #007bff;
}

.stat-label {
  color: #6c757d;
  font-size: 14px;
}

/* Access link */
.access-link {
  margin-top: 15px;
}

.link-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.link-container input {
  flex: 1;
}

/* Request items */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
}

.request-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.request-meta {
  font-size: 12px;
  color: #6c757d;
}

.request-actions {
  display: flex;
  gap: 10px;
}

/* Error messages */
#error_explanation {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

#error_explanation h2 {
  margin-top: 0;
  font-size: 16px;
}

#error_explanation ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

/* Stepper styles */
.stepper-wrapper {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.stepper-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stepper-item::before {
  position: absolute;
  content: "";
  border-bottom: 2px solid #ccc;
  width: 100%;
  top: 20px;
  left: -50%;
  z-index: 2;
}

.stepper-item::after {
  position: absolute;
  content: "";
  border-bottom: 2px solid #ccc;
  width: 100%;
  top: 20px;
  left: 50%;
  z-index: 2;
}

.stepper-item .step-counter {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc;
  margin-bottom: 6px;
  color: white;
  font-weight: bold;
}

.stepper-item.active {
  font-weight: bold;
}

.stepper-item.completed .step-counter {
  background-color: #4bb543;
  color: white;
}

.stepper-item.completed .step-counter {
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-item.completed::after {
  position: absolute;
  content: "";
  border-bottom: 2px solid #4bb543;
  width: 100%;
  top: 20px;
  left: 50%;
  z-index: 3;
}

.stepper-item:first-child::before {
  content: none;
}

.stepper-item:last-child::after {
  content: none;
}

.step-name {
  font-size: 12px;
  color: #666;
  text-align: center;
  font-weight: 500;
}

.stepper-item.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.stepper-item.clickable:hover {
  transform: translateY(-2px);
}

.stepper-item.clickable:hover .step-counter {
  background-color: #007bff;
  transform: scale(1.1);
}

.stepper-item.clickable:hover .step-name {
  color: #007bff;
  font-weight: 600;
}

/* Modern Dashboard Styles */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f8f9fa;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-sidebar {
  width: 280px;
  background: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #3b82f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.logo-icon i {
  color: white;
  font-size: 16px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.sidebar-nav {
  padding: 24px 0;
}

.nav-section {
  margin-bottom: 32px;
}

.nav-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding: 0 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: #f3f4f6;
  color: #374151;
}

.nav-item.active {
  background: #eff6ff;
  color: #3b82f6;
  border-right: 3px solid #3b82f6;
}

.nav-item i {
  margin-right: 12px;
  width: 16px;
  text-align: center;
}

.dashboard-main {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
}

.dashboard-header {
  background: white;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
  margin-bottom: 20px;
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.header-subtitle {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
}

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

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-select,
.control-input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

.control-button {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #6b7280;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-action {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.header-action:hover {
  background: #f3f4f6;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.dashboard-content {
  flex: 1;
  padding: 32px;
}

.content-tabs {
  margin-bottom: 32px;
}

.tab-nav {
  display: flex;
  gap: 32px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.tab-item {
  padding: 12px 0;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.tab-item:hover {
  color: #374151;
}

.tab-item.active {
  color: #3b82f6;
  border-bottom: 2px solid #3b82f6;
}

.tab-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.tab-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-action:hover {
  background: #f3f4f6;
}

.tab-action.primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.tab-action.primary:hover {
  background: #2563eb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card.pending .stat-icon {
  background: #fef3c7;
  color: #f59e0b;
}

.stat-card.clients .stat-icon {
  background: #d1fae5;
  color: #10b981;
}

.stat-card.grants .stat-icon {
  background: #e0e7ff;
  color: #8b5cf6;
}

.stat-card.success .stat-icon {
  background: #fef3c7;
  color: #f59e0b;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
}

.stat-trend.positive {
  color: #10b981;
}

.stat-trend.negative {
  color: #ef4444;
}

.trend-text {
  color: #6b7280;
  font-weight: 400;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.main-chart {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.chart-legend {
  display: flex;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.blue {
  background: #3b82f6;
}

.legend-color.light-blue {
  background: #93c5fd;
}

.chart-content {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
}

.performance-metrics {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-large {
  margin-bottom: 24px;
}

.metric-number {
  font-size: 48px;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 16px;
  color: #6b7280;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 400px;
}

.metric-item {
  text-align: center;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.metric-value.approved {
  color: #10b981;
}

.metric-value.pending {
  color: #f59e0b;
}

.metric-value.expired {
  color: #ef4444;
}

.status-summary {
  background: #3b82f6;
  border-radius: 12px;
  padding: 24px;
  color: white;
}

.summary-header {
  margin-bottom: 20px;
}

.summary-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.summary-content {
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.summary-label {
  font-size: 14px;
  opacity: 0.9;
}

.summary-value {
  font-size: 24px;
  font-weight: 700;
}

.summary-chart {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.chart-placeholder {
  font-size: 14px;
  opacity: 0.9;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.requests-table {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.table-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-control {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.table-control:hover {
  background: #e5e7eb;
}

.table-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.table-link:hover {
  color: #2563eb;
}

.table-container {
  overflow-x: auto;
}

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

.data-table th {
  background: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.data-table tr:hover {
  background: #f9fafb;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.client-info {
  flex: 1;
}

.client-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}

.client-company {
  font-size: 14px;
  color: #6b7280;
}

.template-name {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 2px;
}

.template-desc {
  font-size: 14px;
  color: #6b7280;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.approved {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.default {
  background: #f3f4f6;
  color: #374151;
}

.progress-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-fill {
  width: 60px;
  height: 4px;
  background: #3b82f6;
  border-radius: 2px;
}

.progress-text {
  font-size: 12px;
  color: #6b7280;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #f3f4f6;
}

.action-btn.view:hover {
  color: #3b82f6;
}

.action-btn.edit:hover {
  color: #f59e0b;
}

.action-btn.delete:hover {
  color: #ef4444;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-icon {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.empty-subtext {
  color: #6b7280;
}

.analytics-panel {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.analytics-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.analytics-controls {
  display: flex;
  gap: 8px;
}

.analytics-control {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.analytics-control:hover {
  background: #f3f4f6;
}

.analytics-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.analytics-chart {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.chart-data {
  margin-bottom: 12px;
}

.data-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.data-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.data-color.blue {
  background: #3b82f6;
}

.data-color.green {
  background: #10b981;
}

.data-label {
  flex: 1;
  font-size: 14px;
  color: #6b7280;
}

.data-value {
  font-weight: 600;
  color: #374151;
}

.chart-visual {
  margin-top: 8px;
}

.chart-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trend-item {
  text-align: center;
}

.trend-value {
  font-size: 20px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
}

.trend-label {
  font-size: 12px;
  color: #6b7280;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.metric-item {
  text-align: center;
}

.metric-number {
  font-size: 24px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 12px;
  color: #6b7280;
}

.floating-action {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.fab-button {
  width: 56px;
  height: 56px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.2s;
}

.fab-button:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  color: white;
}

.fab-button i {
  font-size: 20px;
}

/* Simplified Dashboard Styles */
.simplified-dashboard {
  min-height: 100vh;
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: #8b5cf6;
  margin: 0;
}

/* Brand logo sizing for header */
.logo-image {
  height: 24px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #374151;
}

.nav-link.active {
  color: #3b82f6;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 4px;
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.welcome-section {
  margin-bottom: 32px;
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.client-selection {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.client-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.client-label {
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.client-dropdown {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  min-width: 200px;
  cursor: pointer;
}

.client-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.selected-client-info {
  margin-top: 12px;
  padding: 12px 16px;
  background: #dbeafe;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.client-info-text {
  margin: 0;
  color: #1e40af;
  font-size: 14px;
}

.client-info-text strong {
  font-weight: 600;
}

.no-client-warning {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fef3c7;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.warning-text {
  margin: 0;
  color: #92400e;
  font-size: 14px;
}

.client-management-section {
  padding: 0;
}

.management-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.clients-list {
  margin-top: 24px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.client-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

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

.client-card-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.client-card-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.client-card-company {
  color: #6b7280;
  font-size: 14px;
}

.client-card-details {
  margin-bottom: 20px;
}

.client-detail {
  margin-bottom: 8px;
  font-size: 14px;
  color: #374151;
}

.client-detail strong {
  color: #1f2937;
  font-weight: 600;
}

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

.text-blue-600 {
  color: #2563eb;
  text-decoration: none;
}

.text-blue-600:hover {
  text-decoration: underline;
}

.main-tabs {
  margin-bottom: 32px;
}

.tab-nav {
  display: flex;
  gap: 32px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.tab-item {
  padding: 12px 0;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}

.tab-item:hover {
  color: #374151;
}

.tab-item.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.tab-item.progress {
  color: #6b7280;
  font-size: 14px;
}

.tab-content {
  margin-bottom: 48px;
}

.tab-panel {
  display: none;
}

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

.access-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.section-subtitle {
  color: #6b7280;
  font-size: 16px;
  margin: 0 0 24px 0;
}

.link-sharing {
  margin-bottom: 24px;
}

.sharing-text {
  color: #374151;
  margin-bottom: 16px;
}

.sharing-text a {
  color: #3b82f6;
  text-decoration: none;
}

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

.link-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.link-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #f9fafb;
}

.link-actions {
  display: flex;
  gap: 8px;
}

.link-action {
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.link-action:hover {
  background: #f3f4f6;
  color: #374151;
}

.copy-button {
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-button:hover {
  background: #2563eb;
}

.custom-request {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
}

.request-text {
  color: #374151;
  margin-bottom: 16px;
}

.custom-request-btn {
  padding: 12px 24px;
  background: white;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.custom-request-btn:hover {
  background: #3b82f6;
  color: white;
}

/* Generate link section */
.generate-link-section {
  text-align: center;
  padding: 32px 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.generate-text {
  color: #374151;
  font-size: 16px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.generate-link-btn {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.generate-link-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Link sharing section */
.link-sharing {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.link-description {
  margin-top: 16px;
}

.link-description p {
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
}

.small-text {
  font-size: 12px !important;
  color: #6b7280 !important;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
}

.small-text i {
  color: #3b82f6;
}

.client-tabs {
  margin-bottom: 24px;
}

.client-content {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
}

.clients-section h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 24px 0;
}

.clients-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-container {
  position: relative;
}

.search-input {
  padding: 12px 16px 12px 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}

.clients-summary {
  color: #6b7280;
  font-size: 14px;
}

.clients-table {
  overflow-x: auto;
}

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

.clients-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.clients-table td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.client-cell {
  min-width: 200px;
}

.client-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.client-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.view-only {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.connected {
  background: #d1fae5;
  color: #065f46;
}

.accounts-cell {
  min-width: 300px;
}

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

.account-item:last-child {
  margin-bottom: 0;
}

.account-status {
  color: #10b981;
  font-size: 16px;
}

.account-info {
  flex: 1;
}

.account-name {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 2px;
}

.account-details {
  font-size: 14px;
  color: #6b7280;
}

.account-logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.ga-logo {
  background: #f97316;
}

.ads-logo {
  background: #3b82f6;
}

.external-link {
  color: #6b7280;
  font-size: 14px;
  margin-left: 8px;
}

.connection-cell {
  color: #3b82f6;
  font-size: 14px;
}

.connection-time {
  font-weight: 500;
}

.empty-clients {
  text-align: center;
  padding: 48px 24px;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.empty-text {
  color: #6b7280;
  margin: 0;
}

.floating-questions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.questions-button {
  background: #8b5cf6;
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transition: all 0.2s;
}

.questions-button:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
  .dashboard-content {
    padding: 16px;
  }
  
  .welcome-title {
    font-size: 24px;
  }
  
  .tab-nav {
    flex-direction: column;
    gap: 0;
  }
  
  .tab-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
  }
  
  .tab-item.active {
    border-bottom-color: #3b82f6;
  }
  
  .link-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .link-actions {
    justify-content: center;
  }
  
  .clients-controls {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .search-input {
    width: 100%;
  }
  
  .clients-table {
    font-size: 14px;
  }
  
  .clients-table th,
  .clients-table td {
    padding: 8px;
  }
}

/* ===================== */
/* Brand: SyncGrant      */
/* ===================== */
:root {
  --brand-primary: #2563EB;   /* Trust Blue */
  --brand-accent: #06B6D4;    /* Cyan */
  --brand-text: #1E293B;      /* Graphite Slate */
  --brand-bg: #F8FAFC;        /* Cloud White */
  --brand-success: #10B981;   /* Emerald Green */
}

/* Global text and background */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--brand-text);
  background-color: var(--brand-bg);
}

/* Utility helpers */
.brand-primary { color: var(--brand-primary); }
.brand-accent { color: var(--brand-accent); }
.bg-brand-primary { background-color: var(--brand-primary); }
.bg-brand-accent { background-color: var(--brand-accent); }
.bg-brand-success { background-color: var(--brand-success); }

/* Auth + forms */
.auth-container { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%); }
.auth-title { color: var(--brand-text); }
.field-input:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.auth-submit { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%); }
.auth-link:hover { color: var(--brand-primary); }

/* Buttons */
.btn-primary { background-color: var(--brand-primary); color: #fff; }
.btn-primary:hover { background-color: #1e4fd3; }
.btn-success { background-color: var(--brand-success); color: #fff; }

/* Dashboard accents */
.nav-item.active { color: var(--brand-primary); border-right-color: var(--brand-primary); }
.tab-item.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab-action.primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.tab-action.primary:hover { background: #1e4fd3; }
.legend-color.blue { background: var(--brand-primary); }
.metric-number, .stat-number { color: var(--brand-primary); }
.status-summary { background: var(--brand-primary); }
.table-link { color: var(--brand-primary); }
.table-link:hover { color: #1e4fd3; }
.client-avatar { background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent)); }
.text-blue-600 { color: var(--brand-primary); }
.copy-button { background: var(--brand-primary); }
.copy-button:hover { background: #1e4fd3; }
.generate-link-btn { background: var(--brand-primary); box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2); }
.generate-link-btn:hover { background: #1e4fd3; box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3); }
.fab-button { background: var(--brand-primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.fab-button:hover { background: #1e4fd3; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4); }

/* Access Templates Provider Actions */
.provider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.provider-actions {
  display: flex;
  gap: 8px;
}

.select-all-btn, .deselect-all-btn {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.select-all-btn:hover {
  background-color: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.deselect-all-btn:hover {
  background-color: #6b7280;
  color: white;
  border-color: #6b7280;
}

/* Renovated Settings Pages */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.settings-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.2s ease;
}

.settings-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.card-title i {
  color: var(--brand-primary);
  font-size: 16px;
}

.card-subtitle {
  margin: 4px 0 0 0;
  color: #6b7280;
  font-size: 14px;
}

.card-actions {
  margin-top: 12px;
}

.card-content {
  padding: 24px;
}

/* Profile Card Specific */
.profile-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
  transition: all 0.2s ease;
}

.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.profile-avatar:hover .avatar-overlay {
  opacity: 1;
}

.avatar-overlay i {
  color: white;
  font-size: 20px;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  font-weight: 500;
  color: #374151;
}

.detail-label i {
  color: #6b7280;
  font-size: 14px;
  width: 16px;
}

.detail-value {
  flex: 1;
  color: #1f2937;
}

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.owner {
  background: #dbeafe;
  color: #1e40af;
}

.role-badge.user {
  background: #f3f4f6;
  color: #6b7280;
}

/* Stats Card */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin: 4px 0 2px 0;
}

.stat-description {
  font-size: 12px;
  color: #6b7280;
}

/* Actions Card */
.action-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.action-item:hover {
  background: #f1f5f9;
  border-color: var(--brand-primary);
}

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.action-content {
  flex: 1;
}

.action-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.action-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 12px 0;
}

/* Form Styling */
.settings-form {
  margin-top: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group.logo-upload {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.form-help i {
  font-size: 10px;
}

/* Logo Upload */
.current-logo-section {
  margin-bottom: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.current-logo-header h4 {
  margin: 0 0 12px 0;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
}

.logo-preview {
  text-align: center;
  margin-bottom: 12px;
}

.logo-preview-image {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.logo-info p {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.file-upload-area {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: var(--brand-primary);
  background: #f8fafc;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-label {
  display: block;
  cursor: pointer;
}

.upload-icon {
  font-size: 32px;
  color: #6b7280;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 12px;
  color: #6b7280;
}

/* Error Styling */
.error-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

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

.error-header i {
  color: #dc2626;
}

.error-header h3 {
  margin: 0;
  color: #dc2626;
  font-size: 16px;
}

.error-list ul {
  margin: 0;
  padding-left: 20px;
  color: #dc2626;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
}

.form-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
}

.form-note i {
  color: #10b981;
}

/* Responsive Design */
@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .form-note {
    margin-left: 0;
    margin-top: 12px;
  }
}

/* User Invitations Page */
.user-invitation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.invitation-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

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

.meta-value {
  font-family: monospace;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

.invitation-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.card-header {
  padding: 24px;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.card-title i {
  color: var(--brand-primary);
  font-size: 18px;
}

.card-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.card-content {
  padding: 24px;
}

.business-accounts-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

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

.account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.account-item:hover {
  background: #f1f5f9;
  border-color: var(--brand-primary);
}

.account-info {
  flex: 1;
}

.account-name {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 500;
  color: #1f2937;
}

.account-id {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  font-family: monospace;
}

.loading-state {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  margin-bottom: 12px;
}

.loading-spinner i {
  font-size: 24px;
  color: var(--brand-primary);
}

.invitation-form-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
}

.invitation-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-control {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.results-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.success-alert {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 16px;
}

.error-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 16px;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-content i {
  font-size: 18px;
}

.success-alert .alert-content i {
  color: #10b981;
}

.error-alert .alert-content i {
  color: #dc2626;
}

.alert-content p {
  margin: 0;
  font-weight: 500;
}

.success-alert .alert-content p {
  color: #065f46;
}

.error-alert .alert-content p {
  color: #dc2626;
}
