/* Microsoft 365 & Azure Portal Fluent Design System */
:root {
  --ms-primary: #0078d4;
  --ms-primary-hover: #106ebe;
  --ms-primary-active: #005a9e;
  --ms-primary-subtle: #eff6fc;
  --ms-primary-border: #c7e0f4;
  --ms-neutral-dark: #201f1e;
  --ms-neutral-primary: #323130;
  --ms-neutral-secondary: #605e5c;
  --ms-neutral-tertiary: #a19f9d;
  --ms-neutral-quaternary: #d2d0ce;
  --ms-neutral-light: #f3f2f1;
  --ms-neutral-lighter: #faf9f8;
  --ms-white: #ffffff;
  --ms-success: #107c41;
  --ms-success-bg: #dff6dd;
  --ms-warning: #797673;
  --ms-warning-bg: #fff4ce;
  --ms-error: #a4262c;
  --ms-error-bg: #fde7e9;
  --ms-topbar-bg: #004e8c;
  --ms-topbar-dark: #001e38;
  --ms-nav-bg: #f8fafc;
  --ms-nav-hover: #f1f5f9;
  --ms-nav-active: #eff6ff;
  --ms-radius: 4px;
  --ms-radius-card: 6px;
  --ms-shadow-card: 0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0,0,0,0.108);
  --ms-shadow-flyout: 0 6.4px 14.4px 0 rgba(0,0,0,0.132), 0 1.2px 3.6px 0 rgba(0,0,0,0.108);
  --ms-shadow-dialog: 0 25.6px 57.6px 0 rgba(0,0,0,0.22), 0 4.8px 14.4px 0 rgba(0,0,0,0.18);
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
  font-family: var(--font-family);
  color: var(--ms-neutral-primary);
  background: var(--ms-neutral-light);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { margin: 0; background: var(--ms-neutral-light); min-height: 100vh; overflow-x: hidden; }

/* Microsoft Typography & Form Controls */
button, input, select, textarea { font-family: inherit; font-size: 13px; }
input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  background: var(--ms-white);
  color: var(--ms-neutral-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ms-primary);
  box-shadow: 0 0 0 1px var(--ms-primary);
}
input::placeholder, textarea::placeholder { color: var(--ms-neutral-tertiary); }
textarea { resize: vertical; line-height: 1.4; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ms-neutral-primary);
  margin: 12px 0 6px 0;
}
label input, label select, label textarea { margin-top: 5px; }

/* Fluent Buttons */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--ms-radius);
  border: 1px solid transparent;
  background: var(--ms-primary);
  color: var(--ms-white);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.05s ease;
  user-select: none;
  min-height: 32px;
}
button:hover { background: var(--ms-primary-hover); }
button:active { background: var(--ms-primary-active); transform: scale(0.99); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

button.secondary {
  background: var(--ms-white);
  color: var(--ms-neutral-primary);
  border: 1px solid var(--ms-neutral-quaternary);
}
button.secondary:hover { background: var(--ms-neutral-light); border-color: var(--ms-neutral-tertiary); }
button.secondary:active { background: var(--ms-neutral-quaternary); }

button.danger {
  background: #a4262c;
  color: var(--ms-white);
}
button.danger:hover { background: #8f1f25; }

button.action-btn {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 26px;
  font-weight: 500;
}

/* ================= CUSTOMER PORTAL AUTHENTICATION ================= */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #eff6fc 0%, #e2edf8 50%, #d4e4f5 100%);
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 78, 140, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 28px 32px 32px 32px;
  position: relative;
  transition: all 0.2s ease;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ms-neutral-light);
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ms-neutral-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.auth-back-link:hover {
  color: var(--ms-primary);
  background: var(--ms-primary-subtle);
}

.auth-locale-picker select {
  font-size: 12px;
  padding: 3px 8px;
  width: auto;
  min-width: 100px;
  border-radius: 4px;
  background: var(--ms-neutral-lighter);
  border-color: var(--ms-neutral-quaternary);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0078d4 0%, #004e8c 100%);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 120, 212, 0.3);
}

.auth-brand-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--ms-neutral-dark);
  line-height: 1.2;
}

.auth-brand-sub {
  font-size: 12px;
  color: var(--ms-neutral-secondary);
  font-weight: 400;
}

/* Mode Tabs */
.auth-tabs {
  display: flex;
  background: var(--ms-neutral-light);
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ms-neutral-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 34px;
}

.auth-tab.active {
  background: var(--ms-white);
  color: var(--ms-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.auth-mode-header {
  margin-bottom: 18px;
}

.auth-mode-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ms-neutral-dark);
  margin-bottom: 4px;
}

