/* ============================================================
   conta-admin.css — styles for the admin-only views embedded in
   the member area (Progresso, Agenda, Pedidos). Light-themed to
   match conta.css's content area. The brand vars below use
   mariana's names (no clash with conta's --color-* vars) so the
   ported markup works unchanged. Scoped to admin containers.
   ============================================================ */
.nc-adm {
  --green-900: #0F2219; --green-800: #1A3C34; --green-700: #214d42;
  --beige: #F2F0E6; --ivory-050: #FAF9F6; --white: #FFFFFF;
  --terra: #8B6E52; --sage: #7A9E8A; --ink: #1c2a1c;
  --text-mid: #5b6660; --text-light: #9ca3af; --border: #e7e2d6;
  --novidade-color: #15803d; --novidade-bg: #dcfce7;
  --melhoria-color: #1d4ed8; --melhoria-bg: #dbeafe;
  --correcao-color: #b45309; --correcao-bg: #fef3c7;
  --seguranca-color: #6d28d9; --seguranca-bg: #ede9fe;
}

/* New-item button (Agenda / Pedidos) */
.adm-newbtn {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  background: var(--green-800); color: var(--beige); border: none; border-radius: 100px;
  padding: 11px 20px; font-size: 13.5px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background .2s;
}
.adm-newbtn:hover { background: var(--green-700); }
.adm-empty { padding: 28px 16px; text-align: center; color: var(--text-light); font-size: 14px; line-height: 1.6; }

/* ── Progresso (changelog) ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 4px 0 2rem; max-width: 560px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 1.2rem .75rem; text-align: center; }
.stat-number { font-family: 'Playfair Display', serif; font-size: 2.6rem; font-weight: 600; line-height: 1; margin-bottom: .3rem; }
.stat-label { font-size: .72rem; font-weight: 500; color: var(--text-mid); letter-spacing: .04em; }
.stat-card.novidade .stat-number { color: var(--novidade-color); }
.stat-card.melhoria .stat-number { color: var(--melhoria-color); }
.stat-card.correcao .stat-number { color: var(--correcao-color); }
.month-section { margin-bottom: 2rem; }
.month-header { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--green-800); text-transform: uppercase; letter-spacing: .1em; padding-bottom: .5rem; border-bottom: 2px solid var(--green-800); margin-bottom: 1rem; }
.entries { display: flex; flex-direction: column; gap: .55rem; }
.entry { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; display: flex; align-items: flex-start; gap: .85rem; }
.entry-badge { display: inline-flex; align-items: center; gap: .2rem; padding: .22rem .62rem; border-radius: 999px; font-size: .68rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; margin-top: .05rem; }
.entry-badge.novidade { color: var(--novidade-color); background: var(--novidade-bg); }
.entry-badge.melhoria { color: var(--melhoria-color); background: var(--melhoria-bg); }
.entry-badge.correcao { color: var(--correcao-color); background: var(--correcao-bg); }
.entry-badge.seguranca { color: var(--seguranca-color); background: var(--seguranca-bg); }
.entry-content { flex: 1; min-width: 0; }
.entry-title { font-size: .88rem; color: var(--ink); line-height: 1.45; }
.entry-date { font-size: .72rem; color: var(--text-light); margin-top: .25rem; }
.empty { text-align: center; color: var(--text-light); padding: 3rem 1rem; font-size: .9rem; line-height: 1.7; }

/* ── Pedidos (feature requests) list ── */
.fr-list { display: flex; flex-direction: column; gap: 8px; }
.fr-empty { padding: 28px 16px; text-align: center; color: var(--text-light); font-size: 14px; line-height: 1.6; }
.fr-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: box-shadow .15s; }
.fr-item:hover { box-shadow: 0 2px 10px rgba(15,34,25,.07); }
.fr-item input[type=checkbox] { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--sage); cursor: pointer; }
.fr-it-title { font-size: 14.5px; color: var(--ink); line-height: 1.4; }
.fr-it-meta { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.fr-item.solved .fr-it-title { text-decoration: line-through; color: var(--text-light); }
.fr-clip { font-size: 11px; color: var(--text-light); margin-left: 6px; }

/* ── Agenda month grid (reuses .cal2-* from conta.css) ── */
.agc-grid-wrap { margin-bottom: 26px; width: 100%; }
/* minmax(0,1fr) + min-width:0 keep all 7 columns inside the container even when
   event chips are long (chips clip instead of forcing the grid to overflow). */
.agc-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
.agc-grid .cal2-cell { min-width: 0; }
.agc-cell { cursor: pointer; }
.agc-cell:hover { background: rgba(122,158,138,0.08); }
.agc-ev {
  font-size: 11px; line-height: 1.25; color: var(--green-800); background: rgba(122,158,138,0.16);
  border-radius: 5px; padding: 2px 5px; margin-top: 2px; cursor: pointer;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agc-ev:hover { filter: brightness(0.95); }
.agc-ev .agc-t { font-weight: 700; color: var(--sage); }
.agc-ev-c .agc-t { color: inherit; opacity: 0.8; } /* coloured chips: time inherits contrast colour */
@media (max-width: 700px) { .agc-ev { font-size: 9.5px; padding: 1px 4px; } }

/* ── Destaques recentes (Progresso highlights) ── */
.adm-hl-h2 { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 600; color: var(--green-800); margin: 8px 0 .3rem; }
.adm-hl-sub { font-size: .9rem; color: var(--text-mid); margin-bottom: 1.3rem; }
.adm-hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 2.4rem; }
.adm-hl-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 18px 16px; border-left: 4px solid var(--sage); box-shadow: 0 2px 14px rgba(15,34,25,.05);
  display: flex; flex-direction: column; gap: 8px;
}
.adm-hl-card.novidade { border-left-color: var(--novidade-color); }
.adm-hl-card.melhoria { border-left-color: var(--melhoria-color); }
.adm-hl-card.correcao { border-left-color: var(--correcao-color); }
.adm-hl-card.seguranca { border-left-color: var(--seguranca-color); }
.adm-hl-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: .25rem; padding: .24rem .66rem; border-radius: 999px; font-size: .66rem; font-weight: 600; }
.adm-hl-badge.novidade { color: var(--novidade-color); background: var(--novidade-bg); }
.adm-hl-badge.melhoria { color: var(--melhoria-color); background: var(--melhoria-bg); }
.adm-hl-badge.correcao { color: var(--correcao-color); background: var(--correcao-bg); }
.adm-hl-badge.seguranca { color: var(--seguranca-color); background: var(--seguranca-bg); }
.adm-hl-cardtitle { font-family: 'Playfair Display', serif; font-size: 1.16rem; font-weight: 600; color: var(--green-800); line-height: 1.25; }
.adm-hl-date { font-size: .72rem; color: var(--text-light); margin-top: auto; }

