:root {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* Core Fluent-style light theme tokens */
  --mc-color-bg: #f8f9fc;
  --mc-color-surface: #ffffff;
  --mc-color-surface-subtle: #f3f5fa;
  --mc-color-border-subtle: #e1e4e8;
  --mc-color-border-strong: #c5cad3;
  --mc-color-primary: #0f6cbd;
  --mc-color-primary-soft: #ecf3fc;
  --mc-color-primary-strong: #0b4f8a;
  --mc-color-text-primary: #111827;
  --mc-color-text-secondary: #424b57;
  --mc-color-text-muted: #6b7280;
  --mc-shadow-card-soft: 0 1px 3px rgba(0, 0, 0, 0.08);
  --mc-radius-card: 12px;
  --mc-sidebar-width: 260px;
}

html[data-theme="dark"] {
  background: #020617;
  color: #e2e8f0;
}

html[data-theme="light"] {
  background: var(--mc-color-bg);
  color: var(--mc-color-text-primary);
}

html[data-theme="dark"] body {
  background: #020617;
  color: #e2e8f0;
}

html[data-theme="light"] body {
  background: var(--mc-color-bg);
  color: var(--mc-color-text-primary);
}

body {
  margin: 0;
  min-height: 100vh;
}

.logo-hover:hover {
  opacity: 0.85;
  transition: opacity 150ms ease-in-out;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h1,
h2 {
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1rem;
}

button {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button.primary {
  background: var(--mc-color-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 108, 189, 0.2);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--mc-color-primary);
  color: var(--mc-color-primary);
}

.hidden {
  display: none !important;
}

.panel {
  background: var(--mc-color-surface);
  border-radius: var(--mc-radius-card);
  padding: 1.5rem;
  box-shadow: var(--mc-shadow-card-soft);
  border: 1px solid var(--mc-color-border-subtle);
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

input,
select {
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d9e6;
  font-size: 1rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--mc-color-primary);
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.2);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.app-actions {
  display: flex;
  gap: 0.5rem;
}

.hint {
  margin-top: 0.35rem;
  color: #c50f1f;
  font-size: 0.85rem;
  min-height: 1em;
}

.status-banner {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-banner.loading {
  background: #e7f3ff;
  color: #0f6cbd;
}

.status-banner.success {
  background: #e6f6e8;
  color: #0b6a0b;
}

.status-banner.error {
  background: #fde7e9;
  color: #a4262c;
}

/* Azure sign-in button color override */
#authBtn {
  background-color: #0f6cbd !important;
  border-color: #0f6cbd !important;
  color: #fff !important;
}
#authBtn:hover,
#authBtn:focus {
  background-color: #0d62a7 !important; /* slightly darker for hover */
}
#authBtn:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.35);
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

button.secondary .spinner {
  border-color: rgba(15, 108, 189, 0.3);
  border-top-color: #0f6cbd;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#result.success {
  border-left: 4px solid #13a10e;
}

#result.error {
  border-left: 4px solid #c50f1f;
}

#result h3 {
  margin-top: 0;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: grid;
  gap: 0.25rem;
}

.history-item .meta {
  font-size: 0.85rem;
  color: #5f6a7d;
}

.history-item.success {
  border-left: 4px solid #13a10e;
}

.history-item.failed {
  border-left: 4px solid #c50f1f;
}

/* Fluent-style inline success/info callouts */
.mc-callout-success {
  border-radius: 0.75rem;
  border: 1px solid #9fd89f;
  background: #e6f6e8;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #0b6a0b;
}

.mc-callout-success-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #cce5cc;
}

/* Deployments tabs */
.mc-tab {
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mc-tab.mc-tab-active {
  background: #ffffff;
  color: #0f6cbd;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
}

.mc-tab:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.8);
}

/* Fluent-style progress indicator used on deployment cards */
.mc-progress-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.mc-progress-bar {
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease;
}

/* Azure-style shimmer loader for deployments */
.mc-shimmer-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mc-shimmer-line {
  height: 0.75rem;
  border-radius: 999px;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
}

.mc-shimmer-card-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mc-shimmer-card {
  height: 4.25rem;
  border-radius: 0.875rem;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  position: relative;
  overflow: hidden;
}

.mc-shimmer-line::before,
.mc-shimmer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: mc-shimmer 1.25s infinite;
}