.auth-mode-header p {
  font-size: 13px;
  color: var(--ms-neutral-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Alert Banner */
.auth-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.auth-alert.error {
  background: var(--ms-error-bg);
  border: 1px solid #f1aeb5;
  color: var(--ms-error);
}
.auth-alert.success {
  background: var(--ms-success-bg);
  border: 1px solid #a3cfbb;
  color: var(--ms-success);
}
.auth-alert.info {
  background: var(--ms-primary-subtle);
  border: 1px solid var(--ms-primary-border);
  color: #004e8c;
}

/* Landing Page Card Footer */
.auth-card-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
}
.auth-footer-dot {
  opacity: 0.5;
}
.auth-admin-portal-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
}
.auth-admin-portal-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Social Buttons */
.social-auth-container {

  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.btn-google {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-apple {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}
.btn-apple:hover {
  background: #1f2937;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0;
  color: var(--ms-neutral-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--ms-neutral-quaternary);
}
.auth-divider span {
  padding: 0 10px;
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ms-neutral-primary);
  margin: 0 0 5px 0;
}
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.form-label-row label {
  margin: 0;
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--ms-neutral-secondary);
  margin-top: 4px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper input {
  padding-right: 38px;
}
.btn-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--ms-neutral-tertiary);
  padding: 6px;
  cursor: pointer;
  min-height: auto;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-password-toggle:hover {
  color: var(--ms-neutral-primary);
  background: var(--ms-neutral-lighter);
}

.auth-remember-row {
  display: flex;
  align-items: center;
  margin: 12px 0 16px 0;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ms-neutral-secondary);
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--ms-primary);
  cursor: pointer;
  margin: 0;
}

/* Buttons and Links */
.auth-card .actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.btn-primary-action {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  background: linear-gradient(180deg, #0078d4 0%, #006cbe 100%);
  box-shadow: 0 2px 4px rgba(0, 120, 212, 0.25);
  transition: all 0.15s ease;
}
.btn-primary-action:hover {
  background: #106ebe;
  box-shadow: 0 4px 8px rgba(0, 120, 212, 0.35);
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--ms-primary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  min-height: auto;
  text-decoration: none;
}
.btn-text-link:hover {
  text-decoration: underline;
}

.btn-text-link-muted {
  background: transparent;
  border: none;
  color: var(--ms-neutral-secondary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  min-height: auto;
  text-decoration: underline;
}
.btn-text-link-muted:hover {
  color: var(--ms-primary);
}

.auth-footer-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ms-neutral-light);
  font-size: 13px;
  color: var(--ms-neutral-secondary);
}

.auth-aux-links {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* Action View Specifics */
.spinner-large {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 120, 212, 0.2);
  border-top-color: var(--ms-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.status-icon-large {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto;
}
.status-icon-large.success {
  background: var(--ms-success-bg);
  color: var(--ms-success);
  border: 2px solid #a3cfbb;
}

.invite-info-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ms-neutral-lighter);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: 6px;
  padding: 14px;
  margin: 16px 0;
}
.invite-icon {
  font-size: 28px;
}

.font-semibold {
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Topbar Specific Button Styles (CSP Compliant) */
.btn-topbar-add {
  height: 32px;
  min-height: 32px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--ms-radius);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-topbar-add:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-topbar-logout {
  height: 30px;
  min-height: 30px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-topbar-logout:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}


/* Global Top Navigation Bar (Azure / Microsoft 365 Header) */
.ms-topbar {
  height: 48px;
  background: var(--ms-topbar-bg);
  background: linear-gradient(90deg, var(--ms-topbar-dark) 0%, var(--ms-topbar-bg) 100%);
  color: var(--ms-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ms-topbar-left {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}
.ms-waffle-btn {
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 3px;
  place-content: center;
  cursor: pointer;
  border-radius: var(--ms-radius);
  padding: 6px;
}
.ms-waffle-btn span {
  width: 3px;
  height: 3px;
  background: var(--ms-white);
  border-radius: 0.5px;
}
.ms-waffle-btn:hover { background: rgba(255,255,255,0.15); }
.ms-portal-brand {
  width: 250px;
  min-width: 250px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ms-white);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  height: 100%;
}
.ms-portal-brand .sub {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
}
.ms-topbar-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 20px;
  height: 100%;
}
.ms-switcher-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.ms-tenant-select {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--ms-white);
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--ms-radius);
  min-width: 180px;
  max-width: 280px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ms-tenant-select:hover, .ms-tenant-select:focus {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.55);
}
.ms-tenant-select option {
  background: var(--ms-neutral-dark);
  color: var(--ms-white);
}
.ms-business-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--ms-white);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.ms-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ms-topbar-user-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ms-topbar-user-btn {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 3px 10px 3px 5px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.ms-topbar-user-btn:hover,
.ms-topbar-user-btn.active {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.45);
}
.ms-topbar-user-btn .avatar {
  width: 24px;
  height: 24px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}
