/* Cavallini — painel do estúdio */
.a-top { gap: 20px; border-bottom-color: var(--line); }
.a-tabs { display: flex; gap: 2px; margin-right: auto; }
.a-tabs button {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px;
  border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 600; font-size: 15.5px; color: var(--grey); cursor: pointer;
}
.a-tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--stencil); color: var(--white); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .a-top .top__brand, .a-site { display: none; }
  .a-tabs { margin: 0 auto; }
  .a-tabs button { padding: 0 11px; font-size: 15px; }
}

.a-main { max-width: 980px; margin: 0 auto; padding: 0 var(--gutter) 80px; }
.pane { padding-top: 28px; }
.pane__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 20px; margin-bottom: 20px; }
.pane__head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(42px, 6vw, 56px); line-height: 1; }
.hint { color: var(--grey); font-size: 15px; max-width: 46ch; }
.opt { font-weight: 400; color: var(--grey); }

/* caixa de pedidos */
.inbox { display: grid; border-top: 1.5px solid var(--ink); }
.req {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  width: 100%; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .req:hover { background: rgba(0, 0, 0, 0.03); } }
.req:focus-visible { outline-offset: -2px; }
.req__thumb {
  grid-row: span 2; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: var(--white);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--stencil);
}
.req__thumb img { width: 100%; height: 100%; object-fit: cover; }
.req__thumb svg { width: 28px; }
.req__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.req__name { flex: none; max-width: 100%; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req__idea { grid-column: 2 / 4; color: var(--grey); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req__when { font-size: 13.5px; color: var(--grey); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stencil); flex: none; }
.req__top .tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.tag--marcado { border-color: var(--ink); color: var(--ink); }
.req.is-novo .req__name::after { content: ""; }

.empty { padding: 48px 8px; display: grid; gap: 14px; justify-items: start; border-bottom: 1px solid var(--line); }
.empty strong { font-size: 19px; }
.empty p { color: var(--grey); max-width: 52ch; }

/* janela de detalhe */
.modal {
  width: min(640px, calc(100vw - 20px)); max-height: calc(100dvh - 24px); padding: 0; border: 1.5px solid var(--ink); border-radius: 8px;
  background: var(--paper); color: var(--ink);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.modal[open] { animation: pop 0.22s var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.modal__head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 16px 18px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.modal__head h2 { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1; }
.modal__sub { margin-top: 6px; color: var(--grey); font-size: 14.5px; }
.modal__body { padding: 18px; display: grid; gap: 18px; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn svg { width: 20px; }

.m-idea { font-size: 19px; line-height: 1.45; padding: 16px; background: var(--white); border-left: 3px solid var(--stencil); white-space: pre-wrap; overflow-wrap: anywhere; }
.m-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.m-facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.m-facts dt { font-size: 13px; color: var(--grey); }
.m-facts dd { margin: 0; font-weight: 600; }
.m-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.m-refs button { padding: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; width: 110px; height: 110px; background: var(--white); cursor: zoom-in; }
.m-refs img { width: 100%; height: 100%; object-fit: cover; }
.m-refs button.is-big { width: 100%; height: auto; cursor: zoom-out; }
.m-refs button.is-big img { height: auto; object-fit: contain; max-height: 70dvh; }
.m-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.wa { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
@media (hover: hover) and (pointer: fine) { .wa:hover { background: #18723e; border-color: #18723e; } }

.m-form { display: grid; gap: 14px; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.lbl { display: grid; gap: 6px; font-weight: 600; font-size: 14.5px; }
.lbl input, .lbl select, .lbl textarea, .hours-rows input {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink); font: inherit; font-weight: 400; font-size: 16px;
}
.lbl textarea { min-height: 80px; resize: vertical; }
.lbl input:focus, .lbl select:focus, .lbl textarea:focus, .hours-rows input:focus { outline: none; border-color: var(--stencil); box-shadow: 0 0 0 3px var(--stencil-soft); }
.status-seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--white); }
.status-seg button { min-height: 44px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--grey); cursor: pointer; }
.status-seg button + button { border-left: 1px solid var(--line); }
.status-seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.m-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.btn--danger { border-color: #e2b6b3; color: var(--err); background: transparent; }

/* portefólio */
.card { display: grid; gap: 16px; padding: 20px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 6px; margin-bottom: 24px; }
.card h2 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; }
.card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.up { grid-template-columns: 220px minmax(0, 1fr); align-items: stretch; }
.up__drop {
  position: relative; display: grid; place-content: center; justify-items: center; gap: 8px; min-height: 180px; padding: 12px;
  border: 1.5px dashed var(--stencil); border-radius: 4px; color: var(--stencil); font-weight: 600; text-align: center; cursor: pointer;
}
.up__drop.has-files { border-style: solid; background: var(--stencil-soft); }
.up__drop svg { width: 30px; }
.up__drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.up__drop:focus-within { outline: 2px solid var(--stencil); outline-offset: 2px; }
.up__fields { display: grid; gap: 12px; align-content: start; justify-items: stretch; }
.up__fields .btn { justify-self: start; }
@media (max-width: 640px) { .up { grid-template-columns: 1fr; } .up__drop { min-height: 120px; } }

.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.w-item { position: relative; margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.w-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.w-item figcaption { padding: 8px 10px; font-size: 13.5px; display: block; }
.w-item button {
  position: absolute; top: 6px; right: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 0;
  background: rgba(0, 0, 0, 0.78); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.w-empty { grid-column: 1 / -1; color: var(--grey); padding: 18px 0; }

/* definições */
.defs { max-width: 680px; }
.hours-rows { display: grid; gap: 8px; }
.h-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 44px; gap: 8px; }
.h-row .icon-btn { width: 44px; height: 48px; border-radius: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--white); font-weight: 600; padding: 12px 20px; border-radius: 999px; white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.lbl select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
