
      /* TAM - Dark Mode Matching BOTS Website */

      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      :root {
        --primary: #4a6cf7;
        --accent: #13c296;
        --secondary: #135e96;
        --danger: #fb5d5d;
        --success: #2ecc71;

        --bg-dark: #0a0a0a;
        --bg-darker: #1a1a2e;
        --bg-card: #252540;
        --bg-input: #2a2a3e;
        --bg-hover: rgba(30, 30, 50, 0.95);

        --text-primary: #e0e0e0;
        --text-secondary: #a0a0b0;
        --text-muted: #6b7280;

        --border: rgba(79, 195, 247, 0.25);
        --border-hover: rgba(74, 108, 247, 0.6);

        --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);

        --radius: 10px;
        --radius-lg: 15px;
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%) fixed;
        background-attachment: fixed;
        color: var(--text-primary);
        line-height: 1.6;
        min-height: 100vh;
      }

      input[type="text"] {
        background-color: var(--bg-input) !important;
      }
      .tam-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000000;
        opacity: 0;
        transition: none; /* No transition on open for instant display */
      }

      .tam-overlay.active {
        opacity: 1;
      }

      .tam-overlay.closing {
        transition: opacity 0.3s ease; /* Only animate when closing */
      }

      .tam-modal {
        background: var(--bg-darker);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        width: 95%;
        max-width: 1400px;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
        border: 2px solid var(--border);
        transform: scale(1); /* Start at full scale for instant display */
        transition: none; /* No transition on open */
      }

      .tam-overlay.closing .tam-modal {
        transform: scale(0.95);
        transition: transform 0.3s ease; /* Only animate when closing */
      }

      .tam-header {
        background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
        padding: 1.5rem 2rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        position: relative;
      }

      .tam-header::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--accent), var(--primary));
      }

      .tam-header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
      }

      .tam-back-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.2s;
      }

      .tam-back-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateX(-3px);
      }

      .tam-title {
        color: white;
        font-size: 1.5rem;
        font-weight: 600;
      }

      .tam-subtitle {
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.9rem;
        margin-top: 0.25rem;
      }

      .tam-close-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
      }

      .tam-close-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: rotate(90deg);
      }

      .tam-body {
        padding: 2rem;
        overflow-y: auto;
        flex: 1;
        background: white;
      }

      .tam-body::-webkit-scrollbar {
        width: 10px;
      }

      .tam-body::-webkit-scrollbar-track {
        background: var(--bg-darker);
      }

      .tam-body::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 5px;
      }

      .tam-footer {
        padding: 1.5rem 2rem;
        background: var(--bg-card);
        border-top: 2px solid var(--border);
        display: flex;
        justify-content: flex-end;
        gap: 1rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
      }

      .tam-btn {
        padding: 0.75rem 1.5rem;
        border-radius: var(--radius);
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        border: none;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
      }

      .tam-btn-primary {
        background: linear-gradient(135deg, var(--primary), var(--accent));
        color: white;
      }

      .tam-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(74, 108, 247, 0.4);
      }

      .tam-btn-secondary {
        /* background: var(--bg-input); */
        color: var(--text-primary);
        border: 2px solid var(--border);
      }

      .tam-btn-secondary:hover {
        border-color: var(--border-hover);
        background: var(--bg-hover);
      }

      .tam-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
      }

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

      /* Mobile Modal Fixes - Aggressive overrides to prevent overflow */
      @media (max-width: 768px) {
        .tam-overlay {
          padding: 0 !important;
          align-items: stretch !important;
        }

        .tam-modal {
          width: 100vw !important;
          max-width: 100vw !important;
          height: 100vh !important;
          height: 100dvh !important;
          max-height: 100vh !important;
          max-height: 100dvh !important;
          border-radius: 0 !important;
          display: flex !important;
          flex-direction: column !important;
          margin: 0 !important;
          padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        .tam-modal.billing-modal {
          width: 100vw !important;
          max-width: 100vw !important;
          height: 100vh !important;
          height: 100dvh !important;
          max-height: 100vh !important;
          max-height: 100dvh !important;
          padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        .tam-header {
          border-radius: 0 !important;
          padding: 1rem !important;
          flex-shrink: 0 !important;
        }

        .tam-title {
          font-size: 1.1rem !important;
        }

        .tam-subtitle {
          font-size: 0.75rem !important;
        }

        .tam-body {
          padding: 1rem !important;
          overflow-y: auto !important;
          overflow-x: hidden !important;
          flex: 1 1 auto !important;
          min-height: 0 !important; /* Critical: allows flex child to shrink */
        }

        .tam-footer {
          padding: 1rem !important;
          border-radius: 0 !important;
          flex-shrink: 0 !important;
        }

        .tam-back-btn {
          padding: 0.4rem 0.8rem !important;
          font-size: 0.875rem !important;
        }

        .tam-close-btn {
          width: 36px !important;
          height: 36px !important;
          font-size: 1.1rem !important;
        }

        .billing-section {
          margin-bottom: 1.25rem;
        }

        .billing-section-body {
          padding: 1rem;
        }

        .tam-column {
          padding: 1rem;
        }

        .tam-form {
          padding: 0 !important;
          border: none !important;
          border-radius: 0 !important;
          background: transparent !important;
          margin-top: 0 !important;
        }

        /* Re-add subtle visual separation for form fields inside tam-form on mobile */
        .tam-form > .tam-form-group:first-child,
        .tam-form > div:first-child {
          padding-top: 1rem;
        }

        .tam-type-grid {
          grid-template-columns: 1fr !important;
          gap: 1rem !important;
        }

        /* Fix: Provider grid responsive on mobile - #tam-container for specificity */
        #tam-container .tam-provider-grid {
          grid-template-columns: repeat(2, 1fr) !important;
          gap: 0.75rem !important;
          margin-bottom: 1rem !important;
        }

        #tam-container .tam-provider-btn {
          padding: 0.75rem 0.5rem !important;
          min-width: 0 !important;
          overflow: visible !important;
          word-break: break-word !important;
          text-align: center !important;
        }

        #tam-container .tam-provider-btn small {
          font-size: 9px !important;
          line-height: 1.2 !important;
          display: block !important;
        }

        #tam-container .tam-provider-btn .tam-provider-name {
          font-size: 0.75rem !important;
          text-align: center !important;
          line-height: 1.2 !important;
        }

        #tam-container .tam-provider-badge {
          font-size: 0.65rem !important;
        }

        /* Ensure billing form fits */
        .billing-form-group {
          margin-bottom: 1rem;
        }

        .billing-grid-2 {
          grid-template-columns: 1fr !important;
        }

        /* Form action buttons are moved out of .tam-body into .tam-modal via JS,
         so they become a flex sibling like .tam-footer — always visible at bottom */
        #tam-container .tam-form-actions {
          flex-shrink: 0 !important;
          position: relative !important;
          bottom: auto !important;
          left: auto !important;
          right: auto !important;
          width: auto !important;
          background: var(--bg-card) !important;
          padding: 1rem !important;
          margin: 0 !important;
          border-top: 2px solid var(--border) !important;
          z-index: 10 !important;
          border-radius: 0 !important;
          display: flex !important;
          justify-content: flex-end !important;
          gap: 1rem !important;
        }

        /* No extra bottom padding needed since buttons are outside scroll area */
        .tam-body {
          padding-bottom: 1rem !important;
        }

        .billing-modal .tam-footer {
          position: sticky !important;
          bottom: 0 !important;
          z-index: 10 !important;
        }
      }

      /* Extra small devices */
      @media (max-width: 480px) {
        .tam-header {
          padding: 0.75rem !important;
        }

        .tam-body {
          padding: 0.75rem !important;
        }

        .tam-footer {
          padding: 0.75rem !important;
        }

        .tam-title {
          font-size: 1rem !important;
        }

        .tam-btn {
          padding: 0.6rem 1rem !important;
          font-size: 0.875rem !important;
        }

        #tam-container .tam-form-actions {
          padding: 0.75rem !important;
        }

        #tam-container .tam-provider-grid {
          grid-template-columns: repeat(2, 1fr) !important;
          gap: 0.4rem !important;
        }

        #tam-container .tam-provider-btn {
          padding: 0.5rem 0.25rem !important;
          gap: 0.25rem !important;
        }

        #tam-container .tam-provider-btn .tam-provider-name {
          font-size: 0.7rem !important;
        }

        #tam-container .tam-provider-btn small {
          font-size: 8px !important;
        }

        #tam-container .tam-provider-icon,
        #tam-container .tam-provider-icon-wrapper {
          width: 32px !important;
          height: 32px !important;
          font-size: 1.25rem !important;
        }
      }

      .tam-column {
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        position: relative;
        overflow: hidden;
      }

      .tam-column::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
      }

      .tam-column.destination::before {
        background: linear-gradient(90deg, var(--accent), var(--success));
      }

      .tam-column-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--border);
      }

      .tam-column-title {
        font-size: 1.25rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-primary);
      }

      .tam-column-count {
        /* background: var(--bg-input); */
        padding: 0.25rem 0.75rem;
        border-radius: var(--radius);
        font-size: 0.875rem;
        color: var(--text-secondary);
        border: 1px solid var(--border);
      }

      .tam-column-body {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        min-height: 300px;
      }

      .tam-account-card {
        background: var(--bg-input);
        border: 2px solid var(--border);
        border-radius: var(--radius);
        padding: 1rem;
        transition: all 0.2s;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
      }

      .tam-account-card:hover {
        border-color: var(--border-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.2);
      }

      .tam-account-card.tam-account-inactive {
        opacity: 0.45;
        position: relative;
      }

      .tam-account-card.tam-account-inactive::after {
        content: "{{T|Inactive — Upgrade tier}}";
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(246, 170, 53, 0.9);
        color: #fff;
        padding: 2px 10px;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
      }

      /* Group 1: Icon + Email + Status */
      .tam-card-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1 1 auto;
        min-width: 200px;
      }

      .tam-card-icon {
        font-size: 1.5rem;
        flex-shrink: 0;
      }

      .tam-card-email {
        flex: 1;
        font-weight: 600;
        font-size: 0.95rem;
        /* color: var(--text-primary); */
        word-break: break-word;
      }

      @media (max-width: 640px) {
        .tam-card-email {
          font-size: 0.875rem;
        }

        .tam-card-body {
          font-size: 0.8125rem;
        }

        .tam-card-header {
          min-width: 150px;
        }

        .tam-card-body {
          min-width: 120px;
        }
      }

      .tam-card-status {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--success);
        animation: pulse 2s infinite;
        flex-shrink: 0;
      }

      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
        }
        50% {
          opacity: 0.5;
        }
      }

      .tam-card-status.inactive {
        background: var(--text-muted);
        animation: none;
      }

      .tam-card-status.error {
        background: #e74c3c;
        animation: pulse-error 1.5s infinite;
      }

      @keyframes pulse-error {
        0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
        50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
      }

      /* Group 2: Protocol + Folder */
      .tam-card-body {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1 1 auto;
        min-width: 150px;
        font-size: 0.875rem;
        color: var(--text-secondary);
      }

      .tam-card-provider {
        font-weight: 500;
        color: var(--primary);
      }

      /* Group 3: Buttons - always full width on new line */
      .tam-card-actions {
        flex: 1 1 100%;
        display: flex;
        gap: 0.5rem;
      }

      .tam-card-btn {
        flex: 1;
        padding: 0.5rem;
        /* background: var(--bg-dark); */
        border: 1px solid var(--border);
        color: var(--text-primary);
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 0.875rem;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
      }

      .tam-card-btn:hover {
        border-color: var(--border-hover);
        background: var(--bg-hover);
      }

      .tam-empty {
        text-align: center;
        padding: 3rem 1rem;
        color: var(--text-muted);
      }

      .tam-empty-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.3;
      }

      .tam-empty h3 {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-secondary);
      }

      .tam-empty p {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
      }

      .tam-add-btn {
        width: 100%;
        padding: 1rem;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        border: none;
        color: white;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 1rem;
        font-weight: 500;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
      }

      .tam-add-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(74, 108, 247, 0.4);
      }

      .tam-add-btn.destination {
        background: linear-gradient(135deg, var(--accent), var(--success));
      }

      .tam-type-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
      }

      .tam-type-card {
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 2rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s;
        position: relative;
        overflow: hidden;
      }

      .tam-type-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        transform: scaleX(0);
        transition: transform 0.3s;
      }

      .tam-type-card:hover::before {
        transform: scaleX(1);
      }

      .tam-type-card:hover {
        border-color: var(--border-hover);
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(74, 108, 247, 0.3);
      }

      .tam-type-card.disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }

      .tam-type-card.disabled:hover {
        transform: none;
        border-color: var(--border);
      }

      .tam-type-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
      }

      .tam-type-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
      }

      .tam-type-usage {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-bottom: 1rem;
      }

      .tam-provider-section {
        margin-top: 2rem;
      }

      .tam-section-title {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        /* color: var(--text-primary); */
      }

      .tam-section-subtitle {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
      }

      .tam-provider-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
        margin-bottom: 2rem;
      }

      .tam-provider-btn {
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: var(--radius);
        padding: 1.5rem 1rem;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-primary);
      }

      .tam-provider-btn:hover {
        border-color: var(--border-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
      }

      .tam-provider-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: var(--bg-input);
        border-color: rgba(79, 195, 247, 0.15);
      }

      .tam-provider-btn.disabled .tam-provider-name,
      .tam-provider-btn.disabled .tam-provider-icon {
        opacity: 1;
        color: white;
      }

      .tam-provider-btn.disabled:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(79, 195, 247, 0.15);
      }

      /* Connection Type Selector Styles */
      .tam-connection-type-section {
        padding: 2rem;
      }

      .tam-provider-icon-wrapper {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
      }

      .tam-provider-logo {
        max-width: 100%;
        max-height: 100%;
      }

      .tam-provider-icon-fallback {
        display: none;
        position: absolute;
      }

      .tam-provider-icon-wrapper.use-emoji .tam-provider-icon-fallback {
        display: block;
      }

      .tam-provider-icon {
        font-size: 2rem;
      }

      .tam-provider-name {
        font-weight: 500;
        font-size: 0.875rem;
      }

      .tam-provider-badge {
        font-size: 0.75rem;
        color: var(--accent);
      }

      .tam-divider {
        display: flex;
        align-items: center;
        text-align: center;
        margin: 2rem 0;
        color: var(--text-muted);
      }

      .tam-divider::before,
      .tam-divider::after {
        content: "";
        flex: 1;
        border-bottom: 2px solid var(--border);
      }

      .tam-divider span {
        padding: 0 1rem;
        font-weight: 500;
      }

      .tam-manual-option {
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: var(--radius);
        padding: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        transition: all 0.2s;
      }

      .tam-manual-option:hover {
        border-color: var(--border-hover);
        transform: translateY(-2px);
      }

      .tam-manual-content h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        color: var(--text-primary);
      }

      .tam-manual-content p {
        font-size: 0.875rem;
        color: var(--text-secondary);
      }

      /* Email Form Styles */
      .tam-form {
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 2rem;
        margin-top: 2rem;
      }

      .tam-form-group {
        margin-bottom: 1.5rem;
      }

      .tam-form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--text-primary);
        font-size: 0.9rem;
      }

      .tam-form-group input,
      .tam-form-group select,
      .tam-form-group textarea {
        width: 100%;
        padding: 0.75rem;
        background: var(--bg-input);
        border: 2px solid var(--border);
        border-radius: var(--radius);
        color: white;
        font-size: 0.95rem;
        transition: all 0.2s;
      }

      .tam-form-group input:focus,
      .tam-form-group select:focus,
      .tam-form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
      }

      .tam-form-group input::placeholder {
        color: var(--text-muted);
      }

      .tam-form-actions {
        display: flex;
        gap: 1rem;
        justify-content: flex-end;
        margin-top: 2rem;
        position: sticky;
        bottom: 0;
        /* background: var(--bg-darker, #1a1a2e); */
        padding: 1rem 0;
        z-index: 10;
      }

      .tam-form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
      }

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

      .tam-screen {
        display: none;
        animation: slideIn 0.3s ease;
      }

      .tam-screen.active {
        display: block;
      }

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

      @media (max-width: 768px) {
        .tam-modal {
          width: 100%;
          height: 100vh;
          max-height: 100vh;
          border-radius: 0;
        }

        .tam-header,
        .tam-body,
        .tam-footer {
          padding: 1rem;
        }

        .tam-title {
          font-size: 1.25rem;
        }
      }

      /* Info icon tooltips - Issues #3 and #4 */
      .info-icon {
        position: relative;
        display: inline-block;
        margin-left: 0.25rem;
        cursor: help;
      }

      .info-icon i {
        color: var(--text-muted);
        font-size: 0.8rem;
        transition: color 0.2s;
      }

      .info-icon:hover i {
        color: var(--primary);
      }

      .info-tooltip {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-darker);
        color: var(--text-primary);
        padding: 0.5rem 0.75rem;
        border-radius: var(--radius);
        font-size: 0.8rem;
        max-width: 250px;
        white-space: normal;
        word-wrap: break-word;
        z-index: 1000;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        transition:
          opacity 0.2s,
          visibility 0.2s;
        pointer-events: none;
      }

      .info-tooltip::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: var(--bg-darker);
      }

      .info-icon:hover .info-tooltip {
        visibility: visible;
        opacity: 1;
      }

      /* Autofill badge tooltips - Issue #3 */
      .autofill-badge {
        position: relative;
        display: inline-block;
        background: var(--accent);
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        margin-left: 0.5rem;
        font-weight: 600;
        cursor: help;
        transition:
          transform 0.2s,
          box-shadow 0.2s;
      }

      .autofill-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(19, 194, 150, 0.3);
      }

      .autofill-tooltip {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-darker) !important;
        color: var(--text-secondary);
        padding: 0.75rem 1rem;
        border-radius: var(--radius);
        font-size: 0.8rem;
        width: 280px;
        white-space: normal;
        z-index: 10000 !important;
        border: 1px solid var(--primary) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        transition:
          opacity 0.2s,
          visibility 0.2s;
        pointer-events: none;
        line-height: 1.4;
      }
      
      .autofill-tooltip strong {
        color: var(--accent);
        display: block;
        margin-bottom: 0.25rem;
      }

      .autofill-tooltip::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: var(--bg-darker);
      }

      .autofill-badge:hover .autofill-tooltip {
        visibility: visible;
        opacity: 1;
      }

    
      /* ========================================== */
      /* BILLING MODAL REDESIGN */
      /* ========================================== */

      .billing-modal {
        max-width: 1100px !important;
      }

      .billing-section {
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        margin-bottom: 1.5rem;
        overflow: visible; /* Allow tooltips to overflow */
      }

      .billing-section-header {
        background: linear-gradient(135deg, rgba(74, 108, 247, 0.1), rgba(19, 194, 150, 0.1));
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        border-bottom: 2px solid var(--border);
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
      }

      .billing-section-header i {
        color: var(--primary);
        font-size: 1.2rem;
      }

      .billing-section-body {
        padding: 1.5rem;
        position: relative; /* For tooltip positioning */
        overflow: visible; /* Allow tooltips to overflow */
      }

      .billing-form-group {
        margin-bottom: 1.25rem;
        position: relative; /* For tooltip positioning */
        overflow: visible; /* Allow tooltips to overflow */
      }

      .billing-form-group:last-child {
        margin-bottom: 0;
      }

      .billing-label {
        display: block;
        color: var(--text-secondary);
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        font-weight: 500;
        position: relative; /* For tooltip positioning */
      }

      .billing-label i {
        margin-right: 0.5rem;
        color: var(--primary);
      }

      .billing-input {
        width: 100%;
        padding: 0.75rem;
        background-color: var(--bg-input) !important;
        border: 2px solid var(--border) !important;
        border-radius: var(--radius) !important;
        color: var(--text-secondary) !important;
        font-size: 1rem !important;
        transition:
          border-color 0.2s,
          box-shadow 0.2s,
          background-color 0.3s !important;
        -webkit-text-fill-color: var(--text-secondary) !important;
      }

      /* Override browser autofill styles */
      .billing-input:-webkit-autofill,
      .billing-input:-webkit-autofill:hover,
      .billing-input:-webkit-autofill:focus,
      .billing-input:-moz-autofill {
        -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        color: var(--text-primary) !important;
        caret-color: var(--text-primary) !important;
        background-color: var(--bg-input) !important;
        border: 2px solid var(--accent) !important;
        transition: background-color 5000s ease-in-out 0s !important;
      }

      .billing-input:focus {
        outline: none !important;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1) !important;
      }

      .billing-input:hover {
        border-color: var(--border-hover) !important;
      }

      /* Highlight style for auto-filled fields */
      .billing-input.auto-filled {
        background-color: rgba(19, 194, 150, 0.15) !important;
        border-color: var(--accent) !important;
      }

      select.billing-input {
        cursor: pointer;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a6cf7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1.25rem;
        padding-right: 2.5rem;
      }

      select.billing-input option {
        background-color: var(--bg-input);
        color: var(--text-primary);
      }

      .billing-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        overflow: visible; /* Allow tooltips to overflow */
      }

      .billing-vat-controls {
        display: flex;
        gap: 0.5rem;
      }

      .billing-vat-controls .billing-input {
        flex: 1;
      }

      .billing-vat-controls .tam-btn {
        white-space: nowrap;
        padding: 0.75rem 1.5rem;
      }

      .billing-validation-msg {
        margin-top: 0.5rem;
        font-size: 0.85rem;
      }

      .billing-checkbox-label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        cursor: pointer;
        padding: 1rem;
        background: rgba(74, 108, 247, 0.05);
        border-radius: var(--radius);
        border: 2px solid transparent;
        transition: all 0.2s;
      }

      .billing-checkbox-label:hover {
        background: rgba(74, 108, 247, 0.1);
        border-color: var(--border);
      }

      .billing-checkbox {
        width: 20px;
        height: 20px;
        min-width: 20px;
        cursor: pointer;
        flex-shrink: 0;
        margin: 0;
        align-self: center;
        vertical-align: middle;
      }

      .billing-checkbox-text {
        flex: 1;
        line-height: 1.5;
        color: var(--text-primary);
        align-self: center;
      }

      .billing-link {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
      }

      .billing-link:hover {
        color: var(--accent);
        text-decoration: underline;
      }





      /* Responsive Design for Billing Modal */
      @media (max-width: 1200px) {
        .billing-modal {
          max-width: 95% !important;
        }
      }

      @media (max-width: 768px) {
        .billing-modal {
          max-width: 95% !important;
        }

        .billing-grid-2 {
          grid-template-columns: 1fr;
          gap: 1rem;
        }

        .billing-vat-controls {
          flex-direction: column;
        }

        .billing-vat-controls .tam-btn {
          width: 100%;
        }

        .billing-section-header {
          padding: 0.875rem 1rem;
          font-size: 1rem;
        }

        .billing-section-body {
          padding: 1rem;
        }

        .autofill-tooltip {
          width: 90vw;
          max-width: 280px;
          left: 50% !important;
          right: auto !important;
        }
      }

      @media (max-width: 480px) {
        .billing-section-header {
          font-size: 0.95rem;
          padding: 0.75rem 0.875rem;
        }

        .billing-section-body {
          padding: 0.875rem;
        }

        .billing-checkbox-label {
          padding: 0.875rem;
          font-size: 0.9rem;
        }

        .billing-input {
          font-size: 0.95rem !important;
          padding: 0.675rem !important;
        }

        .autofill-tooltip {
          font-size: 0.75rem;
          width: 85vw;
          max-width: 250px;
        }
      }

      /* Checkbox error glow */
      @keyframes checkboxError {
        0%,
        100% {
          box-shadow: 0 0 0 0 rgba(251, 93, 93, 0);
        }
        50% {
          box-shadow: 0 0 0 4px rgba(251, 93, 93, 0.4);
        }
      }

      .checkbox-error {
        animation: checkboxError 0.6s ease-in-out 3;
        border: 2px solid var(--danger) !important;
        border-radius: var(--radius);
        padding: 0.5rem;
      }

      /* Custom Searchable Country Dropdown */
      .country-dropdown-wrapper { position: relative; width: 100%; }
      .country-dropdown-trigger {
        width: 100%; padding: 0.75rem; background-color: var(--bg-input); border: 2px solid var(--border);
        color: var(--text-secondary); border-radius: var(--radius); font-size: 1rem; cursor: pointer; display: flex;
        align-items: center; justify-content: space-between; transition: border-color 0.2s, box-shadow 0.2s;
        font-family: inherit; box-sizing: border-box; min-height: 46px;
      }
      .country-dropdown-trigger:hover { border-color: var(--border-hover); }
      .country-dropdown-trigger.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1); }
      .country-dropdown-trigger.valid { border-color: var(--accent); }
      .country-dropdown-trigger .cdd-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .country-dropdown-trigger .cdd-text.placeholder { color: #6b7280; }
      .country-dropdown-trigger .cdd-arrow { font-size: 0.75rem; color: var(--primary); margin-left: 8px; transition: transform 0.2s; }
      .country-dropdown-trigger.open .cdd-arrow { transform: rotate(180deg); }
      .country-dropdown-panel {
        /* position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1000; */
        background: var(--bg-modal); border: 2px solid var(--border); border-radius: var(--radius);
        box-shadow: 0 8px 32px rgba(0,0,0,0.4); display: none; overflow: hidden;
      }
      .country-dropdown-panel.open { display: block; }
      .country-dropdown-search {
        width: 100%; padding: 10px 14px; border: none; border-bottom: 1px solid var(--border);
        background: var(--bg-input); color: var(--text-primary); font-size: 14px; outline: none; box-sizing: border-box;
        font-family: inherit;
      }
      .country-dropdown-search::placeholder { color: #6b7280; }
      .country-dropdown-list { max-height: 260px; overflow-y: auto; padding: 4px 0; }
      .country-dropdown-list::-webkit-scrollbar { width: 6px; }
      .country-dropdown-list::-webkit-scrollbar-track { background: transparent; }
      .country-dropdown-list::-webkit-scrollbar-thumb { background: rgba(79, 195, 247, 0.3); border-radius: 3px; }
      .country-dropdown-group { padding: 6px 14px 4px; font-size: 0.7rem; font-weight: 700; color: var(--primary);
        text-transform: uppercase; letter-spacing: 0.05em; }
      .country-dropdown-option {
        padding: 8px 14px; cursor: pointer; font-size: 14px; color: var(--text-secondary);
        display: flex; align-items: center; gap: 8px; transition: background 0.15s;
      }
      .country-dropdown-option:hover, .country-dropdown-option.highlighted { background: rgba(74, 108, 247, 0.15); color: var(--text-primary); }
      .country-dropdown-option.selected { background: rgba(74, 108, 247, 0.25); color: #fff; }
      .country-dropdown-option .cdd-check { font-size: 0.7rem; color: var(--primary); width: 14px; }
      .country-dropdown-no-results { padding: 12px 14px; font-size: 13px; color: #6b7280; text-align: center; }
    