*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #050a1a;
  --surface:    #080f28;
  --surface2:   #0c1535;
  --surface3:   #101c42;
  --border:     #1a2a5e;
  --border2:    #243a7a;
  --accent:     #f7c800;
  --accent2:    #e6b800;
  --accent-dim: rgba(247,200,0,0.10);
  --purple:     #1a3aaa;
  --red:        #f43f5e;
  --ham:        #e8607a;
  --ham2:       #f472b6;
  --yellow:     #f7c800;
  --green:      #10b981;
  --text:       #eef2ff;
  --muted:      #5a6a9a;
  --muted2:     #2a3a6a;
  --mono:       'JetBrains Mono', monospace;
  --sans:       'DM Sans', sans-serif;
  --topbar-h:   56px;
  --filters-h:  54px;
  --radius:     12px;
}

html, body { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  --color: rgba(247, 200, 0, 0.12);
  background-color: transparent;
  background-size: 40px 40px;
  background-image:
    linear-gradient(45deg, var(--color), transparent 40%),
    linear-gradient(-90deg, var(--color), transparent 20%);
}
.bg-orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(90px); opacity: 0.18;
}
.orb-1 { width: 600px; height: 600px; background: #1a3aaa; top: -200px; left: -150px; }
.orb-2 { width: 350px; height: 350px; background: #f7c800; top: 40vh; right: -120px; opacity: 0.14; }
.orb-3 { width: 280px; height: 280px; background: #e8607a; bottom: 0; left: 25%; opacity: 0.12; }
.scanline {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.018) 2px, rgba(0,0,0,.018) 4px);
}

.screen {
  position: fixed; inset: 0; z-index: 10;
  display: none; opacity: 0; transition: opacity 0.3s ease;
}
.screen.active  { display: flex; }
.screen.visible { opacity: 1; }

#screen-login { align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }

.login-wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  text-align: center; padding: 8px 0 24px;
}

.login-logo {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  animation: fadeUp 0.5s ease both;
}
.logo-img {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 24px;
  border: 2px solid rgba(247,200,0,0.4);
  box-shadow: 0 0 32px rgba(247,200,0,0.35), 0 0 8px rgba(247,200,0,0.2);
  filter: drop-shadow(0 0 16px rgba(247,200,0,0.4));
}

.ham-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,96,122,0.15);
  border: 1px solid rgba(232,96,122,0.4);
  border-radius: 99px; padding: 5px 16px 5px 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--ham2); letter-spacing: 0.12em;
  margin-bottom: 20px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.ham-img {
  width: 32px; height: 24px;
  object-fit: cover; border-radius: 50px;
  border: 1px solid rgba(232,96,122,0.3);
}

.login-wordmark {
  font-family: var(--mono); font-size: 22px; font-weight: 700;
  letter-spacing: 0.14em; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  animation: fadeUp 0.5s 0.05s ease both;
}

.logo-img-sm {
  width: 28px; height: 28px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border2);
  box-shadow: 0 0 10px rgba(247,200,0,0.3);
}
.logo-bracket { color: var(--muted); }
.logo-text    { color: var(--text); }
.accent       { color: var(--accent); }

.login-sub {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  margin-bottom: 28px; letter-spacing: 0.06em;
  animation: fadeUp 0.5s 0.05s ease both;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 24px 20px;
  animation: fadeUp 0.5s 0.1s ease both;
}

.field-group { margin-bottom: 16px; text-align: left; }
.field-label {
  display: block; font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.14em; margin-bottom: 6px; opacity: 0.8;
}
.field-input {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; font-family: var(--mono); font-size: 14px;
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; font-size: 16px;
}
.field-input::placeholder { color: var(--muted2); }
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(247,200,0,0.08); }

.pass-wrap { position: relative; }
.pass-wrap .field-input { padding-right: 44px; }
.pass-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); opacity: 0.5; padding: 6px;
  transition: opacity 0.2s, color 0.2s; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.pass-toggle:hover { opacity: 1; color: var(--accent); }

.login-error {
  min-height: 18px; font-family: var(--mono); font-size: 11px;
  color: #ff7a9a; margin-bottom: 10px; text-align: left;
}

.btn-login {
  width: 100%; padding: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #050a1a;
  border: none; border-radius: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 0 28px rgba(247,200,0,0.35);
}
.btn-login:hover { box-shadow: 0 0 40px rgba(247,200,0,0.55); transform: translateY(-1px); }
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-arrow { font-size: 16px; }
.login-note { margin-top: 14px; font-size: 11px; color: var(--muted2); line-height: 1.6; }

#screen-dash { flex-direction: column; overflow-y: hidden; overflow-x: visible; }

