  /* ===== ROOT – identidade roxo/azul ===== */
    :root {
      --bg: #0d0a14;
      --panel: #181225;
      --panel-2: #221b33;
      --text: #f0edf7;
      --muted: #b3a9cc;
      --line: #3a2e4f;
      --accent: #a78bfa;
      --accent-2: #60a5fa;
      --danger: #f87171;
      --warning: #fbbf24;
      --shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
      --radius: 22px;
      --transition: 0.25s ease;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    html {
      scroll-behavior: smooth;
    }
    body {
      min-height: 100vh;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
      color: var(--text);
      background: radial-gradient(circle at 20% 10%, rgba(167, 139, 250, .12), transparent 40%),
                  radial-gradient(circle at 80% 90%, rgba(96, 165, 250, .10), transparent 40%),
                  linear-gradient(145deg, #0d0a14, #161122 60%, #0d0a14);
      line-height: 1.5;
    }

    button, select, input {
      font: inherit;
    }
    button {
      cursor: pointer;
      border: none;
      background: none;
      color: inherit;
    }

    .app {
      width: min(1024px, 100%);
      margin: 0 auto;
      padding: 20px 16px 56px;
    }

    /* ===== TOPBAR ===== */
    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }
    .brand-title {
      display: flex;
      align-items: baseline;
      gap: 9px;
      flex-wrap: wrap;
    }
    .brand h1 {
      margin: 0;
      font-size: clamp(1.7rem, 5vw, 2.6rem);
      letter-spacing: -0.04em;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .brand-handle {
      color: var(--muted);
      font-size: .72rem;
      font-weight: 600;
      letter-spacing: .01em;
      white-space: nowrap;
    }
    .brand p {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: .95rem;
    }
    .topbar-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(24, 18, 37, 0.7);
      backdrop-filter: blur(8px);
      color: var(--muted);
      font-size: .9rem;
      white-space: nowrap;
    }
    .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--accent-2);
      box-shadow: 0 0 16px rgba(96, 165, 250, .6);
    }
    .icon-btn {
      padding: 8px 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(24, 18, 37, 0.6);
      font-size: 1.1rem;
      transition: var(--transition);
    }
    .icon-btn:hover {
      background: var(--panel-2);
      transform: scale(1.04);
    }

    /* ===== HERO ===== */
    .hero {
      display: grid;
      grid-template-columns: 1.4fr .6fr;
      gap: 20px;
      padding: 24px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: linear-gradient(145deg, rgba(28, 20, 44, 0.95), rgba(15, 10, 26, 0.96));
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
      margin-bottom: 28px;
    }
    .hero::after {
      content: '';
      position: absolute;
      inset: auto -70px -95px auto;
      width: 280px;
      height: 280px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(167, 139, 250, .12), transparent 60%);
      pointer-events: none;
    }
    .eyebrow {
      margin: 0 0 6px;
      color: var(--accent);
      font-weight: 700;
      text-transform: uppercase;
      font-size: .75rem;
      letter-spacing: .16em;
    }
    .hero h2 {
      font-size: clamp(1.8rem, 5vw, 3.2rem);
      line-height: 1.05;
      margin: 0 0 10px;
      letter-spacing: -0.04em;
    }
    .hero p {
      color: var(--muted);
      margin: 0;
      max-width: 50ch;
    }
    .selector {
      margin-top: 18px;
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    select, .input-style {
      min-width: 180px;
      padding: 10px 14px;
      border-radius: 14px;
      border: 1px solid var(--line);
      background: #11101c;
      color: var(--text);
      outline: none;
    }
    select:focus, .input-style:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(167, 139, 250, .15);
    }

    .btn {
      border: none;
      border-radius: 14px;
      padding: 10px 18px;
      font-weight: 700;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .btn-primary {
      background: var(--accent);
      color: #0d0a14;
      box-shadow: 0 8px 24px rgba(167, 139, 250, .25);
    }
    .btn-primary:hover {
      transform: translateY(-2px);
      filter: brightness(1.08);
    }
    .btn-ghost {
      background: #1f1830;
      color: var(--text);
      border: 1px solid var(--line);
    }
    .btn-ghost:hover {
      background: #2c2242;
      transform: translateY(-1px);
    }
    .btn-danger {
      background: rgba(248, 113, 113, .12);
      color: #fca5a5;
      border: 1px solid rgba(248, 113, 113, .2);
    }
    .btn-danger:hover {
      background: rgba(248, 113, 113, .2);
    }
    .btn-sm {
      padding: 6px 12px;
      font-size: .85rem;
      border-radius: 10px;
    }
    .btn-timer {
      background: rgba(96, 165, 250, 0.15);
      border: 1px solid rgba(96, 165, 250, 0.3);
      color: var(--accent-2);
    }
    .btn-timer:hover {
      background: rgba(96, 165, 250, 0.25);
    }

    /* ===== PROGRESS RING ===== */
    .progress-wrap {
      display: grid;
      place-items: center;
      position: relative;
      min-height: 190px;
    }
    .ring {
      width: 168px;
      height: 168px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: conic-gradient(var(--accent) 0deg, #2c2340 0deg);
      position: relative;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 50px rgba(167, 139, 250, .08);
      transition: background 0.4s ease;
    }
    .ring::after {
      content: '';
      position: absolute;
      width: 132px;
      height: 132px;
      border-radius: 50%;
      background: #161122;
      border: 1px solid var(--line);
    }
    .ring-value {
      position: relative;
      z-index: 1;
      text-align: center;
    }
    .ring-value strong {
      display: block;
      font-size: 2rem;
      letter-spacing: -0.04em;
    }
    .ring-value span {
      font-size: .8rem;
      color: var(--muted);
    }

    /* ===== SECTION TITLE ===== */
    .section-title {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin: 28px 2px 14px;
    }
    .section-title h3 {
      margin: 0;
      font-size: 1.2rem;
    }
    .section-title span {
      color: var(--muted);
      font-size: .85rem;
    }

    /* ===== CURRENT CARD ===== */
    .current-card {
      border: 1px solid rgba(167, 139, 250, .25);
      border-radius: var(--radius);
      padding: 22px;
      background: linear-gradient(145deg, rgba(26, 18, 44, 0.98), rgba(15, 10, 26, 0.98));
      box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
      position: relative;
      overflow: hidden;
      transition: border-color 0.3s;
    }
    .current-card.done-all {
      border-color: rgba(96, 165, 250, .3);
    }
    .step-label {
      color: var(--accent);
      font-weight: 700;
      font-size: .8rem;
      text-transform: uppercase;
      letter-spacing: .12em;
    }
    .current-card h4 {
      font-size: clamp(1.4rem, 4vw, 2rem);
      margin: 8px 0 8px;
      letter-spacing: -0.03em;
    }
    .meta {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin: 12px 0 16px;
    }
    .tag {
      padding: 6px 12px;
      border: 1px solid var(--line);
      background: #14101f;
      border-radius: 999px;
      color: #d5cce6;
      font-size: .85rem;
    }
    .howto {
      margin: 0 0 12px;
      color: var(--muted);
      line-height: 1.6;
    }
    .tip {
      padding: 12px 14px;
      border-radius: 14px;
      background: rgba(96, 165, 250, .07);
      border: 1px solid rgba(96, 165, 250, .15);
      color: #c7dbfe;
      font-size: .92rem;
      margin-bottom: 14px;
    }
    .exercise-image {
      margin: 12px 0 16px;
      text-align: center;
    }
    .exercise-image img {
      max-width: 100%;
      max-height: 400px;
      border-radius: 14px;
      border: 1px solid var(--line);
      box-shadow: 0 8px 24px rgba(0,0,0,0.3);
      background: #0f0c1a;
    }
    .load-input {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 10px 0 16px;
      flex-wrap: wrap;
    }
    .load-input label {
      color: var(--muted);
      font-weight: 600;
      font-size: .9rem;
    }
    .load-input input {
      width: 90px;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: #0f0c1a;
      color: var(--text);
      text-align: center;
    }
    .load-input input:focus {
      border-color: var(--accent);
      outline: none;
    }
    .actions {
      display: grid;
      grid-template-columns: 1fr 1.5fr;
      gap: 10px;
      margin-top: 6px;
    }

    /* ===== EXERCISE LIST ===== */
    .exercise-list {
      display: grid;
      gap: 12px;
    }
    .exercise-item {
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(24, 18, 37, 0.8);
      overflow: hidden;
      transition: var(--transition);
    }
    .exercise-item.active {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(167, 139, 250, .12);
    }
    .exercise-item.completed {
      opacity: .65;
    }
    .exercise-head {
      display: grid;
      grid-template-columns: auto 1fr auto auto;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
    }
    .exercise-head .check {
      width: 28px;
      height: 28px;
      border-radius: 10px;
      border: 1px solid #4a3d60;
      background: #0f0c1a;
      display: grid;
      place-items: center;
      font-weight: 900;
      font-size: .9rem;
      transition: var(--transition);
      color: #0d0a14;
    }
    .exercise-item.completed .check {
      background: var(--accent);
      border-color: var(--accent);
      color: #0d0a14;
    }
    .exercise-name {
      font-weight: 700;
    }
    .exercise-sub {
      color: var(--muted);
      font-size: .8rem;
      margin-top: 2px;
    }
    .exercise-load {
      font-size: .85rem;
      background: #1f1830;
      padding: 4px 10px;
      border-radius: 999px;
      border: 1px solid var(--line);
      color: var(--muted);
      min-width: 60px;
      text-align: center;
    }
    .index {
      color: #6b5a83;
      font-weight: 800;
      font-size: .8rem;
    }
    details {
      border-top: 1px solid transparent;
    }
    details[open] {
      border-top-color: var(--line);
    }
    summary {
      list-style: none;
      padding: 0 16px 14px 56px;
      color: #b3a9cc;
      cursor: pointer;
      font-size: .9rem;
    }
    summary::-webkit-details-marker {
      display: none;
    }
    .detail-body {
      padding: 0 16px 18px 56px;
      color: var(--muted);
      font-size: .9rem;
      line-height: 1.6;
    }
    .detail-body strong {
      color: #d5cce6;
    }

    /* ===== FOOTER ACTIONS ===== */
    .footer-actions {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 22px;
    }
    .backup-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .note {
      margin-top: 22px;
      padding: 16px 18px;
      border: 1px solid rgba(251, 191, 36, .15);
      background: rgba(251, 191, 36, .06);
      border-radius: 16px;
      color: #fde68a;
      line-height: 1.6;
      font-size: .9rem;
    }

    /* ===== REST AREA ===== */
    .rest-card {
      padding: 32px;
      text-align: center;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(24, 18, 37, 0.9);
    }
    .rest-card .emoji {
      font-size: 3.6rem;
    }
    .rest-card h4 {
      font-size: 1.6rem;
      margin: 12px 0 8px;
    }
    .rest-card p {
      color: var(--muted);
      max-width: 50ch;
      margin: 0 auto;
      line-height: 1.6;
    }

    /* ===== TIMER OVERLAY ===== */
    .timer-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .75);
      backdrop-filter: blur(6px);
      display: none;
      place-items: center;
      z-index: 1000;
      animation: fadeIn 0.3s ease;
    }
    .timer-overlay.active {
      display: grid;
    }
    .timer-box {
      background: #1a142b;
      border: 1px solid var(--line);
      border-radius: 32px;
      padding: 36px 48px;
      text-align: center;
      max-width: 400px;
      width: 90%;
      box-shadow: 0 30px 60px rgba(0, 0, 0, .6);
      animation: slideUp 0.4s ease;
    }
    .timer-box .timer-display {
      font-size: 4.2rem;
      font-weight: 800;
      letter-spacing: -0.04em;
      color: var(--accent-2);
      font-variant-numeric: tabular-nums;
      margin: 10px 0 6px;
    }
    .timer-box .timer-label {
      color: var(--muted);
      font-size: .9rem;
      text-transform: uppercase;
      letter-spacing: .12em;
    }
    .timer-box .timer-progress {
      width: 100%;
      height: 6px;
      background: #2c2340;
      border-radius: 999px;
      margin: 16px 0 20px;
      overflow: hidden;
    }
    .timer-box .timer-progress span {
      display: block;
      height: 100%;
      width: 100%;
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
      border-radius: 999px;
      transition: width 1s linear;
    }
    .timer-box .timer-actions {
      display: flex;
      gap: 12px;
      justify-content: center;
    }

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

    /* ===== HISTÓRICO MODAL ===== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .7);
      backdrop-filter: blur(4px);
      display: none;
      place-items: center;
      z-index: 900;
      animation: fadeIn 0.25s ease;
    }
    .modal-overlay.active {
      display: grid;
    }
    .modal-box {
      background: #1a142b;
      border: 1px solid var(--line);
      border-radius: 28px;
      padding: 28px 32px;
      max-width: 700px;
      width: 94%;
      max-height: 80vh;
      overflow-y: auto;
      box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
    }
    .modal-box h2 {
      margin: 0 0 12px;
      font-size: 1.6rem;
    }
    .modal-box .close-btn {
      float: right;
      font-size: 1.8rem;
      color: var(--muted);
      background: none;
      border: none;
      padding: 0 4px;
    }
    .modal-box .close-btn:hover {
      color: var(--text);
    }
    .historico-item {
      border-bottom: 1px solid var(--line);
      padding: 16px 0;
    }
    .historico-item:last-child {
      border-bottom: none;
    }
    .historico-item .data {
      color: var(--accent-2);
      font-weight: 700;
    }
    .historico-item .treino-nome {
      font-weight: 700;
      font-size: 1.1rem;
      margin: 4px 0;
    }
    .historico-item .detalhes {
      color: var(--muted);
      font-size: .9rem;
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
      margin-top: 6px;
    }
    .historico-item .detalhes span {
      background: #221b33;
      padding: 2px 10px;
      border-radius: 999px;
      border: 1px solid var(--line);
    }
    .empty-historico {
      color: var(--muted);
      text-align: center;
      padding: 30px 0;
    }

    /* ===== CONTROLE DE SÉRIES ===== */
    .metric-inputs {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 10px;
      margin: 12px 0 16px;
    }
    .metric-inputs[hidden],
    .series-panel[hidden] {
      display: none;
    }
    .metric-field {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-weight: 650;
      font-size: .85rem;
    }
    .metric-field input {
      width: 100%;
      min-width: 0;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: #0f0c1a;
      color: var(--text);
      outline: none;
    }
    .metric-field input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(167, 139, 250, .13);
    }
    .series-panel {
      padding: 14px;
      margin: 8px 0 16px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(13, 10, 20, .42);
    }
    .series-title {
      color: var(--muted);
      font-size: .82rem;
      font-weight: 700;
      margin-bottom: 10px;
    }
    .series-chips {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    .series-chip {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
      background: #0f0c1a;
      color: var(--muted);
      font-weight: 850;
      transition: var(--transition);
    }
    .series-chip.current {
      border-color: var(--accent-2);
      box-shadow: 0 0 0 3px rgba(96, 165, 250, .12);
      color: #dbeafe;
    }
    .series-chip.done {
      background: var(--accent);
      border-color: var(--accent);
      color: #0d0a14;
    }
    .series-caption {
      margin-top: 9px;
      color: var(--muted);
      font-size: .78rem;
    }
    .btn:disabled {
      opacity: .55;
      cursor: not-allowed;
      transform: none !important;
      filter: none !important;
    }

    /* ===== RESPONSIVIDADE ===== */
    @media (max-width: 720px) {
      .hero {
        grid-template-columns: 1fr;
        padding: 18px;
      }
      .progress-wrap {
        min-height: 150px;
      }
      .ring {
        width: 148px;
        height: 148px;
      }
      .ring::after {
        width: 116px;
        height: 116px;
      }
      .topbar {
        flex-direction: column;
        align-items: flex-start;
      }
      .topbar-actions {
        width: 100%;
        justify-content: flex-start;
      }
      .actions {
        grid-template-columns: 1fr;
      }
      .exercise-head {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
      }
      .exercise-head .exercise-load {
        grid-column: 2 / 3;
        justify-self: start;
        margin-top: 2px;
      }
      .index {
        display: none;
      }
      summary,
      .detail-body {
        padding-left: 54px;
      }
      .timer-box {
        padding: 24px 20px;
      }
      .timer-box .timer-display {
        font-size: 3rem;
      }
      .modal-box {
        padding: 20px;
      }
    }
    @media (max-width: 480px) {
      .app {
        padding: 12px 10px 40px;
      }
      .hero {
        padding: 14px;
      }
      .current-card {
        padding: 16px;
      }
      .exercise-head {
        padding: 12px 12px;
      }
      .selector select {
        min-width: 140px;
      }
    }
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: #0d0a14;
    }
    ::-webkit-scrollbar-thumb {
      background: var(--line);
      border-radius: 999px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent);
    }

    /* ===== TOAST ===== */
    .toast {
      position: fixed;
      left: 50%;
      bottom: 24px;
      transform: translateX(-50%) translateY(20px);
      background: #1a142b;
      color: #fff;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 10px 20px;
      opacity: 0;
      pointer-events: none;
      transition: 0.25s ease;
      z-index: 999;
      box-shadow: var(--shadow);
      font-size: .95rem;
    }
    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    #importInput {
      display: none;
    }