.ms-topbar-user-btn .topbar-user-email-text {
  font-size: 12px;
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-topbar-user-btn .chevron-icon {
  opacity: 0.8;
  transition: transform 0.2s ease;
}
.ms-topbar-user-btn.active .chevron-icon {
  transform: rotate(180deg);
}

/* User Profile Dropdown Card */
.ms-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 270px;
  max-width: 330px;
  background: #ffffff;
  color: #1e293b;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.16), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  z-index: 1000;
  padding: 12px;
  text-align: left;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.ms-profile-dropdown .dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 10px 4px;
}
.ms-profile-dropdown .dropdown-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}
.ms-profile-dropdown .dropdown-user-details {
  flex: 1;
  min-width: 0;
}
.ms-profile-dropdown .dropdown-user-email {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-profile-dropdown .dropdown-user-role {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ms-profile-dropdown .dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 8px 0;
}
.ms-profile-dropdown .dropdown-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  padding: 2px 4px 2px 4px;
}
.ms-profile-dropdown .dropdown-biz-info {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  padding: 2px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-profile-dropdown .dropdown-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-profile-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.12s ease;
}
.ms-profile-dropdown .dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.ms-profile-dropdown .dropdown-logout-btn {
  color: #dc2626 !important;
  font-weight: 600 !important;
}
.ms-profile-dropdown .dropdown-logout-btn:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}


/* Azure Sidebar Navigation */

/* Azure Sidebar Navigation (Light Modern Theme) */
aside {
  width: 250px;
  position: fixed;
  top: 48px;
  bottom: 0;
  left: 0;
  background: var(--ms-nav-bg);
  color: #334155;
  display: flex;
  flex-direction: column;
  z-index: 90;
  border-right: 1px solid #e2e8f0;
  padding: 14px 10px;
  overflow-y: auto;
}

.nav-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  padding: 8px 6px 4px 6px;
  margin-top: 6px;
  transition: background-color 0.15s ease;
}
.nav-group-header:hover {
  background: rgba(0, 120, 212, 0.06);
}
.nav-group-header .nav-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748b;
  padding: 0;
  margin: 0;
}
.nav-group-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-group-collapse-toggle {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  cursor: pointer;
  min-height: 20px;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-group-collapse-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.nav-group-chevron {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
  transition: transform 0.2s ease;
}
.nav-group-header.collapsed .nav-group-chevron {
  transform: rotate(-90deg);
}

nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 500px;
  opacity: 1;
}
nav.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  color: #475569;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--ms-radius);
  text-align: left;
  justify-content: flex-start;
  border: 0;
  transition: all 0.15s ease;
}
nav button:hover {
  background: var(--ms-nav-hover);
  color: #0f172a;
}
nav button.active {
  background: var(--ms-nav-active);
  color: var(--ms-primary);
  font-weight: 600;
  border-left: 3px solid var(--ms-primary);
  border-radius: 0 var(--ms-radius) var(--ms-radius) 0;
}
.nav-icon {
  font-size: 15px;
  display: inline-block;
  width: 18px;
  text-align: center;
}

.sidebar-toggle-all-btn {
  width: 100%;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: auto;
}
.sidebar-toggle-all-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.aside-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.topbar-footer-text {
  font-size: 11px;
  color: #94a3b8;
  padding: 0 8px;
}

/* Main Azure Workspace Content Area */
main {
  margin-left: 250px;
  margin-top: 48px;
  padding: 24px 32px 60px 32px;
  min-height: calc(100vh - 48px);
}

/* Breadcrumbs & Section Header */
.ms-page-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.ms-breadcrumbs {
  font-size: 12px;
  color: var(--ms-neutral-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.ms-page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ms-neutral-dark);
  letter-spacing: -0.2px;
}

/* Fluent Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--ms-warning-bg);
  color: #795b00;
  border: 1px solid rgba(0,0,0,0.06);
}
.badge.good {
  background: var(--ms-success-bg);
  color: var(--ms-success);
}
.badge.critical {
  background: var(--ms-error-bg);
  color: var(--ms-error);
}
.badge.info {
  background: var(--ms-primary-subtle);
  color: var(--ms-primary);
  border-color: var(--ms-primary-border);
}

/* Metrics Ribbon (Fluent Tiles) */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metrics-card {
  background: var(--ms-white);
  border: 1px solid #edebe9;
  border-radius: var(--ms-radius-card);
  padding: 16px 20px;
  box-shadow: var(--ms-shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.metrics-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ms-primary);
}
.metrics-card:nth-child(2)::before { background: var(--ms-success); }
.metrics-card:nth-child(3)::before { background: #8764b8; }
.metrics-card span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ms-neutral-secondary);
}
.metrics-card strong {
  font-size: 28px;
  font-weight: 600;
  color: var(--ms-neutral-dark);
  margin-top: 6px;
}