.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: var(--topbar-h);
  background: rgba(8,8,16,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px); flex-shrink: 0; gap: 8px;
}
.topbar-logo {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em;
  display: flex; align-items: center; gap: 2px; flex-shrink: 0;
}
.topbar-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.user-nick { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-logout {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted);
  font-family: var(--mono); font-size: 10px; padding: 5px 10px;
  cursor: pointer; transition: all 0.2s; white-space: nowrap; letter-spacing: 0.06em;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

.btn-send-all {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #050a1a; border: none; border-radius: 6px;
  padding: 7px 12px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 0 16px rgba(247,200,0,0.3); white-space: nowrap;
}
.btn-send-all:hover { box-shadow: 0 0 26px rgba(247,200,0,0.55); transform: translateY(-1px); }
.btn-send-all:active { transform: scale(0.97); }
.btn-send-all:disabled { opacity: 0.5; cursor: not-allowed; }

.filters-bar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; min-height: var(--filters-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0; gap: 8px;
}
.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  background: none; border: 1px solid transparent;
  border-radius: 6px; padding: 6px 14px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.filter-tab.active {
  background: var(--accent-dim);
  border-color: rgba(247,200,0,0.4);
  color: var(--accent);
}
.filters-right { display: flex; align-items: center; gap: 8px; }

.search-input {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 12px;
  font-family: var(--mono); font-size: 12px; color: var(--text);
  outline: none; width: 140px; transition: border-color 0.2s, width 0.2s;
}
.search-input::placeholder { color: var(--muted2); }
.search-input:focus { border-color: var(--accent); width: 180px; }

.btn-refresh {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted);
  font-size: 18px; padding: 5px 9px;
  cursor: pointer; transition: all 0.2s; line-height: 1;
}
.btn-refresh:hover { color: var(--accent); border-color: var(--accent); }

.task-area {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 16px; position: relative; z-index: 5;
  -webkit-overflow-scrolling: touch;
}
.task-area::-webkit-scrollbar { width: 4px; }
.task-area::-webkit-scrollbar-track { background: transparent; }
.task-area::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 16px 16px;
  position: relative; overflow: hidden;
  animation: fadeUp 0.4s ease both;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.35); }

.dash-card::after {
  content: ''; position: absolute;
  inset: 0; border-radius: 16px; pointer-events: none;
  opacity: 0.06;
}
.dash-card.total { border-color: rgba(26,58,170,0.5); }
.dash-card.total::after { background: radial-gradient(ellipse at top left, #1a3aaa, transparent 70%); }
.dash-card.pend  { border-color: rgba(247,200,0,0.35); }
.dash-card.pend::after  { background: radial-gradient(ellipse at top left, #f7c800, transparent 70%); }
.dash-card.exp   { border-color: rgba(244,63,94,0.35); }
.dash-card.exp::after   { background: radial-gradient(ellipse at top left, #f43f5e, transparent 70%); }

.dash-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}
.dash-num {
  font-family: var(--mono); font-size: 40px; font-weight: 700; line-height: 1;
}
.dash-card.total .dash-num { color: var(--text); }
.dash-card.pend  .dash-num { color: var(--accent); }
.dash-card.exp   .dash-num { color: var(--red); }
.dash-sub {
  font-size: 11px; color: var(--muted);
  font-family: var(--mono); letter-spacing: 0.04em;
}
.dash-bar-wrap { display: none; }
.dash-bar      { display: none; }

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 14px 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
  animation: fadeUp 0.4s ease both;
  display: flex; flex-direction: column; gap: 10px;
}
.task-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  opacity: 0; transition: opacity 0.2s;
}
.task-card:has(.badge-pendente)::before { background: var(--accent); }
.task-card:has(.badge-expirada)::before { background: var(--red); }
.task-card:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.35); }
.task-card:hover::before { opacity: 1; }

.card-top { display: flex; align-items: center; gap: 8px; }
.card-badge {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em; border-radius: 4px; padding: 3px 8px;
  white-space: nowrap; flex-shrink: 0;
}
.badge-pendente { background: rgba(247,200,0,0.12); color: var(--accent); border: 1px solid rgba(247,200,0,0.25); }
.badge-expirada { background: rgba(244,63,94,0.10); color: #fb7185; border: 1px solid rgba(244,63,94,0.2); }

.card-title {
  font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.card-venc { display: none; }
.card-desc  { display: none; }
.card-spacer { display: none; }

.btn-fazer {
  width: 100%; padding: 9px;
  border: 1px solid var(--border2);
  border-radius: 7px; background: transparent;
  color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.task-card:has(.badge-pendente) .btn-fazer {
  border-color: rgba(247,200,0,0.25); color: var(--accent);
  background: rgba(247,200,0,0.05);
}
.task-card:has(.badge-expirada) .btn-fazer {
  border-color: rgba(244,63,94,0.2); color: #fb7185;
  background: rgba(244,63,94,0.05);
}
.btn-fazer:hover { filter: brightness(1.2); border-color: currentColor; }

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px; align-items: stretch;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 0; gap: 16px;
}
.spin-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px; text-align: center;
}
.empty-icon  { font-size: 44px; margin-bottom: 14px; opacity: 0.35; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-sub   { font-size: 13px; color: var(--muted); font-family: var(--mono); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,8,16,0.88); backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.open    { display: flex; }
.modal-overlay.visible { opacity: 1; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  max-height: 90vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 2px;
}
.modal::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.modal-overlay.visible .modal { transform: translateY(0); }
.modal::before {
  content: ''; display: block; width: 36px; height: 4px;
  background: var(--border2); border-radius: 2px; margin: 12px auto 0;
}

.tmodal-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.tmodal-icon { font-size: 20px; }
.tmodal-title {
  flex: 1; margin: 0;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--text); letter-spacing: 0.08em;
}
.tmodal-close {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted);
  font-size: 13px; padding: 5px 9px; cursor: pointer; transition: all 0.2s;
}
.tmodal-close:hover { border-color: var(--red); color: var(--red); }

.tmodal-task-name {
  background: var(--surface2); border-left: 3px solid var(--accent);
  padding: 10px 14px; margin: 14px 20px 0;
  border-radius: 0 8px 8px 0;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.03em;
}

.tmodal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }

