    :root, html[data-theme="dark"] {
      --bg-body: #0d0e12;
      --bg-sidebar: #131419;
      --bg-card: #191b22;
      --bg-card-hover: #1f212a;
      --bg-subtle: #222530;
      --border: #252833;
      --border-light: #2f3442;

      --text-white: #f8fafc;
      --text-muted: #94a3b8;
      --text-dark: #64748b;

      --primary: #39BA76;
      --primary-hover: #2ea366;
      --primary-dim: rgba(57, 186, 118, 0.12);

      --warning: #f59e0b;
      --warning-dim: rgba(245, 158, 11, 0.12);
      --danger: #ef4444;
      --danger-dim: rgba(239, 68, 68, 0.12);

      --sidebar-width: 250px;
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-pill: 9999px;

      --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    html[data-theme="light"] {
      --bg-body: #f8fafc;
      --bg-sidebar: #ffffff;
      --bg-card: #ffffff;
      --bg-card-hover: #f8fafc;
      --bg-subtle: #f1f5f9;
      --border: #e2e8f0;
      --border-light: #cbd5e1;

      --text-white: #0f172a;
      --text-muted: #475569;
      --text-dark: #64748b;

      --primary: #16a34a;
      --primary-hover: #15803d;
      --primary-dim: rgba(22, 163, 74, 0.1);

      --warning: #d97706;
      --warning-dim: rgba(217, 119, 6, 0.1);
      --danger: #dc2626;
      --danger-dim: rgba(220, 38, 38, 0.1);
    }

    .logo-light { display: none; }
    .logo-dark { display: block; }
    html[data-theme="light"] .logo-light { display: block; }
    html[data-theme="light"] .logo-dark { display: none; }

    html[data-theme="light"] .instance-card {
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }
    html[data-theme="light"] .instance-card:hover {
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
    html[data-theme="light"] .filter-bar {
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    }
    html[data-theme="light"] .btn-action-primary,
    html[data-theme="light"] .btn-action-primary i,
    html[data-theme="light"] .btn-create-instance,
    html[data-theme="light"] .btn-create-instance i,
    html[data-theme="light"] .pc-cta:not(.disconnect),
    html[data-theme="light"] .pc-cta:not(.disconnect) i,
    html[data-theme="light"] .btn-subscribe-confirm,
    html[data-theme="light"] .btn-subscribe-confirm i,
    html[data-theme="light"] .btn-create-submit-glow,
    html[data-theme="light"] .btn-create-submit-glow i,
    html[data-theme="light"] #btn-submit-create,
    html[data-theme="light"] #btn-submit-create i,
    html[data-theme="light"] .btn-modal-primary,
    html[data-theme="light"] .btn-modal-primary i,
    html[data-theme="light"] .modal-confirm-btn,
    html[data-theme="light"] .modal-confirm-btn i,
    html[data-theme="light"] .btn-save,
    html[data-theme="light"] .btn-save i,
    html[data-theme="light"] .btn-drawer-save,
    html[data-theme="light"] .btn-drawer-save i,
    html[data-theme="light"] .btn-confirm,
    html[data-theme="light"] .btn-confirm i,
    html[data-theme="light"] .nav-badge {
      color: #ffffff !important;
    }
    html[data-theme="light"] .plan-card-opt {
      background: #f8fafc;
    }
    html[data-theme="light"] .form-input {
      background: #ffffff;
    }
    html[data-theme="light"] .modal-box {
      box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    }
    html[data-theme="light"] .subscription-box.pending {
      background: rgba(217, 119, 6, 0.05);
      border-color: rgba(217, 119, 6, 0.25);
    }
    html[data-theme="light"] .subscription-box.expiring,
    html[data-theme="light"] .subscription-box.paid {
      background: rgba(22, 163, 74, 0.05);
      border-color: rgba(22, 163, 74, 0.25);
    }
    html[data-theme="light"] .subscription-box.paid .sub-status-text {
      color: #0f172a;
    }
    html[data-theme="light"] .card-visual-body {
      background: #f1f5f9;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .card-radar-tile {
      background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
      border-color: #cbd5e1;
    }
    html[data-theme="light"] .card-radar-tile.online {
      background: radial-gradient(circle at center, rgba(22, 163, 74, 0.15) 0%, #f1f5f9 100%);
      border-color: rgba(22, 163, 74, 0.3);
    }
    html[data-theme="light"] #modal-manage .modal-manage-dialog {
      background: #ffffff;
      border-color: #cbd5e1;
      box-shadow: -15px 0 50px rgba(15, 23, 42, 0.12);
    }
    html[data-theme="light"] .drawer-header {
      background: #ffffff;
      border-bottom-color: #e2e8f0;
    }
    html[data-theme="light"] .drawer-instance-name {
      color: #0f172a;
    }
    html[data-theme="light"] .drawer-instance-id {
      color: #475569;
    }
    html[data-theme="light"] .drawer-id-label {
      color: #64748b;
    }
    html[data-theme="light"] .drawer-nav-btn {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #475569;
    }
    html[data-theme="light"] .drawer-nav-btn:hover {
      background: #e2e8f0;
      color: #0f172a;
    }
    html[data-theme="light"] .drawer-profile-bar {
      background: #f8fafc;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .drawer-avatar-icon.disconnected {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .btn-drawer-quick {
      background: #ffffff;
      border-color: #cbd5e1;
      color: #0f172a;
    }
    html[data-theme="light"] .btn-drawer-quick:hover {
      background: #f1f5f9;
    }
    html[data-theme="light"] .drawer-tabs-vertical {
      background: #f8fafc;
      border-right-color: #e2e8f0;
    }
    html[data-theme="light"] .drawer-tab-link {
      background: #ffffff;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .drawer-tab-link:hover {
      background: #f1f5f9;
      color: #0f172a;
    }
    html[data-theme="light"] .drawer-tab-link.active {
      background: rgba(22, 163, 74, 0.12);
      border-color: rgba(22, 163, 74, 0.4);
      color: #16a34a;
    }
    html[data-theme="light"] .setting-card {
      background: #ffffff;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .setting-input,
    html[data-theme="light"] .setting-textarea,
    html[data-theme="light"] .setting-select,
    html[data-theme="light"] .counter-input {
      background: #ffffff;
      border-color: #cbd5e1;
      color: #0f172a;
    }
    html[data-theme="light"] .setting-input::placeholder,
    html[data-theme="light"] .input-pill-modern::placeholder,
    html[data-theme="light"] .webhook-input-field::placeholder {
      color: #94a3b8;
    }
    html[data-theme="light"] .input-with-icon i {
      color: #94a3b8;
    }
    html[data-theme="light"] .input-with-icon:focus-within i {
      color: #16a34a;
    }
    html[data-theme="light"] .setting-input:focus,
    html[data-theme="light"] .setting-textarea:focus,
    html[data-theme="light"] .setting-select:focus {
      background: #ffffff;
      border-color: #16a34a;
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
    }
    html[data-theme="light"] .btn-icon-toggle {
      background: #f8fafc;
      border-color: #cbd5e1;
      color: #475569;
    }
    html[data-theme="light"] .btn-icon-toggle:hover {
      background: #ffffff;
      color: #0f172a;
      border-color: #94a3b8;
    }
    html[data-theme="light"] .slider {
      background-color: #cbd5e1;
    }
    html[data-theme="light"] input:checked + .slider {
      background-color: #16a34a;
    }
    html[data-theme="light"] .btn-token-generate {
      background: rgba(22, 163, 74, 0.08);
      border-color: rgba(22, 163, 74, 0.35);
      color: #16a34a;
    }
    html[data-theme="light"] .btn-token-generate:hover {
      background: rgba(22, 163, 74, 0.16);
      border-color: #16a34a;
    }
    html[data-theme="light"] .btn-pane-save {
      background: #16a34a;
      color: #ffffff;
    }
    html[data-theme="light"] .btn-pane-save:hover {
      background: #15803d;
    }
    html[data-theme="light"] .btn-refresh-history {
      background: #f8fafc;
      border-color: #cbd5e1;
      color: #475569;
    }
    html[data-theme="light"] .btn-refresh-history:hover {
      background: #ffffff;
      color: #0f172a;
    }
    html[data-theme="light"] .history-table-container {
      background: #ffffff;
      border-color: #e2e8f0;
      box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    }
    html[data-theme="light"] .history-table th {
      background: #f8fafc;
      color: #64748b;
      border-bottom-color: #e2e8f0;
    }
    html[data-theme="light"] .history-table td {
      color: #0f172a;
      border-bottom-color: #f1f5f9;
    }
    html[data-theme="light"] .history-phone-number,
    html[data-theme="light"] .history-date-main {
      color: #0f172a;
    }
    html[data-theme="light"] .history-duration-badge {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #475569;
    }
    html[data-theme="light"] .history-stat-chip {
      background: #ffffff;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .health-stat-card {
      background: #f8fafc;
      border-color: #e2e8f0;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: var(--font);
      -webkit-font-smoothing: antialiased;
    }

    body {
      background-color: var(--bg-body);
      color: var(--text-white);
      min-height: 100vh;
      display: flex;
      overflow-x: hidden;
    }

    .sidebar {
      width: var(--sidebar-width);
      background-color: var(--bg-sidebar);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      z-index: 100;
      padding: 24px 16px 20px 16px;
      transition: transform 0.3s ease;
    }

    .brand-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 12px 28px 12px;
    }

    .brand-logo-img {
      height: 32px;
      width: auto;
      object-fit: contain;
    }

    .nav-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
    }

    .nav-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 11px 14px;
      border-radius: var(--radius-md);
      color: var(--text-muted);
      text-decoration: none;
      font-size: 0.92rem;
      font-weight: 600;
      transition: all 0.2s ease;
      cursor: pointer;
      border: 1px solid transparent;
    }

    .nav-item:hover {
      background: var(--bg-card);
      color: var(--text-white);
    }

    .nav-item.active {
      background: var(--primary-dim);
      color: var(--primary);
      border-color: rgba(57, 186, 118, 0.2);
    }

    .nav-item-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .nav-item-left i {
      font-size: 1.25rem;
    }

    .nav-badge {
      background: var(--primary);
      color: #052e16;
      font-size: 0.72rem;
      font-weight: 800;
      padding: 1px 7px;
      border-radius: var(--radius-pill);
      min-width: 18px;
      text-align: center;
    }

    #faturas-caret {
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
    }

    .nav-submenu {
      display: flex;
      flex-direction: column;
      gap: 3px;
      padding-left: 20px;
      margin-left: 18px;
      margin-top: 3px;
      margin-bottom: 6px;
      border-left: 1.5px solid var(--border);
      transition: all 0.2s ease;
    }

    .nav-subitem {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-dark);
      text-decoration: none;
      font-size: 0.83rem;
      font-weight: 500;
      padding: 7px 12px;
      border-radius: var(--radius-sm);
      transition: all 0.15s ease;
      position: relative;
    }

    .nav-subitem i {
      font-size: 0.95rem;
      color: var(--text-muted);
      transition: color 0.15s ease;
      flex-shrink: 0;
    }

    .nav-subitem:hover {
      color: var(--primary);
      background: var(--primary-dim);
    }

    .nav-subitem:hover i {
      color: var(--primary);
    }

    .nav-subitem.active {
      color: var(--primary) !important;
      background: var(--primary-dim) !important;
      font-weight: 700 !important;
    }

    .nav-subitem.active i {
      color: var(--primary) !important;
    }

    html[data-theme="light"] .nav-subitem {
      color: #475569;
    }

    html[data-theme="light"] .nav-subitem:hover {
      color: #15803d;
      background: #f0fdf4;
    }

    html[data-theme="light"] .nav-subitem.active {
      color: #15803d !important;
      background: #dcfce7 !important;
      font-weight: 700 !important;
    }

    html[data-theme="light"] .nav-subitem.active i {
      color: #15803d !important;
    }

    .sidebar-footer {
      display: flex;
      flex-direction: column;
      gap: 14px;
      padding-top: 18px;
      border-top: 1px solid var(--border);
    }

    .logout-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-dark);
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      background: none;
      border: none;
      padding: 8px 16px;
      border-radius: var(--radius-pill);
      transition: all 0.2s;
    }

    .logout-btn:hover {
      color: var(--danger);
      background: var(--danger-dim);
    }

    .user-profile-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 10px;
      border-radius: var(--radius-lg);
      background: var(--bg-card);
      border: 1px solid var(--border);
      text-decoration: none;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .user-profile-card:hover {
      border-color: var(--border-light);
      background: var(--bg-card-hover);
    }

    .user-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: #e11d48;
      color: #fff;
      font-weight: 700;
      font-size: 0.82rem;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      text-transform: uppercase;
    }

    .user-details {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      flex: 1;
    }

    .user-name {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-white);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .user-email {
      font-size: 0.72rem;
      color: var(--text-dark);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .user-chevron {
      color: var(--text-dark);
      font-size: 0.9rem;
    }

    .main-wrapper {
      margin-left: var(--sidebar-width);
      flex: 1;
      min-width: 0;
      padding: 20px 24px 30px 24px;
    }

    .page-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
      gap: 16px;
      flex-wrap: wrap;
    }

    .page-title-wrap {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .page-title-row {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .page-title-row h1 {
      font-size: 1.85rem;
      font-weight: 800;
      letter-spacing: -0.02em;
    }

    .title-badge {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-muted);
      font-size: 0.85rem;
      font-weight: 700;
      padding: 3px 12px;
      border-radius: var(--radius-pill);
    }

    .page-subtitle-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .page-subtitle {
      color: var(--text-muted);
      font-size: 0.92rem;
      font-weight: 500;
    }

    .sync-dot-divider {
      color: var(--text-dark);
      font-size: 0.8rem;
    }

    .sync-subtitle-time {
      color: var(--text-muted);
      font-size: 0.84rem;
      font-weight: 500;
    }

    .sync-subtitle-time strong {
      color: var(--text-white);
      font-family: 'Space Mono', monospace;
      font-size: 0.82rem;
      font-weight: 700;
    }

    html[data-theme="light"] .sync-subtitle-time strong {
      color: #0f172a;
    }

    .btn-refresh-inline {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--text-muted);
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.85rem;
      transition: all 0.2s ease;
      padding: 0;
      margin-left: 2px;
    }

    .btn-refresh-inline i {
      transition: transform 0.25s ease;
      display: inline-block;
    }

    .btn-refresh-inline:hover {
      color: #39BA76;
      border-color: #39BA76;
      background: rgba(57, 186, 118, 0.12);
    }

    .btn-refresh-inline:hover i {
      transform: rotate(90deg);
    }

    .btn-refresh-inline:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }

    html[data-theme="light"] .btn-refresh-inline {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .btn-refresh-inline:hover {
      color: #16a34a;
      border-color: #16a34a;
      background: #f0fdf4;
    }

    .btn-create-instance {
      background: var(--primary);
      color: #052e16;
      border: none;
      padding: 11px 22px;
      border-radius: var(--radius-pill);
      font-size: 0.92rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: none !important;
    }

    .btn-create-instance:hover {
      background: var(--primary-hover);
      transform: translateY(-1px);
      box-shadow: none !important;
    }

    .header-action-group {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .sync-status-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 14px;
      border-radius: var(--radius-pill);
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      font-size: 0.78rem;
      color: var(--text-muted);
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .sync-status-badge strong {
      color: var(--text-white);
      font-family: 'Space Mono', monospace;
      font-size: 0.78rem;
      font-weight: 700;
    }

    .sync-status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #39BA76;
      box-shadow: 0 0 6px #39BA76;
      display: inline-block;
      animation: pulseGreen 2s infinite;
    }

    .btn-refresh-dashboard {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 9px 16px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: var(--radius-pill);
      color: var(--text-white);
      font-size: 0.86rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      white-space: nowrap;
    }

    .btn-refresh-dashboard:hover {
      background: rgba(57, 186, 118, 0.1);
      border-color: rgba(57, 186, 118, 0.4);
      color: #39BA76;
      transform: translateY(-1px);
    }

    .btn-refresh-dashboard:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .btn-refresh-dashboard i {
      font-size: 1.05rem;
      transition: transform 0.3s ease;
    }

    html[data-theme="light"] .sync-status-badge {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .sync-status-badge strong {
      color: #0f172a;
    }
    html[data-theme="light"] .btn-refresh-dashboard {
      background: #ffffff;
      border-color: #e2e8f0;
      color: #334155;
    }
    html[data-theme="light"] .btn-refresh-dashboard:hover {
      background: #f0fdf4;
      border-color: rgba(22, 163, 74, 0.4);
      color: #16a34a;
    }

    .stats-overview-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    @media (max-width: 1080px) {
      .stats-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
      }
    }

    @media (max-width: 640px) {
      .stats-overview-grid {
        grid-template-columns: 1fr;
        gap: 12px;
      }
    }

    .stat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 18px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: all 0.2s ease;
      position: relative;
    }

    .stat-card:hover {
      border-color: var(--border-light);
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

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

    .stat-card-title {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: -0.01em;
    }

    .stat-card-body {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
    }

    .stat-card-value {
      font-size: 2rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.03em;
      line-height: 1;
    }

    .stat-badge {
      font-size: 0.72rem;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: var(--radius-pill);
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .stat-badge-primary {
      background: rgba(57, 186, 118, 0.12);
      color: var(--primary);
      border: 1px solid rgba(57, 186, 118, 0.25);
    }

    .stat-badge-lite {
      background: rgba(14, 165, 233, 0.12);
      color: #38bdf8;
      border: 1px solid rgba(14, 165, 233, 0.25);
    }

    .stat-badge-pro {
      background: rgba(168, 85, 247, 0.12);
      color: #c084fc;
      border: 1px solid rgba(168, 85, 247, 0.25);
    }

    .stat-badge-connected {
      background: rgba(34, 197, 94, 0.12);
      color: #4ade80;
      border: 1px solid rgba(34, 197, 94, 0.25);
    }

    html[data-theme="light"] .stat-card {
      background: #ffffff;
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    }
    html[data-theme="light"] .stat-card:hover {
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }
    html[data-theme="light"] .stat-badge-lite {
      background: rgba(2, 132, 199, 0.1);
      color: #0284c7;
      border-color: rgba(2, 132, 199, 0.2);
    }
    html[data-theme="light"] .stat-badge-pro {
      background: rgba(147, 51, 234, 0.1);
      color: #9333ea;
      border-color: rgba(147, 51, 234, 0.2);
    }

    .filter-bar-combined {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 26px;
    }

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

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

    .filter-chip-tag {
      background: rgba(99, 102, 241, 0.12);
      border: 1px solid rgba(99, 102, 241, 0.22);
      color: #a5b4fc;
      border-radius: var(--radius-pill);
      padding: 7px 14px;
      font-size: 0.84rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.15s ease;
      user-select: none;
    }

    .filter-chip-tag:hover {
      background: rgba(99, 102, 241, 0.18);
      border-color: rgba(99, 102, 241, 0.35);
      color: #c7d2fe;
    }

    .filter-chip-tag i {
      font-size: 0.82rem;
      opacity: 0.75;
      transition: opacity 0.15s;
    }

    .filter-chip-tag:hover i {
      opacity: 1;
    }

    html[data-theme="light"] .filter-chip-tag {
      background: #eef2ff;
      border: 1px solid #c7d2fe;
      color: #4338ca;
    }

    html[data-theme="light"] .filter-chip-tag:hover {
      background: #e0e7ff;
      color: #3730a3;
    }

    .more-filters-dropdown-wrap {
      position: relative;
    }

    .btn-more-filters {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-white);
      border-radius: var(--radius-pill);
      padding: 7px 16px;
      font-size: 0.84rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .filter-count-badge {
      background: var(--primary);
      color: #052e16;
      font-size: 0.72rem;
      font-weight: 800;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: 2px;
    }

    .filter-reset-pill {
      background: rgba(239, 68, 68, 0.08);
      border: 1px solid rgba(239, 68, 68, 0.25);
      color: #ef4444;
      border-radius: var(--radius-pill);
      padding: 6px 14px;
      font-size: 0.8rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .filter-reset-pill:hover {
      background: rgba(239, 68, 68, 0.16);
      border-color: rgba(239, 68, 68, 0.45);
    }

    html[data-theme="light"] .filter-reset-pill {
      background: #fef2f2;
      border-color: #fecaca;
      color: #dc2626;
    }

    html[data-theme="light"] .filter-reset-pill:hover {
      background: #fee2e2;
      border-color: #fca5a5;
    }

    .more-filters-popover {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      min-width: 230px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 8px;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
      z-index: 100;
      animation: fadeInDown 0.15s ease-out;
    }

    .more-filters-popover.active {
      display: block;
    }

    html[data-theme="light"] .more-filters-popover {
      background: #ffffff;
      border-color: #e2e8f0;
      box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    }

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

    .popover-section-title {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-dark);
      padding: 6px 10px 4px 10px;
    }

    .popover-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 12px;
      border-radius: 8px;
      font-size: 0.84rem;
      font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s ease;
      gap: 12px;
    }

    .pop-item-left {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .pop-item-left i {
      font-size: 1rem;
    }

    .pop-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .pop-dot.online {
      background: #22c55e;
      box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
    }

    .pop-dot.offline {
      background: #ef4444;
      box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
    }

    .pop-dot.pending {
      background: #f59e0b;
      box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
    }

    .popover-item:hover {
      background: var(--bg-card-hover);
      color: var(--text-white);
    }

    html[data-theme="light"] .popover-item:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    .popover-item.active {
      color: var(--primary);
      font-weight: 700;
    }

    .popover-check {
      font-size: 0.95rem;
      opacity: 0;
    }

    .popover-item.active .popover-check {
      opacity: 1;
    }

    .popover-divider {
      height: 1px;
      background: var(--border);
      margin: 6px 4px;
    }

    .popover-item.clear-all-btn {
      color: var(--danger);
      font-weight: 600;
      justify-content: flex-start;
      gap: 8px;
    }

    .popover-item.clear-all-btn:hover {
      background: rgba(239, 68, 68, 0.1);
      color: var(--danger);
    }

    .top-compact-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
    }

    .top-compact-left {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      flex: 1;
    }

    .top-compact-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }



    .search-input-wrap {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      padding: 7px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-dark);
      width: 100%;
      max-width: 280px;
      transition: border-color 0.2s ease;
    }

    html[data-theme="light"] .search-input-wrap {
      background: #ffffff;
      border-color: #e2e8f0;
    }

    .search-input-wrap:focus-within {
      border-color: var(--primary);
    }

    .search-input-wrap i {
      font-size: 1.05rem;
    }

    .search-input-wrap input {
      background: transparent;
      border: none;
      outline: none;
      color: var(--text-white);
      font-size: 0.86rem;
      width: 100%;
    }

    html[data-theme="light"] .search-input-wrap input {
      color: #0f172a;
    }

    .search-input-wrap input::placeholder {
      color: var(--text-dark);
    }

    .filter-btn {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-white);
      font-size: 0.84rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      padding: 7px 16px;
      border-radius: var(--radius-pill);
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    html[data-theme="light"] .filter-btn {
      background: #ffffff;
      border-color: #e2e8f0;
      color: #334155;
    }

    .filter-btn:hover {
      color: var(--text-white);
      border-color: var(--border-light);
      background: var(--bg-card-hover);
    }

    html[data-theme="light"] .filter-btn:hover {
      background: #f8fafc;
      border-color: #cbd5e1;
      color: #0f172a;
    }

    .instances-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 14px;
    }

    @media (min-width: 960px) {
      .instances-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    @media (max-width: 640px) {
      .instances-grid {
        grid-template-columns: 1fr;
        gap: 12px;
      }
    }

    .instance-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px 18px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      transition: all 0.25s ease;
      position: relative;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
      min-width: 0;
    }

    .instance-card:hover {
      border-color: rgba(57, 186, 118, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
      z-index: 2;
    }

    .card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .card-title-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .card-name-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .card-name {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: -0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 170px;
    }

    .card-plan-tag {
      font-size: 0.65rem;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 6px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .card-plan-tag.pro {
      background: rgba(99, 102, 241, 0.14);
      color: #818cf8;
      border: 1px solid rgba(99, 102, 241, 0.28);
    }

    .card-plan-tag.lite {
      background: rgba(234, 179, 8, 0.12);
      color: #fbbf24;
      border: 1px solid rgba(234, 179, 8, 0.25);
    }

    .card-id-row {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.73rem;
      color: var(--text-dark);
      font-family: 'Space Mono', monospace;
    }

    .card-id-code {
      color: var(--text-muted);
      font-weight: 600;
    }

    .btn-copy-id {
      background: none;
      border: none;
      color: var(--text-dark);
      cursor: pointer;
      font-size: 0.85rem;
      padding: 2px 4px;
      border-radius: 4px;
      transition: all 0.15s;
    }

    .btn-copy-id:hover {
      color: var(--primary);
      background: var(--primary-dim);
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px;
      border-radius: var(--radius-pill);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      flex-shrink: 0;
    }

    .status-pill.connected {
      background: rgba(57, 186, 118, 0.12);
      color: #39BA76;
      border: 1px solid rgba(57, 186, 118, 0.3);
    }

    .status-pill.disconnected {
      background: rgba(148, 163, 184, 0.08);
      color: var(--text-muted);
      border: 1px solid var(--border-light);
    }

    .pulse-indicator {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #39BA76;
      box-shadow: 0 0 0 0 rgba(57, 186, 118, 0.6);
      animation: pulseGreen 2s infinite;
    }

    @keyframes pulseGreen {
      0% { box-shadow: 0 0 0 0 rgba(57, 186, 118, 0.7); }
      70% { box-shadow: 0 0 0 6px rgba(57, 186, 118, 0); }
      100% { box-shadow: 0 0 0 0 rgba(57, 186, 118, 0); }
    }

    .card-visual-body {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 14px;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 14px;
    }

    .card-info-col {
      display: flex;
      flex-direction: column;
      gap: 9px;
      flex: 1;
      min-width: 0;
    }

    .info-row {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .info-row i {
      font-size: 1.15rem;
      flex-shrink: 0;
    }

    .info-row i.text-green { color: #39BA76; }
    .info-row i.text-muted { color: var(--text-dark); }

    .info-text {
      display: flex;
      flex-direction: column;
      line-height: 1.25;
      min-width: 0;
    }

    .info-label {
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--text-dark);
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .info-value {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-white);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .info-value.val-highlight {
      color: #39BA76;
    }

    .card-radar-tile {
      width: 58px;
      height: 58px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
      border: 1px solid var(--border-light);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      overflow: hidden;
    }

    .card-radar-tile.online {
      border-color: rgba(57, 186, 118, 0.3);
      background: radial-gradient(circle at center, rgba(57, 186, 118, 0.15) 0%, rgba(15, 23, 42, 0.85) 100%);
    }

    .radar-rings {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .radar-rings .ring {
      position: absolute;
      border-radius: 50%;
      border: 1px dashed rgba(148, 163, 184, 0.2);
    }

    .radar-rings .ring-1 {
      width: 30px;
      height: 30px;
    }

    .radar-rings .ring-2 {
      width: 48px;
      height: 48px;
    }

    .card-radar-tile.online .radar-rings .ring-1 {
      border-color: rgba(57, 186, 118, 0.35);
    }

    .radar-center-icon {
      position: relative;
      z-index: 2;
      font-size: 1.25rem;
      color: var(--text-dark);
    }

    .card-radar-tile.online .radar-center-icon {
      color: #39BA76;
      filter: drop-shadow(0 0 6px rgba(57, 186, 118, 0.5));
    }

    .card-sub-strip {
      border-radius: 12px;
      padding: 0 12px;
      min-height: 42px;
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border: 1px solid transparent;
      box-sizing: border-box;
      transition: all 0.2s ease;
    }

    .card-sub-strip.pending {
      background: rgba(245, 158, 11, 0.05);
      border-color: rgba(245, 158, 11, 0.22);
    }

    .card-sub-strip.paid {
      background: rgba(57, 186, 118, 0.05);
      border-color: rgba(57, 186, 118, 0.22);
    }

    .card-sub-strip.stripe-active {
      background: rgba(6, 182, 212, 0.05);
      border-color: rgba(6, 182, 212, 0.22);
    }

    .card-sub-strip.stripe-active.is-clickable {
      cursor: pointer;
    }

    .card-sub-strip.stripe-active.is-clickable:hover {
      background: rgba(6, 182, 212, 0.12);
      border-color: rgba(6, 182, 212, 0.45);
      transform: translateY(-1px);
    }

    html[data-theme="light"] .card-sub-strip.stripe-active.is-clickable:hover {
      background: #cffafe;
      border-color: #67e8f9;
    }

    .card-sub-strip.trial {
      background: rgba(168, 85, 247, 0.06);
      border-color: rgba(168, 85, 247, 0.25);
    }

    .sub-strip-text {
      display: flex;
      flex-direction: column;
      justify-content: center;
      line-height: 1.2;
      min-width: 0;
    }

    .sub-strip-title {
      font-size: 0.76rem;
      font-weight: 700;
      letter-spacing: 0.1px;
      line-height: 1;
    }

    .card-sub-strip.pending .sub-strip-title { color: #f59e0b; }
    .card-sub-strip.paid .sub-strip-title { color: var(--text-white); }
    .card-sub-strip.stripe-active .sub-strip-title { color: var(--text-white); }
    .card-sub-strip.trial .sub-strip-title { color: #c084fc; }

    .sub-strip-desc {
      font-size: 0.60rem;
      color: var(--text-muted);
      font-weight: 600;
      margin-top: 2px;
      letter-spacing: 0.3px;
      text-transform: uppercase;
    }

    .sub-strip-btn {
      border: none;
      padding: 4px 11px;
      border-radius: var(--radius-pill);
      font-size: 0.68rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
      flex-shrink: 0;
      letter-spacing: 0.2px;
    }

    .sub-strip-btn.pending {
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid rgba(245, 158, 11, 0.35);
      color: #f59e0b;
    }

    .sub-strip-btn.pending:hover {
      background: #f59e0b;
      border-color: #f59e0b;
      color: #000000;
    }

    .sub-strip-btn.paid {
      background: rgba(57, 186, 118, 0.14);
      border: 1px solid rgba(57, 186, 118, 0.3);
      color: #39BA76;
    }

    .sub-strip-btn.paid:hover {
      background: #39BA76;
      border-color: #39BA76;
      color: #052e16;
    }

    .stripe-info-wrap {
      position: relative;
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }

    .btn-sub-info {
      background: transparent;
      border: 1.5px solid #06b6d4;
      color: #06b6d4;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.95rem;
      transition: all 0.2s ease;
    }

    .btn-sub-info:hover {
      background: rgba(6, 182, 212, 0.15);
      color: #22d3ee;
      border-color: #22d3ee;
    }

    .stripe-tooltip {
      position: absolute;
      bottom: calc(100% + 10px);
      right: -8px;
      background: #1f242d;
      border: 1px solid #333d4b;
      color: #f1f5f9;
      font-size: 0.76rem;
      line-height: 1.4;
      padding: 10px 14px;
      border-radius: 8px;
      width: 250px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
      pointer-events: none;
      opacity: 0;
      transform: translateY(4px);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 100;
      text-align: left;
    }

    .stripe-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      right: 16px;
      border-width: 6px;
      border-style: solid;
      border-color: #1f242d transparent transparent transparent;
    }

    .stripe-info-wrap:hover .stripe-tooltip,
    .stripe-info-wrap:focus-within .stripe-tooltip {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    html[data-theme="light"] .stripe-tooltip {
      background: #0f172a;
      border-color: #334155;
      color: #ffffff;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    }
    html[data-theme="light"] .stripe-tooltip::after {
      border-color: #0f172a transparent transparent transparent;
    }

    .btn-view-details {
      background: var(--bg-subtle);
      border: 1px solid var(--border-light);
      color: #38bdf8;
      font-size: 0.8rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      padding: 9px 14px;
      border-radius: var(--radius-pill);
      transition: all 0.2s ease;
      flex-shrink: 0;
      white-space: nowrap;
    }

    .btn-view-details:hover {
      background: rgba(56, 189, 248, 0.12);
      border-color: rgba(56, 189, 248, 0.4);
      color: #7dd3fc;
    }

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

    .btn-card-toggle {
      flex: 1;
      border: none;
      padding: 9px 16px;
      border-radius: var(--radius-pill);
      font-size: 0.84rem;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-card-toggle.connect {
      background: var(--primary);
      color: #052e16;
    }

    .btn-card-toggle.connect:hover {
      background: var(--primary-hover);
    }

    .btn-card-toggle.disconnect {
      background: var(--bg-subtle);
      border: 1px solid var(--border-light);
      color: var(--text-white);
    }

    .btn-card-toggle.disconnect:hover {
      border-color: var(--danger);
      color: var(--danger);
      background: var(--danger-dim);
    }

    .btn-card-trash {
      background: transparent;
      border: 1px solid var(--border-light);
      color: var(--text-dark);
      cursor: pointer;
      font-size: 1rem;
      width: 38px;
      height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-pill);
      transition: all 0.2s ease;
      flex-shrink: 0;
    }

    .btn-card-trash:hover {
      color: var(--danger);
      background: var(--danger-dim);
      border-color: rgba(239, 68, 68, 0.3);
    }

    .card-head-v2 {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .card-head-v2 {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .card-head-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
      flex: 1;
    }

    .card-name-v2 {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: -0.015em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.25;
    }

    .card-created-v2 {
      font-size: 0.58rem;
      font-weight: 600;
      color: var(--text-dark);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      opacity: 0.85;
    }

    .btn-card-trash-top {
      background: transparent;
      border: none;
      color: var(--text-dark);
      cursor: pointer;
      font-size: 1.15rem;
      width: 32px;
      height: 32px;
      border-radius: var(--radius-pill);
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .btn-card-trash-top:hover {
      color: var(--danger);
      background: var(--danger-dim);
    }

    .btn-card-trash-top.disabled-paid {
      opacity: 0.35;
      cursor: not-allowed;
    }

    .btn-card-trash-top.disabled-paid:hover {
      color: var(--text-dark);
      background: transparent;
    }

    .card-id-section {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .card-id-label {
      font-size: 0.68rem;
      font-weight: 600;
      color: var(--text-dark);
      letter-spacing: 0.4px;
    }

    .card-id-val-wrap {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      width: fit-content;
      transition: all 0.15s ease;
    }

    .card-id-val {
      font-family: 'Space Mono', monospace;
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: 0.3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color 0.15s ease;
    }

    .card-id-val-wrap:hover .card-id-val {
      color: var(--primary);
    }

    .card-id-copy-icon {
      font-size: 0.88rem;
      color: var(--text-dark);
      flex-shrink: 0;
      transition: color 0.15s ease;
    }

    .card-id-val-wrap:hover .card-id-copy-icon {
      color: var(--primary);
    }

    .card-conn-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 2px 0;
    }

    .card-conn-status {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .card-conn-avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.95rem;
      color: var(--text-dark);
      flex-shrink: 0;
      overflow: hidden;
      transition: all 0.2s ease;
    }

    .card-conn-avatar.online {
      background: rgba(57, 186, 118, 0.14);
      border-color: rgba(57, 186, 118, 0.35);
      color: #39BA76;
      box-shadow: 0 0 8px rgba(57, 186, 118, 0.3);
    }

    .card-conn-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
      display: block;
    }

    .card-conn-number {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: -0.2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-conn-number.active {
      color: var(--text-white);
      font-weight: 700;
    }

    .btn-card-manage {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 30px;
      padding: 0 14px;
      border-radius: var(--radius-pill);
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: var(--text-white);
      font-size: 0.74rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .btn-card-manage:hover {
      background: rgba(57, 186, 118, 0.1);
      border-color: var(--primary);
      color: var(--primary);
    }

    .card-actions-v2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      width: 100%;
      padding-top: 2px;
    }

    .btn-card-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      height: 38px;
      width: 100%;
      box-sizing: border-box;
      padding: 0 12px;
      border-radius: var(--radius-pill);
      font-size: 0.74rem;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .btn-card-action i {
      font-size: 1rem;
    }

    .btn-card-action.reset {
      background: transparent;
      border: 1px solid rgba(245, 158, 11, 0.3);
      color: #f59e0b;
    }

    .btn-card-action.reset:hover {
      background: rgba(245, 158, 11, 0.12);
      border-color: #f59e0b;
      color: #fbbf24;
    }

    .btn-card-action.disconnect {
      background: transparent;
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: #ef4444;
    }

    .btn-card-action.disconnect:hover {
      background: rgba(239, 68, 68, 0.12);
      border-color: #ef4444;
      color: #f87171;
    }

    .btn-card-action.connect {
      background: #39BA76;
      border: 1px solid #39BA76;
      color: #052e16;
      font-weight: 800;
      box-shadow: 0 2px 8px rgba(57, 186, 118, 0.25);
    }

    .btn-card-action.connect:hover {
      background: #2ea366;
      border-color: #2ea366;
      box-shadow: 0 4px 14px rgba(57, 186, 118, 0.35);
    }

    html[data-theme="light"] .instance-card {
      background: #ffffff;
      border: 1px solid #e2e8f0;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    }
    html[data-theme="light"] .instance-card:hover {
      border-color: #cbd5e1;
      box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
    }
    html[data-theme="light"] .card-name-v2 {
      color: #0f172a;
    }
    html[data-theme="light"] .card-created-v2 {
      color: #64748b;
    }
    html[data-theme="light"] .btn-card-trash-top {
      color: #64748b;
    }
    html[data-theme="light"] .btn-card-trash-top:hover {
      color: #ef4444;
      background: #fee2e2;
    }
    html[data-theme="light"] .card-sub-strip.paid {
      background: #f0fdf4;
      border-color: #bbf7d0;
    }
    html[data-theme="light"] .card-sub-strip.stripe-active {
      background: #ecfeff;
      border-color: #a5f3fc;
    }
    html[data-theme="light"] .card-sub-strip.pending {
      background: #fffbeb;
      border-color: #fde68a;
    }
    html[data-theme="light"] .card-sub-strip.trial {
      background: #faf5ff;
      border-color: #e9d5ff;
    }
    html[data-theme="light"] .sub-strip-title {
      color: #0f172a !important;
    }
    html[data-theme="light"] .sub-strip-desc {
      color: #64748b;
    }
    html[data-theme="light"] .sub-strip-btn.paid {
      background: #16a34a;
      border-color: #16a34a;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(22, 163, 74, 0.2);
    }
    html[data-theme="light"] .sub-strip-btn.paid:hover {
      background: #15803d;
      border-color: #15803d;
    }
    html[data-theme="light"] .sub-strip-btn.pending {
      background: #f59e0b;
      border-color: #f59e0b;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
    }
    html[data-theme="light"] .card-id-label {
      color: #64748b;
    }
    html[data-theme="light"] .card-id-val {
      color: #0f172a;
    }
    html[data-theme="light"] .card-id-val-wrap:hover .card-id-val {
      color: #16a34a;
    }
    html[data-theme="light"] .card-id-copy-icon {
      color: #94a3b8;
    }
    html[data-theme="light"] .card-id-val-wrap:hover .card-id-copy-icon {
      color: #16a34a;
    }
    html[data-theme="light"] .card-conn-avatar {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .card-conn-avatar.online {
      background: #dcfce7;
      border-color: #86efac;
      color: #16a34a;
      box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
    }
    html[data-theme="light"] .card-conn-number {
      color: #64748b;
    }
    html[data-theme="light"] .card-conn-number.active {
      color: #0f172a;
    }
    html[data-theme="light"] .btn-card-manage {
      background: transparent;
      border-color: #cbd5e1;
      color: #334155;
    }
    html[data-theme="light"] .btn-card-manage:hover {
      background: rgba(22, 163, 74, 0.08);
      border-color: #16a34a;
      color: #16a34a;
    }
    html[data-theme="light"] .btn-card-action.reset {
      background: transparent;
      border-color: rgba(217, 119, 6, 0.4);
      color: #d97706;
    }
    html[data-theme="light"] .btn-card-action.reset:hover {
      background: #fef3c7;
      border-color: #d97706;
    }
    html[data-theme="light"] .btn-card-action.disconnect {
      background: transparent;
      border-color: rgba(220, 38, 38, 0.4);
      color: #dc2626;
    }
    html[data-theme="light"] .btn-card-action.disconnect:hover {
      background: #fee2e2;
      border-color: #dc2626;
    }
    html[data-theme="light"] .btn-card-action.connect {
      background: #16a34a;
      border-color: #16a34a;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
    }
    html[data-theme="light"] .btn-card-action.connect:hover {
      background: #15803d;
      border-color: #15803d;
      box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
    }

    #modal-manage {
      justify-content: flex-end;
      align-items: stretch;
      padding: 0;
    }

    #modal-manage .modal-manage-dialog {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 26px;
      width: 620px;
      max-width: 96vw;
      height: calc(100vh - 28px);
      margin: 14px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: -20px 0 60px rgba(0, 0, 0, 0.75);
      opacity: 0;
      transform: translateX(105%);
      transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }

    #modal-manage.active .modal-manage-dialog {
      opacity: 1;
      transform: translateX(0);
      animation: modalSlideFromRight 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes modalSlideFromRight {
      0% {
        opacity: 0;
        transform: translateX(100%);
      }
      100% {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .drawer-header {
      padding: 20px 22px 18px 22px;
      background: rgba(255, 255, 255, 0.015);
      border-bottom: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 12px;
      flex-shrink: 0;
    }

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

    .drawer-category-label {
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.8px;
      color: var(--text-dark);
      text-transform: uppercase;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .drawer-header-id-badge {
      font-family: 'Space Mono', monospace;
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--primary);
      background: rgba(57, 186, 118, 0.12);
      border: 1px solid rgba(57, 186, 118, 0.28);
      padding: 3px 9px;
      border-radius: 6px;
      letter-spacing: 0.3px;
      cursor: pointer;
      transition: all 0.2s ease;
      text-transform: none;
    }

    .drawer-header-id-badge:hover {
      background: rgba(57, 186, 118, 0.22);
      border-color: rgba(57, 186, 118, 0.5);
    }

    .drawer-header-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .drawer-nav-btn {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      color: var(--text-muted);
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.95rem;
      transition: all 0.2s ease;
    }

    .drawer-nav-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-white);
      border-color: var(--text-muted);
    }

    .drawer-close-btn {
      background: transparent;
      border: none;
      color: var(--text-dark);
      font-size: 1.25rem;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .drawer-close-btn:hover {
      color: var(--text-white);
      background: rgba(255, 255, 255, 0.08);
    }

    .drawer-title-block {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .drawer-instance-name {
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.02em;
      line-height: 1.2;
      word-break: break-word;
    }

    .drawer-id-section {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .drawer-id-label {
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--text-dark);
      letter-spacing: 0.2px;
    }

    .drawer-instance-meta-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    .drawer-instance-id {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text-muted);
      letter-spacing: 0.5px;
      font-family: 'Space Mono', monospace;
      cursor: pointer;
      transition: color 0.15s ease;
    }

    .drawer-instance-id:hover {
      color: var(--primary);
    }

    .drawer-meta-divider {
      color: var(--text-dark);
      font-size: 0.8rem;
    }

    .drawer-created-text {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 0.78rem;
      color: var(--text-dark);
      font-weight: 600;
    }

    .drawer-created-text strong {
      color: var(--text-muted);
      font-weight: 700;
    }

    .drawer-profile-label {
      font-size: 0.68rem;
      font-weight: 800;
      color: var(--text-dark);
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-bottom: 2px;
    }

    .drawer-profile-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 14px;
    }

    .drawer-profile-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .drawer-avatar-icon {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(57, 186, 118, 0.12);
      border: 1px solid rgba(57, 186, 118, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      color: #39ba76;
      flex-shrink: 0;
      overflow: hidden;
    }

    .drawer-avatar-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
      display: block;
    }

    .drawer-avatar-icon.disconnected {
      background: rgba(148, 163, 184, 0.1);
      border-color: var(--border);
      color: var(--text-dark);
    }

    .drawer-profile-info {
      display: flex;
      flex-direction: column;
      line-height: 1.2;
      min-width: 0;
    }

    .drawer-profile-name {
      font-size: 0.86rem;
      font-weight: 700;
      color: var(--text-white);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .drawer-profile-phone {
      font-size: 0.74rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .drawer-quick-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .btn-drawer-quick {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: var(--radius-pill);
      font-size: 0.74rem;
      font-weight: 700;
      border: 1px solid var(--border);
      background: var(--bg-card);
      color: var(--text-white);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-drawer-quick:hover {
      background: var(--bg-subtle);
    }

    .btn-drawer-quick.connect {
      background: rgba(57, 186, 118, 0.15);
      border-color: rgba(57, 186, 118, 0.4);
      color: #39ba76;
    }

    .btn-drawer-quick.disconnect {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
      color: #ef4444;
    }

    .btn-drawer-quick.reset {
      background: rgba(245, 158, 11, 0.08);
      border-color: rgba(245, 158, 11, 0.25);
      color: #f59e0b;
    }

    .btn-drawer-quick.reset:hover {
      background: rgba(245, 158, 11, 0.18);
      border-color: rgba(245, 158, 11, 0.45);
      color: #fbbf24;
    }

    .drawer-meta-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .drawer-sub-strip-wrap {
      width: 100%;
      margin-top: 2px;
    }

    .drawer-meta-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .drawer-meta-item .meta-label {
      font-size: 0.65rem;
      font-weight: 700;
      color: var(--text-dark);
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .drawer-meta-item .meta-val {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--text-white);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .drawer-content-split {
      display: flex;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .drawer-tabs-vertical {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 62px;
      flex-shrink: 0;
      padding: 18px 8px;
      background: rgba(0, 0, 0, 0.12);
      border-right: 1px solid var(--border);
      overflow-y: auto;
      scrollbar-width: none;
    }

    .drawer-tabs-vertical::-webkit-scrollbar {
      display: none;
    }

    .drawer-tab-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      height: 42px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid transparent;
      color: var(--text-muted);
      font-size: 1.25rem;
      cursor: pointer;
      position: relative;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      flex-shrink: 0;
    }

    .drawer-tab-link:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-white);
      transform: scale(1.05);
    }

    .drawer-tab-link.active {
      background: rgba(34, 197, 94, 0.15);
      color: #22c55e;
      border-color: rgba(34, 197, 94, 0.4);
      box-shadow: 0 0 16px rgba(34, 197, 94, 0.18);
    }

    .drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 18px 22px 36px 22px;
      display: flex;
      flex-direction: column;
      -webkit-overflow-scrolling: touch;
    }

    .drawer-body::-webkit-scrollbar {
      width: 5px;
    }

    .drawer-body::-webkit-scrollbar-thumb {
      background: var(--border-light);
      border-radius: 4px;
    }

    .manage-tab-pane {
      display: none;
      flex-direction: column;
      flex: 1;
      min-height: 0;
    }

    .manage-tab-pane.active {
      display: flex;
    }

    @media (max-width: 640px) {
      #modal-manage .modal-manage-dialog {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
      }
      .drawer-header {
        padding: 14px 14px 12px 14px;
        gap: 10px;
      }
      .drawer-tabs-vertical {
        width: 52px;
        padding: 12px 6px;
        gap: 8px;
      }
      .drawer-tab-link {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
      }
      .drawer-body {
        padding: 14px 14px;
      }
      .drawer-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }
      .two-col-inputs {
        grid-template-columns: 1fr;
      }
      .row-dest-delay {
        flex-direction: column;
        align-items: stretch;
      }
      .delay-box {
        width: 100%;
      }
      .health-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }
      .btn-drawer-quick {
        padding: 5px 9px;
        font-size: 0.72rem;
      }
      .card-actions-v2 {
        gap: 8px;
      }
      .btn-card-action {
        font-size: 0.78rem;
        padding: 9px 8px;
        gap: 6px;
      }
    }

    @media (max-width: 420px) {
      .drawer-header {
        padding: 12px 12px 0 12px;
      }
      .drawer-body {
        padding: 12px 12px;
      }
      .drawer-profile-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 10px;
      }
      .drawer-quick-actions {
        justify-content: flex-end;
        width: 100%;
      }
      .drawer-title-row {
        flex-wrap: wrap;
        gap: 8px;
      }
      .health-cards-grid {
        grid-template-columns: 1fr;
      }
      .drawer-tab-link {
        padding: 6px 10px;
        font-size: 0.72rem;
      }
    }

    .pane-form-body {
      display: flex;
      flex-direction: column;
      gap: 14px;
      width: 100%;
    }

    .setting-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      transition: all 0.2s ease;
    }

    .setting-card.row-between {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .setting-card-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-white);
    }

    .setting-card-desc {
      font-size: 0.76rem;
      color: var(--text-dark);
      line-height: 1.35;
    }

    .setting-input {
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      color: var(--text-white);
      padding: 10px 18px;
      font-size: 0.88rem;
      width: 100%;
      height: 42px;
      box-sizing: border-box;
      transition: all 0.2s ease;
    }

    .setting-input:focus {
      border-color: var(--primary);
      background: var(--bg-card);
      outline: none;
      box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    }

    .token-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 6px;
    }

    .token-mono {
      font-family: 'Space Mono', monospace;
      font-size: 0.82rem;
      letter-spacing: 1.5px;
      flex: 1;
    }

    .btn-icon-toggle {
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      color: var(--text-muted);
      border-radius: var(--radius-pill);
      width: 42px;
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      cursor: pointer;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }

    .btn-icon-toggle:hover {
      color: var(--text-white);
      background: var(--bg-card);
      border-color: var(--text-muted);
    }

    .btn-token-generate {
      background: transparent;
      border: 1px solid rgba(34, 197, 94, 0.4);
      color: var(--primary);
      font-size: 0.8rem;
      font-weight: 700;
      padding: 0 18px;
      height: 42px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .btn-token-generate:hover {
      background: rgba(34, 197, 94, 0.12);
      border-color: var(--primary);
    }

    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 44px;
      height: 24px;
      flex-shrink: 0;
    }

    .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background-color: var(--border-light);
      transition: 0.25s ease;
      border-radius: 24px;
    }

    .slider:before {
      position: absolute;
      content: "";
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: 0.25s ease;
      border-radius: 50%;
    }

    input:checked + .slider {
      background-color: var(--primary);
    }

    input:checked + .slider:before {
      transform: translateX(20px);
    }

    .pane-footer-right {
      display: flex;
      justify-content: flex-end;
      margin-top: 14px;
      padding-top: 10px;
      padding-bottom: 24px;
    }

    .btn-pane-save {
      background: var(--primary);
      color: #052e16 !important;
      border: none;
      font-size: 0.86rem;
      font-weight: 800;
      padding: 11px 26px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: none !important;
    }

    .btn-pane-save:hover {
      background: var(--primary-hover);
      transform: translateY(-1px);
    }

    .proxy-info-box {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      background: rgba(6, 182, 212, 0.06);
      border: 1px solid rgba(6, 182, 212, 0.22);
      border-radius: 14px;
      padding: 12px 14px;
      color: #38bdf8;
      font-size: 0.78rem;
      line-height: 1.45;
    }

    .proxy-info-box i {
      font-size: 1.25rem;
      color: #38bdf8;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .proxy-card-panel {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 16px;
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-shadow: none;
      transition: all 0.2s ease;
    }

    html[data-theme="light"] .proxy-card-panel {
      background: #f8fafc;
      border-color: #e2e8f0;
    }

    .proxy-card-panel.active-glow {
      border-color: rgba(34, 197, 94, 0.4);
      box-shadow: none;
    }

    .proxy-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    html[data-theme="light"] .proxy-panel-header {
      border-bottom-color: #e2e8f0;
    }

    .proxy-header-info {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .proxy-header-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: rgba(148, 163, 184, 0.1);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      color: var(--text-dark);
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .proxy-header-icon.active {
      background: rgba(34, 197, 94, 0.12);
      border-color: rgba(34, 197, 94, 0.35);
      color: var(--primary);
    }

    .proxy-header-title {
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--text-white);
      margin: 0;
      line-height: 1.25;
    }

    .proxy-header-subtitle {
      font-size: 0.74rem;
      color: var(--text-dark);
      margin: 2px 0 0 0;
      line-height: 1.25;
    }

    .proxy-header-switch {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .proxy-switch-status {
      font-size: 0.76rem;
      font-weight: 700;
      color: var(--text-dark);
      letter-spacing: 0.3px;
      text-transform: uppercase;
      transition: color 0.2s ease;
    }

    .proxy-switch-status.active {
      color: var(--primary);
    }

    .proxy-fields-body {
      display: flex;
      flex-direction: column;
      gap: 14px;
      transition: opacity 0.2s ease;
    }

    .proxy-form-row {
      display: grid;
      gap: 12px;
    }

    .proxy-form-row.two-cols-unequal {
      grid-template-columns: 140px 1fr;
    }

    .proxy-form-row.two-cols-equal {
      grid-template-columns: 1fr 1fr;
    }

    .label-optional {
      font-size: 0.72rem;
      font-weight: 500;
      color: var(--text-dark);
    }

    .form-group-custom {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-group-custom label {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: 0.2px;
    }

    .input-with-icon {
      display: flex;
      align-items: center;
      position: relative;
      width: 100%;
    }

    .input-with-icon i {
      position: absolute;
      left: 16px;
      color: var(--text-dark);
      font-size: 1.15rem;
      pointer-events: none;
      transition: color 0.2s ease;
      z-index: 2;
    }

    .input-with-icon .setting-input {
      padding-left: 44px;
      padding-right: 18px;
    }

    .setting-select {
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
      background-repeat: no-repeat;
      background-position: right 16px center;
      padding-right: 38px;
    }

    .setting-select option {
      background: var(--bg-card);
      color: var(--text-white);
    }

    .input-with-icon:focus-within i {
      color: var(--primary);
    }

    .test-console-card {
      gap: 16px;
    }

    .test-endpoint-strip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 14px;
      background: rgba(37, 99, 235, 0.08);
      border: 1px solid rgba(37, 99, 235, 0.22);
      border-radius: 12px;
    }

    html[data-theme="light"] .test-endpoint-strip {
      background: #eff6ff;
      border-color: #bfdbfe;
    }

    .test-endpoint-info {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .badge-post-pill {
      background: #2563eb;
      color: #ffffff;
      font-size: 0.68rem;
      font-weight: 800;
      padding: 3px 8px;
      border-radius: 6px;
      letter-spacing: 0.6px;
      line-height: 1;
    }

    .test-endpoint-path {
      font-family: 'Space Mono', monospace;
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: 0.3px;
    }

    html[data-theme="light"] .test-endpoint-path {
      color: #1e3a8a;
    }

    .test-endpoint-hint {
      font-size: 0.76rem;
      color: var(--text-dark);
      font-weight: 500;
    }

    .row-dest-delay {
      display: grid;
      grid-template-columns: 1fr 140px;
      gap: 12px;
      align-items: flex-end;
    }

    @media (max-width: 520px) {
      .row-dest-delay {
        grid-template-columns: 1fr;
      }
    }

    .delay-box {
      width: 100%;
    }

    .counter-input-modern {
      display: flex;
      align-items: center;
      background: #191b24;
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      height: 42px;
      overflow: hidden;
      padding: 0 4px;
      transition: all 0.2s ease;
    }

    html[data-theme="light"] .counter-input-modern {
      background: #ffffff;
      border-color: #cbd5e1;
    }

    .counter-input-modern:focus-within {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(57, 186, 118, 0.12);
    }

    .counter-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      width: 34px;
      height: 34px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 0.95rem;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s ease;
    }

    .counter-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-white);
    }

    html[data-theme="light"] .counter-btn:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    .counter-input-modern input {
      flex: 1;
      width: 100%;
      min-width: 0;
      text-align: center;
      border: none;
      background: transparent;
      color: var(--text-white);
      font-weight: 700;
      font-size: 0.92rem;
      outline: none;
    }

    html[data-theme="light"] .counter-input-modern input {
      color: #0f172a;
    }

    .textarea-modern-wrap {
      width: 100%;
    }

    .setting-textarea-modern {
      width: 100%;
      background: #191b24;
      border: 1px solid var(--border);
      border-radius: 14px;
      color: var(--text-white);
      padding: 12px 16px;
      font-size: 0.88rem;
      resize: vertical;
      font-family: inherit;
      box-sizing: border-box;
      outline: none;
      transition: all 0.2s ease;
      line-height: 1.5;
    }

    html[data-theme="light"] .setting-textarea-modern {
      background: #ffffff;
      border-color: #cbd5e1;
      color: #0f172a;
    }

    .setting-textarea-modern:focus {
      border-color: var(--primary);
      background: #1c1e28;
      box-shadow: 0 0 0 3px rgba(57, 186, 118, 0.12);
    }

    html[data-theme="light"] .setting-textarea-modern:focus {
      background: #ffffff;
    }

    .btn-test-send {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 28px;
      font-size: 0.88rem;
    }

    .history-top-action {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 12px;
    }

    .btn-refresh-history {
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      color: var(--text-muted);
      padding: 6px 14px;
      border-radius: var(--radius-pill);
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s ease;
    }

    .btn-refresh-history:hover {
      color: var(--text-white);
      background: var(--bg-card);
      border-color: var(--border-light);
    }

    .history-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }

    .history-summary-stats {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .history-stat-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px;
      border-radius: var(--radius-pill);
      font-size: 0.78rem;
      font-weight: 600;
      border: 1px solid var(--border);
      background: var(--bg-subtle);
      color: var(--text-muted);
    }

    .history-stat-chip.total {
      color: var(--text-dark);
    }

    .history-stat-chip.active {
      background: rgba(34, 197, 94, 0.12);
      border-color: rgba(34, 197, 94, 0.3);
      color: #22c55e;
    }

    .history-table-container {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 16px;
      overflow-x: auto;
      overflow-y: hidden;
      margin-bottom: 24px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
      scrollbar-width: thin;
    }

    .history-table {
      width: 100%;
      min-width: 520px;
      border-collapse: separate;
      border-spacing: 0;
      text-align: left;
    }

    .history-table th {
      background: rgba(255, 255, 255, 0.02);
      font-size: 0.68rem;
      color: var(--text-dark);
      font-weight: 700;
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
      letter-spacing: 0.8px;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .history-table td {
      font-size: 0.82rem;
      color: var(--text-white);
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      transition: background 0.18s ease;
      white-space: nowrap;
    }

    .history-table tbody tr:last-child td {
      border-bottom: none;
    }

    .history-table tbody tr:hover td {
      background: rgba(255, 255, 255, 0.02);
    }

    .history-row-active td {
      background: rgba(34, 197, 94, 0.03);
    }

    .history-phone-cell {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .history-phone-icon {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: rgba(37, 211, 102, 0.14);
      color: #25d366;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
    }

    .history-phone-number {
      font-family: 'Space Mono', monospace;
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: 0.2px;
    }

    .history-date-cell {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .history-date-main {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-white);
    }

    .history-date-sub {
      font-size: 0.72rem;
      color: var(--text-dark);
      font-family: 'Space Mono', monospace;
    }

    .history-duration-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px;
      border-radius: var(--radius-pill);
      font-size: 0.78rem;
      font-weight: 700;
      font-family: 'Space Mono', monospace;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border);
      color: var(--text-muted);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .history-duration-badge.live {
      background: rgba(34, 197, 94, 0.12);
      border-color: rgba(34, 197, 94, 0.35);
      color: #22c55e;
    }

    .history-badge-live {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 9px;
      border-radius: var(--radius-pill);
      font-size: 0.72rem;
      font-weight: 700;
      background: rgba(34, 197, 94, 0.15);
      border: 1px solid rgba(34, 197, 94, 0.35);
      color: #22c55e;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .pulse-dot-sm {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #22c55e;
      box-shadow: 0 0 8px #22c55e;
      animation: pulseSmall 1.8s infinite;
    }

    @keyframes pulseSmall {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(0.85); }
    }

    .empty-history-cell {
      text-align: center;
      padding: 46px 18px !important;
      color: var(--text-dark) !important;
      font-style: italic;
      font-size: 0.85rem;
    }

    .empty-history-cell i {
      display: block;
      font-size: 1.8rem;
      margin-bottom: 8px;
      color: var(--text-dark);
      opacity: 0.6;
    }

    .health-feedback-state {
      text-align: center;
      padding: 50px 20px;
      color: var(--text-dark);
      font-size: 0.88rem;
    }

    .health-feedback-state i {
      font-size: 2rem;
      display: block;
      margin-bottom: 12px;
      color: var(--primary);
    }

    .health-feedback-state.warning i {
      color: #f59e0b;
    }

    .health-feedback-state.warning span {
      display: inline-block;
      max-width: 380px;
      line-height: 1.5;
      color: var(--text-muted);
    }

    .bh-status-hero {
      padding: 20px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      border: 1px solid var(--border-light);
      border-radius: 16px;
      margin-bottom: 14px;
      position: relative;
      overflow: hidden;
      transition: all 0.25s ease;
    }

    .bh-status-left {
      display: flex;
      align-items: center;
      gap: 14px;
      position: relative;
      z-index: 1;
    }

    .bh-status-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      border: 1px solid transparent;
      flex-shrink: 0;
    }

    .bh-status-label {
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text-dark);
      margin-bottom: 4px;
    }

    .bh-status-value {
      font-family: 'Outfit', sans-serif;
      font-size: 1.35rem;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 4px;
    }

    .bh-status-desc {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.35;
      max-width: 320px;
    }

    .bh-status-phone {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: 'Space Mono', monospace;
      font-size: 0.8rem;
      font-weight: 700;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border);
      padding: 6px 14px;
      border-radius: var(--radius-pill);
      color: var(--text-white);
      white-space: nowrap;
    }

    .bh-metrics-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 14px;
    }

    .bh-metric-block {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 14px;
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      cursor: default;
      transition: all 0.2s ease;
    }

    .bh-metric-block:hover {
      background: rgba(255, 255, 255, 0.03);
      border-color: var(--border);
      transform: translateY(-2px);
    }

    .bh-metric-icon {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--text-dark);
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      margin-bottom: 10px;
    }

    .bh-metric-value {
      font-family: 'Outfit', sans-serif;
      font-size: 1.9rem;
      font-weight: 800;
      line-height: 1;
      margin-bottom: 6px;
      color: var(--text-white);
    }

    .bh-metric-sub {
      font-size: 0.74rem;
      color: var(--text-dark);
      line-height: 1.35;
    }

    .bh-metric-block.budget-high .bh-metric-value { color: #22c55e; }
    .bh-metric-block.budget-med .bh-metric-value  { color: #f59e0b; }
    .bh-metric-block.budget-low .bh-metric-value  { color: #ef4444; }

    .bh-temp-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: var(--radius-pill);
      font-size: 0.76rem;
      font-weight: 700;
      width: fit-content;
      margin-top: 4px;
      font-family: 'Outfit', sans-serif;
    }

    .bh-temp-pill.cold {
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.3);
      color: #22c55e;
    }

    .bh-temp-pill.warm {
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.3);
      color: #f59e0b;
    }

    .bh-temp-pill.hot {
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: #ef4444;
    }

    .bh-score-bar-wrap {
      margin-top: 8px;
    }

    .bh-score-bar-track {
      height: 6px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: var(--radius-pill);
      overflow: hidden;
    }

    .bh-score-bar-fill {
      height: 100%;
      border-radius: var(--radius-pill);
      transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
      background: #22c55e;
    }

    .bh-score-labels {
      display: flex;
      justify-content: space-between;
      font-size: 0.65rem;
      color: var(--text-dark);
      margin-top: 4px;
      font-weight: 600;
    }

    .bh-details-toggle {
      width: 100%;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 12px;
      color: var(--text-muted);
      font-size: 0.82rem;
      font-weight: 600;
      padding: 12px 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      transition: all 0.2s ease;
    }

    .bh-details-toggle:hover {
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-white);
    }

    .bh-details-toggle.open {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      border-bottom-color: transparent;
      margin-bottom: 0;
    }

    .bh-chevron {
      transition: transform 0.25s ease;
      font-size: 1rem;
    }

    .bh-details-toggle.open .bh-chevron {
      transform: rotate(180deg);
    }

    .bh-details-panel {
      display: none;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-top: none;
      border-bottom-left-radius: 14px;
      border-bottom-right-radius: 14px;
      padding: 0 18px 18px;
      margin-bottom: 14px;
    }

    .bh-details-panel.open {
      display: block;
      animation: fadeIn 0.25s ease;
    }

    .bh-details-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 10px;
      padding-top: 10px;
    }

    .bh-detail-item {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      transition: background 0.18s ease;
    }

    .bh-detail-item:hover {
      background: rgba(255, 255, 255, 0.04);
    }

    .bh-detail-label {
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-dark);
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .bh-detail-val {
      font-family: 'Outfit', sans-serif;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-white);
      line-height: 1.1;
    }

    .bh-detail-desc {
      font-size: 0.7rem;
      color: var(--text-dark);
      margin-top: 3px;
      line-height: 1.25;
    }

    .bh-disclaimer-box {
      display: flex;
      gap: 12px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px 16px;
      margin-top: 14px;
      font-size: 0.74rem;
      color: var(--text-dark);
      line-height: 1.5;
    }

    .bh-disclaimer-box i {
      font-size: 1.3rem;
      color: var(--text-muted);
      flex-shrink: 0;
      margin-top: 1px;
    }

    .bh-disclaimer-box strong {
      color: var(--text-muted);
      font-weight: 700;
    }

    .bh-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 6px 0;
    }

    .bh-footer-status {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.76rem;
      color: var(--text-dark);
    }

    html[data-theme="light"] .bh-status-hero {
      background: #ffffff;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .bh-metric-block {
      background: #ffffff;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .bh-metric-value {
      color: #0f172a;
    }
    html[data-theme="light"] .bh-status-phone {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #0f172a;
    }
    html[data-theme="light"] .bh-details-toggle {
      background: #ffffff;
      border-color: #e2e8f0;
      color: #475569;
    }
    html[data-theme="light"] .bh-details-panel {
      background: #ffffff;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .bh-detail-item {
      background: #f8fafc;
      border-color: #e2e8f0;
    }
    html[data-theme="light"] .bh-detail-val {
      color: #0f172a;
    }
    html[data-theme="light"] .bh-disclaimer-box {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .bh-score-bar-track {
      background: #e2e8f0;
    }




    .btn-action-primary {
      flex: 1;
      width: 100%;
      background: var(--primary);
      color: #052e16;
      border: none;
      padding: 9px 16px;
      border-radius: var(--radius-pill);
      font-size: 0.84rem;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-action-primary:hover {
      background: var(--primary-hover);
    }

    .btn-action-outline {
      flex: 1;
      background: transparent;
      border: 1px solid var(--border-light);
      color: var(--text-white);
      padding: 10px 18px;
      border-radius: var(--radius-pill);
      font-size: 0.88rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-action-outline:hover {
      background: var(--bg-subtle);
      border-color: var(--text-muted);
    }

    .empty-state {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 20px;
      text-align: center;
      gap: 16px;
      background: transparent;
      border: none;
    }

    .empty-state i {
      font-size: 3.5rem;
      color: var(--text-dark);
    }

    .empty-state h3 {
      font-size: 1.35rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: -0.3px;
    }

    .empty-state p {
      color: var(--text-muted);
      font-size: 0.95rem;
      max-width: 540px;
      line-height: 1.6;
    }

    .empty-scene {
      position: relative;
      width: 250px;
      height: 150px;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 8px;
    }

    .empty-scene .qr-card {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 106px;
      height: 106px;
      background: #fff;
      border-radius: 14px;
      padding: 10px;
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      grid-template-rows: repeat(7, 1fr);
      gap: 2px;
      box-shadow: 0 0 0 1px rgba(16,185,129,0.2), 0 8px 32px rgba(0,0,0,0.4);
      animation: empty-qr-pulse 3s ease-in-out infinite;
    }
    @keyframes empty-qr-pulse {
      0%,100% { box-shadow: 0 0 0 1px rgba(16,185,129,0.2), 0 8px 32px rgba(0,0,0,.4); }
      50%      { box-shadow: 0 0 0 2px rgba(16,185,129,0.6), 0 8px 32px rgba(16,185,129,.15); }
    }

    .empty-scene .qr-card .cell { border-radius: 1.5px; background: #1a1a1a; }
    .empty-scene .qr-card .cell.empty { background: transparent; }
    .empty-scene .qr-card .corner { background: #111; border-radius: 2px; }
    .empty-scene .qr-card .corner-dot { background: #10B981; border-radius: 1px; }

    .empty-scene .scan-line {
      position: absolute;
      left: 18px;
      width: 90px;
      height: 2px;
      background: linear-gradient(90deg, transparent, #10B981, #10B981, transparent);
      border-radius: 1px;
      box-shadow: 0 0 8px #10B981, 0 0 20px rgba(16,185,129,.5);
      animation: empty-scan 2.4s ease-in-out infinite;
      top: calc(50% - 53px + 10px);
    }
    @keyframes empty-scan {
      0%   { transform: translateY(0); opacity: 1; }
      85%  { transform: translateY(86px); opacity: 1; }
      100% { transform: translateY(86px); opacity: 0; }
    }

    .empty-scene .phone {
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
      width: 68px;
      height: 124px;
      background: #1C1E26;
      border-radius: 18px;
      border: 2.5px solid #2D3039;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding-top: 12px;
      animation: empty-phone-float 4s ease-in-out infinite;
      overflow: hidden;
    }
    @keyframes empty-phone-float {
      0%,100% { transform: translateY(-50%) rotate(0deg); }
      30%     { transform: translateY(calc(-50% - 5px)) rotate(-2deg); }
      70%     { transform: translateY(calc(-50% + 3px)) rotate(1deg); }
    }

    .empty-scene .phone::before {
      content: '';
      position: absolute;
      top: 6px;
      width: 20px; height: 4px;
      background: #2D3039;
      border-radius: 3px;
    }

    .empty-scene .phone-screen {
      width: 52px;
      height: 96px;
      background: #0E0F12;
      border-radius: 12px;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
      position: relative;
    }

    .empty-scene .mini-qr {
      width: 36px; height: 36px;
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      grid-template-rows: repeat(5, 1fr);
      gap: 1.5px;
      animation: empty-mini-qr 3s ease-in-out infinite;
    }
    @keyframes empty-mini-qr {
      0%,20% { opacity: 0.2; transform: scale(0.9); }
      40%,60% { opacity: 1; transform: scale(1); }
      80%,100% { opacity: 0.2; transform: scale(0.9); }
    }
    .empty-scene .mini-qr .mc { background: #10B981; border-radius: 1px; }
    .empty-scene .mini-qr .me { background: transparent; }

    .empty-scene .scan-frame {
      position: absolute;
      width: 42px; height: 42px;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
    }
    .empty-scene .scan-frame::before, .empty-scene .scan-frame::after,
    .empty-scene .sf-tl, .empty-scene .sf-br {
      content: '';
      position: absolute;
      width: 7px; height: 7px;
      border-color: #10B981;
      border-style: solid;
    }
    .empty-scene .scan-frame::before { top: 0; left: 0; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
    .empty-scene .scan-frame::after  { top: 0; right: 0; border-width: 2px 2px 0 0; border-radius: 0 2px 0 0; }
    .empty-scene .sf-tl { bottom: 0; left: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 2px; }
    .empty-scene .sf-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; }

    .empty-scene .phone-scan-line {
      position: absolute;
      left: 4px; right: 4px;
      height: 1.5px;
      background: linear-gradient(90deg, transparent, #10B981, transparent);
      top: 10px;
      animation: empty-ph-scan 2.4s ease-in-out infinite;
    }
    @keyframes empty-ph-scan {
      0%   { top: 10px; opacity: 1; }
      85%  { top: calc(100% - 12px); opacity: 1; }
      100% { top: calc(100% - 12px); opacity: 0; }
    }

    .empty-scene .beam {
      position: absolute;
      left: 116px;
      width: 38px;
      height: 2px;
      background: linear-gradient(90deg, rgba(16,185,129,0.6), rgba(16,185,129,0.1));
      border-radius: 1px;
      top: 50%;
      transform: translateY(-50%);
      animation: empty-beam-pulse 2s ease-in-out infinite;
    }
    @keyframes empty-beam-pulse {
      0%,100% { opacity: 0.3; }
      50%      { opacity: 1; box-shadow: 0 0 8px rgba(16,185,129,.5); }
    }

    .empty-scene .particle {
      position: absolute;
      width: 4px; height: 4px;
      border-radius: 50%;
      background: #10B981;
      top: -1px;
      box-shadow: 0 0 6px #10B981;
      animation: empty-travel 2s linear infinite;
    }
    .empty-scene .particle:nth-child(2) { animation-delay: -0.7s; }
    .empty-scene .particle:nth-child(3) { animation-delay: -1.4s; }
    @keyframes empty-travel {
      0%   { left: 0; opacity: 0; }
      10%  { opacity: 1; }
      90%  { opacity: 1; }
      100% { left: 100%; opacity: 0; }
    }

    .btn-create-pill-white {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 28px;
      background: #ffffff;
      color: #0f172a;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 9999px;
      font-size: 0.95rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 4px 18px rgba(0,0,0,0.25);
      transition: all 0.2s ease;
      margin-top: 10px;
    }
    .btn-create-pill-white:hover {
      background: #f8fafc;
      transform: translateY(-2px);
      box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    }
    .btn-create-pill-white i {
      font-size: 1.15rem;
      font-weight: 700;
      color: inherit;
    }

    html[data-theme="light"] .btn-create-pill-white {
      background: #16a34a;
      color: #ffffff;
      border: 1px solid #15803d;
      box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
    }
    html[data-theme="light"] .btn-create-pill-white:hover {
      background: #15803d;
      color: #ffffff;
      box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
    }
    html[data-theme="light"] .btn-create-pill-white i {
      color: #ffffff;
    }

    .skeleton {
      background: linear-gradient(90deg, #181a22 25%, #222530 50%, #181a22 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: var(--radius-md);
    }

    html[data-theme="light"] .skeleton {
      background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
      border: 1px solid #e2e8f0;
      background-size: 200% 100%;
    }

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

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(4px);
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-backdrop.active {
      display: flex !important;
      animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes modalFadeIn {
      from { opacity: 0; backdrop-filter: blur(0px); }
      to { opacity: 1; backdrop-filter: blur(6px); }
    }

    .modal-box {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 480px;
      padding: 26px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
      animation: modalSlide 0.25s ease-out;
    }

    @keyframes modalSlide {
      from { opacity: 0; transform: translateY(12px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    #modal-confirm {
      z-index: 1200;
    }

    .modal-box-confirm {
      max-width: 440px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      padding: 32px 28px 26px 28px;
      border-radius: 20px;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    }

    .confirm-modal-icon-wrap {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.6rem;
      flex-shrink: 0;
    }

    .confirm-modal-icon-wrap.danger {
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: #ef4444;
      box-shadow: 0 0 25px rgba(239, 68, 68, 0.2);
    }

    .confirm-modal-icon-wrap.warning {
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.3);
      color: #f59e0b;
      box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
    }

    .confirm-modal-icon-wrap.primary {
      background: rgba(57, 186, 118, 0.12);
      border: 1px solid rgba(57, 186, 118, 0.3);
      color: #39BA76;
      box-shadow: 0 0 25px rgba(57, 186, 118, 0.2);
    }

    .confirm-modal-content {
      display: flex;
      flex-direction: column;
      gap: 6px;
      text-align: center;
      width: 100%;
    }

    .confirm-modal-content h3 {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.01em;
    }

    .confirm-modal-content p {
      font-size: 0.94rem;
      color: var(--text-muted);
      line-height: 1.55;
    }

    .confirm-target-chip {
      font-family: 'Space Mono', monospace;
      font-weight: 700;
      color: var(--text-white);
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 2px 7px;
      border-radius: 6px;
      display: inline-block;
      margin: 2px 0;
    }

    .confirm-modal-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      width: 100%;
      margin-top: 10px;
    }

    .btn-confirm-cancel {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 0.95rem;
      font-weight: 600;
      padding: 12px 20px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
      flex: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .btn-confirm-cancel:hover {
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-white);
    }

    .btn-confirm-proceed {
      border: none;
      font-size: 0.95rem;
      font-weight: 800;
      padding: 12px 28px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      flex: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .btn-confirm-proceed.danger {
      background: #ff2a00;
      color: #ffffff;
      box-shadow: 0 4px 18px rgba(255, 42, 0, 0.45);
    }

    .btn-confirm-proceed.danger:hover {
      background: #e62500;
      transform: translateY(-1px);
      box-shadow: 0 6px 22px rgba(255, 42, 0, 0.55);
    }

    .btn-confirm-proceed.warning {
      background: #f59e0b;
      color: #000000;
      font-weight: 800;
      box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
    }

    .btn-confirm-proceed.warning:hover {
      background: #e69004;
      transform: translateY(-1px);
      box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
    }

    .btn-confirm-proceed.neutral {
      background: #ffffff;
      color: #0f172a;
      font-weight: 800;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    }

    .btn-confirm-proceed.neutral:hover {
      background: #f1f5f9;
      transform: translateY(-1px);
    }

    .confirm-instance-name {
      display: block;
      margin: 10px 0;
      font-family: 'Space Mono', monospace;
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: 0.3px;
    }

    html[data-theme="light"] .modal-box-confirm {
      background: #ffffff;
      border-color: #e2e8f0;
      box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
    }
    html[data-theme="light"] .confirm-modal-content h3 {
      color: #0f172a;
    }
    html[data-theme="light"] .confirm-modal-content p {
      color: #475569;
    }
    html[data-theme="light"] .confirm-instance-name {
      color: #0f172a;
    }
    html[data-theme="light"] .btn-confirm-cancel {
      color: #64748b;
    }
    html[data-theme="light"] .btn-confirm-cancel:hover {
      background: #f1f5f9;
      color: #0f172a;
    }
    html[data-theme="light"] .confirm-modal-content p {
      color: #64748b;
    }
    html[data-theme="light"] .confirm-target-chip {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #0f172a;
    }
    html[data-theme="light"] .btn-confirm-cancel {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #475569;
    }
    html[data-theme="light"] .btn-confirm-cancel:hover {
      background: #e2e8f0;
      color: #0f172a;
    }

    #modal-connect {
      z-index: 1150;
    }

    .modal-box-connect {
      max-width: 620px;
      width: 100%;
      padding: 0;
      border-radius: 22px;
      background: #14161e;
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(57, 186, 118, 0.04);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .connect-modal-close {
      position: absolute;
      top: 22px;
      right: 22px;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: var(--text-dark);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.15rem;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 2;
    }

    .connect-modal-close:hover {
      color: var(--text-white);
      background: rgba(255, 255, 255, 0.12);
      transform: scale(1.06);
    }

    .connect-view-pane {
      display: none !important;
      flex-direction: column;
      width: 100%;
      padding: 22px 26px;
      animation: modalFadeIn 0.25s ease;
    }

    .connect-view-pane.active {
      display: flex !important;
    }

    .connect-choose-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
      margin-bottom: 24px;
    }

    .connect-main-icon-wrap {
      width: 60px;
      height: 60px;
      border-radius: 18px;
      background: rgba(57, 186, 118, 0.12);
      border: 1px solid rgba(57, 186, 118, 0.3);
      color: #39BA76;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.75rem;
      margin-bottom: 4px;
      box-shadow: 0 0 25px rgba(57, 186, 118, 0.2);
    }

    .connect-choose-header h2 {
      font-size: 1.5rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.02em;
    }

    .connect-choose-header p {
      font-size: 0.88rem;
      color: var(--text-muted);
      line-height: 1.4;
    }

    .connect-options-list {
      display: flex;
      flex-direction: column;
      gap: 14px;
      width: 100%;
    }

    .connect-option-card {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 18px 20px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.025);
      border: 1.5px solid rgba(255, 255, 255, 0.07);
      cursor: pointer;
      position: relative;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .connect-option-card:hover {
      background: rgba(37, 211, 102, 0.05);
      border-color: rgba(37, 211, 102, 0.45);
      transform: translateY(-2px);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    }

    .connect-option-card:active {
      transform: translateY(0) scale(0.995);
    }

    .connect-opt-icon {
      width: 52px;
      height: 52px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.55rem;
      flex-shrink: 0;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .connect-opt-icon.icon-qrcode {
      background: linear-gradient(135deg, rgba(37, 211, 102, 0.16) 0%, rgba(18, 140, 126, 0.1) 100%);
      border: 1px solid rgba(37, 211, 102, 0.3);
      color: #25D366;
    }

    .connect-option-card:hover .connect-opt-icon.icon-qrcode {
      background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
      color: #ffffff;
      box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
      transform: scale(1.05);
    }

    .connect-opt-icon.icon-pairing {
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: #0ea5e9;
    }

    .connect-option-card:hover .connect-opt-icon.icon-pairing {
      background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
      color: #ffffff;
      box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
      transform: scale(1.05);
    }

    .connect-opt-icon.icon-extension {
      background: rgba(168, 85, 247, 0.15);
      border: 1px solid rgba(168, 85, 247, 0.3);
      color: #a855f7;
    }

    .connect-option-card:hover .connect-opt-icon.icon-extension {
      background: #a855f7;
      color: #ffffff;
      box-shadow: 0 8px 20px rgba(168, 85, 247, 0.35);
      transform: scale(1.05);
    }

    .connect-opt-text {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      min-width: 0;
    }

    .opt-title-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .opt-title-row h4 {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: -0.015em;
      margin: 0;
      white-space: nowrap;
    }

    .opt-pill-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 9999px;
      font-size: 0.72rem;
      font-weight: 700;
      line-height: 1;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .opt-pill-badge.recommended {
      background: rgba(37, 211, 102, 0.15);
      color: #4ade80;
      border: 1px solid rgba(37, 211, 102, 0.35);
    }

    .opt-pill-badge.neutral {
      background: rgba(148, 163, 184, 0.12);
      color: #94a3b8;
      border: 1px solid rgba(148, 163, 184, 0.22);
    }

    .connect-opt-text p {
      font-size: 0.82rem;
      color: var(--text-muted);
      line-height: 1.4;
      margin: 0;
    }

    .connect-opt-text p b {
      color: var(--text-white);
      font-weight: 600;
    }

    .connect-opt-arrow-wrap {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: var(--text-dark);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      flex-shrink: 0;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .connect-option-card:hover .connect-opt-arrow-wrap {
      background: #25D366;
      border-color: #25D366;
      color: #ffffff;
      transform: translateX(4px);
      box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    }

    .connect-choose-footer {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-top: 24px;
      padding-top: 18px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      font-size: 0.78rem;
      color: var(--text-dark);
      text-align: center;
    }

    .connect-choose-footer i {
      color: #25D366;
      font-size: 1.05rem;
      flex-shrink: 0;
    }

    .connect-sub-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      padding-bottom: 16px;
      margin-bottom: 22px;
    }

    .connect-sub-header-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .connect-sub-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: rgba(57, 186, 118, 0.12);
      border: 1px solid rgba(57, 186, 118, 0.3);
      color: #39BA76;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      flex-shrink: 0;
    }

    .connect-sub-titles h3 {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.01em;
    }

    .connect-sub-titles p {
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-top: 1px;
    }

    .connect-two-cols {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      align-items: center;
    }

    @media (max-width: 620px) {
      .connect-two-cols {
        grid-template-columns: 1fr;
        gap: 20px;
      }
    }

    .connect-col-info {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .connect-col-info h4 {
      font-size: 1.18rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.01em;
    }

    .connect-col-info p {
      font-size: 0.84rem;
      color: var(--text-muted);
      line-height: 1.5;
    }

    .connect-polling-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--text-muted);
      padding: 6px 12px;
      border-radius: var(--radius-pill);
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.06);
      width: fit-content;
    }

    .connect-pulse-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #39BA76;
      box-shadow: 0 0 8px #39BA76;
      animation: pulseGreen 1.8s infinite;
    }

    .btn-connect-back {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: none;
      border: none;
      color: var(--text-dark);
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      margin-top: 4px;
      padding: 0;
      width: fit-content;
      transition: color 0.2s ease;
    }

    .btn-connect-back:hover {
      color: #39BA76;
    }

    .connect-col-action {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
    }

    .qrcode-display-wrapper {
      position: relative;
      background: #ffffff;
      padding: 14px;
      border-radius: 18px;
      width: 220px;
      height: 220px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
      border: 2px solid rgba(255, 255, 255, 0.1);
    }

    .qrcode-image {
      width: 100%;
      height: 100%;
      object-fit: contain;
      border-radius: 6px;
    }

    .qrcode-center-logo {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5;
      pointer-events: none;
      animation: popInLogo 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .qr-logo-badge {
      width: 42px;
      height: 42px;
      background: #ffffff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 0 4px #ffffff;
      padding: 0;
    }

    @keyframes popInLogo {
      0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
      100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    }

    .qrcode-loading-overlay {
      position: absolute;
      inset: 0;
      background: #ffffff;
      border-radius: 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: #0f172a;
      font-size: 0.85rem;
      font-weight: 700;
    }

    .qrcode-loading-overlay i {
      font-size: 2rem;
      color: #16a34a;
    }

    .btn-refresh-qr {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--text-muted);
      font-size: 0.78rem;
      font-weight: 700;
      padding: 6px 14px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-refresh-qr:hover {
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-white);
    }

    .pair-step-box {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
    }

    .pair-phone-input-row {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
    }

    .pair-ddi-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 10px 14px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      color: var(--text-white);
      font-size: 0.9rem;
      font-weight: 700;
      flex-shrink: 0;
      position: relative;
      cursor: pointer;
      user-select: none;
      transition: all 0.2s ease;
    }

    .pair-ddi-badge:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.2);
    }

    .pair-ddi-select {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      cursor: pointer;
      z-index: 2;
      -webkit-appearance: none;
      appearance: none;
    }

    .pair-ddi-select option {
      background-color: #0f172a;
      color: #f8fafc;
      font-size: 0.9rem;
      padding: 8px 12px;
    }

    .pair-phone-field {
      flex: 1;
      width: 100%;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      padding: 10px 16px;
      color: var(--text-white);
      font-size: 0.95rem;
      font-weight: 600;
      outline: none;
      transition: all 0.2s ease;
    }

    .pair-phone-field:focus {
      border-color: #39BA76;
      background: rgba(57, 186, 118, 0.04);
      box-shadow: 0 0 0 3px rgba(57, 186, 118, 0.15);
    }

    .btn-request-pairing {
      width: 100%;
      background: #ffffff;
      color: #0f172a;
      border: none;
      font-size: 0.92rem;
      font-weight: 800;
      padding: 12px 20px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    }

    .btn-request-pairing:hover {
      background: #f1f5f9;
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    }

    .btn-request-pairing:disabled {
      opacity: 0.65;
      cursor: not-allowed;
      pointer-events: none;
      transform: none;
      box-shadow: none;
    }

    .pair-code-label {
      font-size: 0.86rem;
      font-weight: 700;
      color: var(--text-muted);
    }

    .pair-code-display {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 10px 18px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px dashed rgba(57, 186, 118, 0.4);
      border-radius: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
      max-width: 100%;
      box-sizing: border-box;
    }

    .pair-code-display:hover {
      background: rgba(57, 186, 118, 0.08);
      border-color: #39BA76;
    }

    .pair-code-display span {
      font-family: 'Space Mono', monospace;
      font-size: 1.32rem;
      font-weight: 800;
      letter-spacing: 2px;
      color: var(--text-white);
      white-space: nowrap;
      user-select: all;
    }

    .pair-code-display i {
      font-size: 1.15rem;
      color: var(--text-dark);
      transition: color 0.2s ease;
      flex-shrink: 0;
    }

    .pair-code-display:hover i {
      color: #39BA76;
    }

    .pair-code-sub {
      font-size: 0.78rem;
      color: var(--text-dark);
      text-align: center;
    }

    .btn-change-phone {
      background: #39BA76;
      border: none;
      color: #052e16;
      font-size: 0.85rem;
      font-weight: 800;
      padding: 10px 20px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-change-phone:hover {
      background: #2ea366;
      transform: translateY(-1px);
    }

    html[data-theme="light"] .modal-box-connect {
      background: #ffffff;
      border: 1px solid #e2e8f0;
      box-shadow: 0 25px 65px -15px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
    }
    html[data-theme="light"] .connect-modal-close {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #64748b;
    }
    html[data-theme="light"] .connect-modal-close:hover {
      background: #f1f5f9;
      color: #0f172a;
    }
    html[data-theme="light"] .connect-option-card {
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    }
    html[data-theme="light"] .connect-option-card:hover {
      background: #ffffff;
      border-color: #25D366;
      box-shadow: 0 14px 30px -8px rgba(37, 211, 102, 0.22), 0 0 0 1px #25D366;
    }
    html[data-theme="light"] .connect-opt-text h4 {
      color: #0f172a;
    }
    html[data-theme="light"] .connect-opt-text p {
      color: #64748b;
    }
    html[data-theme="light"] .connect-opt-text p b {
      color: #0f172a;
    }
    html[data-theme="light"] .opt-pill-badge.recommended {
      background: #ecfdf5;
      color: #15803d;
      border-color: #86efac;
    }
    html[data-theme="light"] .opt-pill-badge.neutral {
      background: #f1f5f9;
      color: #475569;
      border-color: #cbd5e1;
    }
    html[data-theme="light"] .connect-opt-arrow-wrap {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #94a3b8;
    }
    html[data-theme="light"] .connect-choose-header h2 {
      color: #0f172a;
    }
    html[data-theme="light"] .connect-choose-header p {
      color: #64748b;
    }
    html[data-theme="light"] .connect-choose-header p strong {
      color: #0f172a !important;
    }
    html[data-theme="light"] .connect-choose-footer {
      border-top-color: #f1f5f9;
      color: #64748b;
    }
    html[data-theme="light"] .connect-sub-header {
      border-bottom-color: #e2e8f0;
    }
    html[data-theme="light"] .connect-sub-titles h3 {
      color: #0f172a;
    }
    html[data-theme="light"] .connect-col-info h4 {
      color: #0f172a;
    }
    html[data-theme="light"] .pair-phone-field {
      background: #ffffff;
      border-color: #cbd5e1;
      color: #0f172a;
    }
    html[data-theme="light"] .pair-ddi-badge {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #0f172a;
    }
    html[data-theme="light"] .btn-request-pairing {
      background: #0f172a;
      color: #ffffff;
    }
    html[data-theme="light"] .pair-code-display {
      background: #f8fafc;
      border-color: #86efac;
    }
    html[data-theme="light"] .pair-code-display span {
      color: #0f172a;
    }
    html[data-theme="light"] .btn-refresh-qr {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #475569;
    }
    html[data-theme="light"] .btn-refresh-qr:hover {
      background: #e2e8f0;
      color: #0f172a;
    }

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

    .modal-header h2 {
      font-size: 1.25rem;
      font-weight: 700;
    }

    .modal-close-btn {
      background: transparent;
      border: none;
      color: var(--text-dark);
      cursor: pointer;
      font-size: 1.25rem;
      width: 34px;
      height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-pill);
      transition: all 0.15s;
    }

    .modal-close-btn:hover {
      color: var(--text-white);
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .form-group label {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-muted);
    }

    .form-input {
      background: var(--bg-body);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 12px 14px;
      color: var(--text-white);
      font-size: 0.92rem;
      outline: none;
      transition: border-color 0.2s;
    }

    .form-input:focus {
      border-color: var(--primary);
    }

    .plan-selector-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .plan-card-opt {
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
      background: var(--bg-body);
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .plan-card-opt.selected {
      border-color: var(--primary);
      background: var(--primary-dim);
    }

    .plan-name {
      font-weight: 700;
      font-size: 0.92rem;
    }

    .plan-price {
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .modal-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 8px;
    }

    .toast-notice {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: var(--bg-card);
      border: 1px solid var(--primary);
      color: var(--text-white);
      padding: 14px 20px;
      border-radius: var(--radius-md);
      font-size: 0.88rem;
      font-weight: 600;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
      z-index: 2000;
      display: none;
      align-items: center;
      gap: 10px;
      animation: fadeIn 0.3s;
    }

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

    .mobile-top-bar {
      display: none;
    }
    .sidebar-backdrop {
      display: none;
    }
    .btn-sidebar-close-mobile {
      display: none;
    }

    @media (max-width: 860px) {
      body {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
      }

      .mobile-top-bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        height: 60px;
        padding: 0 16px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1020;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-shrink: 0;
        box-sizing: border-box !important;
      }

      .btn-mobile-menu-toggle {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        color: var(--text-white);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.45rem;
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .btn-mobile-menu-toggle:active {
        transform: scale(0.94);
        background: rgba(255, 255, 255, 0.1);
      }

      .mobile-brand-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 32px;
      }

      .mobile-brand-logo {
        height: 26px;
        width: auto;
        object-fit: contain;
      }

      .btn-mobile-avatar-profile {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
      }

      .mobile-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.82rem;
        border: 2px solid rgba(255, 255, 255, 0.15);
      }

      .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 1050 !important;
        width: 290px !important;
        background: var(--bg-sidebar) !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, visibility 0.3s ease !important;
        box-shadow: none !important;
        visibility: hidden;
      }

      .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 12px 0 35px rgba(0, 0, 0, 0.45) !important;
        visibility: visible;
      }

      .sidebar-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.65) !important;
        backdrop-filter: blur(4px) !important;
        z-index: 1040 !important;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease !important;
      }

      .sidebar-backdrop.active {
        opacity: 1 !important;
        pointer-events: auto !important;
      }

      .btn-sidebar-close-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--border);
        color: var(--text-muted);
        font-size: 1.15rem;
        cursor: pointer;
        margin-left: auto;
        transition: all 0.2s ease;
      }

      .btn-sidebar-close-mobile:hover {
        background: rgba(255, 255, 255, 0.15);
        color: var(--text-white);
      }

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

      .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px 14px 100px 14px !important;
        flex: 1 0 auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        height: auto !important;
      }

      #view-instances.dashboard-page-view.active {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
      }

      #view-instances #instances-container.instances-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-y: visible !important;
        flex: none !important;
        min-height: auto !important;
        padding-bottom: 24px !important;
        padding-right: 0 !important;
      }

      .instance-card.pc-card {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
      }

      .top-compact-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
      }

      .top-compact-left {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
      }

      .search-input-wrap {
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
      }

      .top-compact-left .filter-btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
      }

      .page-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
        flex-wrap: nowrap !important;
      }

      .page-header .page-title-wrap {
        flex: 1 !important;
        min-width: 0 !important;
      }

      .page-header .page-title-row h1 {
        font-size: 1.4rem !important;
        white-space: nowrap !important;
      }

      .page-header .page-subtitle {
        font-size: 0.8rem !important;
      }

      .page-header .btn-create-instance {
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
      }

      #instances-pagination-footer {
        left: 0 !important;
        padding: 10px 16px !important;
      }

      .api-keys-table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
        touch-action: pan-x pan-y !important;
        display: block !important;
        scrollbar-width: thin !important;
      }

      .api-keys-table-responsive::-webkit-scrollbar {
        height: 6px !important;
        display: block !important;
      }

      .api-keys-table-responsive::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.04) !important;
      }

      .api-keys-table-responsive::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.5) !important;
        border-radius: 999px !important;
      }

      .modern-api-table {
        min-width: 860px !important;
        width: max-content !important;
      }

      #view-subscriptions .modern-api-table {
        min-width: 940px !important;
      }

      #view-payments .modern-api-table {
        min-width: 860px !important;
      }

      #view-api-keys .modern-api-table {
        min-width: 780px !important;
      }

      .modern-api-table thead th,
      .modern-api-table tbody td {
        padding: 14px 18px !important;
        white-space: nowrap !important;
      }

      .subs-inst-id,
      .subs-inst-name,
      .subs-inst-meta,
      .subs-value-badge,
      .subs-expire-days,
      .api-name-title,
      .api-name-sub {
        white-space: nowrap !important;
      }

      .subs-toolbar-wrap {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
      }

      .subs-search-box {
        max-width: 100% !important;
        width: 100% !important;
      }
    }

    html[data-theme="light"] .mobile-top-bar {
      background: #ffffff;
      border-color: #e2e8f0;
    }

    html[data-theme="light"] .btn-mobile-menu-toggle {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #0f172a;
    }

    .theme-toggle-btn {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 8px 12px;
      border-radius: var(--radius-pill);
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border);
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: none !important;
    }

    .theme-toggle-btn:hover {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.15);
      color: var(--text-white);
      transform: translateY(-1px);
    }

    .theme-toggle-content {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .theme-icon-box {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.95rem;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.25);
      color: #f59e0b;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .theme-label-text {
      font-size: 0.84rem;
      font-weight: 600;
      letter-spacing: -0.01em;
    }

    .theme-switch-indicator {
      width: 36px;
      height: 20px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      position: relative;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      padding: 2px;
    }

    .theme-switch-knob {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #94a3b8;
      transform: translateX(0);
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    html[data-theme="light"] .theme-toggle-btn {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #475569;
    }

    html[data-theme="light"] .theme-toggle-btn:hover {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #0f172a;
    }

    html[data-theme="light"] .theme-icon-box {
      background: rgba(14, 165, 233, 0.12);
      border-color: rgba(14, 165, 233, 0.25);
      color: #0284c7;
    }

    html[data-theme="light"] .theme-switch-indicator {
      background: #39BA76;
      border-color: #39BA76;
    }

    html[data-theme="light"] .theme-switch-knob {
      background: #ffffff;
      transform: translateX(16px);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    }

    .modal-box-create {
      max-width: 620px;
      width: 100%;
      padding: 0;
      border-radius: 22px;
      background: #14161e;
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(57, 186, 118, 0.04);
      display: flex;
      flex-direction: column;
      max-height: 88vh;
      overflow: hidden;
      animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    html[data-theme="light"] .modal-box-create {
      background: #ffffff;
      border-color: #e2e8f0;
      box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    }

    .create-modal-header {
      padding: 22px 26px 18px 26px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.01);
    }

    .create-modal-header-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .create-modal-sparkle-icon {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      flex-shrink: 0;
      background: linear-gradient(135deg, rgba(57, 186, 118, 0.2), rgba(57, 186, 118, 0.04));
      border: 1px solid rgba(57, 186, 118, 0.25);
      color: var(--primary);
      box-shadow: 0 4px 16px rgba(57, 186, 118, 0.15);
      transition: all 0.3s ease;
    }

    .create-modal-sparkle-icon.lite {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.04));
      border-color: rgba(245, 158, 11, 0.25);
      color: #f59e0b;
      box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    }

    .create-modal-titles h2 {
      font-size: 1.2rem;
      font-weight: 800;
      color: var(--text-white);
      letter-spacing: -0.02em;
    }

    .create-modal-titles p {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .create-modal-body {
      padding: 22px 26px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 20px;
      max-height: 58vh;
    }

    .create-modal-body::-webkit-scrollbar {
      width: 6px;
    }
    .create-modal-body::-webkit-scrollbar-track {
      background: transparent;
    }
    .create-modal-body::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.12);
      border-radius: 9999px;
    }
    .create-modal-body::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.2);
    }

    .plan-selection-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .plan-card-selector {
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 14px 16px;
      background: rgba(255, 255, 255, 0.02);
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      flex-direction: column;
      gap: 6px;
      position: relative;
    }

    .plan-card-selector:hover {
      background: rgba(255, 255, 255, 0.04);
      border-color: var(--border-light);
      transform: translateY(-2px);
    }

    .plan-card-selector.selected.pro {
      border-color: rgba(57, 186, 118, 0.5);
      background: linear-gradient(135deg, rgba(57, 186, 118, 0.1), rgba(57, 186, 118, 0.02));
      box-shadow: 0 4px 20px rgba(57, 186, 118, 0.12);
    }

    .plan-card-selector.selected.lite {
      border-color: rgba(245, 158, 11, 0.5);
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.02));
      box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
    }

    .plan-selector-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .plan-badge-icon {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.85rem;
      font-weight: 800;
      padding: 4px 10px;
      border-radius: var(--radius-pill);
    }

    .plan-badge-icon.lite {
      background: rgba(245, 158, 11, 0.12);
      color: #f59e0b;
    }

    .plan-badge-icon.pro {
      background: rgba(57, 186, 118, 0.12);
      color: var(--primary);
    }

    .plan-badge-tag {
      font-size: 0.7rem;
      font-weight: 700;
      color: var(--text-dark);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .plan-selector-name {
      font-size: 1rem;
      font-weight: 800;
      color: var(--text-white);
      margin-top: 4px;
    }

    .plan-selector-desc {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.4;
    }

    .glass-form-card {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 16px;
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    html[data-theme="light"] .glass-form-card {
      background: #f8fafc;
      border-color: #e2e8f0;
    }

    .form-field-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-field-label {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .input-pill-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
    }

    .input-leading-icon {
      position: absolute;
      left: 16px;
      color: var(--text-dark);
      font-size: 1.15rem;
      pointer-events: none;
      transition: color 0.2s ease;
    }

    .input-pill-modern {
      width: 100%;
      background: #191b24;
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      padding: 10px 18px 10px 44px;
      color: var(--text-white);
      font-size: 0.88rem;
      outline: none;
      transition: all 0.2s ease;
    }

    .input-pill-modern:focus {
      border-color: var(--primary);
      background: #1c1e28;
      box-shadow: 0 0 0 3px rgba(57, 186, 118, 0.12);
    }

    .input-pill-modern:focus + .input-leading-icon,
    .input-pill-wrapper:focus-within .input-leading-icon {
      color: var(--primary);
    }

    html[data-theme="light"] .input-pill-modern {
      background: #ffffff;
      border-color: #cbd5e1;
      color: #0f172a;
    }

    .token-action-buttons {
      position: absolute;
      right: 6px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .token-inline-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: var(--text-muted);
      font-size: 0.76rem;
      font-weight: 700;
      padding: 5px 12px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all 0.2s ease;
    }

    .token-inline-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-white);
    }

    html[data-theme="light"] .token-inline-btn {
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      color: #334155;
    }

    html[data-theme="light"] .token-inline-btn:hover {
      background: #e2e8f0;
      border-color: #cbd5e1;
      color: #0f172a;
    }

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

    @media (max-width: 580px) {
      .automations-grid {
        grid-template-columns: 1fr;
      }
      .plan-selection-grid {
        grid-template-columns: 1fr;
      }
    }

    .automation-card-row {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 16px;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      cursor: pointer;
      user-select: none;
      transition: all 0.2s ease;
    }

    .automation-card-row:hover {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.1);
    }

    html[data-theme="light"] .automation-card-row {
      background: #ffffff;
      border-color: #e2e8f0;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    }

    html[data-theme="light"] .automation-titles h4 {
      color: #0f172a;
    }

    html[data-theme="light"] .automation-titles p {
      color: #64748b;
    }

    .automation-info {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .automation-icon-box {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      font-size: 1.15rem;
      flex-shrink: 0;
    }

    .automation-titles h4 {
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--text-white);
    }

    .automation-titles p {
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-top: 1px;
    }

    .ios-switch {
      position: relative;
      display: inline-block;
      width: 42px;
      height: 24px;
      flex-shrink: 0;
    }

    .ios-switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .ios-slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background: #2b303e;
      transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      border-radius: 9999px;
    }

    .ios-slider:before {
      position: absolute;
      content: "";
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background: white;
      transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      border-radius: 50%;
      box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }

    .ios-switch input:checked + .ios-slider {
      background: var(--primary);
    }

    .ios-switch input:checked + .ios-slider:before {
      transform: translateX(18px);
    }

    .webhooks-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 2px;
    }

    .webhooks-section-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.86rem;
      font-weight: 800;
      color: var(--text-white);
    }

    .webhooks-opt-badge {
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-muted);
      font-size: 0.7rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: var(--radius-pill);
    }

    .btn-quick-fill-url {
      background: none;
      border: 1px dashed var(--border-light);
      color: var(--text-muted);
      font-size: 0.74rem;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-quick-fill-url:hover {
      border-color: var(--primary);
      color: var(--primary);
      background: var(--primary-dim);
    }

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

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

    .webhook-item-col {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .webhook-item-label {
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--text-muted);
    }

    .webhook-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .webhook-input-icon {
      position: absolute;
      left: 14px;
      color: var(--text-dark);
      font-size: 1.05rem;
      pointer-events: none;
    }

    .webhook-input-field {
      width: 100%;
      background: #191b24;
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      padding: 9px 14px 9px 38px;
      color: var(--text-white);
      font-size: 0.82rem;
      outline: none;
      transition: all 0.2s ease;
    }

    .webhook-input-field:focus {
      border-color: var(--primary);
      background: #1c1e28;
      box-shadow: 0 0 0 2px rgba(57, 186, 118, 0.1);
    }

    html[data-theme="light"] .webhook-input-field {
      background: #ffffff;
      border-color: #cbd5e1;
      color: #0f172a;
    }

    html[data-theme="light"] .webhook-item-label {
      color: #1e293b;
    }

    html[data-theme="light"] .btn-quick-fill-url {
      border-color: #cbd5e1;
      color: #334155;
    }

    html[data-theme="light"] .btn-quick-fill-url:hover {
      border-color: #16a34a;
      color: #16a34a;
      background: #f0fdf4;
    }

    .create-modal-footer {
      padding: 16px 26px;
      border-top: 1px solid var(--border);
      background: rgba(20, 22, 30, 0.95);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    html[data-theme="light"] .create-modal-footer {
      background: rgba(255, 255, 255, 0.95);
    }

    .btn-create-cancel {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-muted);
      font-size: 0.88rem;
      font-weight: 700;
      padding: 10px 22px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-create-cancel:hover {
      border-color: var(--border-light);
      color: var(--text-white);
      background: var(--bg-card-hover);
    }

    .btn-create-submit-glow {
      background: var(--primary);
      color: #ffffff;
      border: none;
      padding: 11px 32px;
      border-radius: var(--radius-pill);
      font-size: 0.92rem;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s ease;
      box-shadow: 0 6px 20px rgba(57, 186, 118, 0.35);
    }

    .btn-create-submit-glow:hover {
      background: var(--primary-hover);
      transform: translateY(-1px);
      box-shadow: 0 8px 25px rgba(57, 186, 118, 0.45);
    }

    [data-tooltip] {
      cursor: pointer;
    }

    [data-tooltip]::before,
    [data-tooltip]::after {
      display: none !important;
    }

    #ui-global-tooltip {
      position: fixed;
      z-index: 99999999;
      pointer-events: none !important;
      opacity: 0;
      visibility: hidden;
      transform: scale(0.95);
      transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1),
                  transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
      background: #0f172a;
      color: #f8fafc;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 0.74rem;
      font-weight: 600;
      letter-spacing: 0.2px;
      line-height: 1.35;
      padding: 6px 12px;
      border-radius: 8px;
      white-space: nowrap;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.14);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      top: 0;
      left: 0;
      will-change: transform, opacity, top, left;
    }

    #ui-global-tooltip.active {
      opacity: 1;
      visibility: visible;
      transform: scale(1);
      pointer-events: none !important;
    }

    #ui-global-tooltip::before {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      border: 5px solid transparent;
      pointer-events: none !important;
    }

    #ui-global-tooltip[data-arrow="bottom"]::before {
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border-top-color: #0f172a;
    }

    #ui-global-tooltip[data-arrow="top"]::before {
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border-bottom-color: #0f172a;
    }

    #ui-global-tooltip[data-arrow="right"]::before {
      left: 100%;
      top: 50%;
      transform: translateY(-50%);
      border-left-color: #0f172a;
    }

    #ui-global-tooltip[data-arrow="left"]::before {
      right: 100%;
      top: 50%;
      transform: translateY(-50%);
      border-right-color: #0f172a;
    }

    html[data-theme="light"] #ui-global-tooltip {
      background: #0f172a;
      color: #ffffff;
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.18);
    }
    html[data-theme="light"] #ui-global-tooltip[data-arrow="bottom"]::before { border-top-color: #0f172a; }
    html[data-theme="light"] #ui-global-tooltip[data-arrow="top"]::before { border-bottom-color: #0f172a; }
    html[data-theme="light"] #ui-global-tooltip[data-arrow="right"]::before { border-left-color: #0f172a; }
    html[data-theme="light"] #ui-global-tooltip[data-arrow="left"]::before { border-right-color: #0f172a; }

    .dashboard-page-view {
      animation: fadeInView 0.2s ease-out;
    }

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

    .api-keys-content-container {
      width: 100%;
      min-height: 420px;
      display: flex;
      flex-direction: column;
    }

    .clean-empty-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 64px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    .clean-empty-icon-wrap {
      width: 58px;
      height: 58px;
      border-radius: 16px;
      background: var(--primary-dim);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      margin-bottom: 18px;
      border: 1px solid rgba(57, 186, 118, 0.25);
    }

    .clean-empty-card h3 {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--text-white);
      margin: 0 0 8px 0;
      letter-spacing: -0.2px;
    }

    .clean-empty-card p {
      font-size: 0.9rem;
      color: var(--text-muted);
      max-width: 460px;
      line-height: 1.6;
      margin: 0 0 24px 0;
    }

    .btn-clean-create-key {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--primary);
      color: #ffffff !important;
      font-weight: 700;
      font-size: 0.92rem;
      padding: 11px 24px;
      border-radius: var(--radius-pill);
      border: none;
      cursor: pointer;
      transition: all 0.18s ease;
      box-shadow: 0 4px 14px rgba(57, 186, 118, 0.3);
    }

    .btn-clean-create-key:hover {
      background: var(--primary-hover);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(57, 186, 118, 0.4);
    }

    .api-keys-table-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }

    .api-keys-table-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 24px;
      border-bottom: 1px solid var(--border);
      background: var(--bg-sidebar);
    }

    .table-card-title {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text-white);
    }

    .api-keys-table-responsive {
      width: 100%;
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-x: contain;
      scrollbar-width: thin;
      display: block;
    }

    .api-keys-table-responsive::-webkit-scrollbar {
      height: 6px;
    }

    .api-keys-table-responsive::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.05);
    }

    .api-keys-table-responsive::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.4);
      border-radius: 999px;
    }

    .modern-api-table {
      width: 100%;
      min-width: 680px;
      border-collapse: collapse;
      text-align: left;
    }

    .modern-api-table thead th {
      padding: 14px 24px;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text-muted);
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
    }

    html[data-theme="light"] .modern-api-table thead th {
      background: #f8fafc;
      color: #64748b;
    }

    .modern-api-table tbody tr {
      border-bottom: 1px solid var(--border);
      transition: background 0.15s ease;
    }

    .modern-api-table tbody tr:hover {
      background: var(--bg-card-hover);
    }

    .modern-api-table tbody td {
      padding: 16px 24px;
      vertical-align: middle;
    }

    .api-name-wrap {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .api-table-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: var(--primary-dim);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.15rem;
      flex-shrink: 0;
      border: 1px solid rgba(57, 186, 118, 0.2);
    }

    .api-name-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .api-name-title {
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--text-white);
    }

    .api-name-sub {
      font-size: 0.72rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    .api-status-pill {
      font-size: 0.68rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 9999px;
      background: rgba(57, 186, 118, 0.15);
      color: #10b981;
      display: inline-flex;
      align-items: center;
      line-height: 1.2;
    }

    html[data-theme="light"] .api-status-pill {
      background: #dcfce7;
      color: #15803d;
    }

    .table-card-count {
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 9px;
      border-radius: var(--radius-pill);
      background: #dcfce7;
      color: #15803d;
    }

    html[data-theme="dark"] .table-card-count {
      background: rgba(57, 186, 118, 0.2);
      color: var(--primary);
    }

    .api-token-container {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 10px;
      max-width: 100%;
    }

    html[data-theme="light"] .api-token-container {
      background: #f8fafc;
      border-color: #e2e8f0;
    }

    .api-token-code {
      font-family: 'Space Mono', monospace;
      font-size: 0.82rem;
      color: var(--text-white);
      user-select: all;
      letter-spacing: 0.3px;
    }

    .api-token-actions {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: 6px;
    }

    .api-table-btn {
      background: transparent;
      border: 1px solid transparent;
      color: var(--text-muted);
      border-radius: 6px;
      padding: 5px 6px;
      font-size: 0.9rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s ease;
    }

    .api-table-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-white);
    }

    .api-table-btn.btn-copy-key {
      color: var(--primary);
    }

    .api-table-btn.btn-copy-key:hover {
      background: var(--primary-dim);
    }

    .api-date-badge {
      font-size: 0.8rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    .btn-delete-key-table {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: transparent;
      border: 1px solid transparent;
      color: var(--text-dark);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      transition: all 0.15s ease;
    }

    .btn-delete-key-table:hover {
      background: rgba(239, 68, 68, 0.12);
      border-color: rgba(239, 68, 68, 0.25);
      color: var(--danger);
      transform: scale(1.05);
    }

    .ak-dot-status {
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--primary);
      margin-right: 4px;
      box-shadow: 0 0 6px var(--primary);
    }

    .modal-box-apikey {
      max-width: 500px;
      padding: 0;
      overflow: hidden;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
    }

    .subs-toolbar-wrap {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-top: 10px;
    }

    .subs-search-box {
      flex: 1;
      max-width: 500px;
      position: relative;
      display: flex;
      align-items: center;
    }

    .subs-search-box i {
      position: absolute;
      left: 14px;
      font-size: 1.1rem;
      color: var(--text-muted);
      pointer-events: none;
    }

    .subs-search-box input {
      width: 100%;
      height: 42px;
      padding: 0 16px 0 42px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      font-size: 0.88rem;
      color: var(--text-white);
      outline: none;
      transition: all 0.2s ease;
    }

    .subs-search-box input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--primary-dim);
    }

    html[data-theme="light"] .subs-search-box input {
      background: #ffffff;
      color: #0f172a;
    }

    .subs-filter-dropdown-wrap {
      position: relative;
    }

    .btn-table-renew {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      background: #ffffff;
      color: #0f172a;
      border: 1px solid #e2e8f0;
      border-radius: var(--radius-pill);
      padding: 6px 16px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .btn-table-renew:hover {
      background: var(--primary);
      color: #ffffff;
      border-color: var(--primary);
      box-shadow: 0 4px 14px rgba(57, 186, 118, 0.35);
      transform: translateY(-1px);
    }

    html[data-theme="dark"] .btn-table-renew {
      background: rgba(255, 255, 255, 0.06);
      color: #ffffff;
      border-color: rgba(255, 255, 255, 0.12);
    }

    html[data-theme="dark"] .btn-table-renew:hover {
      background: var(--primary);
      color: #ffffff;
      border-color: var(--primary);
    }

    .btn-table-renew.disabled-stripe,
    .btn-table-renew:disabled {
      opacity: 0.55 !important;
      cursor: not-allowed !important;
      pointer-events: auto !important;
      box-shadow: none !important;
      transform: none !important;
    }

    .btn-table-renew.disabled-stripe:hover,
    .btn-table-renew:disabled:hover {
      background: inherit !important;
      color: inherit !important;
      border-color: inherit !important;
      box-shadow: none !important;
      transform: none !important;
    }

    html[data-theme="dark"] .btn-table-renew.disabled-stripe {
      background: rgba(255, 255, 255, 0.04) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      color: #94a3b8 !important;
    }

    html[data-theme="light"] .btn-table-renew.disabled-stripe {
      background: #f1f5f9 !important;
      border-color: #e2e8f0 !important;
      color: #64748b !important;
    }

    .table-toggle-switch {
      position: relative;
      display: inline-block;
      width: 40px;
      height: 22px;
      vertical-align: middle;
      cursor: pointer;
    }

    .table-toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
      position: absolute;
    }

    .table-toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #cbd5e1;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      border-radius: 22px;
    }

    html[data-theme="dark"] .table-toggle-slider {
      background-color: #334155;
    }

    .table-toggle-slider:before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 3px;
      bottom: 3px;
      background-color: #ffffff;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      border-radius: 50%;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }

    .table-toggle-switch input:checked + .table-toggle-slider {
      background-color: var(--primary);
    }

    .table-toggle-switch input:checked + .table-toggle-slider:before {
      transform: translateX(18px);
    }

    .table-toggle-switch input:disabled + .table-toggle-slider {
      opacity: 0.35;
      cursor: not-allowed;
    }

    .subs-billing-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.74rem;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: var(--radius-pill);
      letter-spacing: 0.3px;
    }

    .subs-billing-pill.card {
      background: rgba(99, 102, 241, 0.1);
      color: #6366f1;
      border: 1px solid rgba(99, 102, 241, 0.2);
    }

    .subs-billing-pill.pix {
      background: rgba(14, 165, 233, 0.1);
      color: #0284c7;
      border: 1px solid rgba(14, 165, 233, 0.2);
    }

    .api-status-pill.plan-lite {
      background: rgba(100, 116, 139, 0.12);
      color: #475569;
      border: 1px solid rgba(100, 116, 139, 0.2);
    }

    html[data-theme="dark"] .api-status-pill.plan-lite {
      background: rgba(148, 163, 184, 0.15);
      color: #cbd5e1;
      border-color: rgba(148, 163, 184, 0.25);
    }

    .api-status-pill.plan-pro {
      background: rgba(57, 186, 118, 0.12);
      color: #15803d;
      border: 1px solid rgba(57, 186, 118, 0.25);
    }

    html[data-theme="dark"] .api-status-pill.plan-pro {
      background: rgba(57, 186, 118, 0.2);
      color: var(--primary);
    }

    .subs-trial-badge {
      display: inline-flex;
      align-items: center;
      padding: 1px 6px;
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: 0.4px;
      border-radius: var(--radius-pill);
      background: rgba(14, 165, 233, 0.18);
      color: #0284c7;
      border: 1px solid rgba(14, 165, 233, 0.35);
      text-transform: uppercase;
      line-height: 1.3;
      white-space: nowrap;
      flex-shrink: 0;
    }

    html[data-theme="dark"] .subs-trial-badge {
      background: rgba(14, 165, 233, 0.25);
      color: #38bdf8;
      border-color: rgba(56, 189, 248, 0.4);
    }

    .subs-billing-none {
      font-size: 0.74rem;
      font-weight: 700;
      color: #94a3b8;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    html[data-theme="dark"] .subs-billing-none {
      color: #64748b;
    }

    .subs-expire-icon-check {
      color: var(--primary);
      font-size: 1.15rem;
      flex-shrink: 0;
    }

    .subs-inst-meta {
      display: flex;
      flex-direction: column;
      gap: 3px;
      white-space: nowrap;
    }

    .subs-inst-id {
      font-size: 0.86rem;
      font-weight: 700;
      color: var(--text-white);
      letter-spacing: 0.3px;
      white-space: nowrap;
    }

    .subs-inst-name {
      font-size: 0.74rem;
      color: var(--text-muted);
      font-weight: 500;
      white-space: nowrap;
    }

    .subs-value-badge {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-white);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .subs-expire-wrap {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .subs-expire-icon {
      font-size: 1.25rem;
      flex-shrink: 0;
    }

    .subs-expire-icon.ok {
      color: var(--primary);
    }

    .subs-expire-icon.alert {
      color: #f59e0b;
    }

    .subs-expire-icon.expired {
      color: var(--danger);
    }

    .subs-expire-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .subs-expire-days {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-white);
      line-height: 1.2;
    }

    .subs-expire-date {
      font-size: 0.74rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    .subs-pagination-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 24px;
      border-top: 1px solid var(--border);
      background: var(--bg-card);
    }

    @media (min-width: 861px) {
      #view-instances.dashboard-page-view.active {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 50px);
        max-height: calc(100vh - 50px);
        box-sizing: border-box;
        overflow: hidden;
        justify-content: space-between;
      }

      #view-instances .page-header {
        flex-shrink: 0;
        margin-bottom: 12px;
      }

      #view-instances .top-compact-bar {
        flex-shrink: 0;
        margin-bottom: 14px;
      }

      #view-instances #instances-container.instances-grid {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        overflow-x: hidden;
        padding-right: 8px;
        padding-bottom: 84px !important;
        align-content: start;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
      }

      #instances-container::-webkit-scrollbar {
        width: 7px;
      }
      #instances-container::-webkit-scrollbar-track {
        background: transparent;
      }
      #instances-container::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.4);
        border-radius: 999px;
      }
      #instances-container::-webkit-scrollbar-thumb:hover {
        background: rgba(148, 163, 184, 0.7);
      }
    }

    /* Modo Integrador: rolagem natural de página inteira com respiro para a paginação fixa */
    #view-integrator {
      padding-bottom: 90px !important;
    }

    #instances-pagination-footer,
    #integrator-pagination-footer {
      position: fixed !important;
      bottom: 0 !important;
      left: var(--sidebar-width) !important;
      right: 0 !important;
      z-index: 95 !important;
      background: var(--bg-card) !important;
      border-top: 1px solid var(--border) !important;
      padding: 12px 24px !important;
      margin: 0 !important;
      box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
    }

    html[data-theme="light"] #instances-pagination-footer,
    html[data-theme="light"] #integrator-pagination-footer {
      background: #ffffff !important;
      border-color: #e2e8f0 !important;
    }

    @media (max-width: 860px) {
      #instances-pagination-footer,
      #integrator-pagination-footer {
        left: 0 !important;
        padding: 10px 16px !important;
      }
    }

    .subs-pagination-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .pagination-page-pill {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: 0.2px;
    }

    .pagination-select-pill {
      position: relative;
      display: inline-flex;
      align-items: center;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      padding: 0 10px 0 12px;
      height: 32px;
      gap: 6px;
      transition: all 0.2s ease;
    }

    .pagination-select-pill:hover {
      border-color: var(--primary);
    }

    .pagination-select-label {
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--text-muted);
      pointer-events: none;
    }

    .pagination-select-pill select {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      background: transparent;
      border: none;
      outline: none;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-white);
      cursor: pointer;
      padding-right: 14px;
    }

    html[data-theme="light"] .pagination-select-pill {
      background: #f1f5f9;
      border-color: #e2e8f0;
    }

    html[data-theme="light"] .pagination-select-pill select {
      color: #0f172a;
    }

    .pagination-select-caret {
      position: absolute;
      right: 10px;
      font-size: 0.7rem;
      color: var(--text-muted);
      pointer-events: none;
    }

    .subs-page-buttons {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-sub-page {
      width: 32px;
      height: 32px;
      border-radius: var(--radius-pill);
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.95rem;
      transition: all 0.2s ease;
    }

    .btn-sub-page:hover:not(:disabled) {
      background: var(--primary-dim);
      color: var(--primary);
      border-color: rgba(57, 186, 118, 0.35);
      transform: translateY(-1px);
    }

    .btn-sub-page:disabled {
      opacity: 0.3;
      cursor: not-allowed;
      border-color: transparent;
    }

    html[data-theme="light"] .btn-sub-page {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #64748b;
    }

    html[data-theme="light"] .btn-sub-page:hover:not(:disabled) {
      background: #dcfce7;
      color: #15803d;
      border-color: #86efac;
    }

    .sub-page-number {
      min-width: 32px;
      height: 32px;
      padding: 0 10px;
      border-radius: var(--radius-pill);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.82rem;
      font-weight: 800;
      background: var(--primary-dim);
      color: var(--primary);
      border: 1px solid rgba(57, 186, 118, 0.25);
    }

    html[data-theme="light"] .sub-page-number {
      background: #dcfce7;
      color: #15803d;
      border-color: #bbf7d0;
    }

    .pay-icon-box {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      font-size: 1.1rem;
      flex-shrink: 0;
    }

    html[data-theme="light"] .pay-icon-box {
      background: #f1f5f9;
      border-color: #e2e8f0;
      color: #475569;
    }

    .pay-number-text {
      font-family: 'Space Mono', monospace, sans-serif;
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-white);
      white-space: nowrap;
    }

    .pay-amount-text {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-white);
      white-space: nowrap;
    }

    .btn-pay-download {
      width: 34px;
      height: 34px;
      border-radius: var(--radius-pill);
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      text-decoration: none;
      transition: all 0.2s ease;
      cursor: pointer;
    }

    .btn-pay-download:hover:not(.disabled) {
      background: var(--primary-dim);
      border-color: var(--primary);
      color: var(--primary);
      transform: translateY(-1px);
    }

    .btn-pay-download.disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }

    html[data-theme="light"] .btn-pay-download {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #64748b;
    }

