/* ============================================================
   ARROW CONTINGÊNCIA — panel.css (painel do cliente)
   ============================================================ */

body {
  min-height: 100vh;
}

.panel-main {
  padding-block: 40px 90px;
}

/* ---------- Login / cadastro ---------- */
.panel-auth {
  display: grid;
  place-items: start center;
  padding-block: 24px;
}

.co-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

.co-auth-tab {
  padding: 11px 12px;
  border: none;
  border-radius: calc(var(--radius-sm) - 3px);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.co-auth-tab.active {
  background: var(--accent-dim);
  color: var(--accent-soft);
}

.panel-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}

.panel-auth-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-auth-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(5, 187, 209, 0.25);
  color: var(--accent);
}

.panel-auth-head h1 {
  font-size: 20px;
  margin-bottom: 6px;
}

.panel-auth-head p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.panel-field {
  margin-bottom: 16px;
}

.panel-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-dim);
}

.panel-field input,
.panel-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel-field input:focus,
.panel-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.panel-field input.panel-invalid {
  border-color: rgba(248, 113, 113, 0.6);
}

.panel-field-err {
  min-height: 15px;
  margin-top: 5px;
  font-size: 12.5px;
  color: #fca5a5;
}

.panel-opt {
  font-weight: 400;
  color: var(--text-muted);
}

.panel-error {
  padding: 12px 14px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* ---------- Cabeçalho do painel ---------- */
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.panel-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.panel-head h1 {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.panel-sub {
  color: var(--text-muted);
  font-size: 14.5px;
}

.panel-stats {
  display: flex;
  gap: 12px;
}

.panel-stat {
  min-width: 96px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.panel-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent-soft);
}

.panel-stat span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Grid de contas ---------- */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.account-card:hover {
  border-color: rgba(5, 187, 209, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.account-card.is-pending {
  cursor: default;
  opacity: 0.72;
}

.account-card.is-pending:hover {
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}

.account-card-pending {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.account-card-pending a {
  color: var(--accent);
  text-decoration: underline;
}

.account-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.account-card-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-dim);
  border: 1px solid rgba(5, 187, 209, 0.25);
  color: var(--accent);
}

.account-card-icon svg {
  width: 20px;
  height: 20px;
}

.account-card h3 {
  font-size: 15.5px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.account-card-price {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--text-muted);
}

.account-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.account-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Badges / status ---------- */
.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.panel-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.panel-badge.delivered {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.panel-badge.pending,
.panel-badge.pending_delivery {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.panel-badge.neutral {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

/* ---------- Tags ---------- */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-soft);
  background: var(--accent-dim);
  border: 1px solid rgba(5, 187, 209, 0.3);
  border-radius: 999px;
  padding: 5px 12px;
}

.tag-chip button {
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  padding: 0;
}

.tag-chip button:hover {
  opacity: 1;
}

.tag-chip button svg {
  width: 13px;
  height: 13px;
}

.tags-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.tag-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tag-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text);
}

.tag-form input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- Aquecimento ---------- */
.warm-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 6px;
}

.warm-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 18px;
}

.warm-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.warm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.warm-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.warm-item.done {
  opacity: 0.6;
}

.warm-item.done .warm-text {
  text-decoration: line-through;
}

.warm-check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 1.5px solid var(--line-strong);
  background: none;
  display: grid;
  place-items: center;
  color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.warm-check:hover {
  border-color: var(--accent);
}

.warm-item.done .warm-check {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.5);
  color: #4ade80;
}

.warm-check svg {
  width: 13px;
  height: 13px;
}

.warm-body {
  flex: 1;
  min-width: 0;
}

.warm-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.warm-note {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  white-space: pre-wrap;
}

.warm-del {
  flex: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.warm-item:hover .warm-del {
  opacity: 0.8;
}

.warm-del:hover {
  color: #f87171;
}

.warm-del svg {
  width: 15px;
  height: 15px;
}

.warm-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 2px;
}

.warm-actions {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.warm-add {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warm-add input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text);
}

.warm-add input:focus {
  outline: none;
  border-color: var(--accent);
}

.warm-add-actions {
  display: flex;
  gap: 8px;
}

.warm-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warm-edit input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
}

.warm-edit input:focus {
  outline: none;
  border-color: var(--accent);
}

.warm-edit-actions {
  display: flex;
  gap: 8px;
}

/* ---------- Nota ---------- */
.panel-section textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text);
  resize: vertical;
  font-family: inherit;
}

.panel-section textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.note-save {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.note-saved {
  font-size: 13px;
  color: #4ade80;
  font-weight: 600;
}

/* ---------- Seções / drawer ---------- */
.panel-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-section:last-child {
  border-bottom: none;
}

.panel-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.panel-section h3 .link-like {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.link-like {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.link-like:hover {
  color: var(--accent-soft);
}

/* ---------- Credenciais ---------- */
.cred-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}

.cred-row > span:first-child {
  color: var(--text-muted);
}

.cred-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cred-value code {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--text);
  word-break: break-all;
}

.cred-copy {
  flex: none;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cred-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cred-copy svg {
  width: 14px;
  height: 14px;
}

.cred-eye {
  flex: none;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cred-eye:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cred-eye svg {
  width: 14px;
  height: 14px;
}

.cred-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.cred-meta-chip {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
}

.cred-meta-chip strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

/* ---------- Drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 90;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(460px, 100vw);
  background: var(--bg-card);
  border-left: 1px solid var(--line);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.drawer-head h2 {
  font-size: 20px;
  line-height: 1.25;
  margin: 5px 0 8px;
}

.drawer-close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.drawer-close svg {
  width: 18px;
  height: 18px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ---------- Empty state ---------- */
.panel-empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.panel-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 16px;
}

.panel-empty-icon svg {
  width: 26px;
  height: 26px;
}

.panel-empty h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.panel-empty p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 360px;
  margin: 0 auto 20px;
}

/* ---------- Toolbar (busca e filtros) ---------- */
.panel-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.panel-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.panel-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.panel-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 40px;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.panel-search input::placeholder {
  color: var(--text-muted);
}

.panel-filter {
  flex: none;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.panel-filter:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- Skeleton de carregamento ---------- */
.skeleton-card {
  display: flex;
  gap: 14px;
  cursor: default;
}

.skeleton-card:hover {
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}

.skeleton-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

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

/* ---------- Toasts ---------- */
.toast-wrap {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.toast-error::before {
  background: #f87171;
}

.toast-success::before {
  background: #4ade80;
}

.toast-success {
  border-color: rgba(74, 222, 128, 0.35);
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.35);
}

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .panel-main {
    padding-block: 24px 70px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-stats {
    width: 100%;
  }

  .panel-stat {
    flex: 1;
    min-width: 0;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }
}
