/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --slate-400: #94a3b8;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-600: #dc2626;
  --red-800: #991b1b;
  --green-100: #dcfce7;
  --green-800: #166534;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
}

/* Header */
.header {
  background: linear-gradient(to right, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--slate-700);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-600);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.125rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

.logo p {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin: 0;
}

.logo-icon-large {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(to bottom right, var(--primary-600), var(--primary-700));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 2rem;
  color: white;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
  background: var(--primary-600);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

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

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

.btn-secondary {
  background: white;
  color: var(--gray-700);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid var(--gray-300);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.btn-google {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 0.5rem;
  background: white;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-google:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

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

.btn-full {
  width: 100%;
}

.google-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Main Content */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.container {
  max-width: 1280px;
}

.page-header,
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--gray-900);
  margin: 0;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.back-link {
  color: var(--primary-600);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.back-link:hover {
  color: var(--primary-700);
}

/* Cards */
.card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.card-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.card-body {
  padding: 0;
}

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

.stats-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.stats-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-200, var(--gray-300));
}

.stats-card-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stats-card-value {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--gray-900);
}

/* Accounts List */
.accounts-list-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
}

.accounts-list-item:hover {
  background: var(--gray-50);
}

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

.account-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.account-email {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.account-meta {
  text-align: right;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background: var(--green-100);
  color: var(--green-800);
}

.status-badge.inactive {
  background: var(--gray-100);
  color: var(--gray-800);
}

.account-date {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* Login */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, var(--gray-50), var(--gray-100));
  padding: 3rem 1rem;
}

.login-card {
  max-width: 28rem;
  width: 100%;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.login-header h2 {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.login-header p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.login-form {
  margin-top: 2rem;
}

.divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-300);
}

.divider span {
  position: relative;
  background: white;
  padding: 0 0.5rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* Forms */
.form-container {
  max-width: 48rem;
}

.form-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  padding: 2rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

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

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

.form-group .required {
  color: var(--red-600);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-help {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

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

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background-color: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Error Messages */
.error-message {
  background: var(--red-50);
  border: 1px solid var(--red-200);
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: var(--red-800);
  font-size: 0.875rem;
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-gray-500 {
  color: var(--gray-500);
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Account Details */
.account-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.account-details-section h2 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

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

.account-details-item dt {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.account-details-item dd {
  font-size: 0.875rem;
  color: var(--gray-900);
  margin-top: 0.25rem;
}

.account-notes {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.account-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.account-footer .font-medium {
  font-weight: 500;
}

.capitalize {
  text-transform: capitalize;
}

/* Responsive */
@media (max-width: 640px) {
  .page-header,
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .account-details-grid {
    grid-template-columns: 1fr;
  }
}