.instance-card.pc-card {
  padding: 16px 12px 14px;
  gap: 11px;
  border-radius: 20px;
  overflow: visible;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.pc-card-header-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.pc-plan-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1;
}

.pc-plan-badge i {
  font-size: 0.72rem;
}

.pc-plan-badge.pro {
  background: rgba(57, 186, 118, 0.14);
  color: #39BA76;
  border: 1px solid rgba(57, 186, 118, 0.35);
}

.pc-plan-badge.pro i {
  color: #39BA76;
}

.pc-plan-badge.lite {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.pc-plan-badge.lite i {
  color: #f59e0b;
}

html[data-theme="light"] .pc-plan-badge.pro {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

html[data-theme="light"] .pc-plan-badge.pro i {
  color: #15803d;
}

html[data-theme="light"] .pc-plan-badge.lite {
  background: #fef3c7;
  color: #d97706;
  border-color: #fde68a;
}

html[data-theme="light"] .pc-plan-badge.lite i {
  color: #d97706;
}

.pc-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding-top: 4px;
}

.pc-avatar-wrapper {
  position: relative;
  display: inline-flex;
}

.pc-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: #1e293b;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.pc-avatar.online {
  color: #39BA76;
  border-color: rgba(57, 186, 118, 0.5);
}

.pc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-default-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pc-avatar-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #94a3b8;
  border: 2.5px solid var(--bg-card);
}

