/* Zackgo Account Settings — Clerk & Executive personal profile UI */

.as-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.as-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: var(--accent-soft, rgba(224, 180, 76, 0.14));
  color: var(--accent, #E0B44C);
  margin-bottom: 8px;
}

.as-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-strong, #04140F);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.as-page-sub {
  font-size: 13px;
  color: var(--text-mute, #6B7280);
  margin-top: 4px;
  max-width: 560px;
  line-height: 1.55;
}

.as-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.as-nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--surface-elev, var(--surface, #fff));
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

.as-nav-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-mute, #9CA3AF);
  padding: 8px 12px 4px;
}

.as-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-dim, #6B7280);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.18s ease, color 0.18s ease;
  width: 100%;
}

.as-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.as-nav-item:hover {
  background: var(--surface-2, #F3F4F6);
  color: var(--text-strong, #04140F);
}

.as-nav-item.active {
  background: var(--accent-soft, rgba(224, 180, 76, 0.14));
  color: var(--text-strong, #04140F);
  font-weight: 600;
}

.as-panels {
  min-width: 0;
}

.as-panel {
  display: none;
}

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

.as-section {
  background: var(--surface-elev, var(--surface-solid, #fff));
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.as-section-head {
  margin-bottom: 18px;
}

.as-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong, #04140F);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.as-section-title svg {
  width: 17px;
  height: 17px;
  color: var(--accent, #E0B44C);
}

.as-section-sub {
  font-size: 12.5px;
  color: var(--text-mute, #6B7280);
  margin-top: 4px;
  line-height: 1.5;
}

.as-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border, #E5E7EB);
}

.as-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #E0B44C), var(--accent-2, #C9992F));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #04140F;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(224, 180, 76, 0.35);
}

.as-profile-meta h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong, #04140F);
  letter-spacing: -0.3px;
}

.as-profile-meta p {
  font-size: 12.5px;
  color: var(--text-mute, #6B7280);
  margin-top: 2px;
}

.as-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--info-soft, rgba(96, 165, 250, 0.14));
  color: var(--info, #60A5FA);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.as-role-pill.clerk {
  background: rgba(96, 165, 250, 0.12);
  color: #93C5FD;
  border-color: rgba(96, 165, 250, 0.28);
}

.as-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.as-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.as-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim, #374151);
}

.as-field input,
.as-field select {
  padding: 10px 12px;
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text, #111827);
  background: var(--surface-2, #F9FAFB);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.as-field input:focus,
.as-field select:focus {
  border-color: var(--accent, #E0B44C);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(224, 180, 76, 0.14));
}

.as-field input:disabled,
.as-field input[readonly] {
  opacity: 0.72;
  cursor: not-allowed;
}

.as-field-hint {
  font-size: 11px;
  color: var(--text-mute, #9CA3AF);
}

.as-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.as-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.as-btn-primary {
  background: var(--brand-navy, #06231B);
  color: #fff;
}

:root[data-theme="dark"] .as-btn-primary {
  background: linear-gradient(135deg, var(--accent, #E0B44C), var(--accent-2, #C9992F));
  color: #04140F;
}

.as-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 8px 20px rgba(0, 0, 0, 0.12));
}

.as-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.as-status {
  font-size: 12px;
  color: var(--text-mute, #6B7280);
}

.as-status.success { color: var(--success, #10B981); }
.as-status.error { color: var(--danger, #F87171); }

.as-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.as-info-row {
  padding: 12px 14px;
  background: var(--surface-2, #F9FAFB);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
}

.as-info-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-mute, #9CA3AF);
  margin-bottom: 4px;
}

.as-info-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong, #04140F);
}

.as-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, #E5E7EB);
}

.as-toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.as-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong, #04140F);
}

.as-toggle-desc {
  font-size: 12px;
  color: var(--text-mute, #6B7280);
  margin-top: 2px;
  line-height: 1.45;
}

.as-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.as-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.as-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3, #D1D5DB);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.as-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.as-switch input:checked + .as-switch-slider {
  background: var(--accent, #E0B44C);
}

.as-switch input:checked + .as-switch-slider::before {
  transform: translateX(20px);
}

.as-theme-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.as-theme-card {
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  background: var(--surface-2, #F9FAFB);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
  font-family: inherit;
}

.as-theme-card:hover {
  border-color: var(--border-strong, #D1D5DB);
}

.as-theme-card.selected {
  border-color: var(--accent, #E0B44C);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(224, 180, 76, 0.14));
}

.as-theme-preview {
  height: 48px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--border, #E5E7EB);
}

.as-theme-preview.dark {
  background: linear-gradient(135deg, #04140F 0%, #0A2A20 100%);
}

.as-theme-preview.light {
  background: linear-gradient(135deg, #F8FAFC 0%, #fff 100%);
}

.as-theme-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong, #04140F);
}

.as-theme-card-sub {
  font-size: 11px;
  color: var(--text-mute, #6B7280);
  margin-top: 2px;
}

.as-session-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2, #F9FAFB);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
}

.as-session-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-3, #E5E7EB);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mute, #6B7280);
}

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

.as-session-device {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong, #04140F);
}

.as-session-meta {
  font-size: 11.5px;
  color: var(--text-mute, #6B7280);
  margin-top: 2px;
}

.as-signout-wrap {
  margin-top: 8px;
}

.as-btn-danger-ghost {
  background: transparent;
  border: 1.5px solid rgba(248, 113, 113, 0.35);
  color: var(--danger, #EF4444);
}

.as-btn-danger-ghost:hover {
  background: var(--danger-soft, rgba(248, 113, 113, 0.1));
}

/* Topbar theme toggle (shared clerk + executive pattern) */
.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border, #E5E7EB);
  background: var(--surface, #fff);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim, #6B7280);
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--surface-2, #F3F4F6);
  border-color: var(--border-strong, #D1D5DB);
  color: var(--text-strong, #04140F);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity 0.25s ease, transform 0.25s ease;
  position: absolute;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0);
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0);
}

@media (max-width: 900px) {
  .as-layout {
    grid-template-columns: 1fr;
  }

  .as-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .as-nav-label {
    width: 100%;
  }

  .as-nav-item {
    width: auto;
    flex: 1;
    min-width: calc(50% - 6px);
    justify-content: center;
  }

  .as-grid-2,
  .as-info-grid,
  .as-theme-cards {
    grid-template-columns: 1fr;
  }
}
