/* Amendoar — Área dos Profissionais */

.amendoar-area {
  --aa-paper: #fbfaf7;
  --aa-white: #ffffff;
  --aa-ink: #2f2a2e;
  --aa-ink-soft: #5f5960;
  --aa-ink-muted: #857d84;
  --aa-plum: #433544;
  --aa-plum-deep: #2f2731;
  --aa-rose-deep: #6a5368;
  --aa-rose: #b7839a;
  --aa-blush: #f4ecef;
  --aa-champagne: #d9c7ad;
  --aa-line: rgba(47, 42, 46, 0.11);
  --aa-shadow: 0 24px 70px rgba(47, 39, 49, 0.10);
  --aa-shadow-sm: 0 10px 30px rgba(47, 39, 49, 0.06);
  --aa-radius: 20px;
  --aa-display: "Cormorant Garamond", Georgia, serif;
  --aa-body: "Manrope", "Segoe UI", Arial, sans-serif;

  margin: 0;
  min-height: 100vh;
  color: var(--aa-ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(228, 176, 188, 0.14), transparent 32rem),
    radial-gradient(circle at 100% 30%, rgba(143, 175, 189, 0.10), transparent 30rem),
    var(--aa-paper);
  font-family: var(--aa-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.amendoar-area *,
.amendoar-area *::before,
.amendoar-area *::after { box-sizing: border-box; }

:where(.amendoar-area) a { color: inherit; text-decoration: none; }
:where(.amendoar-area) img { display: block; max-width: 100%; height: auto; }
:where(.amendoar-area) svg { width: 18px; height: 18px; flex: 0 0 auto; }
:where(.amendoar-area) :is(button, input, textarea, select) { font: inherit; color: inherit; }
.amendoar-area :focus-visible { outline: 3px solid rgba(183, 131, 154, 0.5); outline-offset: 3px; }
.amendoar-area .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.aa-wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.aa-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 16px;
  color: #745771;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
}
.aa-eyebrow::before { width: 30px; height: 1px; content: ""; background: currentColor; }

.aa-wordmark { font-family: var(--aa-display); font-size: 2rem; letter-spacing: -0.03em; }

/* Botões */
.aa-btn {
  min-height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.84rem; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.aa-btn svg { width: 16px; height: 16px; }
.aa-btn-primary { color: #fff; background: linear-gradient(135deg, var(--aa-plum), var(--aa-rose-deep)); box-shadow: 0 10px 24px rgba(67, 53, 68, 0.18); }
.aa-btn-primary:hover { background: linear-gradient(135deg, var(--aa-plum-deep), #5d475c); transform: translateY(-1px); }
.aa-btn-ghost { color: var(--aa-plum); background: #fff; border-color: rgba(67, 53, 68, 0.16); }
.aa-btn-ghost:hover { border-color: var(--aa-rose); color: var(--aa-plum-deep); }
.aa-btn-block { width: 100%; min-height: 52px; font-size: 0.92rem; }
.aa-btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Tela de acesso ---------- */
.aa-gate {
  min-height: 100vh; padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.aa-gate-card {
  width: min(460px, 100%);
  padding: 44px 40px 34px;
  border: 1px solid var(--aa-line); border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--aa-shadow);
  text-align: center;
}
.aa-gate-logo { display: inline-block; margin-bottom: 30px; }
.aa-gate-logo img { width: 190px; margin-inline: auto; }
.aa-gate-icon {
  width: 54px; height: 54px; margin: 0 auto 22px;
  border-radius: 50%; display: grid; place-items: center;
  color: var(--aa-rose-deep); background: var(--aa-blush);
}
.aa-gate-icon svg { width: 24px; height: 24px; }
.aa-gate .aa-eyebrow { justify-content: center; }
.aa-gate .aa-eyebrow::before { display: none; }
.aa-gate h1 {
  margin: 0 0 14px;
  font-family: var(--aa-display); font-size: 2.15rem; font-weight: 400; line-height: 1.05; letter-spacing: -0.03em;
}
.aa-gate-text { margin: 0 0 28px; color: var(--aa-ink-soft); font-size: 0.92rem; line-height: 1.7; }
.aa-gate-back { display: inline-block; margin-top: 22px; color: var(--aa-ink-muted); font-size: 0.82rem; }
.aa-gate-back:hover { color: var(--aa-plum); }
.aa-gate-foot { margin: 0; display: inline-flex; align-items: center; gap: 8px; color: var(--aa-ink-muted); font-size: 0.76rem; }
.aa-gate-foot svg { width: 16px; height: 16px; }

/* ---------- Barra superior ---------- */
.aa-topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--aa-line);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(16px);
}
.admin-bar .aa-topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .aa-topbar { top: 46px; } }

.aa-topbar-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.aa-brand { display: inline-flex; align-items: center; gap: 16px; }
.aa-brand img { width: 150px; }
.aa-brand-tag {
  padding: 6px 12px; border-radius: 999px;
  color: var(--aa-rose-deep); background: var(--aa-blush);
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.aa-user { display: flex; align-items: center; gap: 14px; font-size: 0.84rem; }
.aa-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--aa-rose), var(--aa-rose-deep));
  font-weight: 700; font-size: 0.85rem;
}
.aa-user-name { font-weight: 600; }
.aa-user-link { color: var(--aa-ink-muted); }
.aa-user-link:hover { color: var(--aa-plum); }
.aa-user-exit { padding-left: 14px; border-left: 1px solid var(--aa-line); }

/* ---------- Conteúdo ---------- */
.aa-main { padding: 56px 0 80px; }

.aa-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; margin-bottom: 36px; }
.aa-hero h1 {
  margin: 0; max-width: 720px;
  font-family: var(--aa-display); font-size: clamp(2.4rem, 4.6vw, 3.8rem); font-weight: 400; line-height: 1; letter-spacing: -0.04em;
}
.aa-hero h1 em { display: block; color: var(--aa-rose-deep); }
.aa-lead { margin: 18px 0 0; max-width: 620px; color: var(--aa-ink-soft); font-size: 1rem; line-height: 1.75; }
.aa-stats { display: flex; gap: 12px; }
.aa-stats div {
  min-width: 132px; padding: 18px 20px;
  border: 1px solid var(--aa-line); border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}