.pc-avatar-dot.online {
  background: #22c55e;
}

.pc-hero-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
}

.pc-whatsapp-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.015em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.pc-instance-name-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.pc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid var(--border);
  letter-spacing: 0.4px;
}

.pc-status-pill.online {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
}

.pc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.pc-info-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.pc-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  min-width: 0;
}

.pc-info-row i {
  font-size: 0.92rem;
  color: var(--text-dark);
  flex-shrink: 0;
}

.pc-info-val {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-white);
}

.pc-info-row.cursor-pointer {
  cursor: pointer;
  transition: all 0.15s ease;
}

.pc-info-row.cursor-pointer:hover .pc-info-val {
  color: #39BA76;
}

.pc-info-row.cursor-pointer:hover i {
  color: #39BA76;
  transform: scale(1.1);
}

.pc-info-row.is-disconnected i {
  color: #ef4444;
}

.pc-info-row.is-disconnected .pc-info-val {
  color: #ef4444;
  font-weight: 600;
}

.pc-icon-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.12));
  color: var(--text-muted);
  transition: all 0.2s ease;
  box-shadow: none;
}

.pc-icon-btn:hover {
  color: var(--text-white);
  border-color: var(--text-muted);
  transform: translateY(-1px);
  box-shadow: none;
}

.pc-icon-btn.trash {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

.pc-icon-btn.trash:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.pc-icon-btn.trash.disabled-paid {
  opacity: 0.35;
  cursor: not-allowed;
}

.pc-icon-btn.favorite {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pc-icon-btn.favorite:hover {
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.08);
  transform: scale(1.08);
}

.pc-icon-btn.favorite.active {
  color: #eab308 !important;
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.12);
}