/* Fluent Panels & Cards */
.panel {
  background: var(--ms-white);
  border: 1px solid #edebe9;
  border-radius: var(--ms-radius-card);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--ms-shadow-card);
}
.panel h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ms-neutral-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel p {
  color: var(--ms-neutral-secondary);
  font-size: 13px;
  margin-bottom: 14px;
}
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Command Bars & Search */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-head input {
  max-width: 320px;
  font-size: 12px;
}

/* Fluent Data Grid / Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ms-neutral-secondary);
  background: var(--ms-neutral-lighter);
  border-bottom: 1px solid var(--ms-neutral-quaternary);
}
td {
  padding: 12px;
  border-bottom: 1px solid #f3f2f1;
  vertical-align: middle;
}
tr:hover td { background: #fdfdfd; }
td strong { color: var(--ms-neutral-dark); }
td small {
  display: block;
  color: var(--ms-neutral-secondary);
  font-size: 11px;
  margin-top: 3px;
}

/* Items List & Action Groups */
.item-card {
  padding: 14px 16px;
  border: 1px solid #edebe9;
  border-radius: var(--ms-radius);
  background: var(--ms-white);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.item-card:hover {
  border-color: var(--ms-neutral-tertiary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.item-card-body { flex: 1; }
.item-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ms-neutral-dark);
}
.item-desc {
  font-size: 12px;
  color: var(--ms-neutral-secondary);
  margin-top: 4px;
}

/* Phone Info Card & Telephony styles */
.phone-info-card {
  background: #f3f2f1;
  padding: 14px;
  border-radius: var(--ms-radius);
  margin-bottom: 14px;
}
.phone-info-title {
  font-size: 12px;
  color: var(--ms-neutral-secondary);
}
.phone-info-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--ms-neutral-dark);
  margin-top: 2px;
}
.phone-info-acc {
  font-size: 11px;
  color: #8a8886;
  margin-top: 4px;
}

/* Setup Studio Helper Classes */
.setup-review-box {
  margin-top: 24px;
  border-top: 1px solid #edebe9;
  padding-top: 20px;
}
.setup-heading {
  margin: 14px 0 6px;
}

/* Plan Card Styles */
.plan-price-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--ms-primary);
  margin: 8px 0;
}
.plan-interval-text {
  font-size: 12px;
  color: var(--ms-neutral-secondary);
}
.plan-features {
  font-size: 12px;
}

/* Chat Simulator (Microsoft Copilot / Teams Style) */
.chat-panel {
  background: var(--ms-white);
  display: flex;
  flex-direction: column;
}
#chat {
  height: 380px;
  overflow-y: auto;
  background: var(--ms-neutral-lighter);
  border: 1px solid #edebe9;
  border-radius: var(--ms-radius);
  padding: 18px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ms-white);
  border: 1px solid #edebe9;
  max-width: 80%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.bubble.caller {
  align-self: flex-end;
  background: var(--ms-primary-subtle);
  border-color: var(--ms-primary-border);
}
.bubble small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ms-neutral-secondary);
  margin-bottom: 4px;
}
#chat-form {
  display: flex;
  gap: 10px;
}

/* Bulk Slot Form Layout */
.bulk-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  align-items: end;
}