/* =========================================================
   AUTENTICAÇÃO — MYPERSONAL
========================================================= */

.hidden {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  min-height: 100vh;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(167, 139, 250, 0.20),
      transparent 38%
    ),
    radial-gradient(
      circle at 80% 90%,
      rgba(96, 165, 250, 0.14),
      transparent 40%
    ),
    linear-gradient(145deg, #0d0a14, #161122 60%, #0d0a14);
}

.auth-screen[hidden] {
  display: none !important;
}

.auth-card {
  width: min(100%, 470px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(
      145deg,
      rgba(28, 20, 44, 0.98),
      rgba(15, 10, 26, 0.98)
    );
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(167, 139, 250, 0.08);
}

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

.auth-logo {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: white;
  font-size: 31px;
  font-weight: 900;
  background:
    linear-gradient(
      135deg,
      var(--accent),
      var(--accent-2)
    );
  box-shadow: 0 12px 28px rgba(167, 139, 250, 0.28);
}

.auth-brand h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  background:
    linear-gradient(
      135deg,
      var(--accent),
      var(--accent-2)
    );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(13, 10, 20, 0.72);
}

.auth-tab {
  padding: 12px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  transition: var(--transition);
}

.auth-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.auth-tab.active {
  color: white;
  background:
    linear-gradient(
      135deg,
      rgba(167, 139, 250, 0.28),
      rgba(96, 165, 250, 0.18)
    );
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(13, 10, 20, 0.76);
  transition: var(--transition);
}