.pc-icon-btn.favorite.active i {
  color: #eab308 !important;
}

.filter-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-fav-btn i {
  color: #eab308;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.filter-fav-btn:hover {
  border-color: rgba(234, 179, 8, 0.45);
  color: #facc15;
}

.filter-fav-btn:hover i {
  transform: scale(1.15) rotate(12deg);
}

.filter-fav-btn.active {
  background: rgba(234, 179, 8, 0.15) !important;
  border-color: rgba(234, 179, 8, 0.5) !important;
  color: #facc15 !important;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.2);
}

.filter-fav-btn.active i {
  color: #facc15 !important;
}

.fav-badge {
  background: rgba(234, 179, 8, 0.22) !important;
  color: #facc15 !important;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

html[data-theme="light"] .filter-fav-btn:hover {
  border-color: #ca8a04;
  color: #a16207;
}

html[data-theme="light"] .filter-fav-btn.active {
  background: rgba(234, 179, 8, 0.15) !important;
  border-color: #ca8a04 !important;
  color: #854d0e !important;
  box-shadow: none;
}

html[data-theme="light"] .fav-badge {
  background: rgba(234, 179, 8, 0.2) !important;
  color: #854d0e !important;
  border-color: rgba(202, 138, 4, 0.4);
}

.pc-icon-btn.reset:hover {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.pc-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 11px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

/* Bloco Unificado: ID + Token da Instância */
.pc-credentials-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.pc-credentials-card:hover {
  border-color: rgba(57, 186, 118, 0.35);
  background: rgba(255, 255, 255, 0.035);
}

.pc-cred-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pc-cred-divider {
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.08));
  margin: 1px 0;
}

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