@keyframes mc-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Drawer (right side) */
.drawer-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.4); display: none; z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 360px; max-width: 90vw; background: #fff; border-left: 1px solid #e5e7eb; box-shadow: -4px 0 16px rgba(0,0,0,.08); transform: translateX(100%); transition: transform .2s ease; z-index: 51; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 12px 16px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; }
.drawer-body { padding: 12px 16px; overflow: auto; }
.drawer-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer; }
.drawer-item:hover { background: #f9fafb; }

/* --- Auth pages (Firebase / React) --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #ecf3fc, #f8f9fc);
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--mc-color-surface);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  border: 1px solid var(--mc-color-border-subtle);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--mc-color-text-primary);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--mc-color-text-muted);
  margin-bottom: 1.75rem;
}

.auth-form {
  margin-bottom: 1.25rem;
}

.auth-input {
  width: 100%;
}

.auth-button {
  width: 100%;
  justify-content: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--mc-color-text-muted);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mc-color-border-subtle);
}

.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-button.provider {
  background: var(--mc-color-surface-subtle);
  border: 1px solid var(--mc-color-border-subtle);
  color: var(--mc-color-text-primary);
  justify-content: flex-start;
}

.auth-button.provider:hover {
  background: #eef2ff;
}

.provider-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-block;
}

.provider-google {
  background: url('https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg')
    center/contain no-repeat;
}

.provider-microsoft {
  background:
    linear-gradient(90deg, #f25022 0 50%, #7fba00 50% 100%),
    linear-gradient(90deg, #00a4ef 0 50%, #ffb900 50% 100%);
  background-repeat: no-repeat;
  background-size: 50% 50%;
  background-position:
    0 0,
    100% 100%;
}

.auth-footer {
  font-size: 0.9rem;
  color: var(--mc-color-text-secondary);
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.auth-link {
  color: var(--mc-color-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.auth-alert-error {
  background: #fde7e9;
  color: #a4262c;
  border: 1px solid #f3b6c0;
}

.auth-alert-success {
  background: #e6f6e8;
  color: #0b6a0b;
  border: 1px solid #9fd89f;
}

.auth-card-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.auth-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--mc-color-primary-soft);
  color: var(--mc-color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.auth-card-icon.success {
  color: #0b6a0b;
  background: #e3f7e8;
}

.auth-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
}

.verify-page {
  background: linear-gradient(180deg, #f5f9ff 0%, #eef2ff 60%, #f9fbff 100%);
}

.verify-card {
  max-width: 560px;
}

.verify-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #e7f0fb;
  color: var(--mc-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.verify-email-address {
  font-weight: 600;
  color: var(--mc-color-primary);
}

.verify-panel {
  border: 1px solid var(--mc-color-border-subtle);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--mc-color-surface-subtle);
  margin: 1.25rem 0 1.5rem;
  box-shadow: inset 0 0 0 1px rgba(15, 108, 189, 0.05);
}

.verify-panel.small {
  padding: 1rem;
}

.verify-panel-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mc-color-text-primary);
}

.verify-panel-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--mc-color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.verify-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.verify-step {
  display: flex;
  gap: 0.75rem;
}

.verify-step-index {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--mc-color-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.verify-step-title {
  font-weight: 600;
  color: var(--mc-color-text-primary);
  margin-bottom: 0.1rem;
}

.verify-step-desc {
  font-size: 0.9rem;
  color: var(--mc-color-text-secondary);
}

.verify-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-top: 1rem;
  color: var(--mc-color-text-secondary);
}

.verify-inline-link {
  background: none;
  border: none;
  color: var(--mc-color-primary);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.verify-inline-link:hover {
  text-decoration: underline;
}

.verify-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .verify-actions {
    flex-direction: row;
  }
  .verify-actions .auth-button {
    flex: 1;
  }
}

.verify-footer {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--mc-color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.verify-footer-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.verify-btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: verify-spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

@keyframes verify-spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Sidebar: MacroCloud navigation */
#mc-sidebar { transition: width 0.18s ease; overflow: hidden; width: var(--mc-sidebar-width); background: #ffffff; border-right: 1px solid var(--mc-color-border-subtle); }
#mc-sidebar[data-collapsed="true"] { width: 3.75rem; }

.mc-nav-item,
.mc-nav-section,
.mc-nav-leaf {
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease, color 0.16s ease;
}

.mc-nav-item,
.mc-nav-section,
.mc-nav-leaf,
.mc-nav-label,
.mc-nav-sub,
.mc-nav-section-label {
  white-space: nowrap;
}

.mc-nav-item i,
.mc-nav-section i,
.mc-nav-leaf i {
  transition: transform 0.12s ease;
}

#mc-sidebar[data-collapsed="true"] .mc-nav-label,
#mc-sidebar[data-collapsed="true"] .mc-nav-sub,
#mc-sidebar[data-collapsed="true"] .mc-nav-section-label,
#mc-sidebar[data-collapsed="true"] .mc-nav-leaf span {
  display: none;
}