.tmodal-section-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 8px;
}

.score-display { display: flex; align-items: center; gap: 12px; }
.score-value {
  font-family: var(--mono); font-size: 28px; font-weight: 700;
  color: var(--accent); min-width: 60px; line-height: 1;
}
.score-value span { font-size: 14px; color: var(--muted); }
.score-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) 0%, var(--surface3) 0%);
}
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 0 10px rgba(247,200,0,0.5);
  border: 2px solid var(--surface);
}
.score-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--surface);
}

.time-section {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
}
.time-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.time-field { display: flex; flex-direction: column; gap: 6px; }
.time-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
}
.time-input-wrap { position: relative; display: flex; align-items: center; }
.tmodal-input {
  width: 100%; background: var(--surface3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 10px 28px 10px 12px;
  font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--text);
  outline: none; transition: border-color 0.2s; -webkit-appearance: none;
  text-align: center;
  -moz-appearance: textfield;
}
.tmodal-input::-webkit-outer-spin-button,
.tmodal-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.tmodal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(247,200,0,0.08); }
.time-unit {
  position: absolute; right: 10px;
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  pointer-events: none;
}
.time-arrow {
  font-family: var(--mono); font-size: 18px; color: var(--muted2);
  padding-bottom: 8px; text-align: center;
}
.time-hint {
  margin-top: 8px; font-family: var(--mono); font-size: 10px;
  color: var(--muted); text-align: center; line-height: 1.5;
  letter-spacing: 0.03em;
}

.tmodal-info {
  display: flex; align-items: center; gap: 8px;
  background: rgba(247,200,0,0.06); border: 1px solid rgba(247,200,0,0.15);
  border-radius: 8px; padding: 8px 12px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.tmodal-info-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.tmodal-footer { display: flex; gap: 10px; padding: 0 20px 20px; }
.btn-draft {
  flex: 1; padding: 12px; background: none;
  border: 1px solid var(--border2); border-radius: 8px; color: var(--muted);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer; transition: all 0.2s;
}
.btn-draft:hover { border-color: var(--muted); color: var(--text); }
.btn-draft:disabled { opacity: 0.4; pointer-events: none; }

.btn-send {
  flex: 2; padding: 12px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none; border-radius: 8px; color: #050a1a;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 0 18px rgba(247,200,0,0.28);
}
.btn-send:hover { box-shadow: 0 0 28px rgba(247,200,0,0.5); }
.btn-send:active { transform: scale(0.98); }
.btn-send:disabled { opacity: 0.5; pointer-events: none; }

.tmodal-status {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 32px 20px; text-align: center;
}
.tmodal-status .spin-ring { width: 36px; height: 36px; }
.tmodal-status-msg { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.status-ok  { color: var(--accent); }
.status-err { color: var(--red); }

.sendall-progress { padding: 16px 20px; }
.sendall-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 13px; transition: border-color 0.2s;
}
.sendall-item.ok   { border-color: rgba(16,185,129,0.3); }
.sendall-item.err  { border-color: rgba(244,63,94,0.3); }
.sendall-item.curr { border-color: rgba(247,200,0,0.3); animation: pulseBorder 1s infinite; }
@keyframes pulseBorder { 0%,100%{opacity:1;} 50%{opacity:0.6;} }
.sendall-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--muted2); }
.sendall-item.ok .sendall-dot   { background: var(--green); }
.sendall-item.err .sendall-dot  { background: var(--red); }
.sendall-item.curr .sendall-dot { background: var(--accent); animation: pulseBorder 0.8s infinite; }
.sendall-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; }
.sendall-status { font-family: var(--mono); font-size: 10px; color: var(--muted); flex-shrink: 0; }
.sendall-item.ok .sendall-status  { color: var(--green); }
.sendall-item.err .sendall-status { color: var(--red); }

