
    :root {
      --bg: #0a0a0a;
      --surface: #141414;
      --surface-2: #1b1b1b;
      --border: #2a2a2a;
      --gold: #d9b22f;
      --gold-dim: #8a712a;
      --text: #eae7dd;
      --text-dim: #8f8c82;
      --ok: #6fae6f;
      --off: #8f8c82;
      box-sizing: border-box;
      --green: #10b981;
      --red: #F87171;
      padding-top: env(safe-area-inset-top, 0px);
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-padding-top: env(safe-area-inset-top, 0px);
    }

    html,
    body {
      height: 100%;
    }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: 'Söhne', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    header {
      padding: 28px 32px 22px;
      border-bottom: 1px solid var(--border);
    }

    header h1 {
      margin: 0 0 4px;
      font-size: 20px;
      font-weight: 600;
      letter-spacing: .2px;
    }

    header p {
      margin: 0;
      color: var(--text-dim);
      font-size: 13.5px;
    }

    header .accent {
      color: var(--gold);
    }

    main {
      padding: 22px 32px 60px;
      max-width: 1500px;
      margin: 0 auto;
    }

    .toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }

    .search-field {
      position: relative;
      width: 260px;
      max-width: 100%;
    }

    .search-field input {
      width: 100%;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 5px;
      padding: 9px 12px 9px 32px;
      font-size: 13px;
      font-family: inherit;
    }

    .search-field input:focus {
      outline: none;
      border-color: var(--gold);
    }

    .search-field svg {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 14px;
      height: 14px;
      stroke: var(--text-dim);
    }

    .result-count {
      color: var(--text-dim);
      font-size: 12.5px;
      white-space: nowrap;
    }

    .table-wrap {
      border: 1px solid var(--border);
      border-radius: 6px;
      overflow-x: auto;
      background: var(--surface);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 760px;
      font-size: 13.5px;
    }

    thead th {
      text-align: left;
      padding: 13px 16px;
      color: var(--text-dim);
      font-weight: 500;
      font-size: 12px;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    tbody td {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      white-space: nowrap;
    }

    tbody tr {
      cursor: pointer;
      transition: background .12s ease;
    }

    tbody tr:hover {
      background: var(--surface-2);
    }

    tbody tr:last-child td {
      border-bottom: none;
    }

    .user-cell {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .user-name {
      font-weight: 500;
      color: var(--text);
    }

    .user-email {
      color: var(--text-dim);
      font-size: 12px;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 9px;
      border-radius: 4px;
      font-size: 12px;
      border: 1px solid var(--border);
      color: var(--text);
    }

    .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex: none;
    }

    .dot.google_authenticator {
      background: var(--gold);
    }

    .dot.email {
      background: #6f9aae;
    }

    .status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12.5px;
    }

    .status .dot.on {
      background: var(--ok);
    }

    .status .dot.off {
      background: var(--text-dim);
    }

    .status.off {
      color: var(--text-dim);
    }

    .muted {
      color: var(--text-dim);
    }

    .view-btn {
      background: none;
      border: 1px solid var(--border);
      color: var(--gold);
      padding: 6px 12px;
      border-radius: 4px;
      font-size: 12.5px;
      cursor: pointer;
    }

    .view-btn:hover {
      border-color: var(--gold-dim);
    }

    /* Panel lateral de registro */
    .overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .55);
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s ease;
      z-index: 20;
    }

    .overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .panel {
      position: fixed;
      top: 0;
      right: 0;
      height: 100%;
      width: min(420px, 92vw);
      background: var(--surface);
      border-left: 1px solid var(--border);
      transform: translateX(100%);
      transition: transform .22s ease;
      z-index: 21;
      display: flex;
      flex-direction: column;
      padding-top: env(safe-area-inset-top, 0px);
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .panel.open {
      transform: translateX(0);
    }

    .panel-head {
      padding: 22px 24px 16px;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }

    .panel-head h2 {
      margin: 0 0 3px;
      font-size: 16px;
      font-weight: 600;
    }

    .panel-head p {
      margin: 0;
      color: var(--text-dim);
      font-size: 12.5px;
    }

    .close-btn {
      background: none;
      border: none;
      color: var(--text-dim);
      font-size: 20px;
      cursor: pointer;
      line-height: 1;
      padding: 2px 4px;
    }

    .close-btn:hover {
      color: var(--text);
    }

    .panel-body {
      padding: 18px 24px;
      overflow-y: auto;
      flex: 1;
    }

    .log-entry {
      border-left: 2px solid var(--border);
      padding: 2px 0 18px 16px;
      position: relative;
    }

    .log-entry::before {
      content: '';
      position: absolute;
      left: -5px;
      top: 3px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--gold);
    }

    .log-entry.error::before {
      content: '';
      position: absolute;
      left: -5px;
      top: 3px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #df3434;
    }

    .log-entry:last-child {
      padding-bottom: 2px;
    }

    .log-row {
      display: flex;
      justify-content: space-between;
      font-size: 12.5px;
      margin-bottom: 3px;
    }

    .log-row .label {
      color: var(--text-dim);
    }

    .log-row .val {
      color: var(--text);
      font-variant-numeric: tabular-nums;
    }

    .log-delta {
      font-size: 11.5px;
      color: var(--gold);
      margin-top: 2px;
    }

    .empty-log {
      color: var(--text-dim);
      font-size: 13px;
      padding: 20px 0;
    }

    .filter-bar {
      display: flex;
      align-items: flex-end;
      gap: 10px;
      padding-bottom: 16px;
      margin-bottom: 16px;
      margin: 20px;
      border-bottom: 1px solid var(--border);
    }

    .filter-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
    }

    .filter-field label {
      font-size: 11px;
      color: var(--text-dim);
    }

    .filter-field input {
      background: var(--surface-2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 4px;
      padding: 7px 8px;
      font-size: 12.5px;
      font-family: inherit;
      color-scheme: dark;
    }

    .filter-field input:focus {
      outline: 1px solid var(--gold);
      border-color: var(--gold);
    }

    .filter-clear {
      background: none;
      border: 1px solid var(--border);
      color: var(--text-dim);
      border-radius: 4px;
      padding: 7px 10px;
      font-size: 12px;
      cursor: pointer;
      white-space: nowrap;
    }

    .filter-clear:hover {
      color: var(--text);
      border-color: var(--gold-dim);
    }

    .pagination {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 14px;
      font-size: 12.5px;
      color: var(--text-dim);
    }

    .pagination .pages {
      display: flex;
      gap: 6px;
    }

    .pagination button {
      background: none;
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 4px;
      padding: 5px 11px;
      font-size: 12.5px;
      cursor: pointer;
      font-family: inherit;
    }

    .pagination button:hover:not(:disabled) {
      border-color: var(--gold-dim);
    }

    .pagination button:disabled {
      opacity: .35;
      cursor: default;
    }

    .pagination button.active {
      border-color: var(--gold);
      color: var(--gold);
    }

    .empty-row td {
      text-align: center;
      color: var(--text-dim);
      padding: 30px 16px;
    }

    .popup {
      position: fixed;
      top: 50%;
      left: 50%;

      width: min(1100px, 95vw);
      max-height: 90dvh;

      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;

      display: flex;
      flex-direction: column;

      padding: 0;
      box-sizing: border-box;

      overflow: hidden;

      transform: translate(-50%, -45%) scale(0.96);
      opacity: 0;
      visibility: hidden;

      transition:
        transform .22s ease,
        opacity .22s ease,
        visibility .22s ease;

      z-index: 21;
    }

    .popup.active {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
      visibility: visible;
    }

    .popup-pagination {
      padding: 14px 24px;
      margin-top: 0;
      border-top: 1px solid var(--border);
      flex-shrink: 0;
      gap: 12px;
    }

    .popup-pagination .pages {
      display: flex;
      gap: 6px;
      overflow-x: auto;
    }

    .panel-body {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }

    .popup-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.45);
      opacity: 0;
      visibility: hidden;
      transition: opacity .22s ease, visibility .22s ease;
      z-index: 20;
    }

    .popup-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .big-icon {
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      font-size: 15px;
    }

    .big-icon.email {
      background: #153a72;
      color: #bfdbfe;
    }

    .provider,
    .status {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 5px 9px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
    }

    .provider.email {
      color: #93c5fd;
      background: #172c46;
    }

    .provider-icon {
      display: inline-grid;
      place-items: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--surface);
      font-size: 11px;
    }

    .status.approved {
      color: #34d399;
      background: #10382e;
    }

    .attempt-left {
      display: flex;
      align-items: center;
      gap: 9px;
      color: var(--text-dim);
    }

    .attempt-id {
      font-size: 10px;
      color: var(--text-dim);
    }

    .attempt-heading {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }

    .status.pending {
        background: #382c17;
      color: #fbbf24;
    }
    .status.error {
      color: #f87171;
      background: #3b1d25;
    }

    .provider.google {
      color: #A78BFA;
      background: #2B2340; 
    }
    .provider.error {
    background: #371E23;
  color: #FB7185;
    }
    .big-icon.error {
     background: #3b1d25;
  color: #f87171;
}

    .big-icon.google {
        color: #A78BFA;
      background: #2B2340; 
    }

    .events {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-left: 14px;
      border-left: 2px solid #303a48;
      margin-left: 14px;
    }

    .event {
      display: grid;
      grid-template-columns:
        minmax(155px, .8fr) minmax(150px, 1.3fr) minmax(135px, auto);
      gap: 10px;
      align-items: center;
      font-size: 12.5px;
    }



    .event-time {
      text-align: right;
      white-space: nowrap;
    }

    .event-name::before {
      content: "";
      position: absolute;
      left: -20px;
      top: 3px;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--green);
    }

    .event-name.pending::before {
      background:  var(--red);
    }
    .event-name.error::before {
      background: var(--red);
    }


    .event-description {
      color: var(--text-dim);
      padding: 2px 0;
    }

    .event-name {
      position: relative;
    }

    .attempt {
      padding: 17px 0;
      border-bottom: 1px solid var(--border);
    }


    .eyebrow {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      font-weight: 500;
      color: #D9B22F;
      letter-spacing: 0.2px;
      margin-bottom: 8px;
    }

    #app {
      display: none;
    }

    #loginScreen {
      min-height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .login-card {
      width: 100%;
      max-width: 360px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 30px 28px 26px;
    }

    .login-mark {
      width: 34px;
      height: 34px;
      border: 1px solid var(--gold);
      border-radius: 7px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--gold);
      font-size: 16px;
      margin-bottom: 16px;
    }

    .login-card h1 {
      margin: 0 0 4px;
      font-size: 18px;
      font-weight: 600;
    }

    .login-card p {
      margin: 0 0 22px;
      color: var(--text-dim);
      font-size: 13px;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 14px;
    }

    .field label {
      font-size: 12px;
      color: var(--text-dim);
    }

    .field input {
      background: var(--surface-2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 5px;
      padding: 10px 11px;
      font-size: 13.5px;
      font-family: inherit;
    }

    .field input:focus {
      outline: none;
      border-color: var(--gold);
    }

    .code-inputs {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
    }

    .code-inputs input {
      width: 100%;
      text-align: center;
      font-size: 17px;
      letter-spacing: 1px;
      padding: 10px 0;
      background: var(--surface-2);
      border: 1px solid var(--border);
      color: var(--gold);
      border-radius: 5px;
      font-family: inherit;
    }

    .code-inputs input:focus {
      outline: none;
      border-color: var(--gold);
    }

    .login-submit {
      width: 100%;
      background: var(--gold);
      color: #141105;
      border: none;
      border-radius: 5px;
      padding: 11px;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
    }

    .login-submit:hover {
      background: #e6c14f;
    }

    .login-back {
      display: block;
      text-align: center;
      margin-top: 14px;
      color: var(--text-dim);
      font-size: 12.5px;
      background: none;
      border: none;
      cursor: pointer;
      font-family: inherit;
    }

    .login-back:hover {
      color: var(--text);
    }

    .login-error {
      color: #d97676;
      font-size: 12.5px;
      margin: -6px 0 14px;
      min-height: 1px;
    }

    .login-hint {
      margin-top: 18px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
      color: var(--text-dim);
      font-size: 11.5px;
      line-height: 1.5;
    }

    .login-back {
      margin-top: 2px;
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 6px 12px;
    }

    .header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
    }


    @media (max-width:640px) {

      header,
      main {
        padding-left: 18px;
        padding-right: 18px;
      }

      thead th:nth-child(4),
      tbody td:nth-child(4) {
        display: none;
      }
    }