.aa-stats strong { display: block; font-family: var(--aa-display); font-size: 2.3rem; font-weight: 500; line-height: 1; }
.aa-stats span { color: var(--aa-ink-muted); font-size: 0.76rem; }

.aa-notice {
  margin-bottom: 22px; padding: 14px 18px;
  border-radius: 14px; font-size: 0.9rem; font-weight: 500;
}
.aa-notice-ok { color: #3d5a45; background: #e9f2ea; border: 1px solid #cfe2d2; }
.aa-notice-erro { color: #7a2e35; background: #f8e9ea; border: 1px solid #efd0d3; }

/* Envio */
.aa-upload {
  margin-bottom: 34px;
  border: 1px solid var(--aa-line); border-radius: var(--aa-radius);
  background: #fff; box-shadow: var(--aa-shadow-sm);
  overflow: hidden;
}
.aa-upload summary {
  padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  list-style: none; cursor: pointer;
}
.aa-upload summary::-webkit-details-marker { display: none; }
.aa-upload summary strong { display: block; font-size: 0.98rem; }
.aa-upload summary small { color: var(--aa-ink-muted); font-size: 0.8rem; }
.aa-upload-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--aa-plum), var(--aa-rose-deep));
}
.aa-upload-toggle { margin-left: auto; color: var(--aa-rose); font-size: 1.6rem; line-height: 1; transition: transform .2s ease; }
.aa-upload[open] .aa-upload-toggle { transform: rotate(45deg); }

