:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #1b2533;
  --muted: #667085;
  --border: #dfe5ec;
  --primary: #1677ff;
  --primary-dark: #0f5dcc;
  --success: #0c9b66;
  --danger: #d64545;
  --shadow: 0 10px 30px rgba(23, 43, 77, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: #111827; color: #fff; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; font-size: 20px; }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: #fff; font-size: 14px; }
.container { max-width: 1440px; margin: 0 auto; padding: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); }
.button, button { display: inline-block; border: 0; border-radius: 10px; padding: 11px 16px; background: var(--primary); color: #fff; cursor: pointer; font-weight: 700; }
.button:hover, button:hover { background: var(--primary-dark); }
.button.secondary { background: #e8eef8; color: #1f3b64; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat span { display: block; color: var(--muted); margin-bottom: 10px; }
.stat strong { font-size: 28px; }
.two-cols { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; margin-bottom: 20px; }
.form-card label, .mobile-panel label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 11px; font: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.checkbox { display: flex !important; align-items: center; gap: 8px; margin-top: 35px !important; }
.checkbox input { width: auto; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.service-item { border: 1px solid var(--border); padding: 14px; border-radius: 12px; }
.service-item span { display: block; font-weight: 800; }
.service-item small { display: block; color: var(--muted); margin: 4px 0 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #edf4ff; color: #1559a6; font-size: 12px; font-weight: 800; }
.inline-form { display: flex; gap: 10px; margin-bottom: 16px; }
.inline-form select { max-width: 260px; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert.success { background: #e6f7f0; color: #086b47; }
.alert.danger { background: #fdecec; color: #9f2626; }
.login-wrap { min-height: 90vh; display: grid; place-items: center; }
.login-card { width: min(420px, 100%); }
.test-users { display: grid; gap: 4px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.qr { width: 220px; max-width: 100%; }
.timeline { display: grid; gap: 12px; }
.timeline-item { border-left: 4px solid var(--primary); padding-left: 12px; }
.timeline-item span, .timeline-item small { display: block; color: var(--muted); margin-top: 3px; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kanban-column { min-height: 70vh; background: #eaf0f7; border-radius: 14px; padding: 12px; }
.kanban-column h2 { display: flex; justify-content: space-between; font-size: 16px; }
.kanban-column h2 span { background: #fff; border-radius: 999px; padding: 2px 8px; }
.order-card { display: block; background: #fff; color: var(--text); border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 5px 15px rgba(0,0,0,.06); }
.order-card > span, .order-card > small, .order-card > em { display: block; margin-top: 5px; }
.order-card ul { padding-left: 18px; margin: 10px 0; }
.order-card em { color: var(--danger); font-style: normal; font-weight: 800; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }
.mobile-panel { max-width: 620px; margin: 0 auto; }
.eyebrow { text-transform: uppercase; font-size: 12px; color: var(--muted); font-weight: 800; }
.status-box { background: #eef5ff; border-radius: 14px; padding: 16px; margin: 20px 0; }
.status-box span, .status-box strong { display: block; }
.status-box strong { font-size: 24px; margin-top: 5px; }
.simple-list { padding-left: 20px; }
.note { background: #fff7db; border: 1px solid #f0d675; border-radius: 10px; padding: 12px; margin: 14px 0; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-cols, .detail-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar { align-items: flex-start; gap: 10px; flex-direction: column; }
}
@media (max-width: 600px) {
  .container { padding: 14px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .stats, .service-grid { grid-template-columns: 1fr; }
  .topbar nav { gap: 10px; }
}

.comparison { margin-bottom: 20px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.comparison span, .comparison strong { display: block; }
.comparison strong { font-size: 32px; margin-top: 5px; }
.positive { color: var(--success); }
.negative { color: var(--danger); }
.camera { width: 100%; min-height: 260px; background: #111827; border-radius: 14px; object-fit: cover; margin: 12px 0; }
.scan-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.secondary-button { background: #e8eef8; color: #1f3b64; }
.fallback { border-top: 1px solid var(--border); padding-top: 18px; }
.fallback form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
@media (max-width: 600px) {
  .comparison { align-items: flex-start; flex-direction: column; }
  .fallback form { grid-template-columns: 1fr; }
}
.logout-form { display: inline; margin: 0; }
.nav-button { padding: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; border: 0; border-radius: 0; }
.nav-button:hover { background: transparent; text-decoration: underline; }


/* Administração de serviços */
.muted {
  color: var(--muted);
}

.narrow-form {
  max-width: 620px;
}

.table-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-action-form {
  margin: 0;
}

.button.small,
button.small {
  padding: 7px 11px;
  font-size: 13px;
}

.warning-button {
  background: #b96b00;
}

.warning-button:hover {
  background: #8f5200;
}

.success-button {
  background: var(--success);
}

.success-button:hover {
  background: #08794f;
}

.status-active {
  background: #e5f7ef;
  color: #08704b;
}

.status-inactive {
  background: #f1f2f4;
  color: #667085;
}

.inactive-row {
  opacity: .68;
}


/* Perfil Caixa e fechamento de pedidos */
.checkout-card {
  margin-top: 20px;
  margin-bottom: 20px;
}

.checkout-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  max-width: 720px;
}

.checkout-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.checkout-success {
  background: #e5f7ef;
  border: 1px solid #a9dfc9;
  border-radius: 12px;
  padding: 14px;
  color: #08704b;
}

.checkout-success strong,
.checkout-success span {
  display: block;
}

.checkout-success span {
  margin-top: 5px;
}

.status-pending {
  background: #fff3dc;
  color: #945b00;
}

@media (max-width: 700px) {
  .checkout-form {
    grid-template-columns: 1fr;
  }
}


/* Registro de pagamento separado do fechamento */
.payment-card {
  margin-top: 20px;
}

.payment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-card-head h2 {
  margin-bottom: 5px;
}

.payment-card-head p {
  margin-top: 0;
  color: var(--muted);
}

.payment-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  max-width: 900px;
}

.payment-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.payment-checkbox {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.payment-checkbox input {
  width: auto;
  margin: 0;
}

.payment-checkbox span {
  white-space: nowrap;
}

@media (max-width: 800px) {
  .payment-form {
    grid-template-columns: 1fr;
  }

  .payment-card-head {
    flex-direction: column;
  }

  .payment-checkbox span {
    white-space: normal;
  }
}


/* Valores a receber e filtros de pagamento */
.clickable-stat {
  display: block;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}

.clickable-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(23, 43, 77, .13);
}

.clickable-stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.orders-filter {
  flex-wrap: wrap;
}

.orders-filter select {
  max-width: 260px;
}

.pending-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px solid #f0d675;
  border-radius: 12px;
  background: #fff7db;
}

.pending-summary span,
.pending-summary strong {
  display: block;
}

.pending-summary strong {
  margin-top: 4px;
  font-size: 24px;
  color: #7a4c00;
}

@media (max-width: 650px) {
  .pending-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .orders-filter select,
  .orders-filter .button,
  .orders-filter button {
    width: 100%;
    max-width: none;
  }
}


/* Código manual da comanda */
.manual-code-box {
  max-width: 330px;
  margin: 0 auto 18px;
  padding: 16px;
  border: 2px dashed var(--primary);
  border-radius: 14px;
  background: #f5f9ff;
}

.manual-code-box span,
.manual-code-box strong {
  display: block;
}

.manual-code-box span {
  color: var(--muted);
  font-size: 13px;
}

.manual-code-box strong {
  margin: 7px 0 12px;
  font-size: 28px;
  letter-spacing: 1px;
}

.copy-code-button {
  width: auto;
}


/* Resumo e desempenho do WhatsApp */
.alert.warning {
  background: #fff7db;
  color: #7a4c00;
}

.whatsapp-performance-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  color: var(--text);
  border-left: 5px solid #1f9d68;
}

.whatsapp-performance-card > div > strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
}

.whatsapp-performance-card p {
  margin: 7px 0 0;
  color: var(--muted);
}

.whatsapp-conversion {
  text-align: center;
}

.whatsapp-conversion strong,
.whatsapp-conversion span {
  display: block;
}

.whatsapp-conversion strong {
  color: #08704b;
  font-size: 30px;
}

.compact-head {
  margin-bottom: 12px;
}

.preorder-list {
  display: grid;
  gap: 16px;
}

.preorder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.preorder-head h2 {
  margin: 5px 0;
}

.preorder-head p {
  margin: 0;
  color: var(--muted);
}

.preorder-total {
  text-align: right;
}

.preorder-total span,
.preorder-total strong {
  display: block;
}

.preorder-total strong {
  margin: 5px 0 8px;
  font-size: 24px;
}

.preorder-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  padding: 14px 0;
  margin: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.preorder-items {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.preorder-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.preorder-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preorder-actions form {
  margin: 0;
}

.danger-button {
  background: var(--danger);
}

.danger-button:hover {
  background: #aa2e2e;
}

@media (max-width: 760px) {
  .whatsapp-performance-card {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .whatsapp-conversion,
  .preorder-total {
    text-align: left;
  }

  .preorder-head {
    flex-direction: column;
  }
}


/* Caixa de entrada do WhatsApp */
.whatsapp-page-head {
  margin-bottom: 16px;
}

.whatsapp-api-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.whatsapp-api-state span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.whatsapp-api-state.ready {
  background: #e5f7ef;
  color: #08704b;
}

.whatsapp-api-state.ready span {
  background: #0c9b66;
}

.whatsapp-api-state.waiting {
  background: #fff3dc;
  color: #8a5700;
}

.whatsapp-api-state.waiting span {
  background: #d88a00;
}

.whatsapp-shell {
  display: grid;
  grid-template-columns: 330px minmax(420px, 1fr) 280px;
  gap: 14px;
  height: calc(100vh - 155px);
  min-height: 650px;
}

.whatsapp-conversations,
.whatsapp-chat,
.whatsapp-contact-panel {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.whatsapp-conversations {
  display: flex;
  flex-direction: column;
}

.whatsapp-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.whatsapp-list-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.unread-total {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.conversation-list {
  overflow-y: auto;
  flex: 1;
}

.conversation-item {
  display: flex;
  gap: 11px;
  padding: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.conversation-item:hover,
.conversation-item.selected {
  background: #eff8f4;
}

.conversation-item.selected {
  box-shadow: inset 4px 0 0 #0c9b66;
}

.conversation-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff3ea;
  color: #08704b;
  font-weight: 900;
  font-size: 18px;
}

.conversation-copy {
  min-width: 0;
  flex: 1;
}

.conversation-name-line,
.conversation-preview-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.conversation-name-line strong,
.conversation-preview-line span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-name-line small {
  color: var(--muted);
}

.conversation-preview-line {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.conversation-preview-line b {
  flex: 0 0 auto;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0c9b66;
  color: #fff;
  font-size: 11px;
}

.conversation-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.chat-tag {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.chat-tag.human {
  background: #e8eef8;
  color: #1f3b64;
}

.chat-tag.automatic {
  background: #eee9ff;
  color: #5b3aa8;
}

.chat-tag.client {
  background: #e5f7ef;
  color: #08704b;
}

.chat-tag.lead {
  background: #fff3dc;
  color: #8a5700;
}

.empty-chat-list,
.empty-chat,
.no-conversation-selected {
  padding: 30px 18px;
  text-align: center;
  color: var(--muted);
}

.whatsapp-chat {
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.chat-header h2,
.chat-header p {
  margin: 0;
}

.chat-header p {
  margin-top: 3px;
  color: var(--muted);
}

.chat-header-actions form {
  margin: 0;
}

.chat-state-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.chat-state,
.service-window {
  font-weight: 700;
}

.chat-state.human {
  color: #1f3b64;
}

.chat-state.automatic {
  color: #5b3aa8;
}

.service-window.open {
  color: #08704b;
}

.service-window.closed {
  color: #a13b32;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  background:
    linear-gradient(rgba(246, 248, 251, .93), rgba(246, 248, 251, .93)),
    radial-gradient(circle at 20% 20%, #dceee6 1px, transparent 1px);
  background-size: auto, 18px 18px;
}

.message-row {
  display: flex;
  margin-bottom: 10px;
}

.message-row.incoming {
  justify-content: flex-start;
}

.message-row.outgoing {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(78%, 620px);
  padding: 10px 12px 7px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .06);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-row.incoming .message-bubble {
  background: #fff;
  border-top-left-radius: 3px;
}

.message-row.outgoing .message-bubble {
  background: #dcf8e8;
  border-top-right-radius: 3px;
}

.message-meta {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.delivery-status.read {
  color: #1677ff;
}

.delivery-status.failed,
.message-error {
  color: var(--danger);
}

.message-error {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}

.chat-composer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.composer-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
}

.composer-form textarea {
  min-height: 48px;
  max-height: 150px;
  margin: 0;
}

.composer-warning {
  padding: 12px;
  border-radius: 10px;
  background: #fff3dc;
  color: #7d5000;
}

.whatsapp-contact-panel {
  padding: 17px;
  overflow-y: auto;
}

.whatsapp-contact-panel h2 {
  margin-top: 0;
}

.contact-data {
  margin: 0;
}

.contact-data dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 13px;
}

.contact-data dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.contact-panel-section {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.section-title h3 {
  margin: 0;
}

.mini-preorder {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f5f7fa;
}

.mini-preorder span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.preorder-conversation-link {
  margin-bottom: 10px;
}

@media (max-width: 1180px) {
  .whatsapp-shell {
    grid-template-columns: 300px minmax(420px, 1fr);
  }

  .whatsapp-contact-panel {
    display: none;
  }
}

@media (max-width: 780px) {
  .whatsapp-shell {
    display: block;
    height: auto;
    min-height: 0;
  }

  .whatsapp-conversations {
    max-height: 360px;
    margin-bottom: 14px;
  }

  .whatsapp-chat {
    min-height: 650px;
  }

  .composer-form {
    grid-template-columns: 1fr;
  }

  .message-bubble {
    max-width: 90%;
  }
}


/* Correção v12 — cartão de desempenho do WhatsApp */
a.whatsapp-performance-card {
  width: 100%;
  min-height: 138px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 20px;
  padding: 22px 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 5px solid #1f9d68;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

a.whatsapp-performance-card:hover {
  background: #fbfefd;
  border-left-color: #08704b;
}

.whatsapp-performance-content {
  flex: 1 1 auto;
  min-width: 0;
}

.whatsapp-performance-content > strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.2;
}

.whatsapp-performance-content p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.whatsapp-performance-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.whatsapp-performance-button {
  white-space: nowrap;
}

@media (max-width: 760px) {
  a.whatsapp-performance-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .whatsapp-performance-right {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .whatsapp-performance-right {
    flex-direction: column;
  }
}


/* =========================================================
   Login LAVSIS v13
   Visual sóbrio, profissional e preparado para a logo real
   da Lavanderia Amorim.
   ========================================================= */

body.auth-page {
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 119, 255, .055), transparent 28%),
    linear-gradient(135deg, #f7f9fc 0%, #eef3f8 100%);
}

.auth-container {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.auth-container > .alert {
  width: min(1040px, 100%);
  margin: 0 auto 14px;
  box-shadow: 0 10px 28px rgba(23, 43, 77, .08);
}

.auth-shell {
  width: min(1040px, 100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(330px, .88fr) minmax(420px, 1.12fr);
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(27, 42, 68, .11);
}

.auth-client-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 48px 42px;
  overflow: hidden;
  color: #142540;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(239, 245, 252, .96)),
    #f3f7fb;
  border-right: 1px solid #e2e8f0;
}

.auth-client-panel::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  top: -150px;
  left: -120px;
  border: 1px solid rgba(22, 119, 255, .10);
  border-radius: 50%;
}

.auth-client-panel::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -145px;
  bottom: -95px;
  border: 34px solid rgba(22, 119, 255, .035);
  border-radius: 50%;
}

.auth-client-content,
.auth-client-footer {
  position: relative;
  z-index: 1;
}

.client-logo-placeholder {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
  color: #0e5eb7;
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 32px;
  box-shadow: 0 18px 44px rgba(31, 70, 120, .10);
}

.client-logo-placeholder span {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
}

.auth-kicker,
.auth-area-label {
  display: inline-block;
  color: #356ca8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.auth-client-panel h1 {
  margin: 10px 0 14px;
  color: #11233e;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.auth-client-description {
  max-width: 360px;
  margin: 0;
  color: #62718a;
  font-size: 16px;
  line-height: 1.65;
}

.auth-client-footer {
  display: grid;
  gap: 5px;
  padding-top: 28px;
  border-top: 1px solid #dde6f0;
}

.auth-client-footer span {
  color: #2f4667;
  font-weight: 750;
}

.auth-client-footer small {
  color: #7b8799;
  font-size: 12px;
}

.auth-login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 64px 34px;
  background: #ffffff;
}

.auth-form-header {
  margin-bottom: 30px;
}

.auth-form-header h2 {
  margin: 10px 0 8px;
  color: #16243a;
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.auth-form-header p {
  margin: 0;
  color: #748096;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-field label {
  display: block;
  margin: 0 0 8px;
  color: #283850;
  font-size: 13px;
  font-weight: 750;
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input > svg {
  position: absolute;
  left: 15px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #7c8aa0;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.auth-input input {
  height: 50px;
  padding: 12px 48px 12px 45px;
  color: #19283e;
  background: #fbfcfe;
  border: 1px solid #d9e1eb;
  border-radius: 11px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-input input::placeholder {
  color: #9aa5b4;
}

.auth-input input:focus {
  background: #ffffff;
  border-color: #4d89d4;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, .09);
}

.password-toggle {
  position: absolute;
  right: 9px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #718096;
  background: transparent;
  border-radius: 9px;
}

.password-toggle:hover,
.password-toggle:focus {
  color: #174f91;
  background: #edf3fa;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle.is-visible {
  color: #1668c6;
}

.auth-submit {
  width: 100%;
  height: 50px;
  margin-top: 2px;
  background: #1268c5;
  border-radius: 11px;
  box-shadow: 0 9px 20px rgba(18, 104, 197, .20);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.auth-submit:hover {
  background: #0d57a7;
  box-shadow: 0 11px 24px rgba(18, 104, 197, .24);
  transform: translateY(-1px);
}

.auth-security {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: #748096;
  font-size: 12px;
}

.auth-security svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: #4b7e68;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-powered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 42px;
  color: #98a2b1;
  font-size: 10px;
  text-align: center;
}

.auth-powered img {
  width: 154px;
  max-height: 64px;
  object-fit: contain;
  opacity: .88;
}

@media (max-width: 860px) {
  .auth-container {
    padding: 20px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-client-panel {
    min-height: 330px;
    padding: 38px 36px 30px;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .client-logo-placeholder {
    width: 105px;
    height: 105px;
    margin-bottom: 24px;
    border-radius: 25px;
  }

  .client-logo-placeholder span {
    font-size: 34px;
  }

  .auth-client-panel h1 {
    font-size: 34px;
  }

  .auth-client-footer {
    margin-top: 42px;
  }

  .auth-login-panel {
    padding: 40px 36px 28px;
  }
}

@media (max-width: 520px) {
  .auth-container {
    justify-content: flex-start;
    padding: 0;
    background: #ffffff;
  }

  .auth-shell {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-client-panel {
    min-height: 285px;
    padding: 30px 24px 25px;
  }

  .auth-client-description {
    font-size: 14px;
  }

  .auth-client-footer {
    display: none;
  }

  .auth-login-panel {
    padding: 34px 24px 25px;
  }

  .auth-form-header h2 {
    font-size: 27px;
  }

  .auth-powered {
    padding-top: 34px;
  }
}


/* =========================================================
   DESIGN COMPLETO LAVSIS v14
   Interface discreta, profissional e consistente.
   ========================================================= */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #152238;
  --muted: #6f7c91;
  --border: #e1e7ef;
  --primary: #1769d2;
  --primary-dark: #1056ad;
  --primary-soft: #eaf2ff;
  --success: #159267;
  --danger: #c94c4c;
  --warning: #d38a16;
  --sidebar-width: 270px;
  --header-height: 68px;
  --shadow: 0 8px 24px rgba(25, 44, 74, .055);
}

html {
  background: var(--bg);
}

body.app-page {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
.button {
  font-family: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid var(--border);
  transition: transform .22s ease;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 116px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eef1f5;
}

.sidebar-saas-logo {
  width: 158px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.sidebar-client-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding-left: 3px;
  color: #708096;
  font-size: 12px;
}

.sidebar-client-name strong {
  color: #263a58;
  font-size: 13px;
}

.side-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: stretch;
  gap: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: #c9d5e5 transparent;
}

.side-nav::-webkit-scrollbar {
  width: 5px;
}

.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav::-webkit-scrollbar-thumb {
  background: #c9d5e5;
  border-radius: 999px;
}

.side-nav-link {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  color: #53637a;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.side-nav-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-nav-link:hover {
  color: #184f98;
  background: #f2f6fc;
}

.side-nav-link.active {
  color: #1666c6;
  background: #eaf2ff;
  box-shadow: inset 3px 0 0 #2175de;
}

.side-nav-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 11px 12px 14px;
  background: #fff;
  border-top: 1px solid #edf0f4;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
}

.user-avatar,
.header-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #1d579b;
  background: #eaf2ff;
  font-weight: 800;
}

.user-avatar {
  width: 38px;
  height: 38px;
}

.header-avatar {
  width: 36px;
  height: 36px;
}

.sidebar-user-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy strong {
  color: #293a54;
  font-size: 13px;
}

.sidebar-user-copy span {
  margin-top: 2px;
  color: #8893a4;
  font-size: 11px;
}

.sidebar-logout-form {
  margin: 3px 0 0;
}

.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  color: #657389;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
}

.sidebar-logout:hover {
  color: #a33c3c;
  background: #fff2f2;
}

.sidebar-logout svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-overlay {
  display: none;
}

.app-main {
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 25;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.mobile-menu-button {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: #53637a;
  background: transparent;
}

.mobile-menu-button:hover {
  color: #1769d2;
  background: #eef4fc;
}

.mobile-menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.mobile-brand {
  display: none;
  flex-direction: column;
}

.mobile-brand strong {
  font-size: 14px;
}

.mobile-brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.app-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #748096;
  font-size: 12px;
  font-weight: 650;
}

.system-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20a975;
  box-shadow: 0 0 0 4px rgba(32, 169, 117, .10);
}

.app-content.container {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 27px 32px 42px;
}

.alerts-stack {
  margin-bottom: 16px;
}

.alert {
  border: 1px solid transparent;
  box-shadow: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.page-head {
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 4px 0 5px;
  color: #17243a;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.page-head p {
  color: var(--muted);
  font-size: 14px;
}

.page-kicker {
  color: #55708f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.period-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: #526177;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}

.period-chip svg,
.primary-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button,
button {
  border-radius: 10px;
  box-shadow: none;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
}

.button.secondary,
.secondary-button,
.subtle-button {
  color: #315377;
  background: #edf3fa;
}

.button.secondary:hover,
.secondary-button:hover,
.subtle-button:hover {
  color: #174f91;
  background: #e3edf8;
}

input,
select,
textarea {
  color: #203149;
  background: #ffffff;
  border-color: #dbe2eb;
  border-radius: 9px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #73a4df;
  box-shadow: 0 0 0 3px rgba(23, 105, 210, .09);
}

.form-card label,
.mobile-panel label,
.payment-form label,
.checkout-form label {
  color: #34455e;
  font-size: 13px;
}

table {
  font-size: 13px;
}

th {
  padding: 13px 14px;
  color: #778399;
  background: #fbfcfe;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

td {
  padding: 14px;
  color: #34445d;
}

tbody tr:hover {
  background: #fbfcfe;
}

.badge {
  padding: 5px 9px;
  color: #275f9f;
  background: #edf4ff;
  border-radius: 7px;
  font-size: 11px;
}

.status-active {
  color: #11754f;
  background: #e5f6ee;
}

.status-pending {
  color: #8a5a0a;
  background: #fff2da;
}

.order-code {
  color: #1769d2;
}

.table-action {
  font-weight: 750;
}

.service-item,
.order-card,
.status-box,
.note,
.pending-summary,
.payment-checkbox {
  border-color: var(--border);
  box-shadow: none;
}

.service-item {
  background: #fbfcfe;
}

.kanban-column {
  background: #eef2f7;
  border: 1px solid #e0e6ee;
}

.order-card {
  border: 1px solid #e3e8ef;
  box-shadow: 0 6px 18px rgba(25, 44, 74, .06);
}

.timeline-item {
  border-left-width: 3px;
}

/* Dashboard */
.dashboard-page-head {
  margin-bottom: 22px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-stat {
  min-height: 128px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-stat > div:first-child {
  min-width: 0;
}

.dashboard-stat span,
.dashboard-stat small,
.dashboard-stat strong {
  display: block;
}

.dashboard-stat span {
  color: #59687d;
  font-size: 13px;
}

.dashboard-stat strong {
  margin-top: 10px;
  color: #18243a;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.dashboard-stat small {
  margin-top: 8px;
  color: #8893a4;
  font-size: 11px;
}

.dashboard-stat.compact-stat {
  grid-column: span 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
}

.stat-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-icon.blue {
  color: #1769d2;
  background: #eaf2ff;
}

.stat-icon.violet {
  color: #6c52b4;
  background: #f0ecfb;
}

.stat-icon.green {
  color: #16855d;
  background: #e8f6ef;
}

.stat-icon.amber {
  color: #ba7610;
  background: #fff3df;
}

.dashboard-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-whatsapp-card {
  display: block;
  color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}

.dashboard-whatsapp-card:hover {
  border-color: #bcd9ca;
  transform: translateY(-1px);
}

.feature-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-card-title h2,
.section-card-head h2 {
  margin: 0;
  color: #18243a;
  font-size: 16px;
}

.feature-card-title p,
.section-card-head p {
  margin: 4px 0 0;
  color: #8390a3;
  font-size: 12px;
}

.whatsapp-round-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #178b60;
  background: #e6f6ee;
  border-radius: 50%;
}

.whatsapp-round-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.whatsapp-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0 18px;
}

.whatsapp-metrics > div {
  padding: 2px 16px;
  text-align: center;
  border-right: 1px solid #e8edf3;
}

.whatsapp-metrics > div:first-child {
  padding-left: 0;
}

.whatsapp-metrics > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.whatsapp-metrics strong,
.whatsapp-metrics span {
  display: block;
}

.whatsapp-metrics strong {
  color: #17243a;
  font-size: 21px;
}

.whatsapp-metrics span {
  max-width: 105px;
  margin: 6px auto 0;
  color: #758197;
  font-size: 11px;
  line-height: 1.35;
}

.feature-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  color: #738095;
  border-top: 1px solid #edf0f4;
  font-size: 11px;
}

.feature-card-footer strong {
  color: #1769d2;
}

.dashboard-comparison {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 20px;
}

.comparison-copy span,
.comparison-copy strong,
.comparison-copy small {
  display: block;
}

.comparison-copy span {
  color: #59687d;
  font-size: 13px;
  font-weight: 700;
}

.comparison-copy strong {
  margin-top: 22px;
  font-size: 31px;
  line-height: 1;
}

.comparison-copy small {
  margin-top: 9px;
  color: #7d899c;
}

.comparison-visual {
  min-width: 0;
}

.comparison-chart {
  width: 100%;
  height: 95px;
  overflow: visible;
}

.chart-area {
  fill: url(#chartFill);
}

.chart-line {
  fill: none;
  stroke: #2375e8;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.comparison-visual p {
  margin: 5px 0 0;
  color: #7d899c;
  font-size: 11px;
  line-height: 1.5;
}

.recent-orders-card {
  padding: 0;
  overflow: hidden;
}

.section-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf0f4;
}

.recent-orders-card .table-wrap {
  margin: 0;
}

.modern-table th:first-child,
.modern-table td:first-child {
  padding-left: 20px;
}

.modern-table th:last-child,
.modern-table td:last-child {
  padding-right: 20px;
}

.empty-table {
  padding: 34px !important;
  color: var(--muted);
  text-align: center;
}

/* Login com a marca da cliente */
.client-logo-frame {
  width: 100%;
  max-width: 390px;
  display: grid;
  place-items: center;
  padding: 22px 20px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid #dce6f1;
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(31, 70, 120, .08);
}

.client-login-logo {
  width: 100%;
  max-height: 245px;
  object-fit: contain;
}

.auth-client-panel h1,
.auth-kicker {
  display: none;
}

.auth-form-header h1 {
  margin: 10px 0 8px;
  color: #16243a;
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

/* Páginas do WhatsApp integradas ao layout */
.whatsapp-shell {
  height: calc(100vh - var(--header-height) - 122px);
  min-height: 610px;
}

.whatsapp-conversations,
.whatsapp-chat,
.whatsapp-contact-panel {
  box-shadow: var(--shadow);
}

/* Impressão limpa */
@media print {
  .app-sidebar,
  .app-header,
  .sidebar-overlay,
  .page-head-actions,
  .actions,
  button,
  .button {
    display: none !important;
  }

  .app-main {
    width: 100%;
    margin: 0;
  }

  .app-content.container {
    max-width: none;
    padding: 0;
  }

  body {
    background: #fff;
  }

  .card {
    box-shadow: none;
  }
}

@media (max-width: 1240px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: 16px 0 50px rgba(20, 35, 58, .18);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    background: rgba(17, 30, 49, .34);
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.sidebar-open .sidebar-overlay {
    visibility: visible;
    opacity: 1;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-menu-button {
    display: grid;
  }

  .mobile-brand {
    display: flex;
    margin-left: 10px;
  }

  .app-header {
    padding: 0 18px;
  }

  .app-content.container {
    padding: 24px 20px 38px;
  }
}

@media (max-width: 720px) {
  .system-status {
    display: none;
  }

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

  .page-head-actions {
    width: 100%;
  }

  .page-head-actions .button {
    flex: 1;
    justify-content: center;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-comparison {
    grid-template-columns: 1fr;
  }

  .comparison-copy strong {
    margin-top: 13px;
  }

  .whatsapp-metrics {
    gap: 8px;
  }

  .whatsapp-metrics > div {
    padding: 2px 8px;
  }

  .feature-card-footer {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .app-content.container {
    padding: 20px 14px 32px;
  }

  .app-header {
    height: 62px;
  }

  .header-avatar {
    width: 32px;
    height: 32px;
  }

  .period-chip {
    display: none;
  }

  .dashboard-stat {
    min-height: 112px;
  }

  .dashboard-stat strong {
    font-size: 23px;
  }

  .whatsapp-metrics {
    grid-template-columns: 1fr;
  }

  .whatsapp-metrics > div {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid #e8edf3;
  }

  .whatsapp-metrics > div:last-child {
    border-bottom: 0;
  }

  .client-logo-frame {
    padding: 14px;
  }
}

/* Ajustes da versão PHP/Hostinger mantendo o design original */
[hidden] { display: none !important; }
.auth-alert { width: min(980px, calc(100% - 32px)); margin: 20px auto -8px; }
.error-card { max-width: 520px; margin: 12vh auto; padding: 42px; }
.error-card h1 { font-size: 44px; margin-bottom: 10px; }
.period-form { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fff; border: 1px solid #dfe6ef; border-radius: 12px; }
.period-form label { margin: 0; font-size: 12px; color: #6b7280; font-weight: 700; }
.period-form input { border: 0; padding: 0; min-height: auto; background: transparent; }
.compact-grid { align-items: stretch; }
.operation-summary .simple-list > div { padding: 15px 0; }
.operation-summary .simple-list > div + div { border-top: 1px solid #edf1f5; }
.price-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.variation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.variation-grid label { margin-top: 0; }
.service-item-title { display: flex; flex-direction: column; gap: 4px; min-height: 48px; }
.service-item-title small { color: #778196; }
.service-price { font-size: 18px; font-weight: 800; color: #165fc7; display: block; margin: 9px 0 13px; }
.order-create-form { display: grid; gap: 20px; }
.order-form-top { align-items: start; }
.order-summary-card { position: sticky; top: 88px; }
.order-summary-card .note { margin: 18px 0; }
.full-button { width: 100%; justify-content: center; }
.order-service-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.order-service-item { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.order-service-item.has-quantity { border-color: #4b91ef; box-shadow: 0 8px 24px rgba(35,117,232,.12); transform: translateY(-1px); }
.order-service-item input[type="number"] { font-weight: 800; }
.order-summary-card .simple-list > div { padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.order-summary-card .simple-list strong { font-size: 20px; }
.status-processing { background: #e8f1ff; color: #185fb8; }
.status-ready { background: #e8f8ef; color: #157347; }
.compact-form { padding: 0; box-shadow: none; border: 0; }
.order-qr-card { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.order-qr-card .qr { min-height: 180px; min-width: 180px; margin: 14px auto; }
.order-qr-card .qr img, .order-qr-card .qr canvas { margin: auto; }
.manual-code { font-size: 23px; letter-spacing: 1px; margin-top: 9px; }
.table-wrap tfoot td { border-top: 2px solid #dfe6ef; }
.muted { display: block; color: #7b8495; font-size: 12px; margin-top: 4px; }
.expense-total-card { max-width: 520px; margin-bottom: 20px; }
.cashier-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cashier-layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }
.pending-order-list { display: grid; gap: 0; }
.pending-order-list > a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; color: inherit; border-bottom: 1px solid #edf1f5; text-decoration: none; }
.pending-order-list > a span { display: flex; flex-direction: column; gap: 3px; }
.pending-order-list > a small { color: #778196; }
.danger-link { color: #be2e3c; }
.new-client-fields { display: grid; gap: 8px; padding: 14px; background: #f7f9fc; border: 1px solid #e2e8f0; border-radius: 12px; }
.preorder-source { margin-bottom: 20px; }
.compact-filter { max-width: 480px; }
.inline-action-form { display: inline; }
.inline-action-form button { border: 0; background: transparent; padding: 0; }
.alert.fade-out { opacity: 0; transform: translateY(-4px); transition: .35s ease; }
.form-card textarea { min-height: 92px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-actions .button { margin-top: 0; }
.service-item select, .service-item input { width: 100%; }
.preorder-details p { white-space: normal; }

/* Pedidos em linhas e painéis financeiros */
.dashboard-summary-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.clickable-stat { color: inherit; text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.clickable-stat:hover { transform: translateY(-2px); border-color: #b8d2ef; box-shadow: 0 10px 28px rgba(25, 67, 118, .1); }
.stat-icon.expense { color: #c43b58; background: #fdecef; font-weight: 850; }
.expense-kicker { color: #bd3e58; }
.expense-button { background: #c43b58; }
.expense-button:hover { background: #aa2f49; }
.report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 18px; margin-bottom: 18px; }
.comparison-panel, .donut-panel, .report-table-card { padding: 0; overflow: hidden; }
.change-pill { font-size: 20px; }
.bar-comparison { height: 245px; display: flex; align-items: end; justify-content: center; gap: clamp(40px, 10vw, 95px); padding: 32px 24px 24px; }
.bar-column { height: 100%; width: min(120px, 32%); display: grid; grid-template-rows: auto 1fr auto; gap: 9px; text-align: center; }
.bar-column > span { color: #34455e; font-size: 12px; font-weight: 750; }
.bar-column small { color: #758197; }
.bar-track { height: 100%; display: flex; align-items: end; overflow: hidden; background: #edf3fb; border-radius: 12px 12px 5px 5px; }
.bar-track i { width: 100%; min-height: 3px; display: block; background: #8db9ed; border-radius: 12px 12px 0 0; }
.bar-column.current .bar-track i { background: linear-gradient(180deg, #159a70, #1769d2); }
.donut-layout { min-height: 245px; display: grid; grid-template-columns: minmax(180px, .8fr) 1.2fr; align-items: center; gap: 28px; padding: 26px; }
.donut-chart { width: 185px; aspect-ratio: 1; display: grid; place-items: center; margin: auto; border-radius: 50%; }
.donut-chart > div { width: 112px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px #edf0f4; }
.donut-chart strong, .donut-chart span { display: block; }
.donut-chart strong { color: #18243a; font-size: 17px; }
.donut-chart span { margin-top: 3px; color: #7d899c; font-size: 11px; }
.chart-legend { display: grid; gap: 11px; }
.chart-legend > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.chart-legend span { color: #59687d; }
.chart-legend strong { color: #283a53; font-size: 11px; }
.pagination { display: flex; justify-content: center; gap: 6px; padding: 16px; border-top: 1px solid #edf0f4; }
.pagination a { min-width: 34px; height: 34px; display: grid; place-items: center; color: #315377; background: #edf3fa; border-radius: 8px; font-weight: 750; text-decoration: none; }
.pagination a.current { color: #fff; background: #1769d2; }
.order-lines-card { padding: 0; overflow: hidden; }
.order-lines { display: grid; gap: 10px; padding: 18px 20px 22px; }
.order-line { display: grid; grid-template-columns: 32px minmax(180px, 1.35fr) minmax(170px, 1fr) 100px minmax(150px, 1fr) 105px auto; align-items: end; gap: 10px; padding: 13px; background: #fbfcfe; border: 1px solid #e1e7ef; border-radius: 12px; }
.order-line label { margin: 0; color: #34455e; font-size: 12px; font-weight: 700; }
.order-line select, .order-line input { width: 100%; margin-top: 6px; }
.order-line-number { width: 28px; height: 28px; display: grid; place-items: center; align-self: center; color: #1769d2; background: #eaf2ff; border-radius: 50%; font-size: 12px; font-weight: 850; }
.order-line-value { align-self: center; text-align: right; }
.order-line-value span, .order-line-value strong { display: block; }
.order-line-value span { color: #7d899c; font-size: 10px; text-transform: uppercase; }
.order-line-value strong { margin-top: 5px; color: #18243a; font-size: 14px; }
.line-remove { min-height: 38px; padding: 8px 10px; color: #b82e47; background: #fff1f3; }
.discount-row { display: grid !important; grid-template-columns: 1fr 120px; align-items: center; gap: 12px; }
.discount-row label { margin: 0; }
.discount-row input { text-align: right; font-weight: 750; }
.order-final-total { margin-top: 4px; padding-top: 16px !important; border-top: 2px solid #dbe6f2; }
.order-final-total strong { color: #1769d2; }
.total-breakdown { margin-left: auto; max-width: 320px; }
.total-breakdown > div { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; }
.cancel-order-card { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 18px 0; border-color: #f0c9d1; }
.cancel-order-card h2 { margin: 0 0 5px; color: #9e293f; }
.cancel-order-card p { margin: 0; color: #7d6870; }
.cancel-order-card form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 10px; }
.cancel-order-card label { grid-column: 1; margin: 0; font-size: 12px; }
.cancel-order-card input { grid-column: 1; }
.cancel-order-card button { grid-column: 2; grid-row: 1 / 3; }
.order-cancelled-notice { border-left: 4px solid #c43b58; }
.expense-bars .bar-track { background: #f8e9ed; }
.expense-bars .bar-track i, .expense-bars .current .bar-track i { background: linear-gradient(180deg, #ef8294, #c43b58); }
.expense-donut > div { box-shadow: inset 0 0 0 1px #f1dce1; }
.expense-management-grid { display: grid; grid-template-columns: minmax(280px, .38fr) minmax(0, 1fr); align-items: start; gap: 18px; }
.expense-form-card { padding: 0; overflow: hidden; }
.expense-form-fields { padding: 0 20px 20px; }
.expense-badge { color: #a53249; background: #fdecef; }
.expense-table-card { min-width: 0; }

@media (max-width: 1280px) {
  .dashboard-summary-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-line { grid-template-columns: 30px 1fr 1fr 90px; }
  .order-line-notes { grid-column: 2 / 4; }
}

@media (max-width: 980px) {
  .analytics-grid, .expense-management-grid { grid-template-columns: 1fr; }
  .report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .dashboard-summary-stats, .report-stats { grid-template-columns: 1fr; }
  .donut-layout { grid-template-columns: 1fr; }
  .order-line { grid-template-columns: 28px 1fr; }
  .order-line > label, .order-line-notes { grid-column: 2; }
  .order-line-value { grid-column: 2; text-align: left; }
  .line-remove { grid-column: 2; }
  .cancel-order-card { align-items: stretch; flex-direction: column; }
  .cancel-order-card form { grid-template-columns: 1fr; }
  .cancel-order-card label, .cancel-order-card input, .cancel-order-card button { grid-column: 1; grid-row: auto; }
}

@media (max-width: 1100px) {
  .cashier-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cashier-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .variation-grid { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
  .period-form { width: 100%; justify-content: space-between; }
  .period-form input { flex: 1; }
}

@media (max-width: 620px) {
  .cashier-stats { grid-template-columns: 1fr; }
  .order-service-grid { grid-template-columns: 1fr; }
  .form-actions > * { flex: 1; justify-content: center; }
}


/* ============================================================
   Ajustes finais: filtros, resumo, serviços, QR e produção 3 etapas
   ============================================================ */

.orders-filter {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px;
}

.filter-search-field,
.filter-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.filter-search-field > label,
.filter-search-field > span,
.filter-field > span {
  color: #5f6f86;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.filter-search-field input,
.filter-field input,
.filter-field select {
  min-height: 44px;
}

.orders-filter-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) minmax(180px, 1.2fr) minmax(145px, .9fr) minmax(145px, .9fr) auto;
  gap: 14px;
  align-items: end;
}

.orders-filter select {
  width: 100%;
  max-width: none;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

.filter-actions > * {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.clients-filter {
  gap: 18px;
}

.clients-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) auto;
  align-items: end;
  gap: 16px;
}

.orders-table-card {
  margin-top: 0;
}

.table-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cfe0f6;
  border-radius: 9px;
  background: #edf5ff;
  color: #075fc9;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.table-action-button:hover {
  border-color: #9fc5f3;
  background: #e3f0ff;
}

.table-action-button.secondary-action {
  border-color: #dfe5ec;
  background: #fff;
  color: #42536b;
}

.table-action-button.danger-action {
  border-color: #f4c6ca;
  background: #fff1f2;
  color: #b42335;
}

.table-action-button.success-action {
  border-color: #b8e7d0;
  background: #eaf8f1;
  color: #08754b;
}

.inline-action-form .table-action-button {
  padding: 7px 11px;
  background: #fff1f2;
}

.operation-summary-list {
  display: grid;
  margin-top: 4px;
}

.operation-summary .operation-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 52px;
  padding: 15px 0;
}

.operation-summary .operation-summary-row span {
  min-width: 0;
  color: #26364d;
  line-height: 1.35;
}

.operation-summary .operation-summary-row strong {
  flex: 0 0 auto;
  margin-left: auto;
  color: #0f2747;
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}

.order-qr-card {
  min-height: 360px;
  padding: 26px 22px;
}

.order-qr-card .qr {
  display: grid;
  place-items: center;
  width: 196px;
  min-width: 196px;
  height: 196px;
  min-height: 196px;
  margin: 18px auto 14px;
  padding: 8px;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  background: #fff;
}

.order-qr-card .qr img,
.order-qr-card .qr canvas {
  display: block;
  width: 180px !important;
  height: 180px !important;
}

.qr-loading,
.qr-error {
  color: #6e7c91;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.qr-error {
  color: #b42335;
}

.production-page-head {
  margin-bottom: 16px;
}

.production-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.production-search {
  position: relative;
  display: block;
  width: min(620px, 100%);
}

.production-search svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #738197;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.production-search input {
  min-height: 46px;
  padding-left: 45px;
  border-radius: 13px;
}

.production-toolbar-note {
  color: #7b8799;
  font-size: 12px;
  white-space: nowrap;
}

.production-board-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  overflow: visible;
  padding: 0 0 12px;
}

.production-column {
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: #edf3f9;
}

.production-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 14px 15px;
  border-bottom: 1px solid #dce5ef;
  background: rgba(255, 255, 255, .5);
}

.production-column-header > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.production-column-header h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.production-column-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #347fe8;
}

.production-column:nth-child(2) .production-column-dot { background: #e19412; }
.production-column:nth-child(3) .production-column-dot { background: #159367; }

.production-column-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid #dce5ef;
  border-radius: 999px;
  background: #fff;
  color: #26364d;
  font-size: 12px;
  font-weight: 850;
}

.production-column-body {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 305px);
  min-height: 500px;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
}

.production-order-card {
  overflow: hidden;
  border: 1px solid #dfe7f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(29, 55, 88, .06);
}

.production-order-link {
  display: block;
  padding: 13px 14px 11px;
  color: inherit;
  text-decoration: none;
}

.production-order-link:hover {
  background: #fbfdff;
}

.production-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.production-order-top strong {
  color: #075fc9;
  font-size: 14px;
}

.production-deadline {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef3f8;
  color: #53647a;
  font-size: 10px;
  font-weight: 850;
}

.production-deadline.is-today {
  background: #fff3d8;
  color: #936000;
}

.production-deadline.is-overdue {
  background: #ffeaec;
  color: #b42335;
}

.production-client {
  display: block;
  margin-top: 5px;
  color: #152c4a;
  font-size: 15px;
  font-weight: 800;
}

.production-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 7px;
  color: #6c7b90;
  font-size: 11px;
}

.production-order-meta span + span::before {
  content: "•";
  margin-right: 9px;
  color: #b0bac7;
}

.production-order-items {
  display: grid;
  gap: 3px;
  margin: 9px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid #edf1f5;
  color: #4f5f75;
  font-size: 11px;
  list-style: none;
}

.production-order-items .more-items {
  color: #7a8799;
  font-style: italic;
}

.production-advance-form {
  border-top: 1px solid #edf1f5;
}

.production-advance-button,
.production-ready-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: #f5f9ff;
  color: #075fc9;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.production-advance-button:hover,
.production-ready-link:hover {
  background: #e9f3ff;
  color: #044fa7;
}

.production-ready-link {
  color: #08754b;
  background: #eef9f4;
}

.production-empty,
.production-no-results {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 20px;
  color: #718098;
  font-size: 13px;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1180px) {
  .orders-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    grid-column: 1 / -1;
  }

  .production-board-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .orders-filter,
  .clients-filter {
    padding: 16px;
  }

  .orders-filter-grid,
  .clients-filter-row {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    grid-column: auto;
    width: 100%;
  }

  .filter-actions > * {
    flex: 1;
  }

  .operation-summary .operation-summary-row {
    gap: 18px;
  }

  .production-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .production-toolbar-note {
    white-space: normal;
  }

  .production-board-three {
    grid-template-columns: 1fr;
  }

  .production-column {
    min-height: 320px;
  }

  .production-column-body {
    max-height: none;
    min-height: 260px;
  }
}

/* Busca rápida: clientes e itens do pedido */
.client-autocomplete {
  position: relative;
}

.client-autocomplete > input[type="search"] {
  width: 100%;
}

.autocomplete-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(31, 41, 55, .14);
}

.autocomplete-option {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.autocomplete-option:hover,
.autocomplete-option:focus {
  background: #f1f6fd;
}

.autocomplete-option strong {
  font-size: 14px;
}

.autocomplete-option span {
  font-size: 12px;
  color: #778196;
}

.autocomplete-empty,
.order-service-empty {
  padding: 14px;
  color: #778196;
  text-align: center;
}

.order-items-head {
  align-items: end;
  gap: 18px;
}

.order-service-search {
  width: min(390px, 100%);
  margin: 0;
}

.order-service-search span {
  display: block;
  margin-bottom: 6px;
  color: #5f6f86;
  font-size: 12px;
  font-weight: 800;
}

.order-service-search input {
  width: 100%;
  min-height: 44px;
}

@media (max-width: 760px) {
  .order-items-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-service-search {
    width: 100%;
  }
}


/* WhatsApp - aviso de pedido pronto */
.order-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.whatsapp-ready-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(37, 211, 102, .2);
  transition: transform .15s ease, filter .15s ease;
}

.whatsapp-ready-action:hover {
  transform: translateY(-1px);
  filter: brightness(.94);
}

.whatsapp-ready-action svg {
  width: 21px;
  height: 21px;
}

.whatsapp-ready-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.whatsapp-ready-button:hover {
  background: #20bd5a;
  border-color: #20bd5a;
  color: #fff;
}

.whatsapp-ready-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

/* Tarefa 2 - Resumo operacional e Valores a Receber */
.operation-flow-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 .operation-flow-card { min-height: 132px; position: relative; }
.operation-flow-card > div:first-child { width: 100%; }
.operation-flow-card strong {
  position: absolute;
  left: 50%;
  top: 58%;
  margin: 0;
  transform: translate(-50%, -50%);
  font-size: 32px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.operation-flow-card small {
  position: absolute;
  left: 20px;
  right: 70px;
  bottom: 16px;
  margin: 0;
  padding: 0;
  line-height: 1.25;
}
.operation-overview-card { padding: 0; overflow: hidden; margin-bottom: 18px; }
.operation-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid #edf1f5; }
.operation-overview-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 132px; padding: 22px 24px; }
.operation-overview-item + .operation-overview-item { border-left: 1px solid #edf1f5; }
.operation-overview-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; }
.operation-overview-icon.blue { color: #1769d2; background: #eaf2ff; }
.operation-overview-icon.green { color: #12815f; background: #e7f7f1; }
.operation-overview-icon.amber { color: #b77708; background: #fff4d8; }
.operation-overview-item span, .operation-overview-item small { display: block; }
.operation-overview-item span { color: #617087; font-size: 12px; font-weight: 750; }
.operation-overview-item strong { display: block; margin-top: 5px; color: #12233d; font-size: 28px; line-height: 1.05; }
.operation-overview-item small { margin-top: 6px; color: #8a95a6; font-size: 11px; }
.operation-overview-item .overview-text-value { font-size: 19px; line-height: 1.2; }
.receivables-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.receivables-table-card { margin-top: 18px; }

@media (max-width: 1100px) {
  .operation-overview-grid { grid-template-columns: 1fr; }
  .operation-overview-item + .operation-overview-item { border-left: 0; border-top: 1px solid #edf1f5; }
  .receivables-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .operation-flow-stats, .receivables-stats { grid-template-columns: 1fr; }
}


/* Tarefa 2 - Operacao: Prontos para entrega */
.ready-page-head { margin-bottom: 18px; }
.section-kicker { display:block; margin-bottom:5px; color:#d13755; font-size:12px; font-weight:800; letter-spacing:.08em; }
.ready-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.ready-summary-card { min-height:126px; display:flex; align-items:center; gap:16px; padding:20px; border:1px solid #dce4ef; border-radius:16px; background:#fff; color:#14233c; text-decoration:none; box-shadow:0 7px 20px rgba(30,54,86,.04); transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.ready-summary-card:hover { transform:translateY(-1px); border-color:#b9d3f4; box-shadow:0 10px 24px rgba(30,54,86,.07); }
.ready-summary-card.active { border-color:#9dc5f4; box-shadow:0 0 0 2px rgba(33,117,222,.08); }
.ready-summary-card > span:last-child { display:flex; min-width:0; flex-direction:column; }
.ready-summary-card small { color:#5e708b; font-size:13px; }
.ready-summary-card strong { margin:2px 0; font-size:29px; line-height:1.05; }
.ready-summary-card em { color:#71829a; font-size:12px; font-style:normal; }
.ready-summary-icon { width:48px; height:48px; flex:0 0 48px; display:grid; place-items:center; border-radius:50%; }
.ready-summary-icon svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ready-summary-icon--all { color:#176bd6; background:#eaf2ff; }
.ready-summary-icon--paid { color:#079267; background:#e6f7f1; }
.ready-summary-icon--pending { color:#d68b14; background:#fff3df; }
.ready-toolbar { display:flex; align-items:flex-end; gap:10px; padding:16px; margin-bottom:16px; }
.ready-search { flex:1; min-width:220px; }
.ready-search > span { display:block; margin-bottom:6px; color:#425674; font-size:12px; font-weight:700; }
.ready-search-control { position:relative; }
.ready-search-control svg { position:absolute; left:12px; top:50%; width:18px; height:18px; transform:translateY(-50%); fill:none; stroke:#71829a; stroke-width:2; stroke-linecap:round; }
.ready-search-control input { width:100%; padding-left:40px; }
.ready-orders-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.ready-order-card { padding:18px; border:1px solid #dce4ef; border-radius:16px; background:#fff; box-shadow:0 7px 20px rgba(30,54,86,.04); }
.ready-order-top { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.ready-order-code { color:#176bd6; font-size:12px; font-weight:800; letter-spacing:.04em; }
.ready-order-top h2 { margin:4px 0 2px; color:#14233c; font-size:18px; }
.ready-order-phone { color:#71829a; font-size:12px; }
.ready-payment-badge { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; }
.ready-payment-badge svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.ready-payment-badge.is-paid { color:#087c5b; background:#e6f7f1; }
.ready-payment-badge.is-pending { color:#a86408; background:#fff3df; }
.ready-order-details { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0; padding:14px 0; border-top:1px solid #edf1f6; border-bottom:1px solid #edf1f6; }
.ready-order-details small { display:block; margin-bottom:3px; color:#71829a; font-size:11px; }
.ready-order-details strong { color:#233753; font-size:14px; }
.ready-order-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ready-state { display:inline-flex; align-items:center; gap:6px; color:#087c5b; font-size:12px; font-weight:700; }
.ready-state svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
.ready-order-actions { display:flex; align-items:center; gap:8px; }
.ready-action { display:inline-flex; min-height:34px; align-items:center; justify-content:center; padding:7px 11px; border:1px solid #d7e1ee; border-radius:9px; background:#f8fbff; color:#184f98; font-size:12px; font-weight:750; text-decoration:none; }
.ready-action:hover { border-color:#b8cee9; background:#edf5ff; }
.ready-action--whatsapp { color:#087c5b; background:#eefaf6; border-color:#ccecdf; }
.ready-empty { padding:42px 20px; text-align:center; }
.ready-empty svg { width:38px; height:38px; fill:none; stroke:#079267; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ready-empty h2 { margin:10px 0 5px; }
.ready-empty p { margin:0; color:#71829a; }
@media (max-width: 900px) { .ready-summary-grid,.ready-orders-grid { grid-template-columns:1fr; } }
@media (max-width: 620px) { .ready-toolbar,.ready-order-footer { align-items:stretch; flex-direction:column; } .ready-order-details { grid-template-columns:1fr 1fr; } .ready-order-actions { width:100%; } .ready-action { flex:1; } }

/* Tarefa 3 - Dashboard de Lucro */
.profit-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.profit-highlight { border-color: #cfe8dc; box-shadow: 0 10px 30px rgba(25, 135, 84, .08); }
.profit-highlight.is-negative { border-color: #f2cbd2; box-shadow: 0 10px 30px rgba(190, 55, 75, .08); }
.profit-kicker { color: #198754; }
.negative-value { color: #c43d55 !important; }
.profit-comparison-values { display:grid; gap:18px; padding:8px 24px 24px; }
.profit-comparison-values > div { display:grid; grid-template-columns:90px 140px 1fr; align-items:center; gap:14px; }
.profit-comparison-values span { color:#718096; font-size:13px; }
.profit-comparison-values strong { font-size:20px; color:#26364a; }
.profit-meter { height:10px; background:#edf1f5; border-radius:999px; overflow:hidden; }
.profit-meter i { display:block; height:100%; min-width:2px; background:#9aabc0; border-radius:999px; }
.profit-meter.current i { background:#28a06a; }
.year-profit-card { padding:0; overflow:hidden; }
.year-profit-total { padding:10px 24px 18px; display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.year-profit-total span { color:#718096; }
.year-profit-total strong { font-size:32px; color:#198754; }
.year-profit-breakdown { border-top:1px solid #edf1f5; display:grid; grid-template-columns:1fr 1fr; }
.year-profit-breakdown div { padding:18px 24px; display:flex; justify-content:space-between; gap:12px; }
.year-profit-breakdown div + div { border-left:1px solid #edf1f5; }
.year-profit-breakdown span { color:#718096; font-size:13px; }
.profit-trend-card { padding:0; margin-bottom:18px; overflow:hidden; }
.profit-chart-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:#607086; }
.profit-chart-legend span::before { content:""; width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:6px; }
.revenue-dot::before { background:#1769d2; }.expense-dot::before { background:#d84b65; }.profit-dot::before { background:#28a06a; }
.profit-chart { min-height:300px; padding:22px 24px 20px; display:grid; grid-template-columns:repeat(6,minmax(80px,1fr)); gap:18px; align-items:end; overflow-x:auto; }
.profit-month { min-width:80px; text-align:center; display:flex; flex-direction:column; gap:7px; }
.profit-bars { height:205px; border-bottom:1px solid #dfe5ec; display:flex; align-items:flex-end; justify-content:center; gap:5px; }
.profit-bars i { width:18px; min-height:2px; border-radius:5px 5px 0 0; display:block; }
.revenue-bar { background:#1769d2; }.expense-bar { background:#d84b65; }.profit-bar { background:#28a06a; }.profit-bar.negative { background:#9b5bca; }
.profit-month > strong { font-size:12px; color:#2c3d50; white-space:nowrap; }.profit-month > span { font-size:12px; color:#718096; }
.profit-bottom-grid { align-items:stretch; }
.profit-formula-card { padding:0; overflow:hidden; }
.profit-formula { padding:12px 24px 20px; display:grid; gap:10px; }
.profit-formula > div { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:12px 14px; background:#f7f9fc; border-radius:10px; }
.profit-formula span { color:#607086; }.profit-formula strong { color:#26364a; font-size:18px; }.profit-formula > b { text-align:center; color:#8b98aa; }
.profit-formula .formula-result { background:#edf8f2; }.profit-formula .formula-result strong { color:#198754; font-size:22px; }
.profit-note { margin:0 24px 22px; padding:11px 13px; border-radius:9px; background:#fff8e6; color:#7b6424; font-size:12px; }
@media (max-width: 1100px) { .profit-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .profit-stats { grid-template-columns:1fr; } .profit-comparison-values > div { grid-template-columns:72px 1fr; }.profit-comparison-values .profit-meter { grid-column:1/-1; }.year-profit-total { align-items:flex-start; flex-direction:column; }.year-profit-breakdown { grid-template-columns:1fr; }.year-profit-breakdown div + div { border-left:0; border-top:1px solid #edf1f5; } }


/* Tarefa 4 - privacidade somente dos indicadores financeiros consolidados */
.financial-privacy-toggle{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:8px 11px;border:1px solid #dce4ee;border-radius:10px;background:#fff;color:#53637a;font:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease}
.financial-privacy-toggle:hover{background:#f4f7fb;color:#1666c6;border-color:#cbd8e8}
.financial-privacy-toggle:focus-visible{outline:3px solid rgba(22,102,198,.18);outline-offset:2px}
.financial-privacy-toggle .privacy-eye{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.financial-privacy-toggle .privacy-eye-off{display:none}
.financial-privacy-toggle.values-visible .privacy-eye-open{display:none}
.financial-privacy-toggle.values-visible .privacy-eye-off{display:block}
.financial-value{position:relative;display:inline-block;white-space:nowrap}
html.financial-values-hidden .financial-value{color:transparent!important;text-shadow:none!important;user-select:none}
html.financial-values-hidden .financial-value::after{content:"••••••";position:absolute;left:0;top:50%;transform:translateY(-50%);color:#53637a;letter-spacing:.08em;font:inherit;white-space:nowrap}
@media(max-width:760px){.financial-privacy-label{display:none}.financial-privacy-toggle{padding:8px;min-width:38px;justify-content:center}}