/* Fluent Modal Dialogs */
dialog {
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 0;
  box-shadow: var(--ms-shadow-dialog);
  max-width: 600px;
  width: 90vw;
  background: var(--ms-white);
  color: var(--ms-neutral-primary);
  margin: auto;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ms-neutral-quaternary);
}
.dialog-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.dialog-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: var(--ms-neutral-lighter);
  border-top: 1px solid var(--ms-neutral-quaternary);
}

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  top: 56px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}
.ms-toast {
  background: var(--ms-white);
  border-left: 4px solid var(--ms-primary);
  padding: 12px 16px;
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow-flyout);
  font-size: 13px;
  color: var(--ms-neutral-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.25s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ms-toast.success { border-left-color: var(--ms-success); }
.ms-toast.error { border-left-color: var(--ms-error); }
.ms-toast.warning { border-left-color: #f7630c; }
.ms-toast.fade-out { opacity: 0; transform: translateX(100%); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* CSS Helper Utilities (Replacing all inline styles for CSP compliance) */
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.my-20 { margin-top: 20px; margin-bottom: 20px; }
.pt-16 { padding-top: 16px; }
.pt-20 { padding-top: 20px; }
.p-12 { padding: 12px; }
.p-20 { padding: 20px; }
.border-top { border-top: 1px solid #edebe9; }
.flex-row { display: flex; flex-direction: row; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-120 { width: 120px; }
.max-w-140 { max-width: 140px; }
.text-muted { color: #605e5c; }
.text-center { text-align: center; }
.align-center { align-items: center; }
.font-normal { font-weight: normal; }
.m-0 { margin: 0; }
.flex-1 { flex: 1; }

/* Language & Localization Selector */
.locale-picker {
  position: fixed;
  right: 16px;
  bottom: 12px;
  z-index: 80;
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  padding: 4px 10px;
  box-shadow: var(--ms-shadow-card);
}
.locale-picker label { margin: 0; font-size: 11px; }
.locale-picker select { padding: 2px 6px; font-size: 11px; margin-top: 2px; }

/* Checklist & Setup Items */
.setup-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--ms-neutral-lighter);
  border-radius: var(--ms-radius);
  margin-bottom: 6px;
  font-size: 13px;
}

/* RTL Support */
[dir=rtl] aside { left: auto; right: 0; }
[dir=rtl] main { margin-left: 0; margin-right: 250px; }
[dir=rtl] nav button { text-align: right; }
[dir=rtl] td, [dir=rtl] th { text-align: right; }

/* Marketplace Card Grid */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.capability-card {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 16px;
  box-shadow: var(--ms-shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.capability-card:hover {
  border-color: var(--ms-primary);
  box-shadow: var(--ms-shadow-flyout);
  transform: translateY(-2px);
}
.capability-card.enabled {
  border-left: 4px solid var(--ms-primary);
}
.capability-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.capability-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--ms-neutral-dark);
}
.capability-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ms-neutral-secondary);
}
.capability-desc {
  font-size: 13px;
  color: var(--ms-neutral-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}
.capability-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}
.capability-features li {
  font-size: 12px;
  color: var(--ms-neutral-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.capability-features li::before {
  content: "✓";
  color: var(--ms-success);
  font-weight: bold;
}
.capability-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ms-neutral-light);
  padding-top: 12px;
}
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.toggle-switch input {
  display: none;
}
.toggle-slider {
  width: 38px;
  height: 20px;
  background-color: var(--ms-neutral-quaternary);
  border-radius: 20px;
  position: relative;
  transition: background-color 0.2s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--ms-white);
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--ms-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Scanner Results Card */
.scanner-result-box {
  background: var(--ms-neutral-lighter);
  border: 1px solid var(--ms-primary-border);
  border-radius: var(--ms-radius-card);
  padding: 18px;
}
.caps-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cap-tag {
  background: var(--ms-primary-subtle);
  color: var(--ms-primary-active);
  border: 1px solid var(--ms-primary-border);
  border-radius: var(--ms-radius);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}
.scan-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.scan-item-row {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  padding: 6px 10px;
  font-size: 12px;
}

/* Menu & Fleet Grid Cards */
.menu-items-grid, .fleet-vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.menu-item-card, .fleet-unit-card {
  background: var(--ms-neutral-lighter);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-item-card .price-tag, .fleet-unit-card .rate-tag {
  font-weight: bold;
  color: var(--ms-primary);
  font-size: 14px;
}
.allergen-tag {
  font-size: 11px;
  background: var(--ms-warning-bg);
  color: #7a4100;
  padding: 2px 6px;
  border-radius: var(--ms-radius);
  margin-top: 4px;
  display: inline-block;
}

/* Order Cards */
.order-card {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--ms-shadow-card);
}
.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.order-type-badge {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--ms-primary-subtle);
  color: var(--ms-primary);
}

[hidden] { display: none !important; }

/* ================= SOCIAL AUTHENTICATION BUTTONS ================= */
.social-auth-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 12px 0;
}
.btn-social {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--ms-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
}
.btn-google {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
.btn-apple {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}
.btn-apple:hover {
  background: #1f2937;
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--ms-neutral-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 10px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--ms-neutral-quaternary);
}
.auth-divider span {
  padding: 0 10px;
}

/* ================= HOME TAB STATUS CARDS & QUICK ACTIONS ================= */
.home-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.status-card {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 16px;
  box-shadow: var(--ms-shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.status-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.status-card-icon { font-size: 18px; }
.status-card-title { font-weight: 700; font-size: 14px; flex: 1; }
.status-card-desc { font-size: 12px; color: var(--ms-neutral-secondary); }

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--ms-neutral-light);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--ms-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.quick-actions-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.quick-action-btn {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: auto;
}
.quick-action-btn:hover {
  background: var(--ms-primary-subtle);
  border-color: var(--ms-primary);
}
.quick-action-btn .icon { font-size: 20px; margin-bottom: 2px; }
.quick-action-btn strong { font-size: 13px; color: var(--ms-neutral-primary); }
.quick-action-btn small { font-size: 11px; color: var(--ms-neutral-secondary); }

/* ================= CALLS INBOX & FILTERS ================= */
.calls-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  background: var(--ms-neutral-lighter);
  border-radius: var(--ms-radius);
}
.calls-filter-bar input { flex: 2; min-width: 200px; }
.calls-filter-bar select { flex: 1; min-width: 140px; }