.auth-form input::placeholder {
  color: #776d8d;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.13);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
  transition: var(--transition);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--text);
  background: rgba(167, 139, 250, 0.12);
  outline: none;
}

.forgot-password-btn {
  justify-self: end;
  margin-top: -8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
}

.forgot-password-btn:hover,
.forgot-password-btn:focus-visible {
  color: #c4b5fd;
  text-decoration: underline;
  outline: none;
}

.recovery-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 2px;
}

.recovery-heading strong {
  color: var(--text);
  font-size: 1.05rem;
}

.recovery-heading small {
  color: var(--muted);
}

.account-type {
  display: grid;
  gap: 10px;
}

.account-type > p {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 800;
}

.account-option {
  position: relative;
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px !important;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(13, 10, 20, 0.55);
  cursor: pointer;
  transition: var(--transition);
}

.account-option:hover {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.07);
  transform: translateY(-1px);
}

.account-option:has(input:checked) {
  border-color: var(--accent);
  background:
    linear-gradient(
      135deg,
      rgba(167, 139, 250, 0.14),
      rgba(96, 165, 250, 0.07)
    );
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.10);
}

.account-option input[type="radio"] {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--accent);
}

.account-option span {
  display: grid;
  gap: 3px;
}

.account-option strong {
  color: var(--text);
  font-size: 0.94rem;
}