#mc-theme-toggle [data-theme-icon] {
  display: none;
}

html[data-theme="light"] #mc-theme-toggle [data-theme-icon="light"] {
  display: inline-flex;
}

html[data-theme="dark"] #mc-theme-toggle [data-theme-icon="dark"] {
  display: inline-flex;
}

.mc-nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--mc-color-text-primary);
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
}

.mc-nav-item:hover {
  background: #ecf3fc;
  border-color: var(--mc-color-border-subtle);
  box-shadow: var(--mc-shadow-card-soft);
  transform: translateY(-1px);
}

.mc-nav-item-active {
  background: #ecf3fc;
  border-color: var(--mc-color-primary);
  box-shadow: 0 10px 24px rgba(15, 108, 189, 0.18);
}

.mc-nav-item-active::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 3px;
  border-radius: 999px;
  background-color: var(--mc-color-primary);
}

.mc-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.9rem;
  background: #ecf3fc;
  box-shadow: none;
}

.mc-nav-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mc-color-text-primary);
}

.mc-nav-sub {
  font-size: 0.72rem;
  color: var(--mc-color-text-muted);
}

.mc-nav-section {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.8rem;
  color: var(--mc-color-text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.mc-nav-section-label {
  white-space: nowrap;
}

.mc-nav-leaf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  color: var(--mc-color-text-secondary);
  text-decoration: none;
  cursor: default;
}

.mc-nav-leaf[href] {
  cursor: pointer;
}

.mc-nav-leaf:hover {
  background: #f3f5fa;
  color: var(--mc-color-text-primary);
  transform: translateY(-1px);
}

/* Sidebar icon colors for light theme */
#mc-sidebar .mc-nav-icon i {
  color: var(--mc-color-primary);
}

#mc-sidebar .mc-nav-leaf i {
  color: var(--mc-color-text-secondary);
}

@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-actions {
    width: 100%;
    justify-content: flex-start;
  }

  button {
    width: auto;
  }
}

/* Header tweaks: white surface with blue accents */
header.bg-primary,
header.bg-white {
  background-color: #ffffff !important;
}

/* Preview: force Deploy Now button color */
#deployInfraBtn { background-color: #0f6cbd !important; border-color: #0f6cbd !important; color: #fff !important; }
#deployInfraBtn:hover { background-color: #106ebe !important; }

