/*
 * Infraproof Application Styles
 * Multi-tenant SaaS dashboard styling
 */

/* ============================================
   App Layout
   ============================================ */
.app-body {
  background: var(--slate-100);
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: var(--space-4);
  color: var(--color-text-light);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: 260px;
  background: var(--white);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-fixed);
  transition: transform var(--transition-base);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-primary);
  text-decoration: none;
}

.sidebar-logo svg {
  width: 36px;
  height: 36px;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4) 0;
  overflow-y: auto;
}

.nav-section {
  padding: var(--space-2) var(--space-4);
}

.nav-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  margin: var(--space-1) var(--space-2);
  transition: all var(--transition-fast);
  font-weight: 500;
}

.nav-item:hover {
  background: var(--slate-100);
  color: var(--color-primary);
}

.nav-item.active {
  background: var(--navy-50);
  color: var(--color-primary);
}

.nav-item.active .nav-icon {
  color: var(--color-accent);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.user-menu:hover {
  background: var(--slate-100);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--navy-600), var(--navy-400));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-org {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-toggle {
  background: none;
  border: none;
  padding: var(--space-1);
  cursor: pointer;
  color: var(--color-text-light);
}

.user-menu-toggle svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-header {
  background: var(--white);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-text);
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
}

.header-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  flex: 1;
}

.header-actions {
  display: flex;
  gap: var(--space-3);
}

.content-body {
  flex: 1;
  padding: var(--space-6);
}

/* ============================================
   Dashboard Page
   ============================================ */
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-content {
  flex: 1;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

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

.stat-trend {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  background: var(--slate-100);
  color: var(--color-text-light);
  white-space: nowrap;
}

.stat-trend.positive {
  background: var(--seafoam-100);
  color: var(--kelp-500);
}

.stat-trend.negative {
  background: rgba(255, 107, 107, 0.1);
  color: var(--coral-500);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.card-lg {
  grid-column: span 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: var(--space-6);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  color: var(--slate-700);
}

.badge-info {
  background: var(--horizon-100);
  color: var(--navy-700);
}

.badge-success {
  background: var(--seafoam-100);
  color: var(--kelp-500);
}

.badge-warning {
  background: rgba(255, 193, 7, 0.15);
  color: #b78600;
}

.badge-error {
  background: rgba(255, 107, 107, 0.15);
  color: var(--coral-500);
}

.badge-secondary {
  background: var(--navy-100);
  color: var(--navy-700);
}

/* Progress Ring */
.progress-ring-container {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.progress-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--slate-200);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
}

.progress-label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* Control Family Breakdown */
.control-family-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
}

.family-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.family-name {
  font-size: var(--text-sm);
  color: var(--color-text);
  width: 180px;
  flex-shrink: 0;
}

.family-progress {
  flex: 1;
  height: 8px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.family-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--seafoam-400));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.family-percent {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  width: 40px;
  text-align: right;
}

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

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--slate-100);
}

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

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 18px;
  height: 18px;
  color: var(--slate-600);
}

.activity-icon.success {
  background: var(--seafoam-100);
}

.activity-icon.success svg {
  color: var(--kelp-500);
}

.activity-icon.warning {
  background: rgba(255, 193, 7, 0.15);
}

.activity-icon.warning svg {
  color: #b78600;
}

.activity-icon.info {
  background: var(--horizon-100);
}

.activity-icon.info svg {
  color: var(--horizon-500);
}

.activity-content {
  flex: 1;
  min-width: 0;
}

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

.activity-meta {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: var(--space-1);
}

.activity-time {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  white-space: nowrap;
}

/* Gap List */
.gap-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.gap-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--slate-50);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--coral-500);
}

.gap-control {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.gap-info {
  flex: 1;
  min-width: 0;
}

.gap-title {
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--text-sm);
}

.gap-description {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: var(--space-1);
}

.gap-severity {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.gap-severity.high {
  background: rgba(255, 107, 107, 0.15);
  color: var(--coral-500);
}

.gap-severity.medium {
  background: rgba(255, 193, 7, 0.15);
  color: #b78600;
}

.gap-severity.low {
  background: var(--seafoam-100);
  color: var(--kelp-500);
}

/* Assessment Countdown */
.assessment-countdown {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--slate-200);
}