.call-card {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.call-card:hover {
  border-color: var(--ms-primary);
  box-shadow: var(--ms-shadow-card);
}
.call-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.call-caller { font-weight: 700; font-size: 14px; }
.call-time { font-size: 11px; color: var(--ms-neutral-tertiary); }
.call-summary-preview {
  font-size: 12px;
  color: var(--ms-neutral-secondary);
  line-height: 1.4;
  margin-top: 6px;
}
.outcome-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.outcome-booking { background: rgba(16, 185, 129, 0.15); color: #047857; }
.outcome-request { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.outcome-review { background: rgba(245, 158, 11, 0.15); color: #b45309; }

/* ================= CALL TIMELINE & TRANSCRIPTS ================= */
.call-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  position: relative;
  padding-left: 20px;
}
.call-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--ms-primary-border);
}
.timeline-node {
  position: relative;
  font-size: 12px;
}
.timeline-node::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ms-primary);
  border: 2px solid var(--ms-white);
}
.transcript-dialogue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background: var(--ms-neutral-lighter);
  border-radius: var(--ms-radius);
}
.transcript-bubble {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  max-width: 85%;
  line-height: 1.4;
}
.transcript-bubble.caller {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  align-self: flex-start;
}
.transcript-bubble.assistant {
  background: var(--ms-primary-subtle);
  border: 1px solid var(--ms-primary-border);
  align-self: flex-end;
  color: var(--ms-neutral-dark);
}

/* ================= FOLLOW-UPS & INTERNAL NOTES ================= */
.followup-card {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--ms-shadow-card);
}
.followup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.followup-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ms-neutral-light);
}

/* ================= ASSISTANT STUDIO DIFF & WIZARD ================= */
.studio-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--ms-neutral-quaternary);
  padding-bottom: 8px;
}
.studio-nav-bar button {
  background: transparent;
  color: var(--ms-neutral-secondary);
  border: none;
  font-size: 13px;
  padding: 6px 12px;
}
.studio-nav-bar button.active {
  background: var(--ms-primary-subtle);
  color: var(--ms-primary);
  font-weight: 700;
  border-bottom: 2px solid var(--ms-primary);
}
.diff-container-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.diff-panel {
  background: var(--ms-neutral-lighter);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius);
  padding: 12px;
}

/* ================= CARRIER SETUP BOX ================= */
.carrier-setup-box {
  background: var(--ms-primary-subtle);
  border: 1px solid var(--ms-primary-border);
  border-radius: var(--ms-radius);
  padding: 14px;
}
.carrier-steps {
  margin-left: 18px;
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.6;
}

/* ================= MODAL DIALOGS ================= */
.modal-dialog {
  border: none;
  border-radius: 8px;
  box-shadow: var(--ms-shadow-dialog);
  padding: 0;
  max-width: 600px;
  width: 90%;
  margin: auto;
}
.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}
.modal-content {
  background: var(--ms-white);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ms-neutral-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--ms-neutral-tertiary);
  font-size: 16px;
  cursor: pointer;
  min-height: auto;
  padding: 4px;
}
.modal-close-btn:hover { color: var(--ms-neutral-dark); }
.modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
}