.sendall-summary {
  margin: 0 20px 16px; padding: 10px 14px;
  background: var(--surface3); border-radius: 8px;
  font-family: var(--mono); font-size: 12px;
  display: flex; justify-content: space-between;
}
.sendall-ok-count  { color: var(--green); }
.sendall-err-count { color: var(--red); }

.sendall-config {
  padding: 14px 20px; display: flex; flex-direction: column; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sendall-config-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sendall-config-field { display: flex; flex-direction: column; gap: 6px; }
.sendall-config-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--muted);
}
.sendall-score-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
}
.sendall-score-val {
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  color: var(--accent); min-width: 40px;
}
.sendall-slider { flex: 1; accent-color: var(--accent); cursor: pointer; height: 4px; }

.task-select-list {
  max-height: 240px; overflow-y: auto; padding: 8px 14px 10px;
  display: flex; flex-direction: column; gap: 7px;
}
.task-select-list label.task-select-item { flex-shrink: 0; }
.task-select-list::-webkit-scrollbar { width: 3px; }
.task-select-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.task-select-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding: 0 2px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--muted);
}
.task-select-ctrl {
  background: none; border: 1px solid var(--border2);
  border-radius: 6px; color: var(--muted); font-family: var(--mono);
  font-size: 9px; padding: 4px 10px; cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.08em;
}
.task-select-ctrl:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.task-select-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s; user-select: none;
  position: relative; overflow: hidden;
  min-height: 0;
}
.task-select-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, var(--purple), var(--accent));
  transition: width 0.2s; border-radius: 10px 0 0 10px;
}
.task-select-item:hover { border-color: var(--border2); background: var(--surface3); }
.task-select-item:has(.task-checkbox:checked) { border-color: rgba(247,200,0,0.35); }
.task-select-item:has(.task-checkbox:checked)::before { width: 3px; }
.task-select-item > span {
  flex: 1; min-width: 0;
  white-space: normal; word-break: break-word;
  line-height: 1.4; font-size: 12px;
}
.task-checkbox { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; margin-top: 1px; }
.task-select-info {
  flex: 1; min-width: 0; display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.task-select-name {
  font-size: 12px; color: var(--text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.task-select-badge {
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.06em; border-radius: 4px; padding: 2px 7px;
  white-space: nowrap; flex-shrink: 0;
}

.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 8px; padding: 10px 20px;
  font-family: var(--mono); font-size: 12px; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  white-space: nowrap; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.tok  { border-color: rgba(247,200,0,0.5); color: var(--accent); }
.toast.terr { border-color: rgba(244,63,94,0.4); color: #fb7185; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-footer {
  position: relative;
  z-index: 5;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  font-family: var(--mono); font-size: 10px;
  color: var(--muted2); letter-spacing: 0.04em;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom, 16px));
  margin-top: auto;
}
.footer-link { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--accent); }
.footer-sep { color: var(--muted2); opacity: 0.5; }

@media (max-width: 360px) {
  .topbar-logo { font-size: 12px; }
  .filter-tab { padding: 5px 8px; font-size: 11px; }
  .btn-send-all { padding: 7px 8px; font-size: 10px; }
  .dash-grid { grid-template-columns: repeat(3,1fr); gap: 6px; }
  .dash-num { font-size: 22px; }
  .task-grid { grid-template-columns: 1fr; gap: 8px; }
  .user-info { display: none; }
  .search-input { width: 80px; }
}

@media (max-width: 480px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar-logo { font-size: 12px; }
  .user-nick { display: none; }
  .user-name { max-width: 80px; font-size: 12px; }
  .btn-send-all { font-size: 10px; padding: 6px 8px; min-width: 80px; touch-action: manipulation; }
  .btn-logout { font-size: 9px; padding: 5px 8px; }

  .filters-bar {
    padding: 0; gap: 0;
    flex-direction: column; height: auto;
    align-items: stretch;
  }
  .filter-tabs {
    display: flex; overflow-x: auto; overflow-y: hidden;
    padding: 8px 12px 8px 12px; gap: 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, black 92%, transparent 100%);
  }
  .filter-tabs::after { content: ''; flex-shrink: 0; width: 8px; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { padding: 5px 10px; font-size: 10px; white-space: nowrap; flex-shrink: 0; }
  .essay-tab-badge, .done-tab-badge { font-size: 8px; padding: 0 5px; }
  .filters-right {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
  }
  .search-input { flex: 1; width: auto; min-width: 0; }
  .search-input:focus { width: auto; }

  .task-area { padding: 10px 12px; }
  .dash-grid { grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
  .dash-card { padding: 10px 8px; }
  .dash-num { font-size: 22px; }
  .dash-label { font-size: 7px; }
  .dash-sub { font-size: 10px; }

  .task-grid { grid-template-columns: 1fr; gap: 10px; }
  .modal { max-height: 95vh; }
  .tmodal-footer { flex-wrap: wrap; }
  .tmodal-footer .btn-draft,
  .tmodal-footer .btn-send { min-width: 80px; }
  .tmodal-input { font-size: 16px; padding: 10px 8px; }
  .time-unit { right: 4px; font-size: 9px; }
  .sendall-config .tmodal-input { padding: 10px 8px; }
}

@media (max-width: 700px) {
  .dash-grid { grid-template-columns: repeat(3,1fr); }
  .filter-tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { white-space: nowrap; flex-shrink: 0; }
  .search-input { width: 100px; }
  .search-input:focus { width: 130px; }
}

@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: 18px; max-height: 80vh; transform: translateY(20px) scale(0.97); }
  .modal-overlay.visible .modal { transform: translateY(0) scale(1); }
  .modal::before { display: none; }
  .topbar, .filters-bar { padding: 0 24px; }
  .task-area { padding: 20px 24px; }
  .login-card { padding: 28px 26px; }
}