.pc-cred-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.2px;
}

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

.pc-cred-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-dark, #94a3b8);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pc-cred-btn:hover {
  color: #39BA76;
}

.pc-cred-val {
  font-family: 'Space Mono', monospace;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-white, #f8fafc);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: all;
  transition: color 0.15s ease;
}

.pc-cred-val:hover {
  color: #39BA76;
}

/* Botão Gerenciar: Proporcional e Harmônico (Sem Animação) */
.pc-btn-manage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.14));
  color: var(--text-white, #f8fafc);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-btn-manage i {
  font-size: 0.88rem;
  color: #39BA76;
}

.pc-btn-manage:hover {
  background: rgba(57, 186, 118, 0.1);
  border-color: rgba(57, 186, 118, 0.4);
  color: #39BA76;
}

html[data-theme="light"] .pc-credentials-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .pc-cred-divider {
  background: #e2e8f0;
}

html[data-theme="light"] .pc-cred-val {
  color: #0f172a;
}

html[data-theme="light"] .pc-btn-manage {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .pc-btn-manage:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}

.pc-id:hover {
  border-color: rgba(57, 186, 118, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.pc-id-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: #94a3b8;
}

.pc-id-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pc-id-val {
  flex: 1;
  min-width: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-id-value-row i {
  color: var(--text-dark);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: color 0.2s;
}

.pc-id:hover .pc-id-val,
.pc-id:hover .pc-id-value-row i {
  color: #39BA76;
}

.pc-card .card-sub-strip {
  padding: 0 7px;
  border-radius: 10px;
  min-height: 38px;
  height: 38px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
}

.pc-card .sub-strip-text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  overflow: visible;
}

.pc-card .sub-strip-title {
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.25px;
  white-space: nowrap;
  text-align: left !important;
}

.pc-card .sub-strip-btns-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 5;
}