.aa-upload-form { padding: 4px 24px 26px; border-top: 1px solid var(--aa-line); }

.aa-drop {
  position: relative;
  margin-top: 22px; padding: 30px 20px;
  border: 1.5px dashed rgba(106, 83, 104, 0.3); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: #fcf9fa;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.aa-drop:hover, .aa-drop.is-over { border-color: var(--aa-rose); background: var(--aa-blush); }
.aa-drop.has-file { border-style: solid; border-color: rgba(106, 83, 104, 0.35); background: #fff; }
.aa-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.aa-drop-icon { color: var(--aa-rose-deep); }
.aa-drop-icon svg { width: 28px; height: 28px; }
.aa-drop-title { font-weight: 600; font-size: 0.95rem; }
.aa-drop-title u { color: var(--aa-rose-deep); text-underline-offset: 3px; }
.aa-drop-sub { max-width: 460px; color: var(--aa-ink-muted); font-size: 0.8rem; }

.aa-fields { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.aa-field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.aa-field-wide { grid-column: 1 / -1; }
.aa-field label, .aa-field legend {
  padding: 0; color: #594b57;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.aa-field small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--aa-ink-muted); }
.aa-field input[type="text"], .aa-field textarea {
  width: 100%; padding: 13px 15px;
  border: 1px solid rgba(47, 42, 46, 0.16); border-radius: 12px;
  background: var(--aa-paper); outline: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.aa-field input[type="text"]:focus, .aa-field textarea:focus { border-color: var(--aa-rose); background: #fff; }
.aa-field textarea { resize: vertical; min-height: 88px; }
.aa-visibility { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.aa-visibility legend { width: 100%; margin-bottom: 7px; }
.aa-visibility label {
  padding: 0; display: inline-flex; align-items: center;
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--aa-ink);
  cursor: pointer;
}
.aa-visibility input { position: absolute; opacity: 0; pointer-events: none; }
.aa-visibility span { padding: 11px 16px; border: 1px solid rgba(47, 42, 46, 0.16); border-radius: 12px; background: var(--aa-paper); transition: all .2s ease; }
.aa-visibility input:checked + span { color: #fff; border-color: var(--aa-rose-deep); background: var(--aa-rose-deep); }
.aa-visibility input:focus-visible + span { outline: 3px solid rgba(183, 131, 154, 0.5); outline-offset: 2px; }

.aa-form-actions { margin-top: 22px; display: flex; justify-content: flex-end; }

/* Biblioteca */
.aa-library-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.aa-library-head h2 { margin: 0; font-family: var(--aa-display); font-size: 2rem; font-weight: 400; letter-spacing: -0.03em; }
.aa-search {
  width: min(380px, 100%);
  padding: 0 16px;
  border: 1px solid var(--aa-line); border-radius: 999px;
  display: flex; align-items: center; gap: 10px;
  color: var(--aa-ink-muted); background: #fff;
}
.aa-search:focus-within { border-color: var(--aa-rose); }
.aa-search input { width: 100%; min-height: 44px; border: 0; outline: none; background: transparent; font-size: 0.88rem; }

.aa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.aa-chip {
  padding: 8px 15px;
  border: 1px solid var(--aa-line); border-radius: 999px;
  color: var(--aa-ink-soft); background: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all .2s ease;
}
.aa-chip:hover { border-color: var(--aa-rose); color: var(--aa-plum); }
.aa-chip.is-active { color: #fff; border-color: var(--aa-plum); background: var(--aa-plum); }

.aa-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.aa-item {
  padding: 20px 22px;
  border: 1px solid var(--aa-line); border-radius: 18px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  background: #fff;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.aa-item:hover { border-color: rgba(183, 131, 154, 0.35); box-shadow: var(--aa-shadow-sm); }
.aa-item[hidden] { display: none; }

.aa-format {
  width: 50px; height: 58px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--aa-rose-deep); background: var(--aa-blush);
}
.aa-format-pdf { color: #8c3b4a; background: #f7e7ea; }
.aa-format-doc { color: #35577a; background: #e6eef6; }
.aa-format-xls { color: #3c6b4d; background: #e5f1e8; }
.aa-format-ppt { color: #8a5a2b; background: #f6ebdf; }
.aa-format-img { color: #5c4e7a; background: #ece8f5; }

.aa-item-body { min-width: 0; }
.aa-item-body h3 { margin: 0 0 3px; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.aa-item-desc { margin: 0 0 6px; color: var(--aa-ink-soft); font-size: 0.86rem; line-height: 1.55; }
.aa-item-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--aa-ink-muted); font-size: 0.78rem; }
.aa-tag { padding: 3px 10px; border-radius: 999px; color: var(--aa-rose-deep); background: var(--aa-blush); font-weight: 600; font-size: 0.72rem; }
.aa-tag-private { display: inline-flex; align-items: center; gap: 5px; color: #6d5a2f; background: #f5efe2; }
.aa-tag-private svg { width: 12px; height: 12px; }

.aa-item-actions { display: flex; align-items: center; gap: 8px; }
.aa-delete { margin: 0; }
.aa-icon-btn {
  width: 42px; height: 42px; padding: 0;
  border: 1px solid transparent; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--aa-ink-muted); background: transparent; cursor: pointer;
  transition: all .2s ease;
}
.aa-icon-btn:hover { color: #8c3b4a; border-color: #efd0d3; background: #fbf1f2; }

.aa-empty {
  padding: 56px 24px;
  border: 1px dashed rgba(47, 42, 46, 0.16); border-radius: var(--aa-radius);
  text-align: center; background: rgba(255, 255, 255, 0.6);
}
.aa-empty-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: var(--aa-rose-deep); background: var(--aa-blush); }
.aa-empty h3 { margin: 0 0 6px; font-family: var(--aa-display); font-size: 1.7rem; font-weight: 400; }
.aa-empty p { margin: 0 auto; max-width: 440px; color: var(--aa-ink-muted); font-size: 0.9rem; }
.aa-no-results { padding: 28px; text-align: center; color: var(--aa-ink-muted); }

.aa-footer { border-top: 1px solid var(--aa-line); }
.aa-footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--aa-ink-muted); font-size: 0.78rem; }
.aa-footer-inner span { display: inline-flex; align-items: center; gap: 8px; }
.aa-footer-inner svg { width: 16px; height: 16px; }
.aa-footer-inner a:hover { color: var(--aa-plum); }

/* Responsivo */
@media (max-width: 860px) {
  .aa-hero { grid-template-columns: 1fr; gap: 24px; }
  .aa-user-name, .aa-brand-tag { display: none; }
  .aa-item { grid-template-columns: auto 1fr; }
  .aa-item-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--aa-line); }
}

@media (max-width: 600px) {
  .aa-wrap { width: calc(100% - 32px); }
  .aa-brand img { width: 120px; }
  .aa-user { gap: 10px; font-size: 0.8rem; }
  .aa-user .aa-avatar { display: none; }
  .aa-user-exit { padding-left: 10px; }
  .aa-main { padding-top: 36px; }
  .aa-stats div { min-width: 0; flex: 1; }
  .aa-fields { grid-template-columns: 1fr; }
  .aa-library-head { flex-direction: column; align-items: stretch; }
  .aa-search { width: 100%; }
  .aa-item { padding: 16px; gap: 14px; }
  .aa-format { width: 42px; height: 50px; }
  .aa-item-actions .aa-btn { flex: 1; }
  .aa-form-actions .aa-btn { width: 100%; }
  .aa-gate-card { padding: 36px 24px 28px; }
  .aa-footer-inner { flex-direction: column; justify-content: center; padding: 18px 0; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .amendoar-area * { transition: none !important; }
}