@media (min-width: 900px) {
  .task-grid { grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
  .topbar, .filters-bar { padding: 0 28px; }
  .task-area { padding: 22px 28px; }
  .dash-grid { gap: 14px; margin-bottom: 22px; }
  .search-input { width: 160px; }
  .search-input:focus { width: 220px; }
}

@media (min-width: 1200px) {
  .task-grid { grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); }
  .topbar, .filters-bar { padding: 0 40px; }
  .task-area { padding: 24px 40px; }
  .dash-grid { gap: 16px; }
}

.credit-toast {
  position: fixed;
  right: -400px;
  z-index: 9997;
  width: min(260px, calc(100vw - 32px));
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: right 0.5s cubic-bezier(0.16,1,0.3,1), bottom 0.5s cubic-bezier(0.16,1,0.3,1), opacity 0.4s;
  opacity: 0;
  pointer-events: none;
}
.credit-toast.show {
  right: 16px;
  opacity: 1;
  pointer-events: auto;
}
.credit-toast-glow { display: none; }
.credit-toast-stripe { display: none; }

.credit-toast-body {
  padding: 14px 16px 12px;
  position: relative;
}
.credit-toast-tag { display: none; }

.credit-toast-title {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; color: #fff; margin-bottom: 0;
  line-height: 1.3;
}
.credit-toast.ct-eri  .credit-toast-title { color: #fff; }
.credit-toast.ct-marc .credit-toast-title { color: #fff; }

.credit-toast-sub {
  display: none;
}

.credit-toast-row {
  display: flex; align-items: center; gap: 10px;
}
.credit-toast-icon {
  width: 28px; height: 28px;
  object-fit: contain; flex-shrink: 0;
  border-radius: 6px;
}

.credit-toast-timer {
  height: 3px;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.credit-toast-timer-bar {
  position: absolute;
  top: 0; left: 0; height: 100%; width: 100%;
  transform-origin: left;
}
.credit-toast.ct-eri  .credit-toast-timer-bar { background: linear-gradient(90deg, #f7c800, #ff6ef7); }
.credit-toast.ct-marc .credit-toast-timer-bar { background: linear-gradient(90deg, #f7c800, #ff6ef7); }
@keyframes timerShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
.credit-toast.running .credit-toast-timer-bar {
  animation: timerShrink var(--ct-duration, 10s) linear forwards;
}

@media (max-width: 480px) {
  .credit-toast { width: 220px; right: -260px; border-radius: 8px; }
  .credit-toast.show { right: 10px; }
  .credit-toast-body { padding: 11px 12px 10px; }
  .credit-toast-title { font-size: 11px; }
  .credit-toast-icon { width: 22px; height: 22px; }
  .credit-toast-timer { height: 2px; }
}

.credit-toast-timer {
  height: 2px;
  background: var(--surface3);
  position: relative;
  overflow: hidden;
}
.credit-toast-timer-bar {
  position: absolute;
  top: 0; left: 0; height: 100%; width: 100%;
  transform-origin: left;
}
.credit-toast.ct-eri  .credit-toast-timer-bar { background: linear-gradient(90deg, var(--purple), var(--accent)); }
.credit-toast.ct-marc .credit-toast-timer-bar { background: linear-gradient(90deg, #e8607a, #f472b6); }
@keyframes timerShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
.credit-toast.running .credit-toast-timer-bar {
  animation: timerShrink var(--ct-duration, 4s) linear forwards;
}

.ra-wrap { position: relative; display: flex; align-items: center; }
.ra-wrap .field-input { padding-right: 44px; }

.btn-accounts {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); opacity: 0.5; padding: 6px;
  transition: opacity 0.2s, color 0.2s;
  display: flex; align-items: center; justify-content: center;
  position: absolute; right: 10px;
}
.btn-accounts:hover { opacity: 1; color: var(--accent); }
.btn-accounts.active { opacity: 1; color: var(--accent); }

.btn-accounts-badge {
  position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); color: #050a1a;
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.ra-wrap { position: relative; }

.accounts-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 100;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  display: none;
  animation: fadeUp 0.2s ease both;
}
.accounts-dropdown.open { display: block; }

.accounts-dropdown-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
}
.accounts-dropdown-title {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  color: var(--accent); opacity: 0.8;
}
.saved-clear-all {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--muted); transition: color 0.2s; padding: 0;
}
.saved-clear-all:hover { color: var(--red); }

.saved-list { display: flex; flex-direction: column; gap: 0; }
.saved-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.saved-item:last-child { border-bottom: none; }
.saved-item:hover { background: var(--surface2); }
.saved-item:active { background: var(--surface3); }

.saved-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  color: #050a1a; flex-shrink: 0; letter-spacing: 0;
  box-shadow: 0 0 12px rgba(247,200,0,0.2);
}
.saved-info { flex: 1; min-width: 0; }
.saved-ra {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--text); letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.saved-hint {
  font-family: var(--mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.04em; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.saved-delete {
  background: none; border: none; cursor: pointer;
  color: var(--muted2); font-size: 13px; padding: 6px;
  border-radius: 6px; transition: color 0.2s, background 0.2s;
  line-height: 1; flex-shrink: 0;
}
.saved-delete:hover { color: var(--red); background: rgba(244,63,94,0.1); }



.confirm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(5,10,26,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; transition: opacity 0.25s ease;
}
.confirm-overlay.visible { opacity: 1; }

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 28px 24px 24px;
  width: 100%; max-width: 340px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.confirm-overlay.visible .confirm-box { transform: scale(1) translateY(0); }

.confirm-title {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--text); margin-bottom: 14px;
}
.confirm-msg {
  font-family: var(--sans); font-size: 14px; color: var(--muted);
  line-height: 1.6; margin-bottom: 22px;
}
.confirm-msg strong { color: var(--text); font-weight: 600; }
.confirm-sub {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: 10px; color: var(--muted2);
  letter-spacing: 0.04em;
}

.confirm-footer {
  display: flex; gap: 10px;
}
.confirm-btn-cancel {
  flex: 1; padding: 12px;
  background: none; border: 1px solid var(--border2);
  border-radius: 10px; color: var(--muted);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.2s;
}
.confirm-btn-cancel:hover { border-color: var(--red); color: var(--red); }

.confirm-btn-ok {
  flex: 2; padding: 12px;
  border: none; border-radius: 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.2s;
}
.confirm-btn-ok.send {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #050a1a;
  box-shadow: 0 0 20px rgba(247,200,0,0.3);
}
.confirm-btn-ok.send:hover { box-shadow: 0 0 32px rgba(247,200,0,0.55); }
.confirm-btn-ok.draft {
  background: rgba(247,200,0,0.12);
  color: var(--accent);
  border: 1px solid rgba(247,200,0,0.35);
}
.confirm-btn-ok.draft:hover { background: rgba(247,200,0,0.2); }

@media (max-width: 480px) {
  .tmodal-input {
    font-size: 16px;
    padding: 10px 8px;
    min-width: 0;
  }
  .time-unit { right: 4px; font-size: 9px; }
  .sendall-config .tmodal-input { padding: 10px 8px; }
}

.credit-toast-url {
  font-family: var(--mono); font-size: 9px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em; margin-top: 2px;
  pointer-events: none; user-select: none;
}

.site-footer { flex-direction: column; gap: 8px; }
.footer-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.footer-label {
  font-family: var(--mono); font-size: 9px; color: var(--muted2); letter-spacing: 0.06em;
}
.footer-person {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; transition: opacity 0.2s;
}
.footer-person:hover { opacity: 0.8; }
.footer-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.footer-avatar-img {
  object-fit: cover; object-position: center center;
  border: 1px solid rgba(247,200,0,0.3);
}
.footer-avatar-eri  { background: linear-gradient(135deg, var(--purple), var(--accent)); color: #050a1a; }
.footer-avatar-pablo { background: linear-gradient(135deg, #e8607a, #f472b6); color: #fff; }
.footer-name {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  letter-spacing: 0.04em; transition: color 0.2s;
}
.footer-person:hover .footer-name { color: var(--accent); }
.footer-amp { font-family: var(--mono); font-size: 9px; color: var(--muted2); }

.ham-cursor {
  color: var(--ham2);
  animation: cursorBlink 0.8s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.btn-tutorial {
  width: 100%; margin-top: 10px; padding: 10px;
  background: none; border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.2s;
}
.btn-tutorial:hover { border-color: var(--accent); color: var(--accent); }

#screen-tutorial { align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }

.tutorial-wrap {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 0;
  animation: fadeUp 0.4s ease both;
}

.tutorial-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.tutorial-back {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; transition: color 0.2s; padding: 0;
}
.tutorial-back:hover { color: var(--accent); }
.tutorial-title {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--text);
}
.tutorial-step-indicator {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}

.tutorial-slides { position: relative; min-height: 320px; }

.tutorial-slide {
  display: none; flex-direction: column; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px; padding: 24px 20px;
  animation: fadeUp 0.3s ease both;
}
.tutorial-slide.active { display: flex; }

.tut-num {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.18em; opacity: 0.7;
}
.tut-title {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--text); line-height: 1.2;
}
.tut-desc {
  font-family: var(--sans); font-size: 14px; color: var(--muted);
  line-height: 1.7;
}
.tut-desc strong { color: var(--text); font-weight: 600; }

.tut-tip {
  background: rgba(247,200,0,0.06);
  border: 1px solid rgba(247,200,0,0.15);
  border-radius: 10px; padding: 12px 14px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  line-height: 1.6;
}
.tut-tip-label {
  display: inline-block;
  background: rgba(247,200,0,0.12); color: var(--accent);
  border: 1px solid rgba(247,200,0,0.25);
  font-size: 8px; font-weight: 700; letter-spacing: 0.18em;
  padding: 2px 7px; border-radius: 4px; margin-right: 8px;
  vertical-align: middle;
}

.tut-example {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.tut-example-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.tut-example-row:last-child { border-bottom: none; }
.tut-example-key {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  letter-spacing: 0.08em;
}
.tut-example-val {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--accent);
}

.tutorial-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding: 0 4px;
}
.tut-btn-prev, .tut-btn-next {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text);
  font-family: var(--mono); font-size: 16px;
  width: 40px; height: 40px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.tut-btn-prev:hover, .tut-btn-next:hover { border-color: var(--accent); color: var(--accent); }
.tut-btn-prev:disabled, .tut-btn-next:disabled { opacity: 0.3; cursor: not-allowed; }

.tut-btn-next:not(:disabled) {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #050a1a; border-color: transparent;
  box-shadow: 0 0 16px rgba(247,200,0,0.3);
}

.tut-dots {
  display: flex; gap: 6px; align-items: center;
}
.tut-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border2); transition: all 0.2s; cursor: pointer;
}
.tut-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }

.tutorial-hint-wrap { position: relative; }

.tutorial-hint {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #050a1a;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; white-space: nowrap;
  padding: 6px 12px; border-radius: 99px;
  align-items: center; gap: 6px;
  box-shadow: 0 0 20px rgba(247,200,0,0.4);
  animation: hintBounce 1.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}
.tutorial-hint::before {
  content: '';
  position: absolute;
  bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--accent);
}
.tutorial-hint svg { transform: rotate(0deg); }
.tutorial-hint.visible { display: flex; }

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(5px); }
}