/* ================= MOBILE BOTTOM NAVIGATION (360px+) ================= */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  aside {
    display: none !important;
  }
  main {
    padding-bottom: 80px !important;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .ms-topbar {
    padding: 10px 14px;
  }
  .ms-topbar-left {
    gap: 8px;
  }
  .ms-tenant-select {
    max-width: 140px;
    font-size: 12px;
  }
  .btn-topbar-add {
    display: none;
  }
  .home-status-grid {
    grid-template-columns: 1fr;
  }
  .quick-actions-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .diff-container-grid {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 60px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
    justify-content: space-around;
    align-items: center;
    padding: 6px 4px max(8px, env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav button {
    background: transparent;
    border: none;
    color: var(--ms-neutral-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    min-height: 48px;
    border-radius: 6px;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-bottom-nav button .nav-icon {
    font-size: 19px;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .mobile-bottom-nav button.active {
    color: #0284c7;
    font-weight: 700;
  }
  .mobile-bottom-nav button.active .nav-icon {
    transform: scale(1.18);
  }
}

/* PWA Floating Install Banner */
.pwa-install-card {
  position: fixed;
  bottom: 74px;
  left: 14px;
  right: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  border: 1px solid rgba(56, 189, 248, 0.3);
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-icon {
  font-size: 26px;
  line-height: 1;
}

.pwa-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-info strong {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.pwa-info span {
  font-size: 11px;
  color: #94a3b8;
}

.pwa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pwa-install {
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.btn-pwa-dismiss {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 769px) {
  .pwa-install-card {
    max-width: 380px;
    left: auto;
    right: 24px;
    bottom: 24px;
  }
}

/* Voice & AI Studio Enhancements */
.quick-chip-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-btn {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  color: var(--ms-neutral-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: auto;
}

.chip-btn:hover {
  background: var(--ms-primary-subtle);
  border-color: var(--ms-primary);
  color: var(--ms-primary);
}

.voice-input-wrapper {
  position: relative;
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 12px;
}

.voice-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-voice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ms-neutral-light);
  color: var(--ms-neutral-primary);
  border: 1px solid var(--ms-neutral-quaternary);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 28px;
}

.btn-voice.recording {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
  animation: pulseRecording 1.5s infinite;
}

@keyframes pulseRecording {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voice-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #b91c1c;
  background: #fef2f2;
  padding: 6px 10px;
  border-radius: 4px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.ms-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ms-phone-badge:hover {
  background: #dcfce7;
  border-color: #4ade80;
  transform: translateY(-1px);
}

.frontdesk-inline-working {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ms-primary-subtle);
  border: 1px solid var(--ms-primary-border);
  color: var(--ms-primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  animation: fadeIn 0.3s ease;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--ms-primary);
  border-radius: 50%;
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

.frontdesk-setup-progress-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--ms-radius-card);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  animation: fadeIn 0.3s ease-out;
}

.progress-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.frontdesk-progress-bar-track {
  width: 100%;
  height: 8px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.frontdesk-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb, #6366f1);
  border-radius: 999px;
  transition: width 0.6s ease;
}

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

.frontdesk-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-light);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.3s ease;
  position: relative;
}

.frontdesk-step .step-icon {
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 2px;
}

.frontdesk-step .step-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.frontdesk-step .step-title {
  font-size: 0.8rem;
  color: var(--ms-neutral-dark);
}

.frontdesk-step .step-desc {
  font-size: 0.7rem;
  color: var(--ms-neutral-secondary);
  margin-top: 2px;
}

.frontdesk-step .step-status {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ms-neutral-secondary);
}

.frontdesk-step.active {
  border-color: #3b82f6;
  background: #f0f7ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.frontdesk-step.active .step-status {
  color: #2563eb;
}

.frontdesk-step.done {
  border-color: #86efac;
  background: #f0fdf4;
}

.frontdesk-step.done .step-status {
  color: #166534;
}

.ai-loading-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ms-primary-subtle);
  border: 1px solid var(--ms-primary-border);
  border-radius: var(--ms-radius-card);
  padding: 16px;
}


.review-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .review-fields-grid {
    grid-template-columns: 1fr;
  }
}

/* Live Activation & Carrier Highlight */
.live-hero-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  border-radius: var(--ms-radius-card);
  padding: 18px;
  text-align: center;
}

.live-phone-large {
  font-size: 1.8rem;
  font-weight: 800;
  color: #166534;
  letter-spacing: -0.01em;
  margin: 6px 0;
}

.carrier-box-highlight {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  padding: 14px;
}

.carrier-dial-code {
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--ms-neutral-light);
  border: 1px solid var(--ms-neutral-quaternary);
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--ms-neutral-dark);
  text-align: center;
}

.carrier-instructions-list {
  padding-left: 18px;
  font-size: 12px;
  color: var(--ms-neutral-secondary);
  line-height: 1.6;
}

.alert-box-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}

/* ================= FOLLOW-UPS & TASKS SUITE ================= */
.followups-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ms-neutral-light);
}

.followups-search-box {
  flex: 1;
  min-width: 260px;
}

.followups-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab-pill {
  background: var(--ms-white);
  border: 1px solid var(--ms-neutral-quaternary);
  color: var(--ms-neutral-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab-pill:hover {
  background: var(--ms-neutral-light);
  color: var(--ms-neutral-primary);
}

.filter-tab-pill.active {
  background: var(--ms-primary);
  border-color: var(--ms-primary);
  color: var(--ms-white);
}

.followup-card {
  background: var(--ms-white);
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--ms-primary);
  border-radius: var(--ms-radius-card);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.followup-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.followup-card.status-received { border-left-color: #f59e0b; }
.followup-card.status-assigned { border-left-color: #3b82f6; }
.followup-card.status-in_progress { border-left-color: #8b5cf6; }
.followup-card.status-awaiting_review { border-left-color: #ec4899; }
.followup-card.status-completed { border-left-color: #10b981; }
.followup-card.status-declined { border-left-color: #94a3b8; }

.followup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.followup-customer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ms-neutral-primary);
}

.followup-contact-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ms-neutral-secondary);
  background: var(--ms-neutral-lighter);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.followup-kind-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  text-transform: capitalize;
}

.followup-details-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
  margin: 10px 0;
}

.followup-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.followup-quick-contacts {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-contact-quick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  transition: all 0.1s ease;
}

.btn-contact-quick:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-contact-quick.call:hover {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.btn-contact-quick.sms:hover {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

.followup-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 10px;
}

.empty-followups-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--ms-white);
  border: 1px dashed var(--ms-neutral-quaternary);
  border-radius: var(--ms-radius-card);
  margin-top: 16px;
}

.empty-followups-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: block;
}

.empty-followups-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ms-neutral-primary);
  margin-bottom: 6px;
}

