/* BrainCheck styling based on braincheck.com */
:root {
  --braincheck-blue: #007AFF;
  --braincheck-dark-blue: #0055B8;
  --braincheck-light-blue: #E1F0FF;
  --braincheck-teal: #00B8D9;
  --braincheck-purple: #6554C0;
  --braincheck-gray: #F4F5F7;
  --braincheck-dark-gray: #172B4D;
  --braincheck-text: #253858;
  --braincheck-border: #DFE1E6;
  --braincheck-sidebar-width: 280px;
  --braincheck-header-height: 60px;
  --braincheck-transition: all 0.3s ease;
}

body {
  background-color: #f9fafb;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--braincheck-text);
  line-height: 1.5;
}

.braincheck-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.braincheck-header {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0;
  height: var(--braincheck-header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

.braincheck-logo {
  height: 40px;
  margin-bottom: 10px;
}

.braincheck-card {
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--braincheck-border), 0 2px 4px rgba(23, 43, 77, 0.1);
  padding: 32px;
  margin-top: 40px;
  max-width: 480px;
  width: 100%;
}

.braincheck-title {
  color: var(--braincheck-dark-gray);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.2;
}

.braincheck-subtitle {
  color: var(--braincheck-text);
  font-size: 16px;
  margin-bottom: 32px;
  text-align: center;
  font-weight: 400;
}

.braincheck-input {
  border: 2px solid var(--braincheck-border);
  border-radius: 3px;
  padding: 8px 12px;
  width: 100%;
  margin-bottom: 16px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.braincheck-input:focus {
  border-color: var(--braincheck-blue);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
  outline: none;
}

.braincheck-button {
  background-color: var(--braincheck-blue);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  text-align: center;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  width: auto;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.braincheck-button.full-width {
  width: 100%;
}

.braincheck-button:hover {
  background-color: var(--braincheck-dark-blue);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.braincheck-button:active {
  transform: translateY(1px);
}

.braincheck-link {
  color: var(--braincheck-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}

.braincheck-link:hover {
  color: var(--braincheck-dark-blue);
  text-decoration: underline;
}

.braincheck-checkbox {
  margin-right: 8px;
}

.braincheck-footer {
  text-align: center;
  margin-top: auto;
  padding: 32px 0;
  color: var(--braincheck-text);
  font-size: 13px;
  background-color: white;
  border-top: 1px solid var(--braincheck-border);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

/* Form validation styles */
.braincheck-input.error {
  border-color: #DE350B;
}

.error-message {
  color: #DE350B;
  font-size: 13px;
  margin-top: -10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.error-message svg {
  margin-right: 6px;
  flex-shrink: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
  .braincheck-card {
    margin: 16px auto;
    padding: 24px;
    box-shadow: none;
    border: 1px solid var(--braincheck-border);
  }
  
  .braincheck-title {
    font-size: 24px;
  }
  
  .braincheck-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }
  
  .braincheck-logo {
    height: 24px;
  }
  
  .braincheck-container {
    padding: 0 16px;
  }
}

/* Dashboard card styles */
.dashboard-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.dashboard-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.dashboard-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--braincheck-text);
  margin-bottom: 8px;
}

.dashboard-card-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--braincheck-dark-gray);
  margin-bottom: 16px;
}

.dashboard-card-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--braincheck-blue);
  margin-top: auto;
  transition: color 0.2s;
}

.dashboard-card-link svg {
  margin-left: 6px;
  transition: transform 0.2s;
}

.dashboard-card-link:hover {
  color: var(--braincheck-dark-blue);
}

.dashboard-card-link:hover svg {
  transform: translateX(2px);
}

/* Data table styles */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--braincheck-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--braincheck-border);
}

.data-table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--braincheck-border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

/* Loading indicator */
.braincheck-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: text-bottom;
}

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

/* Sidebar styles */
.sidebar-wrapper {
  position: relative;
}

.sidebar {
  width: var(--braincheck-sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: white;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: var(--braincheck-transition);
}

.sidebar-header {
  height: var(--braincheck-header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--braincheck-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--braincheck-dark-gray);
  font-weight: 600;
}

.sidebar-logo img {
  height: 28px;
  margin-right: 12px;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--braincheck-text);
  cursor: pointer;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow-y: auto;
}

.sidebar-user {
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--braincheck-border);
  margin-bottom: 20px;
}

.sidebar-user-avatar {
  margin-right: 12px;
}

.sidebar-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--braincheck-light-blue);
  color: var(--braincheck-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  font-weight: 600;
  color: var(--braincheck-dark-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 12px;
  color: #6b7280;
}

.sidebar-menu {
  padding: 0 12px;
  margin-bottom: 20px;
}

.sidebar-menu-header {
  padding: 0 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-menu-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--braincheck-text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--braincheck-transition);
  margin-bottom: 2px;
}

.sidebar-menu-item:hover {
  background-color: var(--braincheck-light-blue);
  color: var(--braincheck-blue);
}

.sidebar-menu-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.sidebar-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 150;
}

.sidebar-toggle-button {
  background-color: white;
  border: 1px solid var(--braincheck-border);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Main content layout with sidebar */
.main-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--braincheck-sidebar-width);
  transition: var(--braincheck-transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
}

/* Dashboard card styles */
.dashboard-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.dashboard-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.dashboard-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--braincheck-dark-gray);
  margin-bottom: 4px;
}

.dashboard-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--braincheck-dark-gray);
  margin-bottom: 16px;
}

.dashboard-card-link {
  color: var(--braincheck-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.dashboard-card-link:hover {
  text-decoration: underline;
}

.dashboard-card-link svg {
  width: 16px;
  height: 16px;
  margin-left: 4px;
}

/* Table styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background-color: #f9fafb;
  font-weight: 600;
  color: var(--braincheck-dark-gray);
  border-bottom: 1px solid var(--braincheck-border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--braincheck-border);
  color: var(--braincheck-text);
}

.data-table tr:last-child td {
  border-bottom: none;
}

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

/* Additional BrainCheck specific styles */
.braincheck-page-container {
  padding: 24px;
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.braincheck-section {
  margin-bottom: 48px;
}

.braincheck-section-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--braincheck-dark-gray);
  margin-bottom: 16px;
  line-height: 1.2;
}

.braincheck-section-subtitle {
  font-size: 18px;
  color: var(--braincheck-text);
  margin-bottom: 32px;
  max-width: 800px;
}

.braincheck-tag {
  display: inline-block;
  padding: 4px 8px;
  background-color: var(--braincheck-light-blue);
  color: var(--braincheck-blue);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 8px;
  margin-bottom: 8px;
}

.braincheck-card-header {
  border-bottom: 1px solid var(--braincheck-border);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
