  /* ============================================ */
/* GLOBAL SUBTLE BACKGROUND                     */
/* ============================================ */
html,
body {
  margin: 0;
  padding: 0;
}

.app-content-wrap {
  background:
    radial-gradient(ellipse 90% 70% at 20% 10%, rgba(249,115,22,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 70% 60% at 85% 80%, rgba(99,102,241,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 5% 70%, rgba(249,115,22,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 30%, rgba(251,191,36,0.03) 0%, transparent 50%),
    #fafaf8;
  background-attachment: fixed;
}

/* ============================================ */
/* SITE HEADER — SaaS Navbar                    */
/* ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  border-bottom: 2px solid black;
  font-family: inherit;
}
.site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 1280px) {
  .site-header-inner {
    height: 64px;
    padding: 0 1.5rem;
  }
}

/* Compact sub-desktop header spacing — equal margins */
@media (max-width: 1279px) {
  .site-header-inner {
    padding: 0 10px;
    gap: 10px;
  }
}

  /* Logo */
  .site-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    margin-left: 0;
    transition: margin-left 0.5s ease-in-out;
  }
  @media (min-width: 1280px) {
    .site-logo {
      margin-left: 46px;
    }
    .site-logo.logo-text-open {
      margin-left: 0;
    }
  }
  .site-logo-icon {
    width: 38px;
    height: 38px;
    background: #ea580c;
    border: 2px solid black;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow removed as part of no-shadow logo update */
    flex-shrink: 0;
  }
  @media (min-width: 1280px) {
    .site-logo-icon {
      width: 44px;
      height: 44px;
    }
  }
  .site-logo-text-wrap {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    transition: width 0.5s ease-in-out;
    display: flex;
    align-items: center;
    height: 100%;
  }
  .site-logo.logo-text-open .site-logo-text-wrap {
    width: 12rem;
  }
  .site-logo-text {
    font-size: 1.25rem;
    font-weight: 900;    color: black;
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
    padding-left: 0.5rem;
    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
  }
  .site-logo.logo-text-open .site-logo-text {
    transform: translateX(0);
  }
  @media (min-width: 1280px) {
    .site-logo-text {
      font-size: 1.5rem;
    }
  }

  /* Sub-desktop: show logo icon and text (nav is in hamburger) */
  @media (max-width: 1279px) {
    .site-logo {
      margin-left: 0;
      flex-shrink: 0;
    }
    .site-logo-text-wrap {
      display: flex !important;
      width: auto !important;
      min-width: 0;
      overflow: visible;
    }
    .site-logo-text {
      transform: none !important;
      padding-left: 0.5rem;
      white-space: nowrap;
    }
  }

  @media (max-width: 767px) {
    .site-logo {
      gap: 0.5rem;
      min-width: 0;
      overflow: hidden;
    }
    .site-logo-text {
      padding-left: 0;
      font-size: 1rem;
    }
  }

  /* Nav Links — desktop: horizontal row; mobile: hidden (all in hamburger) */
  .site-nav-links {
    display: none;
    align-items: center;
    gap: 0.25rem;
  }
  @media (min-width: 1280px) {
    .site-nav-links {
      display: flex;
    }
  }
  .site-nav-link:not(.site-nav-active) {
    background: #f3f4f6;
  }
  .site-nav-link.site-nav-pricing:not(.site-nav-active) {
    background: #fff7ed;
  }
  .site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;    color: #6b7280;
    text-decoration: none;
    border: 2px solid black;
    border-radius: 10px;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
  }
  .site-nav-link svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
  }
  .site-nav-link:not(.site-nav-active):hover {
    color: black;
    background: #fff7ed;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
  }
  .site-nav-link:not(.site-nav-active):active {
    transform: translate(2px, 2px);
    box-shadow: none;
  }
  .site-nav-link.site-nav-active {
    color: #ea580c;
    background: #fff7ed;
    border-color: #ea580c;
    box-shadow: 2px 2px 0px 0px rgba(234,88,12,1);
  }
  .site-nav-pricing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ea580c;
  }
  .site-nav-pricing:not(.site-nav-active):hover {
    color: #ea580c;
    background: #fff7ed;
  }
  .site-nav-analytics {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2563eb;
  }
  .site-nav-link.site-nav-analytics:not(.site-nav-active) {
    background: #eff6ff;
  }
  .site-nav-link.site-nav-analytics:not(.site-nav-active):hover {
    color: #2563eb;
    background: #dbeafe;
  }
  .site-nav-link.site-nav-analytics.site-nav-active {
    color: #2563eb;
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 2px 2px 0px 0px rgba(37,99,235,1);
  }
  .site-mobile-analytics {
    color: #2563eb;
  }

  /* Auth — desktop only */
  .site-auth-links {
    display: none;
    align-items: center;
    gap: 0.5rem;
  }
  @media (min-width: 1280px) {
    .site-auth-links {
      display: flex;
    }
  }
  .site-mobile-controls {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  @media (max-width: 1279px) {
    .site-mobile-controls {
      display: flex;
    }
  }
  .site-mobile-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid black;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .site-mobile-bell:hover {
    background: #fff7ed;
  }
  .site-mobile-bell:active {
    transform: translate(1px, 1px);
  }
  .site-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid black;
    white-space: nowrap;
  }
  .site-auth-signin {
    background: white;
    color: black;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-signin:hover {
    background: #f9fafb;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-signin:active {
    transform: translate(2px, 2px);
    box-shadow: none;
  }
  .site-auth-signup {
    background: #ea580c;
    color: white;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-signup:hover {
    background: #c2410c;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-signup:active {
    transform: translate(2px, 2px);
    box-shadow: none;
  }
  .site-auth-notif {
    background: white;
    color: black;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-notif:hover {
    background: #fff7ed;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-notif:active,
  .site-auth-notif.notif-open {
    transform: translate(2px, 2px);
    box-shadow: none;
  }
  .site-auth-logout {
    background: white;
    color: black;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
  }
  .site-auth-logout:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #dc2626;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px #dc2626;
  }
  .site-auth-logout:active {
    transform: translate(2px, 2px);
    box-shadow: none;
  }

  /* Hamburger — mobile only */
  .site-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid black;
    border-radius: 10px;
    cursor: pointer;
    /* box-shadow removed */
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  @media (min-width: 1280px) {
    .site-hamburger {
      display: none !important;
    }
  }
  .hamburger-line {
    display: block;
    width: 16px;
    height: 2px;
    background: black;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }
  .site-hamburger.open .hamburger-line-1 {
    transform: translateY(7px) rotate(45deg);
  }
  .site-hamburger.open .hamburger-line-2 {
    opacity: 0;
    transform: scaleX(0);
  }
  .site-hamburger.open .hamburger-line-3 {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile Menu — all items always visible when open */
  .site-mobile-menu {
    display: none;
    flex-direction: column;
    border-top: 2px solid black;
    background: white;
    padding: 0;
    gap: 0.75rem;
    overflow: hidden;
  }
  .site-mobile-menu.open {
    display: flex;
    padding: 1rem;
  }
  @media (min-width: 1280px) {
    .site-mobile-menu {
      display: none !important;
    }
  }
  .site-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .site-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;    color: #374151;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.2s ease;
  }
  .site-mobile-link:hover, .site-mobile-link:active {
    background: #f9fafb;
    color: black;
  }
  .site-mobile-link.site-nav-active {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
  }
  .site-mobile-pricing {
    color: #ea580c;
  }
  .site-mobile-auth {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
  }
  .site-mobile-auth-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid black;
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
    transition: all 0.2s ease;
  }
  .site-mobile-auth-btn.site-auth-signin {
    background: white;
    color: black;
  }
  .site-mobile-auth-btn.site-auth-signup {
    background: #ea580c;
    color: white;
  }
  .site-mobile-auth-btn.site-auth-logout {
    background: white;
    color: black;
  }
  .site-mobile-auth-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none !important;
  }

  /* ============================================ */
  /* SITE FOOTER                                   */
  /* ============================================ */
  .site-footer {
    position: relative;
    overflow: hidden;
    background: #050505;
    color: rgba(255,255,255,0.5);
    border-top: 2px solid rgba(255,255,255,0.06);
    margin-top: 0;
  }
  .site-footer-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 50% 40%, rgba(234,88,12,0.10) 0%, transparent 60%),
      radial-gradient(ellipse 50% 70% at 15% 85%, rgba(249,115,22,0.05) 0%, transparent 50%),
      radial-gradient(ellipse 50% 70% at 85% 15%, rgba(251,191,36,0.03) 0%, transparent 50%),
      #050505;
    pointer-events: none;
    z-index: 0;
  }
  .site-footer-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
  }
  .site-footer-particle {
    position: absolute;
    background: rgba(249,115,22,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: footerFloat linear infinite;
  }
  @keyframes footerFloat {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-300px) scale(0.3); opacity: 0; }
  }
  .site-footer-inner {
    position: relative;
    z-index: 1;
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  @media (min-width: 640px) {
    .site-footer-inner {
      grid-template-columns: repeat(4, 1fr);
      gap: 3rem;
    }
  }

  /* Brand Column */
  .site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .site-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
  }
  .site-footer-logo-icon {
    width: 28px;
    height: 28px;
    background: #ea580c;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .site-footer-logo-text {
    font-size: 0.9rem;
    font-weight: 900;    color: white;
    text-transform: uppercase;
    line-height: 1;
  }
  .site-footer-slogan {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    font-style: normal;
  }
  .site-footer-copy {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    font-weight: 500;
  }

  /* Footer Columns */
  .site-footer-heading {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;    color: rgba(255,255,255,0.6);
    margin-bottom: 0.75rem;
  }
  .site-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .site-footer-links a {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s ease;
  }
  .site-footer-links a:hover {
    color: #f97316;
  }
  .site-footer-email-label {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
  }
  .site-footer-email {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5) !important;
    word-break: break-all;
  }
  .site-footer-email:hover {
    color: #f97316 !important;
  }

  /* ============================================ */
  /* LEGAL PAGES                                   */
  /* ============================================ */
  .legal-page {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
  }
  .legal-page-title {
    font-size: clamp(1.1rem, 5vw, 2rem);
    font-weight: 900;
    text-transform: uppercase;
    word-break: break-word;    color: black;
    margin-bottom: 0.5rem;
  }
  .legal-page-updated {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;    margin-bottom: 2rem;
  }
  .legal-content h2 {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;    color: black;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
  }
  .legal-content p {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 0.75rem;
  }
  .legal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .legal-content li {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 0.25rem;
  }

  /* Contact Page */
  .contact-page {
    max-width: 36rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    text-align: center;
  }
  .contact-icon-box {
    width: 64px;
    height: 64px;
    background: #fff7ed;
    border: 2px solid black;
    border-radius: 20px;
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
  }
  .contact-title {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;    color: black;
    margin-bottom: 0.5rem;
  }
  .contact-subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2.5rem;
  }
  .contact-card {
    background: white;
    border: 2px solid black;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 6px 6px 0px 0px rgba(0,0,0,1);
    text-align: left;
  }
  .contact-card-title {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;    color: black;
    margin-bottom: 0.25rem;
  }
  .contact-card-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 1rem;
  }
  .contact-email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #ea580c;
    color: white;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;    border: 2px solid black;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
    transition: all 0.2s ease;
  }
  .contact-email-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px 0px rgba(0,0,0,1);
  }
  .contact-email-link:active {
    transform: translate(2px, 2px);
    box-shadow: none;
  }
  .contact-response-time {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;    margin-top: 1rem;
  }

  #mainTranscript {
      min-height: 120px;
  }

  .industrial-shadow {
      box-shadow: 4px 4px 0px 0px #F97316;
  }

  .industrial-input {
      box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 1);
      transition: all 0.2s;
  }

  .industrial-input:focus {
      transform: translate(2px, 2px);
      box-shadow: none;
      border-color: #f97316;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
  }

  input[type=number] {
      -moz-appearance: textfield;
      appearance: textfield;
  }

  /* Subcategory Input hit area fix */
  .sub-item .flex-1.bg-white {
      height: auto !important;
      min-height: 32px;
  }

  .sub-input {
      padding-top: 8px !important;
      padding-bottom: 8px !important;
      line-height: 1.2;
  }

  /* Prevent removal of first item in any section */
  .labor-item-row:first-of-type .remove-labor-btn {
      display: none !important;
  }

  .credit-item-row:first-of-type .remove-credit-btn {
      display: none !important;
  }

  .item-row:first-of-type .remove-item-btn {
      display: none !important;
  }

  /* ═══════════════════════════════════════════════════════════ */
  /* PREMIUM RECORDING UI                                       */
  /* ═══════════════════════════════════════════════════════════ */

  /* ── RECORD BUTTON BASE ── */
  .record-btn {
      width: 10rem;
      height: 10rem;
      border-radius: 9999px;
      background: linear-gradient(145deg, #f97316, #ea580c);
      box-shadow: 0 8px 32px rgba(249, 115, 22, 0.4), 0 4px 12px rgba(0,0,0,0.1), inset 0 2px 0 rgba(255,255,255,0.2);
      position: relative;
      z-index: 4;
      --voice-level: 0;
      animation: idleBreathePulse 3s ease-in-out infinite;
      transition: background 0.3s ease, box-shadow 0.3s ease;
      overflow: hidden;
  }

  @keyframes idleBreathePulse {
      0%, 100% {
          transform: scale(1);
          box-shadow: 0 8px 32px rgba(249, 115, 22, 0.35), 0 4px 12px rgba(0,0,0,0.1), inset 0 2px 0 rgba(255,255,255,0.2);
      }
      50% {
          transform: scale(1.035);
          box-shadow: 0 12px 40px rgba(249, 115, 22, 0.5), 0 6px 16px rgba(0,0,0,0.12), inset 0 2px 0 rgba(255,255,255,0.25);
      }
  }

  /* ── BUTTON SHIMMER OVERLAY ── */
  .record-btn-shimmer {
      position: absolute;
      inset: 0;
      border-radius: 9999px;
      background: linear-gradient(
          105deg,
          transparent 0%,
          transparent 35%,
          rgba(255,255,255,0.18) 45%,
          rgba(255,255,255,0.25) 50%,
          rgba(255,255,255,0.18) 55%,
          transparent 65%,
          transparent 100%
      );
      background-size: 300% 100%;
      animation: shimmerSweep 4s linear infinite;
      pointer-events: none;
      z-index: 1;
  }

  @keyframes shimmerSweep {
      0%   { background-position: 300% 0; }
      100% { background-position: -200% 0; }
  }

  /* ── HOVER (desktop only) ── */
  @media (hover: hover) {
      .record-btn:hover {
          animation: idleBreathePulse 1.5s ease-in-out infinite;
          box-shadow: 0 14px 44px rgba(249, 115, 22, 0.5), 0 6px 16px rgba(0,0,0,0.14), inset 0 2px 0 rgba(255,255,255,0.25);
      }
      .record-btn:hover .record-btn-shimmer {
          animation: shimmerSweep 2s ease-in-out infinite;
      }
      .record-btn:hover #micIcon {
          transform: scale(1.12);
      }
  }

  #micIcon {
      transition: transform 0.2s ease, opacity 0.2s ease;
      position: relative;
      z-index: 2;
  }

  #buttonText {
      position: relative;
      z-index: 2;
  }

  /* ── IDLE BREATHE RING (subtle ring behind button when idle) ── */
  .idle-breathe-ring {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 12rem;
      height: 12rem;
      transform: translate(-50%, -50%);
      border-radius: 9999px;
      border: 2px solid rgba(249, 115, 22, 0.15);
      animation: idleRingBreathe 3s ease-in-out infinite;
      pointer-events: none;
      z-index: 1;
  }

  @keyframes idleRingBreathe {
      0%, 100% {
          transform: translate(-50%, -50%) scale(0.95);
          opacity: 0.3;
          border-color: rgba(249, 115, 22, 0.12);
      }
      50% {
          transform: translate(-50%, -50%) scale(1.05);
          opacity: 0.6;
          border-color: rgba(249, 115, 22, 0.25);
      }
  }

  /* ═══ RECORDING STATE ═══ */

  /* Button in recording mode */
  .record-btn.recording {
      background: linear-gradient(145deg, #ef4444, #dc2626) !important;
      animation: none !important;
      transform: translateY(calc(var(--voice-level) * -2px)) scale(calc(1 + (var(--voice-level) * 0.03)));
      box-shadow:
          0 calc(8px + (var(--voice-level) * 8px)) calc(24px + (var(--voice-level) * 16px)) rgba(239, 68, 68, calc(0.25 + (var(--voice-level) * 0.25))),
          0 4px 10px rgba(0,0,0,0.12),
          inset 0 2px 0 rgba(255,255,255,0.18);
      transition: transform 0.08s linear, box-shadow 0.08s linear, background 0.3s ease;
  }

  .record-btn.recording .record-btn-shimmer {
      animation: none;
      opacity: 0;
  }

  .record-btn.recording #micIcon {
      transform: scale(calc(0.9 + (var(--voice-level) * 0.15)));
      opacity: 0.96;
  }

  /* ── SONAR RIPPLE RINGS ── */
  .sonar-container {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 16rem;
      height: 16rem;
      transform: translate(-50%, -50%);
      pointer-events: none;
      z-index: 1;
  }

  .sonar-ring {
      position: absolute;
      inset: 0;
      border-radius: 9999px;
      border: 2px solid rgba(239, 68, 68, 0.4);
      animation: sonarExpand 2.4s ease-out infinite;
      opacity: 0;
  }

  .sonar-ring-2 { animation-delay: 0.8s; }
  .sonar-ring-3 { animation-delay: 1.6s; }

  @keyframes sonarExpand {
      0% {
          transform: scale(0.65);
          opacity: 0.6;
          border-color: rgba(239, 68, 68, 0.5);
      }
      70% {
          opacity: 0.15;
      }
      100% {
          transform: scale(1.3);
          opacity: 0;
          border-color: rgba(239, 68, 68, 0.05);
      }
  }

  /* ── VOICE-REACTIVE GLOW HALO ── */
  .voice-glow-halo {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 13rem;
      height: 13rem;
      transform: translate(-50%, -50%);
      border-radius: 9999px;
      background: radial-gradient(circle, rgba(239, 68, 68, calc(0.08 + (var(--voice-level) * 0.35))) 0%, transparent 70%);
      filter: blur(16px);
      pointer-events: none;
      z-index: 0;
      transition: background 0.1s linear;
      --voice-level: 0;
  }

  /* ── RADIAL WAVEFORM BARS (circular around button) ── */
  .radial-waveform {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 12.5rem;
      height: 12.5rem;
      transform: translate(-50%, -50%);
      pointer-events: none;
      z-index: 3;
  }

  .radial-bar {
      --angle: calc((var(--bar-index) / var(--bar-count)) * 360deg);
      position: absolute;
      width: 3.5px;
      height: 16px;
      left: 50%;
      top: 50%;
      transform-origin: center center;
      transform:
          translate(-50%, -50%)
          rotate(var(--angle))
          translateY(-5.4rem)
      ;
      border-radius: 9999px;
      background: linear-gradient(to top, #ef4444, #fca5a5);
      opacity: 0.3;
      transition: height 0.08s linear, opacity 0.08s linear;
  }

  /* ── ORBITAL SPINNER (analyzing state) ── */
  .orbital-spinner-track {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 12.5rem;
      height: 12.5rem;
      transform: translate(-50%, -50%);
      border-radius: 9999px;
      border: 2px dashed rgba(251, 191, 36, 0.25);
      animation: orbitalSpin 3s linear infinite;
      pointer-events: none;
      z-index: 5;
  }

  .orbital-dot {
      position: absolute;
      top: -5px;
      left: 50%;
      transform: translateX(-50%);
      width: 10px;
      height: 10px;
      border-radius: 9999px;
      background: linear-gradient(135deg, #fbbf24, #f59e0b);
      box-shadow: 0 0 12px rgba(251, 191, 36, 0.6), 0 0 4px rgba(251, 191, 36, 0.8);
  }

  @keyframes orbitalSpin {
      from { transform: translate(-50%, -50%) rotate(0deg); }
      to   { transform: translate(-50%, -50%) rotate(360deg); }
  }

  /* ── ANALYZING STATE ── */
  .record-btn.analyzing {
      background: linear-gradient(145deg, #fbbf24, #f59e0b) !important;
      box-shadow: 0 8px 32px rgba(251, 191, 36, 0.4), 0 4px 12px rgba(0,0,0,0.1), inset 0 2px 0 rgba(255,255,255,0.3);
      animation: analyzingBreathe 1.8s ease-in-out infinite !important;
  }

  .record-btn.analyzing .record-btn-shimmer {
      animation: none;
      opacity: 0;
  }

  @keyframes analyzingBreathe {
      0%, 100% { transform: scale(1); }
      50%      { transform: scale(1.025); }
  }

  /* ── RECORDING TIMER PILL (frosted glass) ── */
  .recording-timer-pill {
      margin-top: 0.25rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(0, 0, 0, 0.08);
      border-radius: 9999px;
      padding: 0.375rem 0.75rem;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
      animation: timerSlideIn 0.3s ease-out both;
  }

  @keyframes timerSlideIn {
      from {
          opacity: 0;
          transform: translateY(8px) scale(0.95);
      }
      to {
          opacity: 1;
          transform: translateY(0) scale(1);
      }
  }

  /* ── LIVE REC DOT (smooth blink) ── */
  .rec-dot-live {
      width: 8px;
      height: 8px;
      border-radius: 9999px;
      background: #ef4444;
      box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
      animation: recDotBlink 1.2s ease-in-out infinite;
  }

  @keyframes recDotBlink {
      0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
      50%      { opacity: 0.2; box-shadow: 0 0 2px rgba(239, 68, 68, 0.2); }
  }

  /* Custom Scrollbar for Textareas */
  /* Custom Scrollbar for Textareas */
  @media (min-width: 768px) {

      /* Base Scrollbar Track */
      .custom-scrollbar::-webkit-scrollbar {
          width: 14px;
          height: 6px;
          /* Added for horizontal badge scrolling */
      }

      .custom-scrollbar::-webkit-scrollbar-track {
          background: transparent;
      }

      /* Default Thumb (Orange) for generic use cases like badges */
      .custom-scrollbar::-webkit-scrollbar-thumb {
          background-color: #ea580c;
          background-clip: padding-box;
          border-radius: 10px;
          border: 1px solid transparent;
      }

      /* Refinement (Green) Scrollbar */
      #refinementInput::-webkit-scrollbar-thumb {
          background-color: #10b981 !important;
          background-clip: padding-box !important;
          border-radius: 10px !important;
          border-top: 20px solid transparent !important;
          border-bottom: 20px solid transparent !important;
          border-left: 2px solid transparent !important;
          border-right: 9px solid transparent !important;
          /* Move it left */
      }

      #refinementInput::-webkit-scrollbar-thumb:hover {
          background-color: #059669 !important;
      }

      /* Clarification (Orange) Scrollbar */
      #clarificationAnswerInput::-webkit-scrollbar-thumb {
          background-color: #f97316 !important;
          background-clip: padding-box !important;
          border-radius: 10px !important;
          border-top: 20px solid transparent !important;
          border-bottom: 20px solid transparent !important;
          border-left: 2px solid transparent !important;
          border-right: 9px solid transparent !important;
          /* Move it left */
      }

      #clarificationAnswerInput::-webkit-scrollbar-thumb:hover {
          background-color: #ea580c !important;
      }

      /* Main Transcript (Standard Orange) */
      #mainTranscript::-webkit-scrollbar-thumb {
          background-color: #ea580c !important;
          background-clip: padding-box !important;
          border-radius: 10px !important;
          border-top: 20px solid transparent !important;
          border-bottom: 20px solid transparent !important;
          border-left: 2px solid transparent !important;
          border-right: 9px solid transparent !important;
      }

      #mainTranscript::-webkit-scrollbar-thumb:hover {
          background-color: #c2410c !important;
      }
  }

  /* Hide scrollbar on mobile but allow scrolling */
  @media (max-width: 767px) {
      .custom-scrollbar::-webkit-scrollbar {
          display: none;
      }

      .custom-scrollbar {
          -ms-overflow-style: none;
          /* IE and Edge */
          scrollbar-width: none;
          /* Firefox */
      }
  }


  /* Analyzing Animation - Rotating Gradient Border */
  .transcript-container {
      position: relative;
      border-radius: 14px;
      padding: 3px;
      background: transparent;
  }

  .transcript-container.analyzing {
      background: linear-gradient(90deg, #f97316, #fbbf24, #f97316, #ea580c, #f97316);
      background-size: 300% 100%;
      animation: borderFlow 1.5s linear infinite;
  }

  .transcript-container.analyzing::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 14px;
      padding: 3px;
      background: inherit;
      background-size: inherit;
      animation: inherit;
      filter: blur(8px);
      opacity: 0.6;
      z-index: -1;
  }

  .transcript-container.analyzing #mainTranscript {
      border-color: transparent;
  }

  .transcript-container.analyzing #charCounter span {
      color: white !important;
  }

  /* Refinement Input (Green) Analyzing Animation */
  #refinementInputContainer {
      position: relative;
      border-radius: 14px;
      padding: 3px;
      background: transparent;
  }

  #refinementInputContainer.analyzing {
      background: linear-gradient(90deg, #10b981, #34d399, #10b981, #059669, #10b981);
      background-size: 300% 100%;
      animation: borderFlow 1.5s linear infinite;
  }

  #refinementInputContainer.analyzing::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 14px;
      padding: 3px;
      background: inherit;
      background-size: inherit;
      animation: inherit;
      filter: blur(8px);
      opacity: 0.6;
      z-index: -1;
  }

  #refinementInputContainer.analyzing .flex-1 {
      border-color: transparent;
  }

  /* Clarification Input (Orange) Analyzing Animation */
  #clarificationInputContainer {
      position: relative;
      border-radius: 14px;
      padding: 3px;
      background: transparent;
  }

  #clarificationInputContainer.analyzing {
      background: linear-gradient(90deg, #f97316, #fbbf24, #f97316, #ea580c, #f97316);
      background-size: 300% 100%;
      animation: borderFlow 1.5s linear infinite;
  }

  #clarificationInputContainer.analyzing::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 14px;
      padding: 3px;
      background: inherit;
      background-size: inherit;
      animation: inherit;
      filter: blur(8px);
      opacity: 0.6;
      z-index: -1;
  }

  #clarificationInputContainer.analyzing .flex-1 {
      border-color: transparent;
  }

  @keyframes borderFlow {
      0% {
          background-position: 0% 50%;
      }

      100% {
          background-position: 300% 50%;
      }
  }

  @keyframes lineFlow {
      from {
          stroke-dashoffset: 12;
      }

      to {
          stroke-dashoffset: 0;
      }
  }

  /* Review Data Analyzing Container */
  .review-container {
      position: relative;
      border-radius: 18px;
      padding: 3px;
      background: transparent;
  }

  .review-container.analyzing {
      background: linear-gradient(90deg, #f97316, #fbbf24, #f97316, #ea580c, #f97316);
      background-size: 300% 100%;
      animation: borderFlow 1.5s linear infinite;
  }

  .review-container.analyzing::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 18px;
      padding: 3px;
      background: inherit;
      background-size: inherit;
      animation: inherit;
      filter: blur(12px);
      opacity: 0.5;
      z-index: -1;
  }

  .review-container.analyzing .review-content {
      border-color: transparent;
      overflow: hidden;
  }

  /* Smooth Breathing Blur Overlay */
  .analyzing-overlay {
      display: none;
      position: absolute;
      inset: -4px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.85);
      background-size: 200% 200%;
      backdrop-filter: blur(6px);
      z-index: 1000;
      animation: breatheGradient 2s ease-in-out infinite, breatheBlur 2s ease-in-out infinite;
  }

  .analyzing-overlay.active {
      display: flex;
      align-items: center;
      justify-content: center;
  }

  @keyframes breatheGradient {

      0%,
      100% {
          background-position: 0% 50%;
          opacity: 0.7;
      }

      50% {
          background-position: 100% 50%;
          opacity: 1;
      }
  }

  @keyframes breatheBlur {

      0%,
      100% {
          backdrop-filter: blur(4px);
      }

      50% {
          backdrop-filter: blur(10px);
      }
  }

  /* Container pulse effect */
  .review-container.analyzing {
      animation: borderFlow 1.5s linear infinite, containerPulse 2s ease-in-out infinite;
  }

  @keyframes containerPulse {

      0%,
      100% {
          transform: scale(1);
          box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
      }

      50% {
          transform: scale(1.005);
          box-shadow: 0 0 30px 5px rgba(249, 115, 22, 0.2);
      }
  }

  .analyzing-spinner {
      width: 48px;
      height: 48px;
      border: 3px solid rgba(0, 0, 0, 0.1);
      border-top-color: #f97316;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      z-index: 52;
  }

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

  /* Animation for the pop-up price field */
  .price-badge-container.hidden {
      display: none;
  }

  /* Item Operations Menu */
  .item-menu-btn {
      transition: all 0.2s;
  }

  .item-menu-dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: -2px;
      background: white;
      border: 2px solid black;
      border-radius: 0 0 12px 12px;
      overflow: hidden;
      z-index: 1001;
      box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 1);
      width: calc(100% + 4px);
      padding: 6px;
  }

  @media (max-width: 768px) {
      .item-menu-dropdown {
          width: 65%;
      }
  }

  @media (min-width: 768px) {
      .item-menu-dropdown.dropdown-standard {
          width: 35%;
      }

      .item-menu-dropdown.dropdown-labor-half {
          width: 65%;
      }
  }

  .item-menu-dropdown.show {
      display: flex;
      flex-direction: column;
      gap: 4px;
  }

  /* Pop-active states for buttons with active popups */
  .pop-active {
      background-color: #fff7ed !important;
      /* orange-50 */
      border-color: #ea580c !important;
      /* orange-600 */
      color: #ea580c !important;
      /* orange-600 */
      box-shadow: none !important;
      transform: translate(1px, 1px) scale(0.97);
  }

  #globalCurrencyBtn.pop-active {
      /* inherit base pop-active transform */
      transform: translate(1px, 1px) scale(0.97);
      opacity: 1; /* added placeholder property */
  }

  #discountToggleBtn.pop-active {
      background-color: #f0fdf4 !important;
      /* green-50 */
      border-color: #16a34a !important;
      /* green-600 */
      color: #16a34a !important;
      /* green-600 */
      box-shadow: none !important;
      transform: translate(2px, 2px) scale(0.97);
  }

  .slider-icon path {
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .transcript-container.analyzing #charLimitNudge {
      color: white !important;
  }

  /* Labor Switch Redesign */
  .billing-switch-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 6px 4px;
      background: #f9fafb;
      border-radius: 10px;
      border: 1px solid #e5e7eb;
  }

  .billing-pill-container {
      display: flex;
      background: #e5e7eb;
      border-radius: 8px;
      padding: 2px;
      height: 32px;
  }

  .billing-pill-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      font-size: 8px;
      font-weight: 900;
      text-transform: uppercase;
      color: #6b7280;
      border-radius: 6px;
      transition: all 0.2s;
  }

  .billing-pill-btn.active {
      background: white;
      color: #ea580c;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .billing-pill-btn svg {
      width: 10px;
      height: 10px;
  }

  /* Labor Inline Row Polish */
  .labor-inline-row input[type="number"]::-webkit-inner-spin-button,
  .labor-inline-row input[type="number"]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
  }
  .labor-inline-row input[type="number"] {
      -moz-appearance: textfield;
      appearance: textfield;
  }

  .labor-inline-row input:focus {
      color: black;
  }

  .menu-item {
      position: relative;
      /* For dropright positioning */
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 12px;
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;      cursor: pointer;
      border-radius: 6px;
      transition: all 0.1s;
      background: white;
      color: #525252;
      border: 1px solid transparent;
  }

  .menu-item.active {
      background-color: #FFEDD5;
      /* Orange-100 */
      color: #EA580C;
      border: 1px solid #EA580C;
      border-bottom: none;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;

  }

  .menu-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      background: #f5f5f5;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 900;
      color: #a3a3a3;
  }

  .menu-item.active .menu-icon {
      background: #EA580C;
      color: white;
  }

  /* Dropright Input */
  .menu-input-container {
      display: none;
      position: absolute;
      left: 100%;
      top: 0;
      margin-left: 8px;
      background: white;
      padding: 4px;
      border: 2px solid black;
      border-radius: 6px;
      box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.2);
      z-index: 60;
      align-items: center;
      gap: 4px;
  }

  .menu-item.active .menu-input-container {
      display: flex;
      animation: fadeIn 0.1s ease-out;
  }

  .menu-input {
      width: 60px;
      border: 1px solid #e5e5e5;
      border-radius: 4px;
      padding: 4px;
      font-size: 11px;
      font-weight: 700;
      color: black;
      outline: none;
  }

  .menu-input:focus {
      border-color: #F97316;
  }

  /* Badges */
  .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 24px;
      padding: 0 10px;
      border-radius: 0 0 6px 6px;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
      text-transform: uppercase;
      border: 1px solid transparent;
      box-sizing: border-box;
      vertical-align: middle;
  }

  .badge.hidden {
      display: none;
  }

  .badge-price {
      background-color: #EA580C;
      color: white;
      border: 1px solid black;
  }

  .badge-tax,
  .badge-after-tax {
      background-color: #374151;
      /* Gray-700 */
      color: white;
      border: 1px solid black;
  }

  .badge-discount {
      background-color: #16A34A;
      /* Green-600 */
      color: white;
      border: 1px solid black;
      border-radius: 6px 6px 0 0;
      box-shadow: 2px 0 0 0 #000, 0 -2px 0 0 #000, 2px -2px 0 0 #000;
  }

  /* Green Active State for Discount Menu */
  .menu-item-discount.active {
      background-color: #DCFCE7;
      /* Green-100 */
      color: #16A34A;
      /* Green-600 */
      border-color: #16A34A;
      border-bottom: none;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      z-index: 10;
  }

  .menu-item-discount.active .menu-icon {
      background-color: #16A34A;
      color: white;
  }

  /* Gray Active State for Tax Menu */
  .menu-item-tax.active {
      background-color: #E5E7EB;
      /* Gray-200 */
      color: #374151;
      /* Gray-700 */
      border: 1px solid #374151;
      border-bottom: none;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      z-index: 10;
  }

  .menu-item-tax.active .menu-icon {
      background-color: #374151;
      color: white;
  }

  /* Hover States (Desktop Only) */
  @media (hover: hover) {
      .menu-item:hover {
          background: #FFF7ED;
          color: #EA580C;
      }

      .menu-item:hover .menu-icon {
          color: #EA580C;
          background: rgba(234, 88, 12, 0.1);
      }

      .menu-item-discount:hover .menu-icon {
          color: #16A34A;
          background: #DCFCE7;
      }

      .menu-item-discount:hover {
          background: #F0FDF4;
          /* Green-50 */
          color: #16A34A;
      }

      .menu-item-tax:hover {
          background-color: #F3F4F6;
          /* Gray-100 */
          color: #374151;
      }

      .menu-item-tax:hover .menu-icon {
          background-color: #D1D5DB;
          /* Gray-300 */
          color: #374151;
      }
  }

  .discount-inputs-row {
      border-color: #16A34A;
      /* Match active green */
      border-width: 0 1px 1px 1px;
      /* Sides and bottom only */
      border-style: solid;
      border-radius: 0 0 6px 6px;
      margin-top: -1px;
      /* Overlap border */
      background-color: #F0FDF4;
      /* Very light green bg to match */
      padding: 6px;
      /* slightly more padding */
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(-5px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  /* Transition for smooth layout shifts */
  .labor-price-container>div:last-child {
      transition: margin-top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  }

  /* Transition for sub-categories padding */
  .sub-item {
      transition: padding-top 0.3s ease;
  }

  /* Safe Hover States (Desktop Only) */
  @media (hover: hover) {

      /* Header Navigation Links — rise on hover */
      .nav-link-hover:not(.nav-active):hover {
          background-color: #fff7ed !important;
          border-color: #f97316 !important;
          transform: translate(-1px, -1px) !important;
          box-shadow: 3px 3px 0px 0px rgba(0,0,0,1) !important;
      }

      .nav-link-hover:not(.nav-active):hover svg {
          color: #ea580c !important;
      }

      /* Rise on hover for any btn-rise element */
      .btn-rise:hover {
          transform: translate(-1px, -1px);
          box-shadow: 5px 5px 0px 0px rgba(0,0,0,1) !important;
      }

      /* Icon Buttons (Calendar) */
      .btn-icon-hover:hover {
          background-color: #fff7ed;
          transform: translate(-1px, -1px);
          box-shadow: 3px 3px 0px 0px rgba(0,0,0,1) !important;
      }

      .btn-icon-hover:hover svg {
          color: #ea580c;
      }

      /* Discount Button */
      .discount-btn-hover:hover {
          border-color: #22c55e;
          color: #16a34a;
          background-color: #f0fdf4;
          transform: translate(-1px, -1px);
          box-shadow: 3px 3px 0px 0px rgba(0,0,0,1) !important;
      }

      /* Apply Button */
      .apply-btn-hover:hover {
          background-color: #ea580c;
          transform: translate(-1px, -1px);
          box-shadow: 3px 3px 0px 0px rgba(0,0,0,1) !important;
      }

      .apply-btn-hover:hover svg {
          transform: translateX(2px);
      }

      /* Labor Group Collapsed Hover */
      .labor-group-hover:hover {
          background-color: #fff7ed !important;
          border-color: #f97316 !important;
          transform: translate(-1px, -1px);
          box-shadow: 3px 3px 0px 0px rgba(0,0,0,0.15) !important;
      }

      /* Labor Text Color on Hover */
      .group:hover .group-hover-text-orange {
          color: #ea580c;
      }

      /* Reveal/Hide on Hover */
      .group:hover .group-hover-show {
          display: block;
      }

      /* Add/Remove Buttons */
      .btn-add-labor-hover:hover {
          background-color: #c2410c;
      }

      .btn-add-credit-hover:hover {
          background-color: #b91c1c;
      }

      .btn-remove-section-hover:hover {
          background-color: #1f2937;
          transform: translate(-1px, -1px);
      }

      .btn-remove-item-hover:hover {
          color: #ef4444;
      }

      /* Hamburger Menu */
      .btn-hamburger-hover:hover {
          background-color: #f9fafb;
          transform: translate(-1px, -1px);
          box-shadow: 3px 3px 0px 0px rgba(0,0,0,0.15) !important;
      }
  }

  /* ── Global interactive element effects ── */

  /* Pressed state for icon/discount/apply buttons */
  .btn-icon-hover:active,
  .discount-btn-hover:active,
  .apply-btn-hover:active,
  .btn-add-labor-hover:active,
  .btn-add-credit-hover:active,
  .btn-hamburger-hover:active {
      transform: translate(1px, 1px) !important;
      box-shadow: none !important;
  }

  /* Transition for all interactive hover buttons */
  .btn-icon-hover,
  .discount-btn-hover,
  .apply-btn-hover,
  .btn-add-labor-hover,
  .btn-add-credit-hover,
  .btn-remove-section-hover,
  .btn-hamburger-hover {
      transition: all 0.15s ease;
  }

  /* ── Global Input Focus: orange border, remove shadow ── */
  input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="tel"]:focus,
  input[type="number"]:focus,
  input[type="password"]:focus,
  input[type="url"]:focus,
  input[type="date"]:focus,
  input[type="search"]:focus,
  textarea:focus,
  select:focus {
      border-color: #f97316 !important;
      box-shadow: none !important;
      outline: none !important;
  }

  .pop-active.btn-icon-hover {
      background-color: #fff7ed !important;
      /* orange-50 */
      box-shadow: none !important;
      transform: translate(1px, 1px) scale(0.95);
  }

  .pop-active.btn-icon-hover svg {
      color: #ea580c !important;
      /* orange-600 */
  }

  .pop-active.discount-btn-hover {
      border-color: #22c55e !important;
      /* green-500 */
      color: #16a34a !important;
      /* green-600 */
      background-color: #f0fdf4 !important;
      /* green-50 */
  }

  .pop-active.btn-hamburger-hover {
      background-color: #f9fafb !important;
  }

  .pop-active.btn-hamburger-hover svg {
      color: #ea580c !important;
  }

  .pop-active.add-menu-btn {
      background-color: #fff7ed !important;
      /* orange-50 */
      color: #ea580c !important;
      /* orange-600 */
      box-shadow: none !important;
      transform: translate(2px, 2px) scale(0.97);
  }

  /* Higher z-index for popups to ensure they clear ALL badges */
  #mainCalendarPopup,
  #calendarPopup,
  #discountInputsPanel,
  #addMenuDropup {
      z-index: 1000 !important;
  }

  /* Active nav page indicator — appears pressed */
  .nav-active {
      background-color: #fff7ed !important;
      border-color: #ea580c !important;
      transform: translate(2px, 2px) !important;
      box-shadow: none !important;
  }
  .nav-active svg {
      color: #ea580c !important;
  }

  /* Custom Navigation Tooltip */
  .nav-link-hover {
      position: relative;
      box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
      transition: all 0.15s ease;
  }
  .nav-link-hover:active:not(.nav-active) {
      transform: translate(1px, 1px) !important;
      box-shadow: none !important;
  }

  .nav-tooltip {
      position: absolute;
      top: calc(100% + 12px);
      left: 50%;
      transform: translateX(-50%) translateY(-4px);
      background: white;
      border: 2px solid black;
      border-radius: 10px;
      padding: 6px 12px;
      font-size: 9px;
      font-weight: 900;
      text-transform: uppercase;      color: black;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
      box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 1);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  /* Connector Arrow */
  .nav-tooltip::before {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border-width: 6px;
      border-style: solid;
      border-color: transparent transparent black transparent;
  }

  .nav-tooltip::after {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border-width: 4px;
      border-style: solid;
      border-color: transparent transparent white transparent;
      margin-bottom: -4px;
      z-index: 1;
  }

  /* Hover Trigger */
  .nav-link-hover:hover .nav-tooltip {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
  }

  /* PDF Modal Custom Selectors */
  .pdf-selector-dropdown {
      transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
      transform: scale(0.95) translateY(-10px);
      opacity: 0;
      pointer-events: none;
      filter: blur(4px);
      transform-origin: top left;
      z-index: 300 !important;
  }

  .pdf-selector-dropdown.active {
      transform: scale(1) translateY(0);
      opacity: 1;
      pointer-events: auto;
      filter: blur(0);
  }

  .status-chevron {
      transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  }

  .status-chevron.rotate-180 {
      transform: rotate(180deg);
  }

  /* Hide scrollbar for PDF viewer */
  #pdfViewerContainer {
      scrollbar-width: none;
      /* Firefox */
      -ms-overflow-style: none;
      /* IE/Edge */
  }

  #pdfViewerContainer::-webkit-scrollbar {
      display: none;
      /* Chrome/Safari */
  }

  /* Lock scroll during loading */
  #pdfViewerContainer.locked {
      overflow: hidden !important;
  }

  /* PDF.js Page Styling */
  .pdf-js-page {
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
      background-color: white;
      margin-bottom: 20px;
      max-width: 100%;
      height: auto !important;
      user-select: none !important;
      -webkit-user-select: none !important;
      -webkit-touch-callout: none !important;
      pointer-events: none !important;
      /* Fully unselectable/unclickable */
  }

  .unselectable {
      user-select: none !important;
      -webkit-user-select: none !important;
      -webkit-touch-callout: none !important;
  }

  /* ════════════════════════════════════════════════ */
  /* MAGICAL PDF INVOICE REVEAL                       */
  /* ════════════════════════════════════════════════ */

  /* PDF canvas/container materializes when PDF loads */
  #pdfCanvas.pdf-reveal,
  #pdfJSContainer.pdf-reveal {
    animation: pdfMaterialize 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes pdfMaterialize {
    0% {
      opacity: 0;
      transform: scale(0.92);
      filter: blur(12px) brightness(1.3);
    }
    50% {
      opacity: 1;
      filter: blur(2px) brightness(1.05);
    }
    75% {
      transform: scale(1.01);
    }
    100% {
      opacity: 1;
      transform: scale(1);
      filter: blur(0) brightness(1);
    }
  }

  /* Shimmer sweep across the PDF after it appears */
  #pdfCanvas.pdf-reveal::after,
  #pdfJSContainer.pdf-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
      105deg,
      transparent 30%,
      rgba(255, 255, 255, 0.06) 42%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.06) 58%,
      transparent 70%
    );
    animation: pdfShimmer 1s 0.4s ease-out forwards;
    pointer-events: none;
    z-index: 20;
  }

  @keyframes pdfShimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
  }

  /* Warm glow pulse on the PDF viewer area */
  #pdfViewerContainer.pdf-glow {
    animation: pdfGlow 2s ease-out forwards;
  }

  @keyframes pdfGlow {
    0%   { box-shadow: inset 0 0 0 0 rgba(249, 115, 22, 0); }
    20%  { box-shadow: inset 0 0 80px 20px rgba(249, 115, 22, 0.15); }
    100% { box-shadow: inset 0 0 0 0 rgba(249, 115, 22, 0); }
  }

  /* Mobile: staggered page reveals for PDF.js multi-page canvases */
  #pdfJSContainer.pdf-reveal .pdf-js-page {
    opacity: 0;
    animation: pdfPageReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  #pdfJSContainer.pdf-reveal .pdf-js-page:nth-child(1) { animation-delay: 0.2s; }
  #pdfJSContainer.pdf-reveal .pdf-js-page:nth-child(2) { animation-delay: 0.45s; }
  #pdfJSContainer.pdf-reveal .pdf-js-page:nth-child(3) { animation-delay: 0.65s; }
  #pdfJSContainer.pdf-reveal .pdf-js-page:nth-child(n+4) { animation-delay: 0.8s; }

  @keyframes pdfPageReveal {
    0% {
      opacity: 0;
      transform: translateY(20px) scale(0.98);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* ════════════════════════════════════════════════ */
  /* SMALL-SCREEN (≤430px) GLOBAL RESPONSIVE FIXES   */
  /* ════════════════════════════════════════════════ */
  @media (max-width: 430px) {
    /* Main container: reduce outer padding */
    .app-main {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    /* Index page: tighter padding */
    .text-black.font-sans.p-2 {
      padding: 6px;
      padding-bottom: 8rem;
    }

    /* Invoice controls card: reduce shadow & border */
    .text-black.font-sans .shadow-\[4px_4px_0px_0px_rgba\(0\,0\,0\,1\)\] {
      box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
    }

    /* Review container: tighter padding */
    .review-content {
      padding: 10px !important;
    }

    /* Industrial shadow: lighter on small screens */
    .industrial-shadow {
      box-shadow: 3px 3px 0px 0px #F97316;
    }

    /* Recording button: slightly smaller on mobile */
    .record-btn {
      width: 8.5rem;
      height: 8.5rem;
    }

    .idle-breathe-ring {
      width: 10.5rem;
      height: 10.5rem;
    }

    .sonar-container {
      width: 13rem;
      height: 13rem;
    }

    .voice-glow-halo {
      width: 11rem;
      height: 11rem;
    }

    .radial-waveform {
      width: 10.5rem;
      height: 10.5rem;
    }

    .radial-bar {
      height: 13px;
      width: 3px;
      transform:
          translate(-50%, -50%)
          rotate(var(--angle))
          translateY(-4.5rem);
    }

    .orbital-spinner-track {
      width: 10.5rem;
      height: 10.5rem;
    }

    /* Contact card: reduce shadow */
    .contact-card {
      /* box-shadow removed */
    margin: 0 auto 1.5rem;
    }

    /* Footer: tighter */
    .site-footer-inner {
      padding: 2rem 1rem;
    }
  }

  /* ============================================ */
  /* MODAL INPUT FIELDS                           */
  /* ============================================ */
  .modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid black;
    border-radius: 0.75rem;
    font-weight: 700;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
    transition: all 0.15s ease;
    outline: none;
  }
  .modal-input:focus {
    border-color: #f97316;
    box-shadow: none;
    transform: translate(2px, 2px);
  }
  .modal-input::placeholder {
    font-weight: 500;
    color: #9ca3af;
  }
  .modal-input.resize-none {
    resize: none;
  }

/* Custom hover for restore button */
.restore-btn-hover:hover {
  background-color: #16a34a !important; /* green-600 equivalent */
  color: #ffffff !important;
}
.restore-btn-hover:hover svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}