.queue-status-wrap {
  padding: 20px 20px 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.queue-status-msg {
  font-family: var(--mono); font-size: 11px; color: var(--text);
  line-height: 1.6; letter-spacing: 0.03em;
}
.queue-status-sub {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  letter-spacing: 0.03em; line-height: 1.5;
  background: rgba(247,200,0,0.06); border: 1px solid rgba(247,200,0,0.15);
  border-radius: 8px; padding: 8px 12px;
}
.queue-progress-wrap {
  height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden;
}
.queue-progress-bar {
  height: 100%; border-radius: 2px; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--accent));
  transition: width 0.5s ease;
}
.queue-counts {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--mono); font-size: 11px;
}

.credit-toast.ct-repo .credit-toast-timer-bar { background: linear-gradient(90deg, #1a3aaa, #00becb); }


.status-toast {
  position: fixed;
  bottom: 24px; right: -320px;
  z-index: 9998;
  z-index: 9998;
  width: 260px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: right 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.4s;
  opacity: 0;
  pointer-events: none;
}
.status-toast.show { right: 20px; opacity: 1; }

.status-toast-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-toast-loading .status-toast-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: dotPulse 1s ease-in-out infinite;
}
.status-toast-err .status-toast-dot {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.status-toast-msg {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: #fff;
}
.status-toast-loading { border-color: rgba(247,200,0,0.2); }
.status-toast-loading .status-toast-msg { color: var(--accent); }
.status-toast-err { border-color: rgba(244,63,94,0.3); }
.status-toast-err .status-toast-msg { color: #fb7185; }

@media (max-width: 480px) {
  .status-toast { width: calc(100vw - 32px); right: -110vw; bottom: 16px; }
  .status-toast.show { right: 16px; }
}

/* ── MANUTENÇÃO ── */
#screen-manutencao {
  align-items: center; justify-content: center;
  background: var(--bg);
}

.manut-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 24px; text-align: center;
  animation: fadeUp 0.5s ease both;
}

.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

.manut-pixel-title {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.3em; color: var(--muted);
  border: 1px solid var(--border); padding: 4px 14px; border-radius: 4px;
}

.manut-img-wrap {
  position: relative; margin: 4px 0;
}
.manut-img {
  width: 120px; height: 120px; object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(247,200,0,0.4));
  animation: manutFloat 2s ease-in-out infinite;
}
@keyframes manutFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.manut-code {
  font-family: var(--mono); font-size: 72px; font-weight: 700; line-height: 1;
  color: var(--accent); letter-spacing: -2px;
  text-shadow: 4px 4px 0 rgba(247,200,0,0.2);
  /* efeito pixelado */
  image-rendering: pixelated;
}