.pc-card .sub-strip-btn {
  height: 23px;
  padding: 0 6px;
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
  cursor: pointer !important;
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
  transition: all 0.2s ease;
  margin-left: auto;
}

.pc-card .sub-strip-btns-group .sub-strip-btn {
  margin-left: 0;
}

.pc-card .sub-strip-btn.pending {
  height: 26px;
  padding: 0 12px;
  font-size: 0.72rem;
}

.pc-card .sub-strip-btn i {
  font-size: 0.64rem;
}

.sub-strip-btn.upgrade {
  background: rgba(57, 186, 118, 0.14);
  border: 1px solid rgba(57, 186, 118, 0.35);
  color: #39BA76;
}

.sub-strip-btn.upgrade:hover {
  background: #39BA76;
  border-color: #39BA76;
  color: #052e16;
}

.sub-strip-btn.downgrade {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.sub-strip-btn.downgrade:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000000;
}

.sub-strip-btn.downgrade.scheduled {
  background: rgba(148, 163, 184, 0.15);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: #94a3b8;
}

.sub-strip-btn.downgrade.scheduled:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

html[data-theme="light"] .sub-strip-btn.upgrade {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

html[data-theme="light"] .sub-strip-btn.upgrade:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

html[data-theme="light"] .sub-strip-btn.downgrade {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #b45309;
}

html[data-theme="light"] .sub-strip-btn.downgrade:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #ffffff;
}