.countdown-date {
  background: var(--color-primary);
  color: var(--white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 80px;
}

.countdown-month {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.countdown-day {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  margin: var(--space-1) 0;
}

.countdown-year {
  font-size: var(--text-xs);
  opacity: 0.8;
}

.countdown-info {
  flex: 1;
}

.countdown-title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.countdown-remaining {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.countdown-assessor {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* Readiness Checklist */
.readiness-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.checklist-item svg {
  width: 20px;
  height: 20px;
  color: var(--slate-400);
}

.checklist-item.done {
  color: var(--color-text);
}

.checklist-item.done svg {
  color: var(--color-accent);
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
  display: flex;
  min-height: 100vh;
}

.auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-12);
  max-width: 480px;
  margin: 0 auto;
}

.auth-header {
  margin-bottom: var(--space-8);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: var(--space-8);
}

.auth-logo svg {
  width: 40px;
  height: 40px;
}

.auth-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.auth-header p {
  color: var(--color-text-light);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-link {
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-highlight);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.btn-block {
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-footer {
  margin-top: var(--space-8);
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

.auth-footer a {
  color: var(--color-highlight);
  font-weight: 500;
}

.auth-side {
  flex: 1;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
}

.auth-side-content {
  max-width: 400px;
  color: var(--white);
}

.auth-side blockquote {
  font-size: var(--text-xl);
  font-style: italic;
  margin: 0 0 var(--space-8) 0;
  line-height: 1.6;
}

.auth-testimonial {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.auth-testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
}

.auth-testimonial-name {
  font-weight: 600;
}

.auth-testimonial-role {
  font-size: var(--text-sm);
  opacity: 0.8;
}

@media (max-width: 900px) {
  .auth-side {
    display: none;
  }
}

/* ============================================
   Documents Page
   ============================================ */
.documents-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.page-header h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-1);
}

.page-header p {
  color: var(--color-text-light);
  margin: 0;
}

.page-header-actions {
  display: flex;
  gap: var(--space-3);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  text-align: center;
  background: var(--white);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-accent);
  background: var(--seafoam-100);
}

.upload-zone-content svg {
  width: 48px;
  height: 48px;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.upload-zone-content p {
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.upload-zone-content .link {
  background: none;
  border: none;
  color: var(--color-highlight);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.upload-hint {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* Filters */
.filters-bar {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-box svg {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
}

.search-box input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-12);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  background: var(--white);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.filter-group {
  display: flex;
  gap: var(--space-3);
}

.filter-group select {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  background: var(--white);
  cursor: pointer;
}

/* Data Table */
.table-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

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

.data-table th,
.data-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--slate-100);
}

.data-table th {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-light);
  background: var(--slate-50);
}

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

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

.doc-name {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.doc-icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.status-badge.success {
  background: var(--seafoam-100);
  color: var(--kelp-500);
}

.status-badge.warning {
  background: rgba(255, 193, 7, 0.15);
  color: #b78600;
}

.status-badge.error {
  background: rgba(255, 107, 107, 0.15);
  color: var(--coral-500);
}

.action-buttons {
  display: flex;
  gap: var(--space-2);
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-light);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--slate-100);
  color: var(--color-primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.pagination-controls {
  display: flex;
  gap: var(--space-1);
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: var(--white);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

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

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

/* ============================================
   Settings Page
   ============================================ */
.settings-page {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-8);
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.settings-nav-item {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.settings-nav-item:hover {
  background: var(--slate-100);
}

.settings-nav-item.active {
  background: var(--navy-50);
  color: var(--color-primary);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.settings-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
}

.settings-section h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.settings-description {
  color: var(--color-text-light);
  margin-bottom: var(--space-6);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 600px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-hint {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-top: var(--space-1);
}

.form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Organization Info Card */
.org-info-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--slate-50);
  border-radius: var(--radius-lg);
}

.org-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-600), var(--navy-400));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-xl);
}

.org-details {
  flex: 1;
}

.org-details h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.org-details p {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin: 0;
}

/* Team List */
.team-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.team-member {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--slate-50);
  border-radius: var(--radius-lg);
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--navy-600), var(--navy-400));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.member-email {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.member-role {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  padding: var(--space-1) var(--space-3);
  background: var(--white);
  border-radius: var(--radius-full);
}

.member-status {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.member-status.active {
  background: var(--seafoam-100);
  color: var(--kelp-500);
}

.member-status.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #b78600;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

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

  .page-header {
    flex-direction: column;
  }

  .page-header-actions {
    width: 100%;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: none;
  }

  .settings-page {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

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