.account-option small {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 400;
}

.auth-primary-button {
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 14px;
  color: #110b1c;
  font-weight: 900;
  background:
    linear-gradient(
      135deg,
      var(--accent),
      #8b7cf6
    );
  box-shadow: 0 12px 28px rgba(167, 139, 250, 0.24);
  transition: var(--transition);
}

.auth-primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.auth-primary-button:active {
  transform: translateY(0);
}

.auth-primary-button:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
  filter: none;
}

.auth-message {
  min-height: 24px;
  margin: 17px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-message[data-type="success"] {
  color: #75e6a4;
}

.auth-message[data-type="error"] {
  color: #fca5a5;
}

@media (max-width: 520px) {
  .auth-screen {
    place-items: start center;
    padding-top: 24px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .auth-logo {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    font-size: 27px;
  }

  .auth-brand h1 {
    font-size: 1.7rem;
  }
}
.logged-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 18, 37, 0.75);
}

.logged-user-info {
  display: grid;
  line-height: 1.2;
}

.logged-user-info strong {
  max-width: 170px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logged-user-info small {
  color: var(--accent);
  font-size: 0.72rem;
}

.cloud-sync-status {
  color: var(--muted) !important;
  font-size: 0.65rem !important;
}

.cloud-sync-status[data-state="saving"] {
  color: #fbbf24 !important;
}

.cloud-sync-status[data-state="saved"] {
  color: #75e6a4 !important;
}

.cloud-sync-status[data-state="offline"],
.cloud-sync-status[data-state="error"] {
  color: #fca5a5 !important;
}

.logout-btn {
  padding: 8px 14px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  color: #fca5a5;
  font-weight: 800;
  background: rgba(248, 113, 113, 0.08);
}

.logout-btn:hover {
  background: rgba(248, 113, 113, 0.18);
}

@media (max-width: 600px) {
  .logged-user {
    width: 100%;
    justify-content: space-between;
  }
}