.modal-box-upgrade {
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  padding: 0;
  border-radius: 20px;
  background: #14161e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(57, 186, 118, 0.06);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] .modal-box-upgrade {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.pc-card .btn-sub-info {
  width: 26px;
  height: 26px;
  font-size: 0.95rem;
}

.pc-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pc-cta:not(.disconnect) {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #052e16 !important;
  background: linear-gradient(135deg, #39BA76, #16a34a);
  box-shadow: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pc-cta:not(.disconnect) i {
  color: #052e16 !important;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.pc-cta:not(.disconnect):hover {
  transform: translateY(-1px);
  box-shadow: none !important;
  color: #052e16 !important;
}

.pc-cta.disconnect {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pc-cta.disconnect i {
  color: #ef4444 !important;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.pc-cta.disconnect:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #f87171 !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.pc-cta.disconnect:hover i {
  color: #f87171 !important;
}

html[data-theme="light"] .pc-cta.disconnect {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

html[data-theme="light"] .pc-cta.disconnect i {
  color: #dc2626 !important;
}

html[data-theme="light"] .pc-cta.disconnect:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #f87171 !important;
}

html[data-theme="light"] .pc-cta.disconnect:hover i {
  color: #b91c1c !important;
}

html[data-theme="light"] .pc-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
html[data-theme="light"] .pc-avatar {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}
html[data-theme="light"] .pc-default-avatar-svg circle {
  fill: #e2e8f0;
}
html[data-theme="light"] .pc-default-avatar-svg path {
  fill: #94a3b8;
}
html[data-theme="light"] .pc-avatar.online {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.4);
}
html[data-theme="light"] .pc-avatar-dot {
  border-color: #fff;
}
html[data-theme="light"] .pc-whatsapp-name {
  color: #0f172a;
}
html[data-theme="light"] .pc-status-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}
html[data-theme="light"] .pc-status-pill.online {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #16a34a;
}
html[data-theme="light"] .pc-info-block {
  background: #f8fafc;
  border-color: #e2e8f0;
}
html[data-theme="light"] .pc-info-val {
  color: #0f172a;
}
html[data-theme="light"] .pc-info-row.is-disconnected i,
html[data-theme="light"] .pc-info-row.is-disconnected .pc-info-val {
  color: #dc2626;
}
html[data-theme="light"] .pc-id {
  background: #f8fafc;
  border-color: #e2e8f0;
}
html[data-theme="light"] .pc-id-val {
  color: #0f172a;
}
html[data-theme="light"] .pc-icon-btn {
  border-color: #e2e8f0;
  color: #64748b;
  box-shadow: none !important;
}
html[data-theme="light"] .pc-icon-btn:hover {
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: none !important;
}
.btn-create-instance,
.btn-create-instance i,
.pc-cta:not(.disconnect),
.pc-cta:not(.disconnect) i,
.btn-subscribe-confirm,
.btn-subscribe-confirm i,
.btn-action-primary,
.btn-action-primary i,
.btn-create-submit-glow,
.btn-create-submit-glow i,
#btn-submit-create,
#btn-submit-create i,
.btn-modal-primary,
.btn-modal-primary i,
.modal-confirm-btn,
.modal-confirm-btn i,
.btn-save,
.btn-save i,
.btn-pane-save,
.btn-pane-save i,
#btn-save-instance,
#btn-save-instance i,
#btn-save-proxy,
#btn-save-proxy i,
#btn-save-webhook,
#btn-save-webhook i,
.btn-test-send,
.btn-test-send i,
#btn-send-test,
#btn-send-test i,
.btn-drawer-save,
.btn-drawer-save i,
.btn-confirm,
.btn-confirm i,
.btn-clean-create-key,
.btn-clean-create-key i,
#btn-header-create-api-key,
#btn-header-create-api-key i {
  color: #052e16 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .btn-create-instance,
html[data-theme="dark"] .btn-create-instance i,
html[data-theme="dark"] .pc-cta:not(.disconnect),
html[data-theme="dark"] .pc-cta:not(.disconnect) i,
html[data-theme="dark"] .btn-subscribe-confirm,
html[data-theme="dark"] .btn-subscribe-confirm i,
html[data-theme="dark"] .btn-action-primary,
html[data-theme="dark"] .btn-action-primary i,
html[data-theme="dark"] .btn-create-submit-glow,
html[data-theme="dark"] .btn-create-submit-glow i,
html[data-theme="dark"] #btn-submit-create,
html[data-theme="dark"] #btn-submit-create i,
html[data-theme="dark"] .btn-modal-primary,
html[data-theme="dark"] .btn-modal-primary i,
html[data-theme="dark"] .modal-confirm-btn,
html[data-theme="dark"] .modal-confirm-btn i,
html[data-theme="dark"] .btn-save,
html[data-theme="dark"] .btn-save i,
html[data-theme="dark"] .btn-pane-save,
html[data-theme="dark"] .btn-pane-save i,
html[data-theme="dark"] #btn-save-instance,
html[data-theme="dark"] #btn-save-instance i,
html[data-theme="dark"] #btn-save-proxy,
html[data-theme="dark"] #btn-save-proxy i,
html[data-theme="dark"] #btn-save-webhook,
html[data-theme="dark"] #btn-save-webhook i,
html[data-theme="dark"] .btn-test-send,
html[data-theme="dark"] .btn-test-send i,
html[data-theme="dark"] #btn-send-test,
html[data-theme="dark"] #btn-send-test i,
html[data-theme="dark"] .btn-drawer-save,
html[data-theme="dark"] .btn-drawer-save i,
html[data-theme="dark"] .btn-confirm,
html[data-theme="dark"] .btn-confirm i,
html[data-theme="dark"] .btn-clean-create-key,
html[data-theme="dark"] .btn-clean-create-key i,
html[data-theme="dark"] #btn-header-create-api-key,
html[data-theme="dark"] #btn-header-create-api-key i,
html[data-theme="dark"] #btn-save-account,
html[data-theme="dark"] #btn-save-account span,
html[data-theme="dark"] .btn-account-save-pill,
html[data-theme="dark"] .btn-account-save-pill span {
  color: #052e16 !important;
  background: #22c55e !important;
  box-shadow: none !important;
}

html[data-theme="light"] .btn-create-instance,
html[data-theme="light"] .btn-create-instance i,
html[data-theme="light"] .pc-cta:not(.disconnect),
html[data-theme="light"] .pc-cta:not(.disconnect) i,
html[data-theme="light"] .btn-subscribe-confirm,
html[data-theme="light"] .btn-subscribe-confirm i,
html[data-theme="light"] .btn-action-primary,
html[data-theme="light"] .btn-action-primary i,
html[data-theme="light"] .btn-create-submit-glow,
html[data-theme="light"] .btn-create-submit-glow i,
html[data-theme="light"] #btn-submit-create,
html[data-theme="light"] #btn-submit-create i,
html[data-theme="light"] .btn-modal-primary,
html[data-theme="light"] .btn-modal-primary i,
html[data-theme="light"] .modal-confirm-btn,
html[data-theme="light"] .modal-confirm-btn i,
html[data-theme="light"] .btn-save,
html[data-theme="light"] .btn-save i,
html[data-theme="light"] .btn-pane-save,
html[data-theme="light"] .btn-pane-save i,
html[data-theme="light"] #btn-save-instance,
html[data-theme="light"] #btn-save-instance i,
html[data-theme="light"] #btn-save-proxy,
html[data-theme="light"] #btn-save-proxy i,
html[data-theme="light"] #btn-save-webhook,
html[data-theme="light"] #btn-save-webhook i,
html[data-theme="light"] .btn-test-send,
html[data-theme="light"] .btn-test-send i,
html[data-theme="light"] #btn-send-test,
html[data-theme="light"] #btn-send-test i,
html[data-theme="light"] .btn-drawer-save,
html[data-theme="light"] .btn-drawer-save i,
html[data-theme="light"] .btn-confirm,
html[data-theme="light"] .btn-confirm i,
html[data-theme="light"] .btn-clean-create-key,
html[data-theme="light"] .btn-clean-create-key i,
html[data-theme="light"] #btn-header-create-api-key,
html[data-theme="light"] #btn-header-create-api-key i,
html[data-theme="light"] #btn-save-account,
html[data-theme="light"] #btn-save-account span,
html[data-theme="light"] .btn-account-save-pill,
html[data-theme="light"] .btn-account-save-pill span {
  color: #ffffff !important;
  background: #16a34a !important;
  box-shadow: none !important;
}

button,
.btn-create-instance,
.btn-create-instance:hover,
.btn-create-instance:active,
.pc-cta,
.pc-cta:hover,
.pc-cta:active,
.pc-icon-btn,
.pc-icon-btn:hover,
.pc-icon-btn:active,
.sub-strip-btn,
.sub-strip-btn:hover,
.sub-strip-btn:active,
.btn-subscribe-confirm,
.btn-subscribe-confirm:hover,
.btn-subscribe-confirm:active,
.btn-create-submit-glow,
.btn-create-submit-glow:hover,
.btn-clean-create-key,
.btn-clean-create-key:hover,
.filter-btn,
.filter-btn:hover,
.btn-more-filters,
.btn-more-filters:hover {
  box-shadow: none !important;
}
#modal-subscribe {
  z-index: 2500 !important;
}
#modal-subscribe.active {
  display: flex !important;
}

#modal-pix {
  z-index: 2600 !important;
}
#modal-pix.active {
  display: flex !important;
}

.modal-box-subscribe {
  max-width: 470px;
  width: 100%;
  max-height: 90vh;
  padding: 0;
  border-radius: 20px;
  background: #14161e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(57, 186, 118, 0.04);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.subscribe-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.sub-sum-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-sum-info.right {
  align-items: flex-end;
}

.sub-sum-lbl {
  font-size: 0.68rem;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subscribe-chip-id {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-white);
  font-size: 0.85rem;
}

.subscribe-chip-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.05rem;
}

.subscribe-chip-price {
  font-weight: 800;
  color: #39BA76;
  background: rgba(57, 186, 118, 0.14);
  border: 1px solid rgba(57, 186, 118, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  font-size: 0.84rem;
}

.subscribe-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.subscribe-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.subscribe-option-card:hover {
  background: rgba(57, 186, 118, 0.05);
  border-color: rgba(57, 186, 118, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.subscribe-option-card.selected {
  border-color: #39BA76;
  background: rgba(57, 186, 118, 0.08);
  box-shadow: 0 8px 24px rgba(57, 186, 118, 0.18);
}

.subscribe-option-card#sub-opt-card:hover {
  background: rgba(14, 165, 233, 0.05);
  border-color: rgba(14, 165, 233, 0.35);
}

.subscribe-option-card#sub-opt-card.selected {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.18);
}

.sub-opt-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sub-opt-icon.icon-pix {
  background: linear-gradient(135deg, rgba(57, 186, 118, 0.16) 0%, rgba(22, 163, 74, 0.1) 100%);
  border: 1px solid rgba(57, 186, 118, 0.3);
  color: #39BA76;
}

.subscribe-option-card.selected .sub-opt-icon.icon-pix {
  background: linear-gradient(135deg, #39BA76 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(57, 186, 118, 0.35);
  transform: scale(1.04);
}

.sub-opt-icon.icon-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0ea5e9;
}

.subscribe-option-card#sub-opt-card.selected .sub-opt-icon.icon-card {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
  transform: scale(1.04);
}

.sub-opt-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sub-opt-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.015em;
}

.sub-opt-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sub-opt-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-light, rgba(255, 255, 255, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.subscribe-option-card.selected .sub-opt-radio {
  border-color: #39BA76;
  background: rgba(57, 186, 118, 0.15);
}

.subscribe-option-card#sub-opt-card.selected .sub-opt-radio {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.15);
}

.sub-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #39BA76;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subscribe-option-card.selected .sub-radio-dot {
  opacity: 1;
  transform: scale(1);
}

.subscribe-option-card#sub-opt-card.selected .sub-radio-dot {
  background: #0ea5e9;
}

.sub-timeline-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.45), rgba(15, 23, 42, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.sub-timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-timeline-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.sub-timeline-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-timeline-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.2px;
}

.sub-timeline-lead {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.sub-timeline-lead strong {
  color: var(--text-white);
}

.renewal-calc-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.3fr;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.calc-step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
  transition: all 0.2s ease;
}

.calc-step-card.current {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.06);
}

.calc-step-card.added {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

.calc-step-card.total {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.14), rgba(16, 185, 129, 0.06));
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.14);
}