/* ── Agenda list ── */
.cal-list { display: flex; flex-direction: column; }
.cal-empty { padding: 28px 16px; text-align: center; color: var(--text-light); font-size: 14px; line-height: 1.6; }
.cal-daygroup { margin-bottom: 6px; }
.cal-dayhead { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-light); padding: 14px 2px 8px; }
.cal-item { padding: 12px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: box-shadow .15s; margin-bottom: 8px; }
.cal-item:hover { box-shadow: 0 2px 10px rgba(15,34,25,.07); }
.cal-it-time { font-size: 11.5px; color: var(--sage); font-weight: 600; letter-spacing: .04em; }
.cal-it-title { font-size: 14.5px; color: var(--ink); margin-top: 2px; }
.cal-it-loc { font-size: 12.5px; color: var(--text-mid); margin-top: 2px; }

/* ── Shared modals (Pedidos new/detail + Agenda event) ── */
.fr-modal { position: fixed; inset: 0; background: rgba(15,34,25,.55); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.fr-modal.fr-show { display: flex; }
.fr-modal-card { background: var(--white); border-radius: 18px; max-width: 540px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(15,34,25,.35); padding: 26px; }
.fr-modal-card h3 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--green-800); margin-bottom: 2px; }
.fr-field { margin-top: 16px; }
.fr-field label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 6px; }
.fr-field input[type=text], .fr-field textarea, .fr-field input[type=date], .fr-field input[type=time] { width: 100%; font-family: inherit; font-size: 15px; color: var(--green-800); background: var(--ivory-050); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; outline: none; }
.fr-field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.fr-field input:focus, .fr-field textarea:focus { border-color: var(--sage); }
.fr-file-list { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.fr-file-chip { font-size: 12.5px; color: var(--green-800); background: rgba(26,60,52,.06); border-radius: 8px; padding: 6px 10px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.fr-file-chip a { color: var(--green-800); text-decoration: underline; }
.fr-file-chip button { background: none; border: none; color: #b45309; cursor: pointer; font-size: 16px; line-height: 1; }
.fr-modal-actions { margin-top: 22px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fr-btn { padding: 12px 22px; border-radius: 100px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.fr-btn-primary { background: var(--green-800); color: var(--beige); }
.fr-btn-primary:disabled { opacity: .5; cursor: default; }
.fr-btn-ghost { background: transparent; color: var(--text-mid); }
.fr-btn-solve { background: var(--sage); color: #0F2219; }
.fr-btn-danger { background: transparent; color: #b45309; border: 1px solid rgba(180,83,9,.4); }
.fr-msg { font-size: 13px; min-height: 16px; }
.fr-detail-desc { font-size: 15px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; margin-top: 6px; }
.fr-detail-meta { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }
.cal-allday-row { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.cal-allday-row input { width: 17px; height: 17px; accent-color: var(--sage); cursor: pointer; }
.cal-allday-row label { font-size: 14px; color: var(--text-mid); cursor: pointer; }
.cal-row { display: flex; gap: 12px; }
.cal-row .fr-field { flex: 1; min-width: 0; }

/* Extended event fields */
.cal-select { width: 100%; font-family: inherit; font-size: 14px; color: var(--green-800); background: var(--ivory-050); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; outline: none; cursor: pointer; }
.cal-select:focus { border-color: var(--sage); }
.cal-meet-link { font-size: 13px; margin-top: 8px; word-break: break-all; }
.cal-meet-link a { color: var(--melhoria-color); }
.cal-link-btn { background: none; border: none; color: var(--sage); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0 0; }
.cal-link-btn:hover { text-decoration: underline; }
.cal-rem-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cal-rem-row .cal-select { flex: 0 0 auto; width: auto; padding: 8px 10px; }
.cal-rem-val { width: 64px; font-family: inherit; font-size: 14px; color: var(--green-800); background: var(--ivory-050); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; outline: none; }
.cal-rem-val:focus { border-color: var(--sage); }
.cal-rem-x { background: none; border: none; color: #b45309; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.cal-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cal-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .1s; }
.cal-sw:hover { transform: scale(1.12); }
.cal-sw.sel { border-color: var(--green-800); box-shadow: 0 0 0 2px var(--white) inset; }
.cal-guests { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cal-guest-chip { font-size: 12.5px; color: var(--green-800); background: rgba(26,60,52,.07); border-radius: 100px; padding: 5px 6px 5px 11px; display: inline-flex; align-items: center; gap: 4px; }
.cal-guest-chip button { background: none; border: none; color: #b45309; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.cal-guest-perms { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.cal-guest-perms label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-mid); cursor: pointer; }
.cal-guest-perms input { width: 16px; height: 16px; accent-color: var(--sage); cursor: pointer; }

/* ── Clientes table ── */
.cli-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.cli-search { flex: 1; min-width: 220px; max-width: 420px; font-family: inherit; font-size: 14px; color: var(--green-800); background: var(--white); border: 1px solid var(--border); border-radius: 100px; padding: 11px 18px; outline: none; }
.cli-search:focus { border-color: var(--sage); }
.cli-count { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.cli-wrap { container-type: inline-size; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
.cli-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cli-table thead th { text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-light); font-weight: 600; padding: 14px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--ivory-050); position: sticky; top: 0; }
.cli-th { cursor: pointer; user-select: none; }
.cli-th:hover { color: var(--green-800); }
.cli-th.sorted::after { content: " ▾"; opacity: 0.7; }
.cli-th.sorted.asc::after { content: " ▴"; }
.cli-table tbody td { padding: 12px 14px; border-bottom: 1px solid rgba(26,60,52,0.06); color: var(--ink); vertical-align: middle; }
.cli-table tbody tr:last-child td { border-bottom: none; }
.cli-table tbody tr:hover { background: rgba(122,158,138,0.06); }
.cli-email { color: var(--text-mid); max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Responsive: drop secondary columns as the table's own width shrinks
   (container query → based on real available space, not the viewport).
   Columns: 1 Nome · 2 E-mail · 3 Telefone · 4 CPF · 5 Compras · 6 Total ·
   7 Última compra · 8 Último login · 9 Atividade · 10 Sinais. */
@container (max-width: 1080px) { .cli-table th:nth-child(9), .cli-table td:nth-child(9) { display: none; } }
@container (max-width: 950px)  { .cli-table th:nth-child(8), .cli-table td:nth-child(8) { display: none; } }
@container (max-width: 830px)  { .cli-table th:nth-child(4), .cli-table td:nth-child(4) { display: none; } }
@container (max-width: 710px)  { .cli-table th:nth-child(3), .cli-table td:nth-child(3) { display: none; } }
@container (max-width: 580px)  {
  .cli-table th:nth-child(1), .cli-table td:nth-child(1) { display: none; }
  .cli-table thead th, .cli-table tbody td { padding: 10px 9px; }
  .cli-email { max-width: 16ch; }
}
@container (max-width: 470px)  { .cli-table th:nth-child(7), .cli-table td:nth-child(7) { display: none; } }
.cli-c { text-align: right; white-space: nowrap; }
.cli-ok { color: #15803d; font-weight: 700; }
.cli-cpf-val { font-variant-numeric: tabular-nums; }
.cli-eye { background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 12.5px; padding: 2px 5px; margin-left: 2px; vertical-align: middle; }
.cli-eye:hover { color: var(--green-800); }
.cli-eye:disabled { opacity: 0.5; cursor: default; }
.cli-badges { white-space: nowrap; }
.cli-badge { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 100px; margin-right: 4px; }
.cli-badge.acc { color: var(--melhoria-color); background: var(--melhoria-bg); }
.cli-badge.news { color: var(--novidade-color); background: var(--novidade-bg); }
.cli-badge.mkt { color: var(--seguranca-color); background: var(--seguranca-bg); }
/* Campaign origin — terra, so leads from the Astro Arte page stand out
   against the account/newsletter signals next to them. */
.cli-badge.astro { color: #6B5340; background: rgba(139, 110, 82, 0.16); }
/* "Estrangeiro" in the CPF column: blank on purpose, not missing data. */
.cli-na { font-size: 11.5px; font-style: italic; color: var(--text-light); }

/* ── Badge filters ────────────────────────────────────────────── */
.cli-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cli-filter {
    background: none; border: 1px solid rgba(26, 60, 52, 0.22); color: var(--text-light);
    font-size: 12px; font-weight: 500; padding: 6px 14px; border-radius: 100px;
    cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cli-filter:hover { border-color: var(--green-800); color: var(--green-800); }
.cli-filter.on { background: var(--green-800); border-color: var(--green-800); color: #F2F0E6; }
.cli-filter.clear { border-style: dashed; }

/* ── Open-detail button (first column) ────────────────────────── */
.cli-open {
    background: none; border: none; cursor: pointer; color: var(--text-light);
    padding: 4px 6px; border-radius: 6px; font-size: 12.5px;
    transition: color .2s ease, background .2s ease;
}
.cli-open:hover { color: var(--green-800); background: rgba(26, 60, 52, 0.07); }

/* ── Client detail panel ──────────────────────────────────────── */
.cli-detail { position: fixed; inset: 0; z-index: 140; }
.cli-detail-backdrop { position: absolute; inset: 0; background: rgba(15, 34, 25, 0.5); }
.cli-detail-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%);
    background: var(--ivory-050, #FAF9F6); overflow-y: auto;
    padding: 34px 30px 60px; box-shadow: -12px 0 40px -18px rgba(15, 34, 25, 0.5);
}
.cli-detail-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none;
    cursor: pointer; font-size: 17px; color: var(--text-light); padding: 6px;
}
.cli-detail-close:hover { color: var(--green-800); }
.cli-d-head { margin-bottom: 26px; padding-right: 30px; }
.cli-d-name { font-family: 'Playfair Display', Georgia, serif; font-size: 25px; font-weight: 400; color: var(--green-800); margin: 0 0 4px; }
.cli-d-mail { font-size: 13px; color: var(--text-light); word-break: break-all; }
.cli-d-badges { margin-top: 12px; }
.cli-d-sec { margin-bottom: 26px; }
.cli-d-title {
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--sage, #7A9E8A); margin-bottom: 12px;
}
.cli-d-row {
    display: flex; gap: 14px; padding: 9px 0;
    border-bottom: 1px solid rgba(26, 60, 52, 0.09); font-size: 13.5px;
}
.cli-d-k { flex: 0 0 40%; color: var(--text-light); }
.cli-d-v { flex: 1; color: var(--green-800); word-break: break-word; }
.cli-d-addr { font-size: 13.5px; line-height: 1.7; color: var(--green-800); white-space: pre-line; }
.cli-d-empty { font-size: 13px; color: var(--text-light); font-style: italic; }

@media (max-width: 640px) {
    .cli-detail-panel { padding: 30px 20px 50px; }
    .cli-d-k { flex-basis: 45%; }
}

/* ── Clientes pagination ── */
.cli-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.cli-pg { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--green-800); background: var(--white); border: 1px solid var(--border); border-radius: 100px; padding: 8px 16px; cursor: pointer; }
.cli-pg:hover:not(:disabled) { background: rgba(122,158,138,0.1); }
.cli-pg:disabled { opacity: 0.4; cursor: default; }
.cli-pg-info { font-size: 12.5px; color: var(--text-light); white-space: nowrap; }