.empty-followups-desc {
  font-size: 13px;
  color: var(--ms-neutral-secondary);
  max-width: 520px;
  margin: 0 auto 18px auto;
  line-height: 1.5;
}

/* ================= AI SCHEDULE & AVAILABILITY GENERATOR ================= */
.ai-schedule-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
  border-radius: 8px;
  padding: 20px 24px;
}

.ai-chips-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-chips-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ms-neutral-secondary);
}

.ai-chip-btn {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 26px;
}

.ai-chip-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.ai-preview-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 20px;
  animation: fadeIn 0.3s ease-in-out;
}

.ai-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.ai-note-box {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #166534;
  line-height: 1.4;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
}

.checkbox-pill input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.checkbox-pill:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.btn-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.badge-ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spinner-small {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= NAV ICONS & SIDEBAR LANGUAGE PICKER ================= */
.nav-svg-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  color: #64748b;
  transition: color 0.15s ease;
}

nav button.active .nav-svg-icon {
  color: #0066cc;
}

.brand-logo-icon {
  width: 20px;
  height: 20px;
  color: #60a5fa;
}

.sidebar-lang-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
}

.sidebar-lang-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.sidebar-lang-select {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
  width: auto;
  min-width: 90px;
}

/* ================= STUDIO NAVIGATION TABS ================= */
.studio-nav-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  min-height: 38px;
}

.studio-tab-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.studio-tab-btn.active {
  color: #0066cc;
  font-weight: 600;
  border-bottom-color: #0066cc;
  background: transparent;
}

/* ================= TEMPLATE LIBRARY MASTER-DETAIL REDESIGN ================= */
.template-lib-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.template-lib-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.template-lib-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.template-lib-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 32px;
  font-size: 13px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  height: 36px;
}

.template-lib-toolbar select {
  font-size: 13px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  width: auto;
  min-width: 140px;
  height: 36px;
}

.icon-only-btn {
  padding: 7px 10px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.icon-only-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.template-split-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 22px;
  align-items: start;
}

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

.template-rows-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-item-card, .template-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.template-item-card:hover, .template-row-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.template-item-card.selected, .template-row-card.selected {
  border-color: #bfdbfe;
  border-left: 3px solid #0066cc;
  background: #f0f7ff;
  box-shadow: 0 1px 3px rgba(0, 102, 204, 0.05);
}

.template-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.template-industry-icon, .template-icon-container {
  width: 32px;
  height: 32px;
  min-width: 32px;
  color: #0066cc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-item-meta, .template-info-box {
  flex: 1;
  min-width: 0;
}

.template-item-name, .template-row-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.template-item-desc, .template-row-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.35;
  margin: 0;
}

.template-item-chevron, .template-chevron {
  font-size: 18px;
  color: #64748b;
  font-weight: 500;
  padding-left: 6px;
}

.template-item-card.selected .template-item-chevron,
.template-row-card.selected .template-chevron {
  color: #0066cc;
  font-weight: 700;
}

/* Template Preview Panel */
.template-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 22px;
}

.preview-badge-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 12px;
}

.preview-main-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.preview-big-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  color: #0066cc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-header-meta {
  flex: 1;
  min-width: 0;
}

.preview-title {
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.preview-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

.preview-metrics-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  margin: 6px 0 12px 0;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.preview-metric-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview-subheading {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.preview-quote-box {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.45;
}

.preview-quote-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  margin-bottom: 14px;
}

.tmpl-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 8px;
  background: #ffffff;
  overflow: hidden;
}

.tmpl-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
}

.tmpl-accordion-header:hover {
  background: #f8fafc;
}

.tmpl-accordion-body {
  padding: 10px 14px 14px 14px;
  border-top: 1px solid #f1f5f9;
}

.services-2x2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.service-preview-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.service-preview-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: #eff6ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0066cc;
}

.service-preview-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1px;
}

.service-preview-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.preview-info-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 13px;
  margin: 14px 0;
}

.preview-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.btn-use-template {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #0066cc;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 42px;
}

.btn-use-template:hover {
  background: #0052a3;
}

.preview-draft-link {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  text-decoration: none;
  margin-top: 10px;
}

.preview-draft-link:hover {
  text-decoration: underline;
}

.template-lib-footer {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 24px;
  padding-bottom: 8px;
}

/* ================= SERVICES & AVAILABILITY REDESIGN ================= */
.schedule-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.schedule-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

.panel-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.services-offered-panel, .single-slot-panel, .recurring-slot-panel, .appointments-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.bulk-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
}

@media (max-width: 768px) {
  .bulk-form-grid {
    grid-template-columns: 1fr;
  }
}

.services-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-catalog-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.service-catalog-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.segmented-control {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.seg-btn {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: auto;
}

.seg-btn.active {
  background: #ffffff;
  color: #0066cc;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