.calc-step-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.calc-step-card.current .calc-step-tag { color: #60a5fa; }
.calc-step-card.added .calc-step-tag { color: #4ade80; }

.calc-step-tag.badge-total {
  background: #22c55e;
  color: #052e16 !important;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  line-height: 1;
}

.calc-step-value {
  font-family: 'Space Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-white);
}

.calc-step-card.current .calc-step-value { color: #93c5fd; }
.calc-step-card.added .calc-step-value { color: #86efac; }
.calc-step-card.total .calc-step-value.highlight {
  font-size: 1.30rem;
  color: #4ade80;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

.calc-step-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.calc-flow-operator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.sub-timeline-summary-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sub-timeline-summary-info {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-white);
}

.sub-timeline-summary-info i {
  color: #22c55e;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.sub-timeline-summary-info strong {
  color: #4ade80;
  font-weight: 800;
}

.sub-timeline-agree-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 23px;
}

.sub-timeline-agree-hint strong {
  color: #22c55e;
}

html[data-theme="light"] .sub-timeline-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .sub-timeline-title {
  color: #0f172a;
}
html[data-theme="light"] .sub-timeline-lead {
  color: #64748b;
}
html[data-theme="light"] .sub-timeline-lead strong {
  color: #0f172a;
}
html[data-theme="light"] .calc-step-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
html[data-theme="light"] .calc-step-card.current {
  background: #eff6ff;
  border-color: #bfdbfe;
}
html[data-theme="light"] .calc-step-card.current .calc-step-value {
  color: #1d4ed8;
}
html[data-theme="light"] .calc-step-card.added {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
html[data-theme="light"] .calc-step-card.added .calc-step-value {
  color: #15803d;
}
html[data-theme="light"] .calc-step-card.total {
  background: #ecfdf5;
  border-color: #86efac;
}
html[data-theme="light"] .calc-step-card.total .calc-step-value.highlight {
  color: #166534;
  text-shadow: none;
}
html[data-theme="light"] .calc-flow-operator {
  background: #e2e8f0;
  color: #64748b;
}
html[data-theme="light"] .sub-timeline-summary-bar {
  border-top-color: #e2e8f0;
}
html[data-theme="light"] .sub-timeline-summary-info {
  color: #0f172a;
}
html[data-theme="light"] .sub-timeline-summary-info strong {
  color: #15803d;
}

@media (max-width: 480px) {
  .renewal-calc-flow {
    gap: 4px;
  }
  .calc-step-card {
    padding: 8px 4px;
  }
  .calc-step-tag {
    font-size: 0.58rem;
  }
  .calc-step-value {
    font-size: 1rem;
  }
  .calc-step-card.total .calc-step-value.highlight {
    font-size: 1.15rem;
  }
  .calc-step-desc {
    font-size: 0.62rem;
  }
  .calc-flow-operator {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }
}

.subscribe-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  padding: 16px 26px 20px 26px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.btn-subscribe-cancel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.btn-subscribe-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

.btn-subscribe-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--primary);
  color: #052e16;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.btn-subscribe-confirm:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.modal-box-pix {
  max-width: 440px;
  width: 100%;
  padding: 0;
  border-radius: 22px;
  background: #14161e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(57, 186, 118, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-pix-sparkle {
  background: rgba(57, 186, 118, 0.16) !important;
  color: #39BA76 !important;
}

.modal-pix-body {
  padding: 24px 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.modal-box-pix .pix-qrcode-box {
  width: 260px;
  height: 260px;
  background: #ffffff;
  padding: 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.modal-box-pix .pix-qrcode-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pix-copy-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  transition: border-color 0.2s;
}

.pix-copy-input-wrap:focus-within {
  border-color: #39BA76;
}

.pix-copy-input-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  outline: none;
}

.pix-copy-input-wrap .btn-pix-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(57, 186, 118, 0.14);
  border: 1px solid rgba(57, 186, 118, 0.35);
  color: #39BA76;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pix-copy-input-wrap .btn-pix-copy:hover {
  background: #39BA76;
  color: #052e16;
}

.modal-pix-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 28px 24px;
  width: 100%;
}

.modal-pix-footer .btn-create-cancel {
  width: 100%;
  max-width: 200px;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-pix-footer .btn-create-cancel:hover {
  color: var(--text-white);
}

html[data-theme="light"] .modal-box-pix {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 25px 65px -15px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .pix-copy-input-wrap {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .pix-copy-input-wrap input {
  color: #0f172a;
}

html[data-theme="light"] .modal-pix-footer .btn-create-cancel {
  color: #64748b;
}

html[data-theme="light"] .modal-pix-footer .btn-create-cancel:hover {
  color: #0f172a;
}

html[data-theme="light"] .modal-box-subscribe {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 65px -15px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .subscribe-summary-bar {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .subscribe-chip-id {
  color: #0f172a;
}

html[data-theme="light"] .subscribe-option-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .subscribe-option-card:hover {
  background: #ffffff;
  border-color: #39BA76;
  box-shadow: 0 10px 25px -5px rgba(57, 186, 118, 0.18);
}

html[data-theme="light"] .subscribe-option-card.selected {
  border-color: #39BA76;
  background: rgba(57, 186, 118, 0.06);
}

html[data-theme="light"] .subscribe-option-card#sub-opt-card:hover {
  border-color: #0ea5e9;
  box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.18);
}

html[data-theme="light"] .subscribe-option-card#sub-opt-card.selected {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.06);
}

html[data-theme="light"] .sub-opt-title {
  color: #0f172a;
}

html[data-theme="light"] .sub-opt-desc {
  color: #64748b;
}

html[data-theme="light"] .sub-opt-radio {
  border-color: #cbd5e1;
}

html[data-theme="light"] .subscribe-actions {
  border-color: #f1f5f9;
}

html[data-theme="light"] .btn-subscribe-cancel {
  color: #64748b;
}

html[data-theme="light"] .btn-subscribe-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] #sub-pix-result-wrap {
  background: #f8fafc;
  border-color: rgba(57, 186, 118, 0.35);
}

html[data-theme="light"] .pix-copy-row input {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

.modal-box-account {
  max-width: 600px;
  width: 100%;
  padding: 0;
  border-radius: 22px;
  background: #14161e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(57, 186, 118, 0.04);
  overflow: hidden;
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.account-modal-body {
  padding: 24px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.account-profile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.account-avatar-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-avatar-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease;
}

.account-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.btn-account-upload {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-account-upload:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-account-upload i {
  font-size: 1rem;
}

.account-meta-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
}

.account-meta-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.account-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--text-white);
  font-weight: 600;
  font-family: 'Space Mono', monospace;
}

.account-meta-badge i {
  color: #38bdf8;
  font-size: 0.95rem;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.account-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 540px) {
  .account-form-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.whatsapp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.account-ddi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 14px;
  height: 100%;
  position: relative;
  cursor: pointer;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  user-select: none;
  transition: background 0.15s ease;
}

.account-ddi-badge:hover {
  background: rgba(255, 255, 255, 0.04);
}

.account-ddi-badge span {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
}

.account-ddi-badge i {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 2px;
}

.account-ddi-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
  -webkit-appearance: none;
  appearance: none;
}

.whatsapp-field {
  padding-left: 12px !important;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field {
  padding-right: 42px !important;
}

.btn-input-trailing-icon {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  padding: 4px;
}

.btn-input-trailing-icon:hover {
  color: var(--text-white);
}

.account-password-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 4px;
}

.btn-account-toggle-pwd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.btn-account-toggle-pwd:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.toggle-pwd-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-pwd-left i {
  font-size: 1.2rem;
  color: #22c55e;
}

.toggle-pwd-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-pwd-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
}

.toggle-pwd-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.toggle-pwd-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-pwd-badge {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.toggle-pwd-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

#pwd-toggle-caret {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.account-pwd-expandable {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-card-panel {
  background: rgba(255, 255, 255, 0.025);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

html[data-theme="light"] .account-card-panel {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.account-actions-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 6px;
}

.btn-account-save-pill,
#btn-save-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #22c55e;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-account-save-pill:hover,
#btn-save-account:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.4);
}

.btn-account-save-pill:disabled,
#btn-save-account:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

html[data-theme="dark"] .btn-account-save-pill,
html[data-theme="dark"] #btn-save-account {
  background: #22c55e !important;
  color: #052e16 !important;
}

html[data-theme="dark"] .btn-account-save-pill span,
html[data-theme="dark"] #btn-save-account span {
  color: #052e16 !important;
  font-weight: 700;
}

html[data-theme="light"] .btn-account-save-pill,
html[data-theme="light"] #btn-save-account {
  background: #16a34a !important;
  color: #ffffff !important;
}

html[data-theme="light"] .btn-account-save-pill span,
html[data-theme="light"] #btn-save-account span {
  color: #ffffff !important;
  font-weight: 700;
}

html[data-theme="light"] .modal-box-account {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .account-profile-header-row {
  border-bottom-color: #f1f5f9;
}

html[data-theme="light"] .account-avatar-circle {
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

html[data-theme="light"] .btn-account-upload {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

html[data-theme="light"] .btn-account-upload:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

html[data-theme="light"] .account-meta-badge {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

html[data-theme="light"] .account-ddi-badge {
  border-right-color: #e2e8f0;
}

html[data-theme="light"] .account-ddi-badge:hover {
  background: #f1f5f9;
}

html[data-theme="light"] .account-ddi-badge span {
  color: #0f172a;
}

html[data-theme="light"] .btn-account-toggle-pwd {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .btn-account-toggle-pwd:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html[data-theme="light"] .toggle-pwd-title {
  color: #0f172a;
}

html[data-theme="light"] .toggle-pwd-badge {
  background: #e2e8f0;
  color: #64748b;
  border-color: #cbd5e1;
}

html[data-theme="light"] .toggle-pwd-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.3);
}

html[data-theme="light"] .account-pwd-expandable {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .account-form .input-pill-modern {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .account-form .input-pill-modern:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

/* ==========================================================================
   MARCADORES DE INSTÂNCIAS (DESIGN SYSTEM W-API)
   ========================================================================== */
.wapi-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  width: 100%;
}

.wapi-stat-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 20px;
  position: relative;
  user-select: none;
  cursor: default;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wapi-stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Ícone Total */
.wapi-stat-icon-wrap.total {
  background: rgba(57, 186, 118, 0.12);
  color: var(--primary);
  border: 1px solid rgba(57, 186, 118, 0.25);
}

/* Ícone Conectadas */
.wapi-stat-icon-wrap.connected {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Ícone Desconectadas */
.wapi-stat-icon-wrap.disconnected {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.wapi-stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.wapi-stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wapi-stat-number-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wapi-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.wapi-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.wapi-stat-dot.connected {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulseGreen 2s infinite;
}

.wapi-stat-dot.disconnected {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Modo Claro W-API */
html[data-theme="light"] .wapi-stat-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .wapi-stat-label {
  color: #64748b;
}

html[data-theme="light"] .wapi-stat-number {
  color: #0f172a;
}

html[data-theme="light"] .wapi-stat-icon-wrap.total {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.2);
}

/* Responsividade Mobile */
@media (max-width: 900px) {
  .wapi-stats-row {
    gap: 12px;
  }
  .wapi-stat-box {
    padding: 14px 14px;
    gap: 12px;
  }
  .wapi-stat-icon-wrap {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    border-radius: 12px;
  }
  .wapi-stat-number {
    font-size: 1.45rem;
  }
  .wapi-stat-label {
    font-size: 0.72rem;
  }
}

@media (max-width: 680px) {
  .wapi-stats-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}





/* Compact Subscribe Modal & Timeline */
.modal-box-subscribe .create-modal-header {
  padding: 16px 20px 14px 20px;
}

.modal-box-subscribe .create-modal-sparkle-icon {
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  border-radius: 11px;
}

.modal-box-subscribe .create-modal-titles h2 {
  font-size: 1.15rem;
}

.modal-box-subscribe .subscribe-summary-bar {
  padding: 10px 14px;
}

.modal-box-subscribe .sub-timeline-box {
  padding: 12px 14px;
  gap: 10px;
  border-radius: 13px;
}

.modal-box-subscribe .sub-timeline-header {
  gap: 10px;
}

.modal-box-subscribe .sub-timeline-header-icon {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
  border-radius: 8px;
}

.modal-box-subscribe .sub-timeline-title {
  font-size: 0.82rem;
}

.modal-box-subscribe .sub-timeline-lead {
  font-size: 0.72rem;
}

.modal-box-subscribe .calc-step-card {
  padding: 6px 4px;
  border-radius: 9px;
}

.modal-box-subscribe .calc-step-tag {
  font-size: 0.60rem;
  margin-bottom: 2px;
}

.modal-box-subscribe .calc-step-value {
  font-size: 0.95rem;
}

.modal-box-subscribe .calc-step-card.total .calc-step-value.highlight {
  font-size: 1.08rem;
}

.modal-box-subscribe .calc-step-desc {
  font-size: 0.62rem;
}

.modal-box-subscribe .calc-flow-operator {
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
}

.modal-box-subscribe .sub-timeline-summary-bar {
  padding-top: 8px;
  gap: 3px;
}

.modal-box-subscribe .sub-timeline-summary-info {
  font-size: 0.76rem;
  gap: 5px;
}

.modal-box-subscribe .sub-timeline-summary-info i {
  font-size: 0.95rem;
}

.modal-box-subscribe .sub-timeline-agree-hint {
  font-size: 0.70rem;
  padding-left: 20px;
}

.modal-box-subscribe .subscribe-options-list {
  gap: 9px;
}

.modal-box-subscribe .subscribe-option-card {
  padding: 12px 14px;
  border-radius: 14px;
  gap: 12px;
}

.modal-box-subscribe .sub-opt-icon {
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  border-radius: 11px;
}

.modal-box-subscribe .sub-opt-title {
  font-size: 0.88rem;
}

.modal-box-subscribe .sub-opt-desc {
  font-size: 0.72rem;
}

.modal-box-subscribe .sub-opt-radio {
  width: 20px;
  height: 20px;
}

.subscribe-transparency-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-trans-title {
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
}

.sub-trans-title i {
  color: var(--primary);
  font-size: 0.9rem;
}

.sub-trans-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-muted);
}

html[data-theme="light"] .subscribe-transparency-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .sub-trans-title {
  color: #0f172a;
}


/* Destaque no texto do prazo acumulativo */
.sub-timeline-lead.highlighted-lead,
.sub-timeline-lead {
  font-size: 0.77rem !important;
  color: #e2e8f0 !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

.sub-timeline-lead strong,
.sub-timeline-lead.highlighted-lead strong {
  color: #22c55e !important;
  font-weight: 800 !important;
  background: rgba(34, 197, 94, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  display: inline-block;
}

html[data-theme="light"] .sub-timeline-lead.highlighted-lead,
html[data-theme="light"] .sub-timeline-lead {
  color: #334155 !important;
  font-size: 0.77rem !important;
  font-weight: 500 !important;
}

html[data-theme="light"] .sub-timeline-lead strong,
html[data-theme="light"] .sub-timeline-lead.highlighted-lead strong {
  color: #15803d !important;
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  font-weight: 800 !important;
}





/* Theme Picker Dropdown (System / Light / Dark) */
.theme-picker-container {
  position: relative;
  width: 100%;
}

.theme-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-picker-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
}

.theme-picker-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.theme-picker-container.open .theme-picker-arrow {
  transform: rotate(180deg);
}

.theme-picker-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 150px;
  background: #111a14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
  gap: 3px;
}

.theme-picker-container.open .theme-picker-menu {
  display: flex;
  animation: themeMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes themeMenuPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.theme-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-picker-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.theme-picker-item.active {
  background: rgba(34, 197, 94, 0.12);
  color: var(--primary, #22c55e);
  font-weight: 600;
}

.theme-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-item-left i {
  font-size: 1.05rem;
}

.theme-check-icon {
  font-size: 0.95rem;
  color: var(--primary, #22c55e);
  display: none;
}

.theme-picker-item.active .theme-check-icon {
  display: inline-block;
}

/* Light Theme overrides for picker menu */
html[data-theme="light"] .theme-picker-trigger {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

html[data-theme="light"] .theme-picker-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] .theme-picker-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .theme-picker-item {
  color: #475569;
}

html[data-theme="light"] .theme-picker-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .theme-picker-item.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--primary, #16a34a);
}

/* ==========================================================================

/* ==========================================================================

/* ==========================================================================
   PAINEL ADMINISTRATIVO (COMMAND CENTER) - COMPLETE THEMED STYLES
   ========================================================================== */
.admin-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.admin-tab-btn:hover {
  color: var(--text-white, #0f172a);
  background: var(--bg-card, #ffffff);
  border-color: var(--border, #e2e8f0);
}

.admin-tab-btn.active {
  background: var(--primary-dim, rgba(22, 163, 74, 0.12));
  color: var(--primary, #16a34a);
  border-color: rgba(22, 163, 74, 0.35);
  font-weight: 700;
}

/* Light theme overrides for tabs */
html[data-theme="light"] .admin-tab-btn {
  color: #475569;
}
html[data-theme="light"] .admin-tab-btn:hover {
  color: #0f172a;
  background: #ffffff;
  border-color: #cbd5e1;
}
html[data-theme="light"] .admin-tab-btn.active {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.35);
}

/* Cards de Métricas do Admin */
.admin-metric-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-metric-card .metric-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

.admin-metric-card .metric-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white, #0f172a);
  margin-top: 6px;
  line-height: 1.2;
}

html[data-theme="light"] .admin-metric-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
html[data-theme="light"] .admin-metric-card .metric-val {
  color: #0f172a;
}
html[data-theme="light"] .admin-metric-card .metric-label {
  color: #64748b;
}

/* Cards de Servidor VPS */
.admin-srv-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  transition: transform 0.2s;
}

html[data-theme="light"] .admin-srv-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Badges universais do painel */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.admin-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.admin-badge-pro {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.admin-badge-lite {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Switch Toggle no Padrão do Painel */
.admin-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}

.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.admin-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

input:checked + .admin-slider {
  background-color: var(--primary, #16a34a);
}

input:checked + .admin-slider:before {
  transform: translateX(20px);
}

/* Inputs e Selects do Painel Admin */
.admin-filter-control,
.admin-modal-input {
  width: 100%;
  background: var(--bg-subtle, #f1f5f9) !important;
  border: 1px solid var(--border, #cbd5e1) !important;
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-white, #0f172a) !important;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-filter-control::placeholder,
.admin-modal-input::placeholder {
  color: var(--text-muted, #94a3b8) !important;
}

.admin-filter-control:focus,
.admin-modal-input:focus {
  border-color: var(--primary, #16a34a) !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

html[data-theme="light"] .admin-filter-control,
html[data-theme="light"] .admin-modal-input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html[data-theme="light"] .admin-filter-control option {
  background: #ffffff;
  color: #0f172a;
}

/* Tabela de Dados Admin */
.admin-data-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #64748b) !important;
  background: var(--bg-subtle, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
  letter-spacing: 0.04em;
}

.admin-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  vertical-align: middle;
  color: var(--text-white, #0f172a);
}

.admin-data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .admin-data-table tbody tr:hover {
  background: #f8fafc;
}

/* Botões de Ação Redondos no Padrão do Painel */
.btn-icon-subtle {
  background: var(--bg-subtle, #f1f5f9) !important;
  border: 1px solid var(--border, #cbd5e1) !important;
  color: var(--text-muted, #64748b) !important;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.05rem;
  padding: 0;
}

.btn-icon-subtle:hover {
  background: var(--primary, #16a34a) !important;
  color: #ffffff !important;
  border-color: var(--primary, #16a34a) !important;
  transform: translateY(-1px);
}

.btn-icon-subtle.btn-danger-action:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .btn-icon-subtle {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

html[data-theme="light"] .btn-icon-subtle:hover {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}

/* Modais Admin */
.admin-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white, #0f172a) !important;
}
html[data-theme="light"] .admin-modal-title {
  color: #0f172a !important;
}

/* FORÇAR CONTRASTE MODO LIGHT NOS NÚMEROS E TÍTULOS DO ADMIN */
html[data-theme="light"] #adm-stat-users,
html[data-theme="light"] #adm-stat-instances,
html[data-theme="light"] #adm-stat-paid,
html[data-theme="light"] .metric-val:not([style*="color"]) {
  color: #0f172a !important;
}

html[data-theme="light"] .admin-data-table td,
html[data-theme="light"] .admin-data-table th,
html[data-theme="light"] #admin-pane-overview h3,
html[data-theme="light"] #admin-pane-servers h3,
html[data-theme="light"] #admin-pane-instances h3 {
  color: #0f172a !important;
}

html[data-theme="light"] .admin-data-table td span[style*="monospace"] {
  color: #0284c7 !important;
}

/* AJUSTES FINAIS DOS MODAIS E INPUTS ADMIN NO PADRÃO DO DASHBOARD */
.modal-box .admin-modal-input {
  background: var(--bg-subtle, #f1f5f9) !important;
  border: 1px solid var(--border, #cbd5e1) !important;
  border-radius: var(--radius-pill, 9999px) !important;
  padding: 10px 18px !important;
  color: var(--text-white, #0f172a) !important;
  font-size: 0.88rem !important;
}

textarea.admin-modal-input {
  border-radius: 14px !important;
}

html[data-theme="light"] .modal-box .admin-modal-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .modal-box .admin-modal-input:focus {
  border-color: var(--primary, #16a34a) !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

html[data-theme="light"] .admin-metric-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}