.manut-title {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--text);
  margin: 0;
}

.manut-desc {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  line-height: 1.8; letter-spacing: 0.06em;
}

.manut-blink {
  font-family: var(--mono); font-size: 20px; color: var(--accent);
  letter-spacing: 8px;
  animation: blinkDots 1.2s step-end infinite;
}
@keyframes blinkDots {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Scanlines no fundo da tela de manutenção */
#screen-manutencao::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(247,200,0,0.02) 3px, rgba(247,200,0,0.02) 4px
  );
}

/* ── BG BOXES ── */
#bgBoxes {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  width: 100vw; height: 100vh;
  opacity: 0.45;
}

/* ── ESSAY ── */
.card-essay { border-color: rgba(138,43,226,0.35); }
.card-essay:hover { border-color: rgba(138,43,226,0.6); }
.card-essay:has(.badge-pendente)::before { background: #8a2be2; }

.badge-essay {
  background: rgba(138,43,226,0.15); color: #c084fc;
  border: 1px solid rgba(138,43,226,0.3);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em; border-radius: 4px; padding: 3px 8px;
  white-space: nowrap; flex-shrink: 0;
}

.essay-tema-box {
  background: var(--surface2); border: 1px solid rgba(138,43,226,0.25);
  border-radius: 10px; padding: 12px 14px;
}
.essay-tema-text {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: #c084fc; line-height: 1.5; margin-top: 6px;
}

.essay-info-row {
  display: flex; gap: 10px;
}
.essay-info-item {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px; align-items: center;
}
.essay-info-label {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}
.essay-info-val {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: #c084fc;
}

.essay-section {
  margin-top: 24px;
}
.essay-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding: 0 2px;
  flex-wrap: wrap; gap: 4px;
}
.essay-section-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; color: #c084fc;
}
.essay-section-icon { font-size: 14px; }
.essay-count-badge {
  background: rgba(138,43,226,0.2); color: #c084fc;
  border: 1px solid rgba(138,43,226,0.35);
  border-radius: 99px; padding: 1px 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.essay-section-sub {
  font-family: var(--mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.08em;
}
.essay-section::before {
  content: '';
  display: block; width: 100%; height: 1px;
  background: linear-gradient(90deg, rgba(138,43,226,0.4), transparent);
  margin-bottom: 16px;
}

.filter-tab-essay { position: relative; }
.filter-tab-essay.active {
  background: rgba(138,43,226,0.15);
  border-color: rgba(138,43,226,0.4);
  color: #c084fc;
}
.essay-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(138,43,226,0.25); color: #c084fc;
  border-radius: 99px; padding: 0px 6px;
  font-size: 9px; font-weight: 700; margin-left: 4px;
  min-width: 16px;
}

.badge-rascunho {
  background: rgba(251,191,36,0.12); color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em; border-radius: 4px; padding: 3px 8px;
  white-space: nowrap;
}
.card-essay-draft {
  border-color: rgba(251,191,36,0.35);
}
.card-essay-draft::before { background: #fbbf24; }
.card-draft-hint {
  font-family: var(--mono); font-size: 9px; color: #fbbf24;
  letter-spacing: 0.04em; opacity: 0.8;
}

.manut-notice {
  display: flex; align-items: center; gap: 8px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 8px;
  padding: 8px 14px;
  margin: 12px auto;
  max-width: 320px;
  justify-content: center;
  text-align: center;
}
.manut-notice-icon {
  font-size: 14px; color: #fbbf24; flex-shrink: 0;
}
.manut-notice-text {
  font-family: var(--mono); font-size: 10px; color: #fbbf24;
  letter-spacing: 0.02em; line-height: 1.4;
}

.task-select-sent {
  opacity: 0.55;
}
.task-sent-badge {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; color: #34d399;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 4px; padding: 2px 6px;
  white-space: nowrap;
  align-self: flex-start;
}

.card-already-sent { opacity: 0.65; }
.card-already-sent:hover { opacity: 0.85; }

.badge-sent {
  background: rgba(16,185,129,0.1); color: #34d399;
  border: 1px solid rgba(16,185,129,0.25);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; border-radius: 4px; padding: 3px 8px;
  white-space: nowrap;
}

.btn-fazer-sent {
  background: var(--surface3); color: var(--muted);
  border-color: var(--border2);
}
.btn-fazer-sent:hover {
  background: var(--surface2); color: var(--text);
}

.task-expired-badge {
  color: #ff4d6d; border-color: rgba(255,77,109,0.25); background: rgba(255,77,109,0.08);
}