/* --- Firebase header + user menu --- */
.mc-header {
  backdrop-filter: blur(18px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.mc-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mc-header-title {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mc-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mc-header-icon-button {
  border-radius: 999px;
  width: 1.9rem;
  height: 1.9rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.mc-header-icon-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.mc-user-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mc-user-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: #eaf3ff;
  box-shadow: 0 0 0 1px rgba(0, 134, 255, 0.12),
    0 8px 18px rgba(15, 23, 42, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.mc-user-toggle:hover {
  transform: translateY(-1px);
  background: #d8ecff;
  box-shadow: 0 0 0 1px rgba(0, 134, 255, 0.2),
    0 10px 24px rgba(15, 23, 42, 0.18);
}

.mc-user-avatar-image,
.mc-user-avatar-fallback {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  overflow: hidden;
}

.mc-user-avatar-image {
  object-fit: cover;
}

.mc-user-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf3ff;
  color: #0086ff;
  font-size: 0.82rem;
  font-weight: 600;
}

.profile-display-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.95rem;
  color: #0f172a;
}

.profile-display-input[readonly] {
  cursor: default;
}

.profile-input {
  width: 100%;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
}

.profile-input:focus {
  outline: 2px solid #0086ff;
  background: #fff;
}

.mc-user-menu {
  position: absolute;
  right: 0;
  top: 2.5rem;
  min-width: 220px;
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 0.85rem 0.9rem 0.7rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
  border: 1px solid #e5e5e5;
  z-index: 60;
  transform-origin: top right;
  animation: mc-user-menu-in 0.14s ease-out;
}

.mc-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #eef0f3;
}

.mc-user-card-avatar .mc-user-avatar-fallback {
  width: 52px;
  height: 52px;
  background: #eaf3ff;
  color: #0086ff;
  font-size: 1.1rem;
  font-weight: 700;
  border: 1px solid rgba(0, 134, 255, 0.2);
}

.mc-user-card-meta .mc-user-menu-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mc-user-card-meta .mc-user-menu-email {
  font-size: 12px;
  color: #475569;
}

.mc-user-card-meta .mc-user-menu-role {
  font-size: 12px;
  color: #6b7280;
}

.mc-user-menu-section-simple {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #eef0f3;
}

.mc-user-menu-item-primary {
  width: 100%;
  justify-content: flex-start;
}

@keyframes mc-user-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mc-user-menu-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.2rem 0.45rem;
}

.mc-user-menu-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-user-menu-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.mc-user-menu-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}

.mc-user-menu-email {
  font-size: 0.8rem;
  color: #6b7280;
}

.mc-user-menu-error {
  margin: 0.15rem 0.2rem 0.45rem;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  font-size: 0.78rem;
  background: #fde7e9;
  color: #a4262c;
  border: 1px solid #f3b6c0;
}

.mc-user-menu-section {
  padding: 0.25rem 0.35rem 0.45rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.mc-user-menu-section:first-of-type {
  border-top: none;
}

.mc-user-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.4rem 0.35rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s ease, color 0.12s ease, transform 0.06s ease;
}

.mc-user-menu-item:hover:not(:disabled) {
  background: #f3f3f3;
  color: #0f6cbd;
  transform: translateY(-0.5px);
}

.mc-user-menu-item.destructive {
  color: #b91c1c;
}

.mc-user-menu-item.destructive:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
}

.mc-user-menu-footer {
  padding-top: 0.25rem;
  margin-top: 0.1rem;
  border-top: 1px solid #e5e7eb;
}

.mc-user-file-input {
  display: none;
}

/* Notification dropdown (Azure Fluent-style) */
.mc-notification-menu {
  position: absolute;
  right: 3.5rem;
  top: 2.5rem;
  width: 320px;
  max-height: 420px;
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 0.85rem 0.9rem 0.7rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
  border: 1px solid #e5e5e5;
  z-index: 60;
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-4px) scale(0.95);
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.mc-notification-menu.mc-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mc-notification-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.mc-notification-list {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 320px;
  overflow-y: auto;
}

.mc-notification-item {
  display: flex;
  gap: 0.55rem;
  padding: 0.45rem 0.4rem;
  border-radius: 0.65rem;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.06s ease;
  line-height: 1.4;
}

.mc-notification-item:hover {
  background: #f3f3f3;
  transform: translateY(-1px);
}

.mc-notification-item-unread {
  background: #edf5ff;
}

.mc-notification-icon {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-notification-body {
  flex: 1;
  min-width: 0;
}

.mc-notification-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #111827;
}

.mc-notification-message {
  font-size: 0.78rem;
  color: #4b5563;
}

.mc-notification-meta {
  margin-top: 0.1rem;
  font-size: 0.72rem;
  color: #6b7280;
}

.mc-notification-empty {
  margin-top: 0.4rem;
}

.mc-notification-badge-pulse {
  animation: mc-notification-pulse 1.2s ease-out infinite;
}

@keyframes mc-notification-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
  }
  70% {
    transform: scale(1.18);
    box-shadow: 0 0 0 8px rgba(248, 113, 113, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
  }
}

.mc-notification-icon-shake {
  animation: mc-notification-shake 0.35s ease-in-out 0s 2;
}

@keyframes mc-notification-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  50% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-1px);
  }
}

/* Mobile overlay when menus are open */
.mc-header-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 40;
}

@media (min-width: 768px) {
  .mc-header-overlay {
    display: none !important;
  }
}
