@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');/**
 * Error Fallback Styles - Production-Ready SaaS UX
 * Modern, accessible, and responsive error page design
 */

.error-fallback {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  z-index: 10000;
  animation: errorFadeIn 0.5s ease-out;
}

/* ========== BACKGROUND ========== */

.error-fallback__bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.error-fallback__bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #fef2f2 0%,
    #fee2e2 25%,
    #fecaca 50%,
    #fca5a5 75%,
    #f87171 100%
  );
  opacity: 0.3;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.error-fallback__bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(30deg, rgba(239, 68, 68, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(239, 68, 68, 0.05) 87.5%, rgba(239, 68, 68, 0.05)),
    linear-gradient(150deg, rgba(239, 68, 68, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(239, 68, 68, 0.05) 87.5%, rgba(239, 68, 68, 0.05)),
    linear-gradient(30deg, rgba(239, 68, 68, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(239, 68, 68, 0.05) 87.5%, rgba(239, 68, 68, 0.05)),
    linear-gradient(150deg, rgba(239, 68, 68, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(239, 68, 68, 0.05) 87.5%, rgba(239, 68, 68, 0.05));
  background-size: 80px 80px;
  background-position: 0 0, 40px 40px, 40px 40px, 80px 80px;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0 0, 40px 40px, 40px 40px, 80px 80px;
  }
  100% {
    background-position: 80px 80px, 120px 120px, 120px 120px, 160px 160px;
  }
}

/* ========== CONTAINER ========== */

.error-fallback__container {
  max-width: 700px;
  width: 100%;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ========== ICON ========== */

.error-fallback__icon {
  animation: iconBounce 1s ease-out;
  filter: drop-shadow(0 10px 30px rgba(239, 68, 68, 0.3));
}

.error-fallback__icon-circle {
  animation: drawCircle 1s ease-out forwards;
}

.error-fallback__icon-mark {
  opacity: 0;
  animation: fadeInMark 0.5s ease-out 0.8s forwards;
}

@keyframes iconBounce {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.2) rotate(20deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes drawCircle {
  from {
    strokeDashoffset: 345;
  }
  to {
    strokeDashoffset: 0;
  }
}

@keyframes fadeInMark {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== CARD ========== */

.error-fallback__card {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 68, 68, 0.1);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 
    0 20px 60px rgba(239, 68, 68, 0.15),
    0 0 1px rgba(0, 0, 0, 0.1);
  animation: cardSlideUp 0.6s ease-out 0.2s both;
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== HEADER ========== */

.error-fallback__header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.error-fallback__title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin: 0;
  line-height: 1.2;
}

.error-fallback__message {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  max-width: 500px;
}

/* ========== ERROR DETAILS ========== */

.error-fallback__details {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fca5a5;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.error-fallback__details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.error-fallback__details-title {
  font-size: 16px;
  font-weight: 700;
  color: #991b1b;
  margin: 0;
}

.error-fallback__error-box {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.error-fallback__error-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.error-fallback__error-message {
  display: block;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  color: #dc2626;
  background: #fef2f2;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
  overflow-x: auto;
  word-break: break-word;
}

.error-fallback__stack {
  margin-top: 12px;
}

.error-fallback__stack-summary {
  font-size: 14px;
  font-weight: 600;
  color: #991b1b;
  cursor: pointer;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  transition: all 0.2s ease;
}

.error-fallback__stack-summary:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.error-fallback__stack-content {
  margin: 12px 0 0 0;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  color: #475569;
  overflow-x: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ========== ACTIONS ========== */

.error-fallback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.error-fallback__button-primary {
  min-width: 140px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.error-fallback__button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* ========== HELP SECTION ========== */

.error-fallback__help {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.error-fallback__help-title {
  font-size: 16px;
  font-weight: 700;
  color: #0369a1;
  margin: 0 0 16px 0;
}

.error-fallback__help-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #0c4a6e;
  line-height: 1.8;
}

.error-fallback__help-list li {
  margin-bottom: 8px;
}

.error-fallback__help-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.error-fallback__help-link:hover {
  border-color: #0284c7;
}

/* ========== FOOTER ========== */

.error-fallback__footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.error-fallback__timestamp {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

/* ========== BRANDING ========== */

.error-fallback__branding {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.error-fallback__branding:hover {
  opacity: 1;
}

.error-fallback__brand-icon {
  font-size: 24px;
}

.error-fallback__brand-text {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* ========== ANIMATIONS ========== */

@keyframes errorFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .error-fallback__container {
    padding: 24px 16px;
    gap: 24px;
  }

  .error-fallback__icon svg {
    width: 80px;
    height: 80px;
  }

  .error-fallback__card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .error-fallback__title {
    font-size: 24px;
  }

  .error-fallback__message {
    font-size: 14px;
  }

  .error-fallback__actions {
    flex-direction: column;
    width: 100%;
  }

  .error-fallback__actions button {
    width: 100%;
  }

  .error-fallback__details,
  .error-fallback__help {
    padding: 20px;
  }

  .error-fallback__error-message,
  .error-fallback__stack-content {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .error-fallback__card {
    padding: 24px 20px;
  }

  .error-fallback__title {
    font-size: 20px;
  }

  .error-fallback__help-list {
    font-size: 13px;
    padding-left: 16px;
  }
}

/* ========== ACCESSIBILITY ========== */

/* Focus styles */
.error-fallback__stack-summary:focus-visible,
.error-fallback__help-link:focus-visible {
  outline: 3px solid #ef4444;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .error-fallback__card {
    border-width: 2px;
  }

  .error-fallback__error-box,
  .error-fallback__stack-summary {
    border-width: 2px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .error-fallback__card {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(239, 68, 68, 0.3);
  }

  .error-fallback__title {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .error-fallback__message,
  .error-fallback__timestamp {
    color: #94a3b8;
  }

  .error-fallback__details,
  .error-fallback__help {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(239, 68, 68, 0.2);
  }

  .error-fallback__error-box,
  .error-fallback__stack-summary,
  .error-fallback__stack-content {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(239, 68, 68, 0.2);
  }

  .error-fallback__error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
  }

  .error-fallback__stack-content {
    color: #cbd5e1;
  }

  .error-fallback__details-title {
    color: #fca5a5;
  }

  .error-fallback__help {
    background: rgba(12, 74, 110, 0.3);
    border-color: rgba(14, 165, 233, 0.3);
  }

  .error-fallback__help-title {
    color: #7dd3fc;
  }

  .error-fallback__help-list {
    color: #bae6fd;
  }

  .error-fallback__footer {
    border-top-color: rgba(51, 65, 85, 0.5);
  }
}
/* ZMemo Login Page Styles */

.zmemo-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Background */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #f6f7fb;
}

/* Card */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 3rem 2.5rem;
}

/* Brand */
.login-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo-text {
  font-size: 2.5rem;
  font-weight: 200;
  color: #323338;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 300;
  margin: 0;
  color: #323338;
}

.login-brand > p {
  font-size: 1rem;
  color: #676879;
  margin: 0.5rem 0 0;
  font-weight: 300;
}

/* Tabs */
.login-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: #f7fafc;
  padding: 0.25rem;
  border-radius: 8px;
}

.login-tabs button {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  color: #718096;
  cursor: pointer;
  transition: all 0.2s;
}

.login-tabs button:hover {
  color: #4a5568;
}

.login-tabs button.active {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: #2d3748;
  font-size: 0.875rem;
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-error {
  padding: 0.75rem;
  background: #fff5f5;
  border: 1px solid #fc8181;
  border-radius: 8px;
  color: #c53030;
  font-size: 0.875rem;
}

.login-submit {
  padding: 0.875rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Demo Section */
.demo-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.demo-divider {
  text-align: center;
  position: relative;
  margin-bottom: 1.5rem;
}

.demo-divider span {
  background: white;
  padding: 0 1rem;
  color: #a0aec0;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-btn {
  padding: 0;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: left;
}

.demo-btn:hover:not(:disabled) {
  border-color: var(--demo-color);
  background: rgba(102, 126, 234, 0.02);
  transform: translateX(4px);
}

.demo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.demo-btn-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.demo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--demo-color);
  flex-shrink: 0;
}

.demo-btn-text {
  flex: 1;
}

.demo-btn-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.demo-btn-desc {
  font-size: 0.8125rem;
  color: #718096;
}

/* Footer */
.login-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e6e9ef;
}

.login-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-footer-links p {
  margin: 0;
  font-size: 0.875rem;
  color: #676879;
  text-align: center;
}

.login-footer-links a {
  color: #5034ff;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

.login-footer-links a:hover {
  color: #4029d1;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .zmemo-login {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }

  .login-brand h1 {
    font-size: 1.75rem;
  }

  .login-trust {
    font-size: 0.6875rem;
  }
}

/* ============================================ */
/* ENTERPRISE ENHANCEMENTS */
/* ============================================ */

/* Validation Errors */
.input-error {
  border-color: #fc8181 !important;
  background-color: #fff5f5;
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.1) !important;
}

.error-text {
  display: block;
  color: #c53030;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Password Field */
.password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-password {
  background: none;
  border: none;
  color: #667eea;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.forgot-password:hover {
  color: #764ba2;
  text-decoration: underline;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.password-toggle:hover {
  opacity: 1;
}

/* Password Strength Meter */
.password-strength {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.password-strength-bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength-fill.strength-weak {
  background: #fc8181;
  width: 25%;
}

.password-strength-fill.strength-fair {
  background: #f6ad55;
  width: 50%;
}

.password-strength-fill.strength-good {
  background: #68d391;
  width: 75%;
}

.password-strength-fill.strength-strong {
  background: #48bb78;
  width: 100%;
}

.password-strength-text {
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 50px;
}

.password-strength-text {
  color: #718096;
}

.strength-weak ~ .password-strength-text {
  color: #fc8181;
}

.strength-fair ~ .password-strength-text {
  color: #f6ad55;
}

.strength-good ~ .password-strength-text {
  color: #68d391;
}

.strength-strong ~ .password-strength-text {
  color: #48bb78;
}

/* Checkbox */
.checkbox-group {
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  color: #4a5568;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.125rem;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label a {
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Trial Info */
.trial-info {
  text-align: center;
  font-size: 0.8125rem;
  color: #48bb78;
  padding: 0.75rem;
  background: #f0fff4;
  border-radius: 8px;
  border: 1px solid #9ae6b4;
}

/* SSO Section */
.sso-section {
  margin-bottom: 1.5rem;
}

.sso-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #d0d4e4;
  background: white;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #323338;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  margin-bottom: 0.75rem;
  position: relative;
}

.sso-button:hover:not(:disabled) {
  border-color: #b1b5c3;
  background: white;
  transform: none;
}

.sso-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sso-button svg {
  flex-shrink: 0;
}

.sso-button span:not(.sso-badge) {
  flex: 1;
  text-align: left;
}

.sso-badge {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  background: #edf2f7;
  color: #718096;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sso-divider {
  text-align: center;
  position: relative;
  margin: 1.5rem 0;
}

.sso-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e2e8f0;
}

.sso-divider span {
  position: relative;
  background: white;
  padding: 0 1rem;
  color: #676879;
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Mobile Responsive Enhancements */
@media (max-width: 640px) {
  .password-strength {
    flex-direction: column;
    align-items: stretch;
  }

  .password-strength-text {
    text-align: center;
  }

  .sso-button {
    font-size: 0.875rem;
    padding: 0.75rem;
  }

  .sso-badge {
    position: static;
    transform: none;
    margin-left: auto;
  }
}

/* Primary Email Sign-in Button */
.sso-button.primary {
  border: none;
  background: #5034ff;
  color: white;
  font-weight: 400;
  box-shadow: none;
}

.sso-button.primary:hover:not(:disabled) {
  background: #4029d1;
  transform: none;
}

.sso-button.primary span:not(.sso-badge) {
  color: white;
}
/**
 * Sidebar - Fresha-Inspired Professional Styling
 * Clean, modern sidebar with soft shadows and smooth transitions
 */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  /* Instant width change — animated width forces continuous layout (INP killer) */
  contain: layout style paint;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.03);
}

.sidebar.collapsed {
  width: 72px;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid #f3f4f6;
  min-height: 64px;
  position: relative;
}

.sidebar.collapsed .sidebar-header {
  padding: 20px 10px;
  justify-content: center;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.brand-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.sidebar-brand:hover .brand-icon {
  /* no scale transform — keeps pointer interactions cheap */
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #171717;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .brand-name {
  display: none;
}

.sidebar-toggle {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  min-width: 44px; /* WCAG 2.1 AA Touch Target */
  min-height: 44px; /* WCAG 2.1 AA Touch Target */
}

.sidebar.collapsed .sidebar-toggle {
  position: absolute;
  right: -16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
  background: #f3f4f6;
  color: #171717;
}

.toggle-icon {
  font-size: 18px;
  font-weight: 600;
}

.sidebar.collapsed .brand-icon {
  margin: 0 auto;
}

/* Navigation Menu */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  text-decoration: none;
  color: #525252;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
  position: relative;
  cursor: pointer;
  min-height: 44px; /* WCAG 2.1 AA Touch Target */
  content-visibility: auto;
  contain-intrinsic-size: auto 44px;
}

.nav-item:hover {
  background: #f9fafb;
  color: #171717;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand-muted) 100%);
  color: var(--brand-ink);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .nav-label {
  display: none;
}

.nav-badge {
  padding: 2px 6px;
  background: #f97316;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar.collapsed .nav-badge {
  display: none;
}

.nav-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

.nav-group {
  margin-bottom: 12px;
}

.nav-group:last-child {
  margin-bottom: 0;
}

.nav-group__label {
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.sidebar.collapsed .nav-group__label {
  display: none;
}

.nav-group + .nav-group {
  border-top: 1px solid #f3f4f6;
  padding-top: 8px;
}

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Legacy floating hamburger — replaced by AppTopBar menu control */
.mobile-menu-btn {
  display: none !important;
}

.mobile-menu-btn:hover {
  background: #f9fafb;
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    /* Transform-only animation stays on compositor — safe for INP */
    transition: transform 0.18s ease-out;
    z-index: 1000;
    will-change: transform;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: 260px;
  }

  .sidebar-overlay {
    display: block;
  }

  /* Adjust nav items for touch targets */
  .nav-item {
    padding: 12px 16px;
    min-height: 44px;
  }

  .btn-new-memo {
    height: 48px;
  }
}
/**
 * Slim top utility bar — brand accent aligned with primary CTAs (#6366F1)
 */

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 20px 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.app-topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-topbar__menu {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #171717;
  cursor: pointer;
}

.app-topbar__menu:hover {
  background: #f8fafc;
}

.app-topbar__context {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

.app-topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 280px;
  padding: 4px 8px 4px 4px;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.app-topbar__user:hover {
  background: var(--brand-soft);
}

.app-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-topbar__user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar__name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar__email {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar__logout {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.app-topbar__logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

@media (max-width: 768px) {
  .app-topbar {
    padding: 0 12px;
    /* Clear safe area; hamburger lives here — not floating over page titles */
  }

  .app-topbar__menu {
    display: flex;
  }

  .app-topbar__context {
    display: none;
  }

  .app-topbar__email {
    display: none;
  }

  .app-topbar__user {
    max-width: 160px;
  }
}

@media (max-width: 375px) {
  .app-topbar__name {
    max-width: 96px;
  }
}
.footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  margin-top: 64px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin: 0 0 16px 0;
}

.footer-section p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0;
}

.footer-company {
  margin-top: 16px;
  color: #64748b;
  font-size: 13px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin: 12px 0;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.footer-disclaimer p {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.footer-disclaimer strong {
  color: #cbd5e1;
  font-weight: 600;
}

.footer-disclaimer a {
  color: #60a5fa;
  text-decoration: underline;
}

.footer-disclaimer a:hover {
  color: #93c5fd;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-section {
    padding: 16px 0;
  }
}
/**
 * MainLayout - Professional Layout with Sidebar
 * Fresha-inspired clean layout structure with responsive behavior
 * Enterprise-ready with proper spacing adjustments for sidebar collapse
 */

/* Skip Navigation Link - WCAG AA Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

.main-layout {
  display: flex;
  min-height: 100vh;
  background: #fafafa;
}

.main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  /* No margin-left animation — width/margin transitions thrash layout and inflate INP */
}

.main-layout-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--brand-soft, #f5f3ff) 0%, var(--brand-muted, #ede9fe) 100%);
}

.main-layout-loading__inner {
  text-align: center;
}

.main-layout-loading__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(124, 58, 237, 0.3);
  border-top-color: var(--brand, #7c3aed);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

.main-layout-loading__text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--brand-ink, #5b21b6);
}

.main-content.with-sidebar {
  margin-left: 260px;
}

.main-content.with-sidebar.sidebar-collapsed {
  margin-left: 72px;
}

.main-content.no-sidebar {
  margin-left: 0;
}

.content-area {
  flex: 1;
  min-height: calc(100vh - 120px);
  width: 100%;
  max-width: 100%;
}

/* Deal pipeline only: lock shell height so the Kanban can fill the viewport.
   Do NOT apply this globally — it squeezes pages like /memos under the tall footer. */
.main-layout:has(.deal-pipeline-page) {
  height: 100vh;
  overflow: hidden;
}

.main-content:has(.deal-pipeline-page) {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.main-content:has(.deal-pipeline-page) .content-area {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-content:has(.deal-pipeline-page) .footer {
  display: none;
}

/* Responsive - Mobile First */
@media (max-width: 768px) {
  .main-content.with-sidebar,
  .main-content.with-sidebar.sidebar-collapsed {
    margin-left: 0;
  }

  .content-area {
    padding: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .content-area {
    padding: 24px;
  }
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Compact, non-blocking consent panel — does not cover sidebar or drawers */
.cookie-consent {
  position: fixed;
  /* Keep clear of left sidebar (~260px) and drawer CTAs */
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  left: auto;
  width: min(380px, calc(100vw - 280px));
  max-width: calc(100vw - 40px);
  z-index: 9000; /* below drawers (99998+) so modals stay usable */
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  pointer-events: auto;
  animation: cookie-consent-in 0.28s ease-out;
}

@keyframes cookie-consent-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent {
    animation: none;
  }
}

.cookie-consent__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.cookie-consent__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.cookie-consent__text a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__text a:hover {
  color: #1e40af;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .cookie-consent {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }

  .cookie-consent__actions {
    justify-content: stretch;
  }

  .cookie-consent__actions > * {
    flex: 1;
  }
}
.pm-score-circle-wrapper{display:inline-flex;flex-direction:column;align-items:center;gap:12px}

.pm-score-circle-label{font-size:14px;font-weight:600;color:#1e293b;text-align:center;letter-spacing:-.01em}

.pm-score-circle{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;transition:all .3s cubic-bezier(.4,0,.2,1)}

.pm-score-circle--clickable{cursor:pointer;outline:none;position:relative}

.pm-score-circle--clickable:after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid transparent;transition:border-color .2s ease}

.pm-score-circle--clickable:hover{transform:scale(1.05);box-shadow:0 8px 24px #0000001f}

.pm-score-circle--clickable:active{transform:scale(.98)}

.pm-score-circle--clickable:focus-visible:after{border-color:var(--score-color-info, #3b82f6)}

.pm-score-circle--clickable[aria-busy=true]{cursor:not-allowed;pointer-events:none}

.pm-score-circle__svg{width:100%;height:100%;display:block;position:relative;z-index:2}

.pm-score-circle__track{transition:stroke .3s ease,opacity .3s ease;stroke-linecap:round}

.pm-score-circle__ring{transition:stroke-dashoffset var(--animation-duration, .8s) cubic-bezier(.4,0,.2,1);will-change:stroke-dashoffset}

.pm-score-circle--animated .pm-score-circle__ring{animation:score-ring-pulse 2s ease-in-out infinite}

.pm-score-circle--loading{pointer-events:none;opacity:.7}

.pm-score-circle--loading .pm-score-circle__ring{animation:score-ring-loading 1.5s ease-in-out infinite}

.pm-score-circle__loader{display:flex;gap:4px;align-items:center;justify-content:center}

.pm-score-circle__loader-dot{width:6px;height:6px;border-radius:50%;background:currentColor;animation:score-loader-bounce 1.4s infinite ease-in-out both}

.pm-score-circle__loader-dot:nth-child(1){animation-delay:-.32s}

.pm-score-circle__loader-dot:nth-child(2){animation-delay:-.16s}

.pm-score-circle__background{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:94%;height:94%;border-radius:50%;z-index:1;opacity:.05;transition:background-color .3s ease,opacity .3s ease;filter:blur(16px)}

.pm-score-circle__content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;z-index:3;user-select:none}

.pm-score-circle__value{font-weight:800;line-height:1;letter-spacing:-.02em;transition:color .3s ease,font-size .3s ease}

.pm-score-circle__subtitle{margin-top:4px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px;line-height:1;transition:color .3s ease}

.pm-score-circle--outlined{background:#fff;box-shadow:0 2px 12px #0000000f,0 1px 3px #0000000a;border:1px solid #f1f5f9}

.pm-score-circle--outlined:hover{box-shadow:0 6px 20px #0000001f;border-color:#cbd5e1}

.pm-score-circle--solid{background:#fff;box-shadow:0 4px 20px #0000001a,0 2px 8px #0000000d;border:1px solid rgba(0,0,0,.04)}

.pm-score-circle--solid .pm-score-circle__value{position:relative;z-index:3}

.pm-score-circle--solid .pm-score-circle__subtitle{color:#64748b;position:relative;z-index:3}

.pm-score-circle--solid:hover{box-shadow:0 8px 28px #00000024,0 4px 12px #00000014}

.pm-score-circle--soft{background:#f8fafc;border:2px solid #e2e8f0}

.pm-score-circle--soft:hover{background:#f1f5f9;border-color:#cbd5e1}

.pm-score-circle--success.pm-score-circle--outlined{border-color:#10b981}

.pm-score-circle--success.pm-score-circle--solid{box-shadow:0 4px 16px #10b98140}

.pm-score-circle--warning.pm-score-circle--outlined{border-color:#f59e0b}

.pm-score-circle--warning.pm-score-circle--solid{box-shadow:0 4px 16px #f59e0b40}

.pm-score-circle--error.pm-score-circle--outlined{border-color:#ef4444}

.pm-score-circle--error.pm-score-circle--solid{box-shadow:0 4px 16px #ef444440}

.pm-score-circle--info.pm-score-circle--outlined{border-color:#3b82f6}

.pm-score-circle--info.pm-score-circle--solid{box-shadow:0 4px 16px #3b82f640}

.pm-score-circle-trend{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;padding:6px 12px;border-radius:6px;transition:all .2s ease}

.pm-score-circle-trend.positive{color:#10b981;background:#d1fae5}

.pm-score-circle-trend.negative{color:#ef4444;background:#fee2e2}

.pm-score-circle--sm .pm-score-circle__subtitle{margin-top:2px}

.pm-score-circle--md .pm-score-circle__subtitle{margin-top:3px}

.pm-score-circle__subtitle{margin-top:4px}

.pm-score-circle--xl .pm-score-circle__subtitle{margin-top:5px}

.pm-score-circle--2xl .pm-score-circle__subtitle{margin-top:6px}

.pm-score-circle-wrapper{gap:8px}

.pm-score-circle-label{font-size:13px}

.pm-score-circle-trend{font-size:12px;padding:4px 10px}

.pm-score-circle--2xl{width:140px!important;height:140px!important}

.pm-score-circle--2xl .pm-score-circle__value{font-size:48px!important}

.pm-score-circle-wrapper{gap:6px}

.pm-score-circle-label{font-size:12px}

.pm-score-circle-trend{font-size:11px;padding:3px 8px;gap:4px}

.pm-score-circle--2xl{width:120px!important;height:120px!important}

.pm-score-circle--2xl .pm-score-circle__value{font-size:42px!important}

.pm-score-circle--2xl .pm-score-circle__subtitle{font-size:11px!important}

.pm-score-circle--xl{width:110px!important;height:110px!important}

.pm-score-circle--xl .pm-score-circle__value{font-size:38px!important}

.pm-score-circle--xl .pm-score-circle__subtitle{font-size:10px!important}

.pm-score-circle--lg{width:100px!important;height:100px!important}

.pm-score-circle--lg .pm-score-circle__value{font-size:32px!important}

.pm-score-circle--clickable.pm-score-circle--sm,.pm-score-circle--clickable.pm-score-circle--md{min-width:44px;min-height:44px}

.pm-score-circle-wrapper{gap:6px}

.pm-score-circle-label{font-size:12px}

.pm-score-circle--2xl{width:120px!important;height:120px!important}

.pm-score-circle--xl{width:110px!important;height:110px!important}

.pm-score-circle,.pm-score-circle__ring,.pm-score-circle--animated .pm-score-circle__ring,.pm-score-circle--clickable:hover,.pm-score-circle--clickable:active{transition:none;animation:none;transform:none}

.pm-score-circle--outlined{border-width:2px}

.pm-score-circle__ring{stroke-width:calc(var(--thickness, 6) + 2)}

.pm-score-circle__track{opacity:.3}

.pm-score-circle-label{color:#f3f4f6}

.pm-score-circle--outlined{background:#1e293b;border-color:#334155;box-shadow:0 4px 16px #0000004d}

.pm-score-circle--soft{background:#1e293b;border-color:#334155}

.pm-score-circle__subtitle{color:#94a3b8}

.pm-score-circle-trend.positive{background:#10b98126}

.pm-score-circle-trend.negative{background:#ef444426}


/* ═══════════════════════════════════════════════════════════
   ZMemo AI - Enterprise Global Styles
   Professional, Modern, Production-Ready
   ═══════════════════════════════════════════════════════════ */
/* Import Design System */
/**
 * ZMemo AI Design System - PitchBook-Inspired Professional Edition
 * Clean neutrals, data-dense typography, professional spacing
 * Inspired by financial software for credibility and precision
 */
/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY SYSTEM - Inter Font (Financial Industry Standard)
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Font Family */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
  
  /* Font Sizes - PitchBook Style (Smaller, Data-Dense) */
  --text-xs: 0.6875rem;    /* 11px - Labels, metadata */
  --text-sm: 0.75rem;      /* 12px - Secondary text */
  --text-base: 0.8125rem;  /* 13px - Body text (PitchBook standard) */
  --text-md: 0.875rem;     /* 14px - Primary text */
  --text-lg: 0.9375rem;    /* 15px - Headings */
  --text-xl: 1rem;         /* 16px - Large headings */
  --text-2xl: 1.25rem;     /* 20px - Page titles */
  --text-3xl: 1.5rem;      /* 24px - Hero titles */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Letter Spacing */
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

/* ═══════════════════════════════════════════════════════════
   COLOR SYSTEM — ZMemo brand violet (#7c3aed) + neutrals
   ═══════════════════════════════════════════════════════════ */
  /* Primary Palette — professional violet (sidebar, CTAs, Deep Dive accents) */
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  /* Brand aliases (prefer these in new CSS) */
  --brand: var(--primary-600);
  --brand-primary: var(--primary-600);
  --brand-hover: var(--primary-700);
  --brand-soft: var(--primary-50);
  --brand-muted: var(--primary-100);
  --brand-border: var(--primary-200);
  --brand-ink: var(--primary-800);
  
  /* Secondary Palette - Soft Teals (Trust, Growth) */
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  
  /* Accent Palette - Warm Oranges (Energy, Action) */
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  
  /* Rose Palette - Soft Pinks (Important, Highlights) */
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-200: #fecdd3;
  --rose-300: #fda4af;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  
  /* Neutral Colors - Clean Grays */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  
  /* Semantic Colors - Soft & Friendly */
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-200: #bbf7d0;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;
  
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-200: #fecaca;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;
  
  --warning-50: #fefce8;
  --warning-100: #fef9c3;
  --warning-200: #fef08a;
  --warning-500: #eab308;
  --warning-600: #ca8a04;
  --warning-700: #a16207;
  
  --info-50: #f0f9ff;
  --info-100: #e0f2fe;
  --info-200: #bae6fd;
  --info-500: #0ea5e9;
  --info-600: #0284c7;
  --info-700: #0369a1;
  
  /* UI Colors - Bright & Clean */
  --background: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f5f5f5;
  --border: #e5e5e5;
  --border-light: #f5f5f5;
  --divider: #e5e5e5;
  
  /* Text Colors - Clear Hierarchy */
  --text-primary: #171717;
  --text-secondary: #525252;
  --text-tertiary: #a3a3a3;
  --text-disabled: #d4d4d4;
  --text-inverse: #ffffff;
  
  /* Overlay & Shadow - Soft & Subtle */
  --overlay: rgba(0, 0, 0, 0.4);
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY - Professional Grade (PitchBook/Inter)
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Font Families - Inter Primary */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Professional Font Sizes (Refined) */
  --text-xs: 0.6875rem;   /* 11px - metadata */
  --text-sm: 0.75rem;     /* 12px - labels */
  --text-base: 0.8125rem; /* 13px - small body */
  --text-md: 0.875rem;    /* 14px - body secondary */
  --text-lg: 0.9375rem;   /* 15px - body primary */
  --text-xl: 1.125rem;    /* 18px - subheadings */
  --text-2xl: 1.25rem;    /* 20px - H4 */
  --text-3xl: 1.5rem;     /* 24px - H3 */
  --text-4xl: 1.75rem;    /* 28px - H2 */
  --text-5xl: 2rem;       /* 32px - H1 */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights (Professional Tight) */
  --leading-tight: 1.25;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 1.75;
}
/* ═══════════════════════════════════════════════════════════
   SPACING SYSTEM - 8px Grid
   ═══════════════════════════════════════════════════════════ */
:root {
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
}
/* ═══════════════════════════════════════════════════════════
   BORDER RADIUS - Consistent Rounding
   ═══════════════════════════════════════════════════════════ */
:root {
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-3xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
}
/* ═══════════════════════════════════════════════════════════
   Z-INDEX SCALE - Layering System
   ═══════════════════════════════════════════════════════════ */
:root {
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}
/* ═══════════════════════════════════════════════════════════
   TRANSITIONS & ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
:root {
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Smooth Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */
:root {
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}
/* ═══════════════════════════════════════════════════════════
   METRIC CARD COLORS (Like screenshot)
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Chart/Graph Colors */
  --chart-red: #ef4444;
  --chart-green: #22c55e;
  --chart-blue: #3b82f6;
  --chart-purple: #a855f7;
  --chart-orange: #f97316;
  --chart-yellow: #eab308;
  
  /* Positive/Negative Indicators */
  --positive-text: #16a34a;
  --positive-bg: #dcfce7;
  --negative-text: #dc2626;
  --negative-bg: #fee2e2;
  --neutral-text: #6b7280;
  --neutral-bg: #f3f4f6;
}
/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES - Component Primitives
   ═══════════════════════════════════════════════════════════ */
/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}
.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}
.scale-in {
  animation: scaleIn 0.2s ease-out;
}
/* Hover Effects */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-200) 0%,
    var(--gray-100) 50%,
    var(--gray-200) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
/* Focus Styles */
.focus-ring {
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline var(--transition-fast);
}
.focus-ring:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
/* Truncate Text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ═══════════════════════════════════════════════════════════
   Primary CTAs — align @pavanhiro/common-ui buttons to brand
   ═══════════════════════════════════════════════════════════ */
.pm-button-primary.pm-button-standard,
.pm-button-primary.pm-button-raised,
.pm-button-advanced-effects.pm-button-primary.pm-button-standard,
.pm-button-advanced-effects.pm-button-primary.pm-button-raised {
  background: var(--brand) !important;
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.pm-button-primary.pm-button-standard:hover:not(.pm-button-disabled):not(.pm-button-loading),
.pm-button-primary.pm-button-raised:hover:not(.pm-button-disabled):not(.pm-button-loading),
.pm-button-advanced-effects.pm-button-primary.pm-button-standard:hover:not(.pm-button-disabled):not(.pm-button-loading),
.pm-button-advanced-effects.pm-button-primary.pm-button-raised:hover:not(.pm-button-disabled):not(.pm-button-loading) {
  background: var(--brand-hover) !important;
  background-color: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}
.pm-button-primary.pm-button-outline {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.pm-button-primary.pm-button-flat,
.pm-button-primary.pm-button-text {
  color: var(--brand) !important;
}
/* Import WCAG 2.1 AA Accessibility Fixes */
/**
 * ═══════════════════════════════════════════════════════════
 * ZMemo AI - WCAG 2.1 AA Accessibility Fixes
 * ═══════════════════════════════════════════════════════════
 * 
 * CRITICAL FIXES:
 * 1. Color contrast ratios upgraded to meet WCAG 2.1 AA
 * 2. Focus indicators enhanced for keyboard navigation  
 * 3. Semantic HTML structure guidance
 * 
 * WCAG 2.1 AA Requirements:
 * - Normal text: 4.5:1 contrast ratio minimum
 * - Large text (18px+): 3:1 contrast ratio minimum
 * - UI components: 3:1 contrast ratio minimum
 * ═══════════════════════════════════════════════════════════
 */
/* Import base design system */
/* ═══════════════════════════════════════════════════════════
   FIX 1: ENHANCED TEXT COLORS - WCAG 2.1 AA Compliant
   Previous: #525252 on #ffffff = 4.3:1 ❌ (fails WCAG AA)
   Fixed: #404040 on #ffffff = 9.7:1 ✅ (passes WCAG AAA)
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Enhanced Text Hierarchy - All meet WCAG AA */
  --text-primary: #171717;     /* 16.3:1 - Primary content */
  --text-secondary: #404040;   /* 9.7:1 - Secondary content (FIXED) */
  --text-tertiary: #737373;    /* 4.6:1 - Tertiary content (FIXED) */
  --text-disabled: #a3a3a3;    /* 3.2:1 - Disabled (large text only) */
  --text-inverse: #ffffff;     /* For dark backgrounds */
  
  /* Link Colors - Enhanced Contrast */
  --link-primary: #0369a1;     /* 5.5:1 - Meets WCAG AA */
  --link-hover: #0284c7;       /* 4.5:1 - Hover state */
  --link-visited: #7c3aed;     /* 5.3:1 - Visited links */
  
  /* Button Text - Dark backgrounds */
  --button-text-primary: #ffffff;
  --button-text-secondary: #171717;
  
  /* Status Colors - Enhanced for Contrast */
  --success-text: #15803d;     /* 4.5:1 on white */
  --danger-text: #b91c1c;      /* 5.5:1 on white */
  --warning-text: #a16207;     /* 4.7:1 on white */
  --info-text: #0369a1;        /* 5.5:1 on white */
}
/* ═══════════════════════════════════════════════════════════
   FIX 2: KEYBOARD FOCUS INDICATORS - WCAG 2.4.7
   All interactive elements must have visible focus
   ═══════════════════════════════════════════════════════════ */
/* Remove default outline, add enhanced focus ring */
*:focus {
  outline: none;
}
/* Enhanced focus ring for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible,
[role="menuitem"]:focus-visible,
[role="tab"]:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 2px;
  border-radius: 4px;
  transition: outline 0.2s ease;
}
/* Special focus for navigation elements */
nav a:focus-visible,
[role="navigation"] a:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 4px;
  background: rgba(14, 165, 233, 0.1);
}
/* Focus for cards and clickable containers */
.card:focus-visible,
[role="article"]:focus-visible,
[role="listitem"]:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}
/* Focus within (when element contains focused child) */
.form-group:focus-within,
.input-group:focus-within {
  border-color: #0ea5e9;
}
/* ═══════════════════════════════════════════════════════════
   FIX 3: SKIP TO MAIN CONTENT - WCAG 2.4.1
   First focusable element for keyboard users
   ═══════════════════════════════════════════════════════════ */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem 1.5rem;
  background: #0369a1;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  font-weight: 600;
}
.skip-to-main:focus {
  left: 0;
  top: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}
/* ═══════════════════════════════════════════════════════════
   FIX 4: ENHANCED UI COMPONENT CONTRAST - WCAG 1.4.11
   UI components must have 3:1 contrast minimum
   ═══════════════════════════════════════════════════════════ */
/* Form Input Borders */
input,
select,
textarea {
  border: 1.5px solid #737373 !important;  /* 4.6:1 - Enhanced from #d4d4d4 */
  background: #ffffff;
  color: #171717;
}
input::placeholder,
select::placeholder,
textarea::placeholder {
  color: #737373;  /* 4.6:1 - Meets WCAG AA */
}
/* Disabled states */
input:disabled,
select:disabled,
textarea:disabled {
  border-color: #a3a3a3;
  background: #f5f5f5;
  color: #737373;
  cursor: not-allowed;
}
/* Button contrast */
button {
  font-weight: 600;
  border: none;
}
/* Primary buttons - high contrast */
button.primary,
.button-primary {
  background: #0369a1;  /* 5.5:1 contrast */
  color: #ffffff;
}
button.primary:hover,
.button-primary:hover {
  background: #0284c7;
}
/* Secondary buttons */
button.secondary,
.button-secondary {
  background: #ffffff;
  color: #171717;
  border: 1.5px solid #737373 !important;
}
button.secondary:hover,
.button-secondary:hover {
  background: #f5f5f5;
  border-color: #525252 !important;
}
/* Danger buttons */
button.danger,
.button-danger {
  background: #dc2626;  /* 5.9:1 contrast */
  color: #ffffff;
}
/* ═══════════════════════════════════════════════════════════
   FIX 5: STATUS BADGES - Enhanced Contrast
   ═══════════════════════════════════════════════════════════ */
.badge {
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}
.badge-success {
  background: #dcfce7;
  color: #15803d;  /* 4.5:1 on light bg */
  border: 1px solid #15803d;
}
.badge-danger {
  background: #fee2e2;
  color: #b91c1c;  /* 5.5:1 on light bg */
  border: 1px solid #b91c1c;
}
.badge-warning {
  background: #fef9c3;
  color: #a16207;  /* 4.7:1 on light bg */
  border: 1px solid #a16207;
}
.badge-info {
  background: #e0f2fe;
  color: #0369a1;  /* 5.5:1 on light bg */
  border: 1px solid #0369a1;
}
/* ═══════════════════════════════════════════════════════════
   FIX 6: LINK STYLES - WCAG 2.4.4 & 1.4.1
   Links must be distinguishable without relying on color alone
   ═══════════════════════════════════════════════════════════ */
a {
  color: #0369a1;  /* 5.5:1 contrast */
  text-decoration: underline;
  text-decoration-color: rgba(3, 105, 161, 0.4);
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}
a:hover {
  color: #0284c7;
  text-decoration-color: #0284c7;
}
a:visited {
  color: #7c3aed;  /* Purple for visited */
}
/* Navigation links (can skip underline if clearly navigation) */
nav a,
[role="navigation"] a {
  text-decoration: none;
  font-weight: 500;
}
nav a:hover,
[role="navigation"] a:hover {
  text-decoration: underline;
}
/* ═══════════════════════════════════════════════════════════
   FIX 7: TABLE ACCESSIBILITY
   ═══════════════════════════════════════════════════════════ */
table {
  border-collapse: collapse;
  width: 100%;
}
th {
  background: #f5f5f5;
  color: #171717;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #737373;  /* Enhanced contrast */
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
  color: #171717;
}
tr:hover {
  background: #f9fafb;
}
/* Striped rows for better readability */
tbody tr:nth-child(even) {
  background: #fafafa;
}
/* ═══════════════════════════════════════════════════════════
   FIX 8: ICON-ONLY BUTTONS - WCAG 2.4.4
   Must have accessible labels
   ═══════════════════════════════════════════════════════════ */
button[aria-label],
a[aria-label] {
  position: relative;
}
/* Show tooltip on focus for icon-only buttons */
button[aria-label]:focus-visible::after,
a[aria-label]:focus-visible::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: #171717;
  color: #ffffff;
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  z-index: 1000;
}
/* ═══════════════════════════════════════════════════════════
   FIX 9: ENHANCED CONTRAST FOR DARK MODE (if applicable)
   ═══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #fafafa;
    --text-secondary: #d4d4d4;  /* 10.3:1 on dark bg */
    --text-tertiary: #a3a3a3;   /* 4.9:1 on dark bg */
    --background: #171717;
    --surface: #262626;
    --border: #404040;
  }
  
  /* Invert focus ring for dark mode */
  *:focus-visible {
    outline-color: #38bdf8;
  }
}
/* ═══════════════════════════════════════════════════════════
   FIX 10: PRINT STYLES - Accessibility for print
   ═══════════════════════════════════════════════════════════ */
@media print {
  * {
    background: white !important;
    color: black !important;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #404040;
  }
}
/* ═══════════════════════════════════════════════════════════
   BASE STYLES - Enhanced Typography & Layout
   ═══════════════════════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  /* Smooth transition for modal scrollbar compensation */
  transition: padding-right 0.2s ease;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}
#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES (Minimal - Use pm-common-ui components instead)
   ═══════════════════════════════════════════════════════════ */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}
.slide-in {
  animation: slideIn 0.3s ease-out;
}
.loading-spinner {
  animation: spin 1s linear infinite;
}
/* Custom scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/* Text utilities */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Visibility utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/* ============================================================================
   CRITICAL FIX: pm-common-ui PageHeader inline-badge styles
   These override package CSS with !important for specificity
   ============================================================================ */
/* Inline badges container */
.page-header__inline-badges {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: 16px !important;
  flex-wrap: wrap !important;
}
/* Base inline badge */
.inline-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}
.inline-badge-icon {
  display: inline-flex !important;
  font-size: 14px !important;
  line-height: 1 !important;
}
.inline-badge-value {
  font-weight: 600 !important;
  font-size: 14px !important;
}
.inline-badge-label {
  font-weight: 400 !important;
  opacity: 0.85 !important;
}
/* Color variants */
.inline-badge--neutral {
  background: #f3f4f6 !important;
  color: #374151 !important;
}
.inline-badge--neutral .inline-badge-value {
  color: #111827 !important;
}
.inline-badge--success {
  background: #f0fdf4 !important;
  color: #16a34a !important;
}
.inline-badge--success .inline-badge-value {
  color: #15803d !important;
}
.inline-badge--warning {
  background: #fef3c7 !important;
  color: #d97706 !important;
}
.inline-badge--warning .inline-badge-value {
  color: #b45309 !important;
}
.inline-badge--info {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}
.inline-badge--info .inline-badge-value {
  color: #0369a1 !important;
}
.inline-badge--danger {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}
.inline-badge--danger .inline-badge-value {
  color: #b91c1c !important;
}
/* PageHeader action buttons */
.header-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}
.header-action-btn--outline {
  background: white !important;
  color: #3b82f6 !important;
  border: 1.5px solid #3b82f6 !important;
}
.header-action-btn--outline:hover {
  background: #eff6ff !important;
  transform: translateY(-1px) !important;
}
.header-action-btn--primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: white !important;
  border: none !important;
}
.header-action-btn--primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  transform: translateY(-1px) !important;
}
/* NOTE: pm-score-circle CSS is loaded from /pm-common-ui.css in index.html */
/* DO NOT override component CSS here */
/* ═══════════════════════════════════════════════════════════
   MODAL & DIALOG OVERLAY FIXES
   NOTE: Do NOT apply full-viewport flex centering to .pm-dialog /
   .pm-confirm / .confirm-2025 — those are the CARD, not the overlay.
   Forcing inset:0 + display:flex on the card flattens confirm into
   a broken horizontal layout (icon | text | buttons overflowing).
   ═══════════════════════════════════════════════════════════ */
/* Backdrop overlays only — full viewport, above drawers (99999) */
.pm-dialog-overlay,
.confirm-2025-overlay,
.pm-modal-backdrop,
.pm-dialog-backdrop,
.notification-backdrop,
.alert-2025-overlay,
.prompt-2025-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
  z-index: 1000000 !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px;
  box-sizing: border-box;
}
/* Confirm / alert / prompt cards — keep component layout intact */
.pm-confirm.confirm-2025,
.confirm-2025,
.alert-2025,
.prompt-2025 {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: min(420px, 100%) !important;
  max-height: min(90vh, 100%) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  z-index: 1000001 !important;
}
.confirm-2025__footer {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  justify-content: stretch !important;
}
.confirm-2025__btn {
  flex: 1 1 auto !important;
  min-width: 120px !important;
  white-space: nowrap !important;
}
/* Prevent body scroll when modal is open */
body.modal-open,
body:has(.pm-dialog-overlay),
body:has(.confirm-2025-overlay) {
  overflow: hidden !important;
}

