/* ===== Paleta QG Digital (azul-marinho + laranja) — 14/11/2026 =====
   Para mudar as cores no futuro, edite só estas variáveis. */
:root {
  --qg-navy: #0d1b3e; --qg-navy-2: #162d5e; --qg-navy-3: #080f22;
  --qg-orange: #fa8700; --qg-orange-light: #ffaa33; --qg-orange-dark: #d97000;
  --qg-grad: linear-gradient(45deg, #ffaa33 0%, #fa8700 50%, #d97000 100%);
  --qg-bg: #f7f8fc; --qg-surface: #ffffff; --qg-surface-2: #f3f5fb; --qg-tint: #fff4e6;
  --qg-border: #e8ecf4; --qg-text: #0d1b3e; --qg-text-2: #3d4a5c; --qg-text-3: #9aa3b5;
  --qg-ok: #16a34a; --qg-warning: #f59e0b; --qg-danger: #dc2626; --qg-info: #2563eb;
}
* {
        box-sizing: border-box;
      }
      .dynamic-inline-expansion {
        grid-column: 1/-1;
        border-top: 1px solid #eef1f7;
        padding: 10px 0 2px 82px;
      }
      .dynamic-inline-components {
        display: grid;
        gap: 0;
        max-width: 680px;
      }
      .dynamic-inline-tree-head,
      .dynamic-inline-tree-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 120px;
        gap: 14px;
        align-items: center;
      }
      .dynamic-inline-tree-head {
        padding: 0 10px 8px;
        color: #5f6b80;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
      }
      .dynamic-inline-tree-row {
        padding: 8px 10px 8px calc(10px + var(--tree-depth) * 22px);
        border-top: 1px solid #eef1f7;
        background: #fff;
      }
      .dynamic-inline-tree-name {
        font-weight: bold;
        position: relative;
      }
      .dynamic-inline-tree-name:before {
        content: "↳";
        color: #b0b4c1;
        position: absolute;
        left: calc(var(--tree-depth) * -16px);
        top: 0;
      }
      .dynamic-inline-tree-name small {
        display: block;
        color: #5f6b80;
        font-weight: normal;
        font-size: 10px;
        margin-top: 3px;
      }
      .dynamic-inline-tree-stock {
        text-align: right;
        color: #23936b;
        font-size: 12px;
      }
      body {
        margin: 0;
        background: #fff;
        color: #0d1b3e;
        font:
          14px Verdana,
          Arial,
          sans-serif;
      }
      header {
        height: 78px;
        border-bottom: 1px solid #e8e9ee;
        display: flex;
        align-items: center;
        padding: 0 42px;
        gap: 42px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 5;
      }
      nav {
        display: flex;
        gap: 4px;
        flex: 1;
        overflow: auto;
      }
      nav button {
        border: 0;
        background: transparent;
        color: #5f6b80;
        padding: 11px 14px;
        cursor: pointer;
        font: inherit;
        white-space: nowrap;
      }
      nav button.active,
      nav button:hover {
        color: #fa8700;
        font-weight: bold;
        border-bottom: 2px solid #fa8700;
      }
      .warehouse {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        color: #5f6b80;
        white-space: nowrap;
      }
      .warehouse select {
        width: 150px;
      }
      main {
        max-width: 1280px;
        margin: 0 auto;
        padding: 40px 42px;
      }
      .view {
        display: none;
      }
      .view.active {
        display: block;
      }
      .view-head {
        display: flex;
        align-items: end;
        justify-content: space-between;
        margin-bottom: 26px;
      }
      .eyebrow {
        font-size: 10px;
        letter-spacing: 2px;
        color: #fa8700;
        font-weight: bold;
        margin: 0 0 8px;
      }
      h1 {
        font-size: 28px;
        margin: 0;
        letter-spacing: -1px;
      }
      .primary {
        background: #fa8700;
        color: white;
        border: 0;
        border-radius: 6px;
        padding: 12px 18px;
        cursor: pointer;
        font-weight: bold;
        font-family: inherit;
      }
      .primary:hover {
        background: #d97000;
      }
      .secondary,
      .danger {
        min-height: 38px;
        padding: 9px 14px;
        border: 1px solid #dde3ee;
        border-radius: 8px;
        background: #f5f6f8;
        color: #0d1b3e;
        cursor: pointer;
        font: inherit;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.1;
        white-space: nowrap;
        transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
      }
      .secondary:hover { background: #e9ebf0; border-color: #c8ccd6; color: #11162b; transform: translateY(-1px); }
      .danger { background: #fef2f2; border-color: #fecdd3; color: #be123c; }
      .danger:hover { background: #ffe4e6; border-color: #fda4af; }
      .toolbar {
        display: flex;
        gap: 12px;
        margin-bottom: 18px;
        align-items: center;
      }
      .toolbar input {
        flex: 1;
      }
      .toolbar select {
        min-height: 46px;
        max-width: 240px;
      }
      input,
      select {
        border: 1px solid #dde3ee;
        border-radius: 5px;
        padding: 11px 12px;
        background: #fff;
        color: #0d1b3e;
        font: inherit;
        width: 100%;
      }
      label {
        display: grid;
        gap: 7px;
        color: #5f6b80;
        font-size: 11px;
        font-weight: bold;
      }
      .search-input {
        min-height: 46px;
        font-size: 15px;
        padding-left: 16px;
      }
      .product-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        overflow: hidden;
      }
      .product-row {
        display: grid;
        grid-template-columns: 64px minmax(300px, 1fr) 190px 120px;
        gap: 18px;
        align-items: center;
        padding: 14px 18px;
        border-bottom: 1px solid #eef1f7;
        background: #fff;
      }
      .product-row:last-child {
        border-bottom: 0;
      }
      .product-row:hover {
        background: #fffaf3;
      }
      .product-thumb {
        width: 52px;
        height: 52px;
        border-radius: 6px;
        background: #f3f4f7;
        display: grid;
        place-items: center;
        overflow: hidden;
        color: #fa8700;
        font-weight: bold;
      }
      .product-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .product-main .product-title {
        margin: 0 0 4px;
      }
      .product-title {
        font-weight: bold;
        line-height: 1.55;
      }
      .product-meta {
        font-size: 11px;
        color: #5f6b80;
        line-height: 1.7;
      }
      .row-stock {
        display: grid;
        gap: 3px;
        text-align: right;
      }
      .row-stock small {
        font-size: 10px;
        color: #5f6b80;
      }
      .row-actions,
      .card-actions {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
      }
      .row-actions button,
      .card-actions button {
        border: 0;
        background: transparent;
        color: #5f6b80;
        font: inherit;
        font-size: 11px;
        cursor: pointer;
        padding: 0;
      }
      .row-actions button:hover,
      .card-actions button:hover {
        color: #fa8700;
      }
      .tags {
        display: flex;
        gap: 5px;
        margin: 12px 0;
      }
      .tag {
        font-size: 10px;
        border-radius: 3px;
        padding: 4px 7px;
        background: #f0f1f5;
      }
      .stockline {
        border-top: 1px solid #eee;
        padding-top: 12px;
        margin-top: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .status {
        font-weight: bold;
        font-size: 11px;
      }
      .status.low {
        color: #dc2626;
      }
      .status.ok {
        color: #23936b;
      }
      .status.high {
        color: #7a55d4;
      }
      .status.zero {
        color: #888;
      }
      .panel,
      .kit-card {
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        background: #fff;
      }
      .panel {
        padding: 25px;
      }
      .operation-panel {
        max-width: 1120px;
        padding: 24px;
      }
      .operation-top {
        display: grid;
        grid-template-columns: 1fr 1fr 1.5fr;
        gap: 14px;
        margin-bottom: 24px;
      }
      .operation-line,
      .line-head {
        display: grid;
        grid-template-columns: minmax(230px, 2fr) minmax(
            150px,
            1fr
          ) 120px minmax(160px, 1fr) 34px;
        gap: 10px;
        align-items: center;
      }
      .line-head {
        color: #5f6b80;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        padding: 0 4px 8px;
      }
      .operation-line {
        padding: 8px 0;
        border-top: 1px solid #eef1f7;
      }
      .operation-line input,
      .operation-line select {
        min-height: 42px;
      }
      .operation-line .productInput {
        width: 100%;
      }
      .operation-line .remove-line {
        border: 0;
        background: transparent;
        color: #dc2626;
        font-size: 22px;
        cursor: pointer;
      }
      .add-line {
        border: 0;
        background: transparent;
        color: #fa8700;
        font: inherit;
        font-weight: bold;
        cursor: pointer;
        margin-top: 13px;
        padding: 8px 0;
      }
      .operation-actions {
        display: flex;
        justify-content: flex-end;
        border-top: 1px solid #eef1f7;
        margin-top: 20px;
        padding-top: 18px;
      }
      .transfer-head,
      .operation-line.transfer-line {
        grid-template-columns: minmax(230px, 2fr) minmax(150px, 1fr) minmax(
            150px,
            1fr
          ) 120px 34px;
      }
      .warehouse-cards {
        display: flex;
        gap: 12px;
        margin-top: 28px;
        flex-wrap: wrap;
      }
      .warehouse-card {
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        padding: 16px;
        min-width: 250px;
        background: #fff;
      }
      .warehouse-card strong {
        display: block;
        margin-bottom: 12px;
      }
      .kit-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 12px;
      }
      .kit-card {
        padding: 18px;
      }
      .kit-card ul {
        padding-left: 18px;
        color: #5f6b80;
        line-height: 1.8;
        font-size: 12px;
      }
      .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        max-width: 820px;
      }
      .form-grid .wide {
        grid-column: 1/-1;
      }
      .checks {
        display: flex;
        gap: 22px;
        margin: 2px 0 6px;
      }
      .checks label {
        display: flex;
        align-items: center;
        gap: 7px;
        color: #0d1b3e;
        font-size: 12px;
      }
      .checks input {
        width: auto;
      }
      .table-wrap {
        padding: 0;
        overflow: auto;
      }
      table {
        width: 100%;
        border-collapse: collapse;
      }
      th,
      td {
        text-align: left;
        padding: 15px;
        border-bottom: 1px solid #eee;
        font-size: 12px;
      }
      th {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #5f6b80;
      }
      .type-IN {
        color: #23936b;
        font-weight: bold;
      }
      .type-OUT,
      .type-KIT_OUT {
        color: #dc2626;
        font-weight: bold;
      }
      .type-TRANSFER {
        color: #7a55d4;
        font-weight: bold;
      }
      .recent-panel {
        margin-top: 20px;
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        padding: 16px;
        background: #fff;
      }
      .recent-title {
        font-size: 11px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 10px;
      }
      .recent-item {
        display: grid;
        grid-template-columns: 120px 1fr auto;
        gap: 12px;
        padding: 9px 0;
        border-top: 1px solid #eef1f7;
        font-size: 11px;
        align-items: center;
      }
      .recent-item small {
        color: #5f6b80;
      }
      .catalog-panels {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        max-width: 980px;
        margin-bottom: 22px;
      }
      .catalog-panels form {
        display: grid;
        gap: 12px;
      }
      .catalog-lists {
        display: flex;
        gap: 30px;
        margin-top: 22px;
      }
      .catalog-lists > div {
        display: grid;
        gap: 10px;
        background: #fff;
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        padding: 20px;
        min-width: 280px;
      }
      .catalog-lists > div > strong {
        font-size: 13px;
      }
      .catalog-tags {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-top: 14px;
      }
      .catalog-tags .tag {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #f7f7f9;
        border: 1px solid #e8ecf4;
        color: #0d1b3e;
      }
      .catalog-tags button {
        border: 0;
        background: transparent;
        color: #5f6b80;
        font: inherit;
        font-size: 10px;
        cursor: pointer;
        padding: 0;
      }
      .catalog-tags button:hover {
        color: #fa8700;
      }
      .modal {
        display: none;
        position: fixed;
        inset: 0;
        background: #0d1b3e55;
        z-index: 40;
        align-items: center;
        justify-content: center;
      }
      .modal.open {
        display: flex;
      }
      .modal-card {
        background: white;
        border-radius: 9px;
        padding: 28px;
        width: min(520px, calc(100% - 30px));
        position: relative;
        max-height: 90vh;
        overflow: auto;
      }
      .close {
        position: absolute;
        right: 16px;
        top: 12px;
        border: 0;
        background: transparent;
        font-size: 25px;
        color: #5f6b80;
        cursor: pointer;
      }
      .modal-card h2 {
        margin: 0 0 22px;
        font-size: 20px;
      }
      .modal-form {
        display: grid;
        gap: 14px;
      }
      .internal-dialog {
        display: grid;
        gap: 10px;
      }
      .internal-dialog h2 {
        margin-bottom: 2px;
      }
      .internal-dialog-message {
        margin: 0 0 8px;
        color: #52586e;
        line-height: 1.55;
        white-space: pre-line;
      }
      .internal-dialog-form {
        display: grid;
        gap: 14px;
      }
      .internal-dialog-actions {
        display: flex;
        justify-content: flex-end;
        gap: 9px;
        margin-top: 8px;
      }
      .internal-dialog-value {
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        border: 1px solid #dde3ee;
        border-radius: 7px;
        background: #f7f8fc;
        color: #0d1b3e;
        font: inherit;
        font-size: 12px;
      }
      @media (max-width: 560px) {
        .internal-dialog-actions {
          flex-direction: column-reverse;
        }
        .internal-dialog-actions button {
          width: 100%;
        }
      }
      .empty {
        border: 1px dashed #dde3ee;
        padding: 35px;
        text-align: center;
        color: #5f6b80;
        grid-column: 1/-1;
      }
      #toast {
        position: fixed;
        right: 22px;
        bottom: 22px;
        background: #0d1b3e;
        color: #fff;
        padding: 13px 17px;
        border-radius: 6px;
        display: none;
        z-index: 20;
      }
      #toast.show {
        display: block;
      }
      @media (max-width: 850px) {
        .operation-top {
          grid-template-columns: 1fr;
        }
        .line-head {
          display: none;
        }
        .operation-line,
        .operation-line.transfer-line {
          grid-template-columns: 1fr 1fr 100px 30px;
        }
        .operation-line .productInput {
          grid-column: 1/-1;
        }
        .operation-line .lineNote {
          grid-column: 1/-1;
        }
        .product-row {
          grid-template-columns: 52px 1fr;
          gap: 12px;
        }
        .row-stock,
        .row-actions {
          grid-column: 2;
          text-align: left;
          justify-content: flex-start;
        }
        .recent-item {
          grid-template-columns: 1fr;
        }
        .catalog-panels {
          grid-template-columns: 1fr;
        }
        .catalog-lists {
          display: grid;
        }
      }
      @media (max-width: 760px) {
        header {
          height: auto;
          padding: 16px;
          gap: 12px;
          flex-wrap: wrap;
        }
        nav {
          order: 3;
          width: 100%;
        }
        main {
          padding: 25px 16px;
        }
        .form-grid {
          grid-template-columns: 1fr;
        }
        .form-grid .wide {
          grid-column: auto;
        }
        .warehouse {
          margin-left: auto;
        }
      }

      .import-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        max-width: 980px;
      }
      .import-grid .panel {
        display: grid;
        gap: 14px;
      }
      .import-grid input[type="file"] {
        padding: 10px;
        border: 1px dashed #dde3ee;
        border-radius: 6px;
      }
      @media (max-width: 760px) {
        .import-grid {
          grid-template-columns: 1fr;
        }
      }

      /* Ajustes de navegação e formulários para celular */
      .category-tree {
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        padding: 16px;
        background: #fff;
        min-width: 280px;
        flex: 1;
      }
      .category-tree-head,
      .subcategory-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .category-tree-head {
        padding-bottom: 12px;
        border-bottom: 1px solid #eef1f7;
      }
      .subcategory-list {
        display: grid;
        gap: 9px;
        padding-top: 12px;
      }
      .subcategory-item {
        font-size: 12px;
        color: #5f6b80;
      }
      .category-tree button {
        border: 0;
        background: transparent;
        color: #5f6b80;
        font: inherit;
        font-size: 10px;
        cursor: pointer;
        padding: 2px 0;
        margin-left: 8px;
      }
      .category-tree button:hover {
        color: #fa8700;
      }
      .category-fields {
        max-width: none;
      }
      @media (max-width: 760px) {
        body {
          overflow-x: hidden;
        }
        header {
          position: sticky;
          top: 0;
          padding: 12px;
          gap: 10px;
        }
        nav {
          gap: 0;
          scrollbar-width: none;
          padding-bottom: 2px;
        }
        nav::-webkit-scrollbar {
          display: none;
        }
        nav button {
          padding: 10px 11px;
          font-size: 12px;
        }
        .warehouse {
          width: 100%;
          margin-left: 0;
          justify-content: space-between;
        }
        .warehouse select {
          width: auto;
          min-width: 170px;
        }
        main {
          padding: 22px 12px;
        }
        .view-head {
          align-items: flex-start;
          gap: 14px;
          flex-direction: column;
          margin-bottom: 20px;
        }
        .view-head .primary {
          width: 100%;
        }
        h1 {
          font-size: 24px;
        }
        .toolbar {
          display: grid;
          grid-template-columns: 1fr;
          gap: 9px;
        }
        .toolbar select {
          max-width: none;
        }
        .product-row {
          grid-template-columns: 44px minmax(0, 1fr);
          padding: 13px 12px;
          gap: 10px;
        }
        .product-thumb {
          width: 44px;
          height: 44px;
        }
        .product-title {
          font-size: 13px;
        }
        .row-stock,
        .row-actions {
          grid-column: 1/-1;
          padding-left: 54px;
        }
        .row-actions {
          padding-top: 4px;
        }
        .panel {
          padding: 17px;
        }
        .operation-panel {
          padding: 15px;
        }
        .operation-line,
        .operation-line.transfer-line {
          grid-template-columns: minmax(0, 1fr) 92px 30px;
          gap: 7px;
        }
        .operation-line .productInput {
          grid-column: 1/-1;
        }
        .operation-line .lineNote {
          grid-column: 1/-1;
        }
        .operation-line .warehouseSelect {
          min-width: 0;
        }
        .operation-line .lineQty {
          width: 100%;
        }
        .operation-actions .primary {
          width: 100%;
        }
        .catalog-lists {
          gap: 12px;
          margin-top: 15px;
        }
        .catalog-lists > div {
          min-width: 0;
          padding: 16px;
        }
        .category-tree {
          min-width: 0;
        }
        .modal-card {
          width: calc(100% - 20px);
          padding: 22px 17px;
          max-height: calc(100vh - 20px);
        }
        .modal-form .form-grid {
          gap: 12px;
        }
        #toast {
          left: 12px;
          right: 12px;
          bottom: 12px;
          text-align: center;
        }
      }

      .section-label {
        margin: 28px 0 12px;
        font-size: 13px;
        color: #5f6b80;
        text-transform: uppercase;
        letter-spacing: 1px;
      }
      .outsourcing-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
        gap: 16px;
      }
      .out-family {
        border: 2px solid #dde3ee;
        border-radius: 10px;
        padding: 18px;
        background: #fff;
      }
      .out-family.counted {
        border-color: #2563eb;
      }
      .out-family.sent {
        border-color: #23936b;
      }
      .out-family.returned {
        border-color: #d5a623;
      }
      .out-family.confirmed {
        border-color: #2563eb;
      }
      .out-family-head {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: flex-start;
      }
      .out-family h3 {
        margin: 7px 0 14px;
        font-size: 15px;
      }
      .out-id {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: bold;
        color: #5f6b80;
      }
      .out-family.counted .out-id {
        color: #2563eb;
      }
      .out-family.sent .out-id {
        color: #23936b;
      }
      .out-family.returned .out-id {
        color: #b18400;
      }
      .out-family.confirmed .out-id {
        color: #2563eb;
      }
      .family-code {
        font-size: 10px;
        color: #aaa;
      }
      .out-items {
        display: grid;
        gap: 0;
        border: 1px solid #eef1f7;
        border-radius: 7px;
        overflow: hidden;
      }
      .out-item {
        display: grid;
        gap: 4px;
        padding: 11px 12px;
        border-bottom: 1px solid #eef1f7;
      }
      .out-item:last-child {
        border-bottom: 0;
      }
      .out-item span,
      .out-item small {
        font-size: 11px;
        color: #5f6b80;
      }
      .out-timeline {
        display: grid;
        grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
        gap: 7px;
        align-items: center;
        margin: 17px 0 3px;
        font-size: 10px;
        color: #5f6b80;
      }
      .out-timeline b {
        font-weight: normal;
        color: #0d1b3e;
        line-height: 1.8;
      }
      .out-timeline i {
        font-style: normal;
        color: #aaa;
        font-size: 10px;
      }
      .out-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin-top: 15px;
      }
      .confirmed-label {
        font-size: 11px;
        color: #2563eb;
        font-weight: bold;
      }
      .warning-panel {
        border: 1px solid #e8c95b;
        background: #fffaf0;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 16px;
      }
      .warning-panel > strong {
        display: block;
        margin-bottom: 10px;
        color: #806000;
      }
      .warning-row {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
        border-top: 1px solid #f1df9d;
        padding: 10px 0;
        font-size: 11px;
      }
      .warning-resolve {
        border: 0;
        background: #23936b;
        color: #fff;
        border-radius: 5px;
        padding: 7px 10px;
        font: inherit;
        font-size: 10px;
        cursor: pointer;
        white-space: nowrap;
      }
      .out-input-row {
        display: grid;
        grid-template-columns: 1.5fr 1.5fr auto 105px auto 105px 28px;
        gap: 7px;
        align-items: center;
        border-bottom: 1px solid #eef1f7;
        padding: 9px 0;
      }
      .inline-check {
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        color: #0d1b3e;
      }
      .inline-check input {
        width: auto;
      }
      .remove-out-line {
        border: 0;
        background: transparent;
        color: #dc2626;
        font-size: 21px;
        cursor: pointer;
      }
      .return-out-lines {
        display: grid;
        gap: 12px;
      }
      .return-out-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        border: 1px solid #e8ecf4;
        border-radius: 7px;
        padding: 12px;
      }
      .return-out-row > strong {
        grid-column: 1/-1;
      }
      .return-out-row label {
        font-size: 10px;
      }
      .return-out-row label:nth-last-child(-n + 2) {
        grid-column: 1/-1;
      }
      @media (max-width: 760px) {
        .outsourcing-grid {
          grid-template-columns: 1fr;
        }
        .out-timeline {
          grid-template-columns: 1fr 1fr;
          gap: 8px;
        }
        .out-timeline i {
          display: none;
        }
        .out-input-row {
          grid-template-columns: 1fr 1fr;
        }
        .out-input-row select,
        .out-input-row .terc-name {
          grid-column: 1/-1;
        }
        .out-input-row .remove-out-line {
          justify-self: end;
        }
        .return-out-row {
          grid-template-columns: 1fr;
        }
        .return-out-row > strong,
        .return-out-row label:nth-last-child(-n + 2) {
          grid-column: auto;
        }
        .warning-row {
          align-items: flex-start;
          flex-direction: column;
        }
        .warning-resolve {
          width: 100%;
        }
      }

      /* Modal de terceirização: produto livre no topo e métricas condicionais */
      textarea {
        border: 1px solid #dde3ee;
        border-radius: 5px;
        padding: 11px 12px;
        background: #fff;
        color: #0d1b3e;
        font: inherit;
        width: 100%;
        resize: vertical;
      }
      .out-input-row {
        display: grid;
        grid-template-columns: 1fr 30px;
        gap: 12px;
        align-items: start;
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        padding: 14px;
        margin-bottom: 10px;
        background: #fff;
      }
      .terc-product-label {
        display: grid;
        gap: 7px;
        font-size: 11px;
        color: #5f6b80;
        font-weight: bold;
      }
      .terc-product-label input {
        min-height: 44px;
        font-size: 14px;
      }
      .out-metrics {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 10px;
        grid-column: 1/-1;
        align-items: end;
      }
      .metric-toggle {
        display: flex;
        align-items: center;
        gap: 7px;
        color: #0d1b3e !important;
        font-size: 11px !important;
        min-height: 42px;
      }
      .metric-toggle input {
        width: auto;
      }
      .metric-field {
        display: grid;
        gap: 7px;
      }
      .metric-field input {
        min-height: 42px;
      }
      .terc-q-wrap,
      .terc-w-wrap {
        display: none;
      }
      .remove-out-line {
        grid-column: 2;
        grid-row: 1;
        border: 0;
        background: transparent;
        color: #dc2626;
        font-size: 21px;
        cursor: pointer;
      }
      @media (max-width: 760px) {
        .out-metrics {
          grid-template-columns: 1fr 1fr;
        }
        .metric-toggle {
          min-height: 38px;
        }
        .metric-field input {
          min-height: 40px;
        }
      }
      .danger-panel {
        border-color: #f2caca;
      }
      .danger {
        background: #b42318;
        color: #fff;
        border: 0;
        border-radius: 6px;
        padding: 12px 18px;
        cursor: pointer;
        font-weight: bold;
        font-family: inherit;
      }
      .danger:hover {
        background: #8f1d14;
      }
      .out-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
      }
      .out-actions .secondary {
        background: #eef1f7;
        color: #0d1b3e;
        border: 0;
        border-radius: 6px;
        padding: 10px 13px;
        cursor: pointer;
        font: inherit;
        font-size: 11px;
      }
      .out-actions .undo-action {
        width: 30px;
        height: 30px;
        padding: 0;
        border-radius: 50%;
        font-size: 18px;
        line-height: 30px;
        background: #eef1f7;
        color: #5f6b80;
        border: 0;
        cursor: pointer;
      }
      .out-actions .disabled-action {
        background: #eef1f7;
        color: #9aa0af;
        border: 0;
        border-radius: 6px;
        padding: 10px 13px;
        font: inherit;
        font-size: 11px;
        cursor: default;
      }
      .outsourcing-catalog {
        margin: 0 0 20px;
        padding: 18px;
      }
      .outsourcing-catalog-head {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
      }
      .outsourcing-catalog-list {
        display: grid;
        gap: 8px;
        margin-top: 12px;
      }
      .outsourcing-product-row {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
        border-top: 1px solid #eef1f7;
        padding: 9px 0;
        font-size: 12px;
      }
      .outsourcing-product-row.inactive {
        color: #9aa0af;
        text-decoration: line-through;
      }
      .catalog-toggle {
        border: 0;
        border-radius: 5px;
        padding: 7px 10px;
        background: #23936b;
        color: #fff;
        font: inherit;
        font-size: 10px;
        cursor: pointer;
      }
      .catalog-toggle.off {
        background: #eef1f7;
        color: #5f6b80;
      }
      .outsourcing-head-actions {
        display: flex;
        align-items: center;
        gap: 9px;
      }
      .outsourcing-catalog-button {
        width: 42px;
        height: 40px;
        padding: 0;
        font-size: 20px;
        line-height: 1;
      }
      .outsourcing-catalog {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(390px, 92vw);
        z-index: 1000;
        background: #fff;
        box-shadow: -12px 0 35px rgba(20, 30, 60, 0.18);
        padding: 24px;
        overflow-y: auto;
        transform: translateX(105%);
        transition: transform 0.22s ease;
        display: block;
      }
      .outsourcing-catalog.open {
        transform: translateX(0);
      }
      .outsourcing-sidebar-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 15px;
        border-bottom: 1px solid #eef1f7;
        padding-bottom: 15px;
      }
      .outsourcing-sidebar-head strong {
        font-size: 15px;
      }
      .outsourcing-sidebar-close {
        border: 0;
        background: #eef1f7;
        color: #5f6b80;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        font-size: 20px;
        line-height: 25px;
        cursor: pointer;
      }
      .outsourcing-catalog .outsourcing-catalog-list {
        margin-top: 18px;
      }
      .outsourcing-catalog .product-meta {
        margin-top: 5px;
      }
      .outsourcing-catalog::before {
        content: "";
        position: fixed;
        top: 0;
        right: 100%;
        bottom: 0;
        width: 100vw;
        background: rgba(20, 30, 60, 0.22);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.22s ease;
      }
      .outsourcing-catalog.open::before {
        opacity: 1;
        pointer-events: auto;
      } /* Melhorias visuais da interface de terceirização */
      .outsourcing-head-actions {
        display: flex;
        gap: 10px;
        align-items: center;
      }
      .outsourcing-catalog-button {
        min-width: 42px;
        height: 42px;
        padding: 0;
        font-size: 18px;
      }
      .outsourcing-summary {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        margin: 0 0 22px;
      }
      .outsourcing-kpi {
        border: 1px solid #e8ecf4;
        border-radius: 10px;
        padding: 14px 16px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(13, 27, 62, 0.04);
        position: relative;
        overflow: hidden;
      }
      .outsourcing-kpi:before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #2563eb;
      }
      .outsourcing-kpi.sent:before {
        background: #23936b;
      }
      .outsourcing-kpi.returned:before {
        background: #d5a623;
      }
      .outsourcing-kpi.warning:before {
        background: #d64545;
      }
      .outsourcing-kpi.confirmed:before {
        background: #7a55d4;
      }
      .outsourcing-kpi-label {
        display: block;
        color: #5f6b80;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-size: 10px;
        font-weight: bold;
        margin-bottom: 7px;
      }
      .outsourcing-kpi-value {
        display: block;
        font-size: 24px;
        line-height: 1;
        font-weight: bold;
        color: #0d1b3e;
      }
      .outsourcing-kpi-caption {
        display: block;
        color: #9aa0af;
        font-size: 10px;
        margin-top: 7px;
      }
      .outsourcing-toolbar {
        display: flex;
        gap: 10px;
        align-items: center;
        margin: 0 0 18px;
      }
      .outsourcing-toolbar input {
        max-width: 440px;
        min-height: 42px;
      }
      .outsourcing-toolbar select {
        max-width: 190px;
        min-height: 42px;
      }
      .section-label {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .section-count {
        display: inline-grid;
        place-items: center;
        min-width: 24px;
        height: 22px;
        padding: 0 7px;
        border-radius: 999px;
        background: #eef1f7;
        color: #5f6b80;
        font-size: 10px;
        letter-spacing: 0;
      }
      .out-family {
        border: 1px solid #e8ecf4;
        border-left: 4px solid #dde3ee;
        box-shadow: 0 3px 12px rgba(13, 27, 62, 0.045);
        transition:
          transform 0.18s ease,
          box-shadow 0.18s ease;
      }
      .out-family:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 18px rgba(13, 27, 62, 0.09);
      }
      .out-family.counted {
        border-left-color: #2563eb;
      }
      .out-family.sent {
        border-left-color: #23936b;
      }
      .out-family.returned {
        border-left-color: #d5a623;
      }
      .out-family.confirmed {
        border-left-color: #7a55d4;
      }
      .out-id {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 8px;
        border-radius: 999px;
        background: #eef4fc;
      }
      .out-family.sent .out-id {
        background: #eaf7f1;
      }
      .out-family.returned .out-id {
        background: #fff7df;
      }
      .out-family.confirmed .out-id {
        background: #f0edfb;
      }
      .out-items {
        background: #fbfcfd;
      }
      .out-item strong {
        font-size: 12px;
      }
      .out-item span {
        display: inline-block;
        padding: 4px 7px;
        border-radius: 5px;
        background: #f0f1f5;
        width: max-content;
        max-width: 100%;
      }
      .out-timeline {
        position: relative;
        padding-top: 3px;
      }
      .out-timeline span {
        position: relative;
      }
      .out-timeline span b {
        font-size: 10px;
      }
      .out-actions {
        padding-top: 13px;
        border-top: 1px solid #eef1f7;
      }
      .warning-panel {
        box-shadow: 0 3px 12px rgba(128, 96, 0, 0.06);
      }
      .outsourcing-catalog {
        display: none;
        position: fixed;
        z-index: 12;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(380px, calc(100% - 22px));
        margin: 0;
        border: 0;
        border-radius: 0;
        padding: 24px;
        overflow: auto;
        box-shadow: -8px 0 30px rgba(13, 27, 62, 0.16);
        animation: slideInOut 0.2s ease;
      }
      .outsourcing-catalog.open {
        display: block;
      }
      .outsourcing-catalog::before {
        right: 100%;
      }
      @keyframes slideInOut {
        from {
          transform: translateX(20px);
          opacity: 0.7;
        }
        to {
          transform: translateX(0);
          opacity: 1;
        }
      }
      .catalog-toggle {
        min-width: 58px;
        border: 0;
        border-radius: 999px;
        padding: 6px 10px;
        background: #eaf7f1;
        color: #17734f;
        font: inherit;
        font-size: 10px;
        font-weight: bold;
        cursor: pointer;
      }
      .catalog-toggle.off {
        background: #eef1f7;
        color: #5f6b80;
      }
      .empty {
        background: #fff;
        border-radius: 10px;
      }
      .out-family .primary {
        min-height: 38px;
      }
      .out-family .secondary {
        min-height: 38px;
      }
      /* Cadastro de terceirização: campos separados e leitura mais arejada. */
      .modal-card:has(#outForm),
      .modal-card:has(#editOutForm) {
        width: min(820px, calc(100% - 30px));
      }
      #outInputLines,
      #editOutLines {
        display: grid;
        gap: 12px;
      }
      #outInputLines .out-input-row,
      #editOutLines .out-input-row {
        display: grid;
        grid-template-columns: minmax(0, 1.8fr) minmax(150px, 1fr) minmax(140px, .8fr) 30px;
        gap: 12px;
        align-items: end;
        padding: 16px;
        border: 1px solid #e2e5ec;
        border-radius: 10px;
        background: #fbfcfd;
      }
      #outInputLines .out-input-row:focus-within,
      #editOutLines .out-input-row:focus-within {
        border-color: #f4a4ab;
        box-shadow: 0 3px 12px rgba(250, 135, 0, .08);
      }
      .terc-quantity-field,
      .terc-weight-field,
      .terc-product-label {
        display: grid;
        gap: 7px;
      }
      .terc-quantity-field::after {
        content: "Obrigatório";
        color: #fa8700;
        font-size: 10px;
        font-weight: normal;
      }
      .terc-weight-field::after {
        content: "Opcional";
        color: #5f6b80;
        font-size: 10px;
        font-weight: normal;
      }
      #outInputLines .remove-out-line,
      #editOutLines .remove-out-line {
        align-self: center;
        grid-column: auto;
        grid-row: auto;
        justify-self: center;
      }
      @media (max-width: 760px) {
        #outInputLines .out-input-row,
        #editOutLines .out-input-row {
          grid-template-columns: 1fr 1fr;
        }
        #outInputLines .terc-product-label,
        #editOutLines .terc-product-label {
          grid-column: 1 / -1;
        }
        #outInputLines .remove-out-line,
        #editOutLines .remove-out-line {
          justify-self: end;
        }
      }
      @media (max-width: 980px) {
        .outsourcing-summary {
          grid-template-columns: repeat(3, 1fr);
        }
      }
      @media (max-width: 760px) {
        .outsourcing-head-actions {
          width: 100%;
        }
        .outsourcing-head-actions .primary {
          flex: 1;
        }
        .outsourcing-summary {
          grid-template-columns: repeat(2, 1fr);
          gap: 9px;
        }
        .outsourcing-kpi {
          padding: 12px;
        }
        .outsourcing-kpi-value {
          font-size: 21px;
        }
        .outsourcing-toolbar {
          display: grid;
          grid-template-columns: 1fr;
          gap: 8px;
        }
        .outsourcing-toolbar input,
        .outsourcing-toolbar select {
          max-width: none;
        }
        .outsourcing-catalog {
          padding: 20px 16px;
        }
        .out-family:hover {
          transform: none;
        }
      } /* Checkbox animado do sistema: vermelho WRS */
      input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 20px !important;
        height: 20px !important;
        min-width: 20px;
        padding: 0 !important;
        margin: 0;
        border: 2px solid #c7cad4;
        border-radius: 5px;
        background: #fff;
        display: inline-grid;
        place-content: center;
        vertical-align: middle;
        cursor: pointer;
        transition:
          border-color 0.2s ease,
          background-color 0.2s ease,
          box-shadow 0.2s ease,
          transform 0.15s ease;
      }
      input[type="checkbox"]:hover {
        border-color: #fa8700;
        box-shadow: 0 0 0 3px rgba(250, 135, 0, 0.1);
      }
      input[type="checkbox"]:focus-visible {
        outline: 3px solid rgba(250, 135, 0, 0.2);
        outline-offset: 2px;
      }
      input[type="checkbox"]:checked {
        background: #fa8700;
        border-color: #fa8700;
        box-shadow: 0 2px 6px rgba(250, 135, 0, 0.25);
        animation: checkbox-pop 0.22s ease-out;
      }
      input[type="checkbox"]::after {
        content: "";
        width: 6px;
        height: 11px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg) scale(0);
        opacity: 0;
        transition:
          transform 0.2s ease,
          opacity 0.15s ease;
      }
      input[type="checkbox"]:checked::after {
        transform: rotate(45deg) scale(1);
        opacity: 1;
        animation: checkbox-draw 0.35s ease-out;
      }
      @keyframes checkbox-pop {
        0% {
          transform: scale(0.82);
        }
        70% {
          transform: scale(1.08);
        }
        100% {
          transform: scale(1);
        }
      }
      @keyframes checkbox-draw {
        0% {
          clip-path: inset(0 100% 0 0);
        }
        100% {
          clip-path: inset(0 0 0 0);
        }
      }
      .checks label,
      .metric-toggle,
      .return-check {
        cursor: pointer;
      }
      .checks input,
      .metric-toggle input,
      .return-check input {
        flex: 0 0 20px;
      }
      .return-out-lines {
        gap: 14px;
      }
      .return-out-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        background: #fff;
        border: 1px solid #e1e4eb;
        border-left: 3px solid #dde3ee;
        box-shadow: 0 2px 8px rgba(13, 27, 62, 0.04);
        padding: 16px;
      }
      .return-out-row:focus-within {
        border-left-color: #fa8700;
        box-shadow: 0 3px 12px rgba(250, 135, 0, 0.09);
      }
      .return-out-row > strong {
        font-size: 13px;
        color: #0d1b3e;
        padding-bottom: 4px;
        border-bottom: 1px solid #eef1f7;
      }
      .return-out-row label {
        grid-column: auto !important;
        display: grid;
        align-content: start;
        gap: 7px;
      }
      .return-out-row .return-check {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 34px;
        padding: 6px 8px;
        border: 1px solid #eef1f7;
        border-radius: 6px;
        color: #0d1b3e;
        font-size: 11px;
      }
      .return-out-row .return-check:hover {
        border-color: #f4a4ab;
        background: #fff7ed;
      }
      .return-out-row .return-problem-field,
      .return-out-row .return-quality-field {
        grid-column: 1/-1 !important;
      }
      .return-out-row .return-problem-field input,
      .return-out-row .return-quality-field input {
        min-height: 40px;
      }
      .return-out-row .ret-q,
      .return-out-row .ret-w {
        background: #fbfcfd;
      }
      .modal-card:has(#returnOutForm) {
        width: min(700px, calc(100% - 30px));
      }
      .modal-card:has(#returnOutForm) h2 {
        margin-bottom: 8px;
      }
      .modal-card:has(#returnOutForm) .product-meta {
        margin: 0 0 8px;
      }
      .modal-card:has(#returnOutForm) .primary {
        width: 100%;
        margin-top: 4px;
      }
      @media (max-width: 760px) {
        .return-out-row {
          grid-template-columns: 1fr;
          padding: 13px;
        }
        .return-out-row .return-problem-field,
        .return-out-row .return-quality-field {
          grid-column: auto !important;
        }
        .modal-card:has(#returnOutForm) {
          width: calc(100% - 20px);
        }
      } /* Ícone compacto da lista de produtos inspirado no card enviado */
      .outsourcing-catalog-button {
        display: grid;
        place-items: center;
        overflow: hidden;
      }
      .product-list-icon {
        width: 25px;
        height: 25px;
        border-radius: 7px;
        background: linear-gradient(145deg, #ff6b6b, #d43636);
        box-shadow:
          1px 2px 2px #ba2f2f,
          1px 2px 2px #ff4949;
        display: flex;
        align-items: flex-start;
        padding: 5px 4px;
        gap: 3px;
        transition:
          transform 0.18s ease,
          box-shadow 0.18s ease;
      }
      .product-list-avatar {
        width: 7px;
        height: 7px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.95);
        flex: 0 0 7px;
      }
      .product-list-lines {
        display: grid;
        gap: 3px;
        flex: 1;
        margin-top: 1px;
      }
      .product-list-lines i {
        display: block;
        height: 4px;
        border-radius: 2px;
        background: rgba(255, 255, 255, 0.95);
      }
      .product-list-lines i + i {
        width: 65%;
        height: 3px;
      }
      .outsourcing-catalog-button:hover .product-list-icon {
        transform: translateY(-1px);
        box-shadow:
          1px 3px 3px #ba2f2f,
          1px 3px 3px #ff4949;
      } /* Botão textual para o catálogo de produtos salvos */
      .outsourcing-catalog-button {
        width: auto;
        min-width: 0;
        height: 42px;
        padding: 0 15px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        font-size: 12px;
        font-weight: bold;
        color: #0d1b3e !important;
        background: #fff;
        border: 1px solid #dde3ee;
        border-radius: 6px;
        box-shadow: none;
      }
      .outsourcing-catalog-button:before {
        content: "▤";
        color: #fa8700;
        font-size: 15px;
        line-height: 1;
      }
      .outsourcing-catalog-button:hover {
        border-color: #fa8700;
        background: #fff7ed;
        color: #fa8700 !important;
        box-shadow: 0 3px 9px rgba(250, 135, 0, 0.1);
      } /* Cards compactos de terceirização: largura adaptável e múltiplos itens lado a lado */
      .outsourcing-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 380px));
        align-items: start;
        justify-content: start;
        gap: 14px;
      }
      .out-family {
        width: 100%;
        min-width: 0;
        padding: 15px;
        border-radius: 10px;
        align-self: start;
      }
      .out-family-head {
        min-width: 0;
      }
      .out-family-head h3 {
        font-size: 14px;
        line-height: 1.35;
        word-break: break-word;
      }
      .family-code {
        white-space: nowrap;
      }
      .out-items {
        width: 100%;
      }
      .out-item {
        min-width: 0;
        padding: 10px;
      }
      .out-item strong {
        display: block;
        white-space: normal;
        word-break: break-word;
        line-height: 1.35;
      }
      .out-item span {
        display: block;
        width: 100%;
        white-space: normal;
        line-height: 1.35;
      }
      .out-timeline {
        grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
        gap: 5px;
        font-size: 9px;
        overflow: hidden;
      }
      .out-timeline span {
        min-width: 0;
        word-break: break-word;
      }
      .out-timeline span b {
        font-size: 9px;
        white-space: normal;
      }
      .out-timeline i {
        font-size: 9px;
      }
      .out-actions {
        justify-content: flex-start;
        gap: 7px;
      }
      .out-actions .primary,
      .out-actions .secondary {
        font-size: 10px;
        padding: 9px 11px;
      }
      .out-family .product-meta {
        font-size: 10px;
        line-height: 1.45;
      }
      .section-label {
        margin-top: 25px;
      }
      @media (max-width: 760px) {
        .outsourcing-grid {
          grid-template-columns: minmax(0, 1fr);
          width: 100%;
        }
        .out-family {
          width: 100%;
        }
        .out-timeline {
          grid-template-columns: 1fr 1fr;
          gap: 7px;
        }
        .out-timeline i {
          display: none;
        }
      }
      .product-title.product-open {
        display: block;
        width: max-content;
        max-width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        color: #0d1b3e;
        text-align: left;
        font: inherit;
        font-weight: bold;
        line-height: 1.55;
        cursor: pointer;
      }
      .product-title.product-open:hover {
        color: #2563eb;
        text-decoration: underline;
        text-underline-offset: 3px;
      }
      .product-detail-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 22px;
      }
      .product-detail-head .back-link {
        border: 0;
        background: transparent;
        color: #5f6b80;
        font: inherit;
        cursor: pointer;
        padding: 4px 0;
      }
      .product-detail-head .back-link:hover {
        color: #2563eb;
      }
      .product-detail-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
        gap: 20px;
        align-items: start;
      }
      .product-history-panel,
      .product-actions-panel {
        border: 1px solid #e8ecf4;
        border-radius: 8px;
        background: #fff;
      }
      .product-history-panel {
        padding: 22px;
      }
      .product-actions-panel {
        padding: 18px;
        position: sticky;
        top: 100px;
      }
      .product-actions-panel h3 {
        margin: 0 0 14px;
        font-size: 14px;
      }
      .product-actions-panel form {
        display: grid;
        gap: 10px;
        border-top: 1px solid #eef1f7;
        padding-top: 16px;
        margin-top: 16px;
      }
      .product-actions-panel form:first-of-type {
        border-top: 0;
        padding-top: 0;
        margin-top: 0;
      }
      .product-actions-panel .action-title {
        font-size: 11px;
        color: #5f6b80;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: bold;
      }
      .product-actions-panel .action-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
      }
      .product-summary {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 12px 0 20px;
      }
      .product-summary .tag {
        border: 1px solid #e8ecf4;
        background: #f8f9fb;
      }
      .product-history-panel table {
        min-width: 680px;
      }
      .product-history-panel .table-wrap {
        border: 1px solid #eef1f7;
        border-radius: 6px;
      }
      .product-kits {
        margin-top: 22px;
        border-top: 1px solid #eef1f7;
        padding-top: 18px;
      }
      .product-kits-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }
      .product-kits-list .tag {
        border: 1px solid #d9e5f5;
        background: #f5f9ff;
        color: #2563eb;
      }
      .adjustment-note {
        font-size: 11px;
        line-height: 1.55;
        color: #5f6b80;
        margin: 8px 0 0;
      }
      .detail-empty {
        padding: 25px 0;
        color: #5f6b80;
        font-size: 12px;
      }
      @media (max-width: 900px) {
        .product-detail-layout {
          grid-template-columns: 1fr;
        }
        .product-actions-panel {
          position: static;
        }
        .product-history-panel {
          overflow: hidden;
        }
      }
      @media (max-width: 760px) {
        .product-detail-head {
          flex-direction: column;
        }
        .product-actions-panel .action-grid {
          grid-template-columns: 1fr;
        }
        .product-history-panel {
          padding: 15px;
        }
      }

      .product-actions-panel .operation-buttons {
        display: grid;
        gap: 8px;
        margin-top: 8px;
      }
      .product-actions-panel .operation-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 13px;
        border: 1px solid #dde3ee;
        border-radius: 6px;
        background: #fff;
        color: #0d1b3e;
        font: inherit;
        font-weight: bold;
        text-align: left;
        cursor: pointer;
      }
      .product-actions-panel .operation-toggle:hover,
      .product-actions-panel .operation-toggle.active {
        border-color: #2563eb;
        color: #2563eb;
        background: #f7fbff;
      }
      .product-actions-panel .operation-toggle::after {
        content: "+";
        font-size: 18px;
        font-weight: normal;
      }
      .product-actions-panel .operation-toggle.active::after {
        content: "−";
      }
      .product-actions-panel .product-operation-panel {
        display: none;
        border: 0;
        margin: 0;
        padding: 16px 0 0;
      }
      .product-actions-panel .product-operation-panel.open {
        display: grid;
      }
      .product-actions-panel .product-operation-panel .action-title {
        margin-bottom: 2px;
      }
      .product-actions-panel .product-operation-panel .primary {
        margin-top: 3px;
      }

      /* Expansão animada: cada formulário fica imediatamente abaixo do seu botão. */
      .product-actions-panel .product-operation-panel {
        display: grid;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateY(-5px);
        border: 0;
        margin: 0;
        padding: 0;
        pointer-events: none;
        transition:
          max-height 0.32s ease,
          opacity 0.22s ease,
          transform 0.32s ease,
          padding-top 0.32s ease;
      }
      .product-actions-panel .product-operation-panel.open {
        max-height: 1000px;
        opacity: 1;
        transform: translateY(0);
        padding-top: 14px;
        pointer-events: auto;
      }
      .product-actions-panel .product-operation-panel .action-title {
        display: none;
      }
      .product-actions-panel .operation-toggle {
        position: relative;
        z-index: 1;
      }

      /* Navegação lateral e barra de ferramentas. */
      body {
        background: #f7f8fc;
        color: #0d1b3e;
        display: flex;
        min-height: 100vh;
      }
      body > .sidebar {
        width: 248px;
        min-height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        background: #0d1b3e;
        color: #fff;
        padding: 22px 14px;
        z-index: 20;
        overflow-y: auto;
      }
      .sidebar-brand {
        font-weight: bold;
        font-size: 17px;
        padding: 4px 12px 24px;
        letter-spacing: -0.3px;
      }
      .sidebar-brand small {
        display: block;
        color: #aeb5c7;
        font-size: 10px;
        font-weight: normal;
        margin-top: 5px;
      }
      .sidebar nav {
        display: grid;
        gap: 3px;
      }
      .sidebar nav button {
        display: block;
        width: 100%;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: #d8ddea;
        text-align: left;
        padding: 11px 12px;
        cursor: pointer;
        font: inherit;
        font-size: 12px;
        white-space: normal;
      }
      .sidebar nav button:hover,
      .sidebar nav button.active {
        background: #343d5a;
        color: #fff;
        border-bottom: 0;
        font-weight: bold;
      }
      .app-shell {
        width: calc(100% - 248px);
        margin-left: 248px;
        min-width: 0;
      }
      .topbar {
        height: 70px;
        border-bottom: 1px solid #e8ecf4;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 34px;
        position: sticky;
        top: 0;
        z-index: 10;
      }
      .topbar-title {
        font-size: 14px;
        font-weight: bold;
        color: #0d1b3e;
      }
      .topbar-tools {
        display: flex;
        gap: 8px;
        align-items: center;
        margin-left: auto;
        margin-right: 22px;
      }
      .tool-button {
        border: 1px solid #dde3ee;
        background: #fff;
        border-radius: 6px;
        color: #0d1b3e;
        padding: 9px 12px;
        font: inherit;
        font-size: 11px;
        cursor: pointer;
      }
      .tool-button:hover,
      .tool-button.active {
        border-color: #2563eb;
        color: #2563eb;
        background: #f6faff;
      }
      .toolbar-tool {
        display: none;
        position: absolute;
        right: 34px;
        top: 61px;
        width: 310px;
        background: #fff;
        border: 1px solid #dde3ee;
        border-radius: 8px;
        box-shadow: 0 12px 28px #0d1b3e20;
        padding: 16px;
        z-index: 30;
      }
      .toolbar-tool.open {
        display: block;
      }
      .toolbar-tool h3 {
        margin: 0 0 12px;
        font-size: 14px;
      }
      .calculator-display {
        width: 100%;
        font-size: 22px;
        text-align: right;
        margin-bottom: 10px;
        background: #f7f8fc;
      }
      .calculator-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
      }
      .calculator-grid button {
        border: 1px solid #e8ecf4;
        background: #fff;
        border-radius: 5px;
        padding: 11px 5px;
        cursor: pointer;
        font: inherit;
      }
      .calculator-grid button:hover {
        background: #f1f6fd;
        color: #2563eb;
      }
      .calculator-grid .calc-equals {
        background: #2563eb;
        color: #fff;
      }
      .weight-tool-form {
        display: grid;
        gap: 10px;
      }
      .weight-result {
        margin-top: 12px;
        padding: 12px;
        border-radius: 6px;
        background: #f1f7ff;
        color: #2563eb;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
      }
      .weight-result small {
        display: block;
        color: #5f6b80;
        font-size: 10px;
        font-weight: normal;
        margin-top: 4px;
      }
      .warehouse {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        color: #5f6b80;
        white-space: nowrap;
      }
      .warehouse select {
        width: 150px;
      }
      main {
        max-width: 1280px;
        margin: 0 auto;
        padding: 40px 42px;
      }
      @media (max-width: 900px) {
        body > .sidebar {
          width: 210px;
        }
        .app-shell {
          width: calc(100% - 210px);
          margin-left: 210px;
        }
        .topbar {
          padding: 0 18px;
        }
        .topbar-title {
          display: none;
        }
        .topbar-tools {
          margin-left: 0;
          margin-right: 12px;
        }
        .toolbar-tool {
          right: 18px;
        }
      }
      @media (max-width: 700px) {
        body > .sidebar {
          width: 100%;
          min-height: auto;
          height: auto;
          position: sticky;
          top: 0;
          padding: 8px 10px;
        }
        .sidebar-brand {
          display: none;
        }
        .sidebar nav {
          display: flex;
          overflow-x: auto;
          gap: 3px;
        }
        .sidebar nav button {
          width: auto;
          min-width: max-content;
          padding: 9px 10px;
        }
        .app-shell {
          width: 100%;
          margin-left: 0;
        }
        .topbar {
          height: auto;
          min-height: 60px;
          flex-wrap: wrap;
          padding: 10px 12px;
          gap: 8px;
        }
        .topbar-tools {
          width: 100%;
          margin: 0;
          overflow-x: auto;
        }
        .warehouse {
          width: 100%;
          justify-content: space-between;
        }
        .toolbar-tool {
          position: fixed;
          left: 12px;
          right: 12px;
          top: 115px;
          width: auto;
        }
        main {
          padding: 24px 12px;
        }
      }

      /* Ferramentas centralizadas e operáveis pelo teclado. */
      .toolbar-tool {
        position: fixed;
        left: 50%;
        right: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        width: min(340px, calc(100vw - 28px));
        max-height: calc(100vh - 28px);
        overflow: auto;
        z-index: 50;
      }
      .toolbar-tool.open {
        display: block;
      }
      .toolbar-tool .calculator-display {
        height: 48px;
      }
      .toolbar-tool .weight-tool-form input {
        min-height: 42px;
      }
      @media (max-width: 700px) {
        .toolbar-tool {
          left: 14px;
          right: 14px;
          top: 50%;
          width: auto;
          transform: translateY(-50%);
        }
      }

      /* Interface refinada para histórico, categorias e catálogos */
      #history .table-wrap {
        border-radius: 12px;
        border: 1px solid #e8ecf4;
        background: #fff;
        box-shadow: 0 8px 24px #0d1b3e0a;
      }
      #history table {
        min-width: 1040px;
      }
      #history th {
        background: #f7f8fc;
        white-space: nowrap;
      }
      #history td {
        vertical-align: top;
        line-height: 1.45;
      }
      #history tbody tr:hover {
        background: #fffaf3;
      }
      .history-date {
        white-space: nowrap;
        color: #5f6b80;
        font-size: 11px;
      }
      .history-type {
        display: inline-flex;
        align-items: center;
        padding: 5px 8px;
        border-radius: 999px;
        background: #f7f7f9;
        font-size: 10px;
        letter-spacing: 0.3px;
        white-space: nowrap;
      }
      .history-location {
        min-width: 150px;
        max-width: 220px;
        overflow-wrap: anywhere;
      }
      .history-products {
        display: grid;
        gap: 6px;
        min-width: 260px;
        max-width: 430px;
      }
      .history-product {
        display: flex;
        align-items: flex-start;
        gap: 7px;
        padding: 7px 9px;
        border: 1px solid #eef1f7;
        border-radius: 7px;
        background: #f7f8fc;
      }
      .history-qty {
        flex: 0 0 auto;
        color: #fa8700;
        font-weight: bold;
        font-size: 11px;
      }
      .history-product-name {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
      }
      .history-note {
        min-width: 150px;
        max-width: 230px;
        overflow-wrap: anywhere;
        color: #5f6b80;
      }
      .category-layout {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 16px;
        align-items: start;
      }
      .category-layout .category-tree {
        min-width: 0;
        flex: none;
        padding: 18px;
        border-radius: 12px;
        box-shadow: 0 8px 24px #0d1b3e0a;
      }
      .category-heading {
        display: flex;
        align-items: center;
        gap: 11px;
        min-width: 0;
      }
      .category-heading > div {
        display: grid;
        gap: 3px;
        min-width: 0;
      }
      .category-heading strong {
        overflow-wrap: anywhere;
      }
      .category-heading small {
        color: #5f6b80;
        font-size: 10px;
      }
      .category-mark {
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        border-radius: 9px;
        background: #fff4e6;
        color: #fa8700;
        font-size: 16px;
        font-weight: bold;
      }
      .category-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
      }
      .category-tree-head {
        align-items: flex-start;
      }
      .category-tree button {
        padding: 5px 0;
      }
      .subcategory-item {
        align-items: flex-start;
        padding: 7px 0;
      }
      .subcategory-name {
        display: flex;
        gap: 7px;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
      }
      .subcategory-dot {
        color: #fa8700;
        font-weight: bold;
      }
      .category-empty {
        padding: 3px 0;
      }
      .catalog-layout {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
      }
      .catalog-card {
        display: grid;
        gap: 16px;
        background: #fff;
        border: 1px solid #e8ecf4;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 8px 24px #0d1b3e0a;
        min-width: 0;
      }
      .catalog-card-head {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 14px;
        border-bottom: 1px solid #eef1f7;
      }
      .catalog-card-head > div {
        display: grid;
        gap: 4px;
      }
      .catalog-card-head strong {
        font-size: 13px;
      }
      .catalog-card-head small {
        color: #5f6b80;
        font-size: 10px;
      }
      .catalog-count {
        display: grid;
        place-items: center;
        min-width: 28px;
        height: 28px;
        padding: 0 8px;
        border-radius: 999px;
        background: #fff4e6;
        color: #fa8700;
        font-size: 11px;
        font-weight: bold;
      }
      .catalog-list {
        display: grid;
        gap: 7px;
        max-height: 360px;
        overflow: auto;
        padding-right: 2px;
      }
      .catalog-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 11px;
        border: 1px solid #eef1f7;
        border-radius: 8px;
        background: #f7f8fc;
      }
      .catalog-row:hover {
        border-color: #f8c8cd;
        background: #fffaf3;
      }
      .catalog-name {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: 12px;
      }
      .catalog-actions {
        display: flex;
        gap: 9px;
        flex: 0 0 auto;
      }
      .catalog-actions button {
        border: 0;
        background: transparent;
        color: #5f6b80;
        font: inherit;
        font-size: 10px;
        cursor: pointer;
        padding: 3px 0;
      }
      .catalog-actions button:hover {
        color: #fa8700;
      }
      .catalog-empty {
        padding: 14px 0;
        color: #5f6b80;
        font-size: 11px;
      }
      @media (max-width: 760px) {
        #history .table-wrap {
          margin-left: -8px;
          margin-right: -8px;
        }
        .category-layout,
        .catalog-layout {
          grid-template-columns: 1fr !important;
        }
        .catalog-panels {
          grid-template-columns: 1fr;
        }
        .catalog-lists {
          gap: 14px;
        }
        .category-layout .category-tree {
          padding: 15px;
        }
        .history-products {
          min-width: 210px;
        }
      }

      /* Ajustes finais de categorias, catálogos, histórico e estoques */
      .category-root-actions {
        gap: 7px;
      }
      .category-root-action {
        border: 0 !important;
        border-radius: 7px !important;
        padding: 7px 10px !important;
        font-size: 10px !important;
        font-weight: bold !important;
        cursor: pointer;
      }
      .category-root-edit {
        background: #fff4e6 !important;
        color: #d97000 !important;
      }
      .category-root-delete {
        background: #0d1b3e !important;
        color: #fff !important;
      }
      .category-root-action:hover {
        filter: brightness(0.94);
      }
      .catalog-layout {
        align-items: start !important;
        justify-content: center;
        max-width: 920px;
        margin: 22px auto 0;
      }
      .catalog-card {
        align-self: start !important;
        height: max-content;
      }
      .catalog-list {
        max-height: none !important;
      }
      .history-filter-panel {
        margin-bottom: 16px;
        padding: 16px !important;
        border-radius: 12px;
      }
      .history-filter-grid {
        display: grid;
        grid-template-columns: minmax(220px, 1.6fr) repeat(
            4,
            minmax(140px, 1fr)
          ) auto;
        gap: 10px;
        align-items: end;
      }
      .history-filter-grid label {
        min-width: 0;
      }
      .history-filter-grid input,
      .history-filter-grid select {
        min-height: 42px;
      }
      .secondary-button {
        min-height: 42px;
        border: 1px solid #dde3ee;
        border-radius: 6px;
        background: #fff;
        color: #5f6b80;
        padding: 0 13px;
        font: inherit;
        font-size: 11px;
        font-weight: bold;
        cursor: pointer;
        white-space: nowrap;
      }
      .secondary-button:hover {
        border-color: #fa8700;
        color: #fa8700;
      }
      .history-no-results {
        padding: 34px !important;
        text-align: center;
        color: #5f6b80;
      }
      .warehouse-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 16px;
        align-items: stretch;
      }
      .warehouse-card {
        min-width: 0 !important;
        padding: 18px !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 24px #0d1b3e0a;
        cursor: pointer;
        transition:
          transform 0.15s,
          box-shadow 0.15s;
      }
      .warehouse-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px #0d1b3e18;
      }
      .warehouse-card-top {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: flex-start;
      }
      .warehouse-card-top > div {
        display: grid;
        gap: 6px;
        min-width: 0;
      }
      .warehouse-card-top strong {
        margin: 0 !important;
        overflow-wrap: anywhere;
      }
      .warehouse-arrow {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #fff4e6;
        color: #fa8700;
        font-weight: bold;
      }
      .warehouse-card-actions {
        border-top: 1px solid #eef1f7;
        margin-top: 18px;
        padding-top: 12px;
      }
      .warehouseEdit {
        border: 0;
        background: transparent;
        color: #5f6b80;
        font: inherit;
        font-size: 10px;
        font-weight: bold;
        cursor: pointer;
        padding: 0;
      }
      .warehouseEdit:hover {
        color: #fa8700;
      }
      @media (max-width: 1050px) {
        .history-filter-grid {
          grid-template-columns: repeat(3, minmax(150px, 1fr));
        }
        .history-filter-grid label:first-child {
          grid-column: 1/-1;
        }
        .history-filter-grid .secondary-button {
          width: max-content;
        }
      }
      @media (max-width: 760px) {
        .history-filter-grid {
          grid-template-columns: 1fr;
        }
        .history-filter-grid label:first-child {
          grid-column: auto;
        }
        .history-filter-grid .secondary-button {
          width: 100%;
        }
      }

      /* Carregamento incremental e áreas roláveis */
      #productGrid,
      #kitGrid {
        max-height: 72vh;
        overflow-y: auto;
        align-content: start;
      }
      #productGrid,
      #kitGrid,
      #outsourcingActive,
      #outsourcingCompleted {
        scroll-behavior: smooth;
      }
      .recent-scroll {
        max-height: 360px;
        overflow-y: auto;
        padding-right: 4px;
      }
      .product-history-panel .table-wrap {
        max-height: 58vh;
        overflow-y: auto;
      }
      .product-kits-bottom {
        grid-column: 1/-1;
        margin-top: 0;
      }
      .product-kits-bottom .product-kits-list {
        max-height: 220px;
        overflow-y: auto;
        align-content: start;
      }
      .outsourcing-grid {
        max-height: 68vh;
        overflow-y: auto;
        align-content: start;
      }
      .outsourcing-grid:empty {
        display: none;
      }
      .dynamic-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 18px;
        align-items: start;
      }
      .dynamic-sidebar {
        padding: 16px;
      }
      .dynamic-sidebar input {
        width: 100%;
        margin-bottom: 12px;
      }
      .dynamic-list-item {
        padding: 12px;
        border: 1px solid #eceef3;
        border-radius: 8px;
        margin: 7px 0;
        cursor: pointer;
      }
      .dynamic-list-item.active,
      .dynamic-list-item:hover {
        border-color: #fa8700;
        background: #fff7ed;
      }
      .dynamic-list-item strong {
        display: block;
      }
      .dynamic-list-item small {
        color: #5f6b80;
      }
      .dynamic-workspace {
        min-width: 0;
      }
      .dynamic-editor {
        display: grid;
        gap: 18px;
      }
      .dynamic-editor-head {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        align-items: start;
      }
      .dynamic-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
      }
      .dynamic-node-grid {
        display: grid;
        gap: 10px;
      }
      .dynamic-node-row {
        display: grid;
        grid-template-columns: 1.3fr 110px 120px 1fr 90px auto;
        gap: 7px;
        align-items: center;
      }
      .dynamic-node-row input,
      .dynamic-node-row select {
        min-width: 0;
      }
      .dynamic-node-label {
        font-size: 11px;
        color: #5f6b80;
      }
      .dynamic-link-list {
        display: grid;
        gap: 7px;
      }
      .dynamic-stock-summary {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
      }
      .dynamic-stock-tag {
        background: #f3f5fb;
        border-radius: 999px;
        padding: 7px 10px;
        font-size: 12px;
      }
      .dynamic-diagram {
        position: relative;
        min-height: 110px;
        overflow: auto;
        padding: 16px;
        background: #f7f8fc;
        border: 1px dashed #dde3ee;
        border-radius: 8px;
      }
      .dynamic-diagram .dynamic-card {
        display: inline-flex;
        vertical-align: top;
        flex-direction: column;
        gap: 4px;
        padding: 10px;
        margin: 5px;
        border: 1px solid #dde3ee;
        border-radius: 8px;
        background: #fff;
        min-width: 150px;
        box-shadow: 0 2px 7px #0d1b3e0d;
      }
      .dynamic-card small {
        color: #5f6b80;
      }
      .dynamic-empty {
        text-align: center;
        padding: 55px 20px;
      }
      .dynamic-form-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
      }
      .dynamic-node-actions {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        align-items: center;
      }
      .dynamic-muted {
        color: #5f6b80;
        font-size: 12px;
      }
      .dynamic-receipt-fields {
        display: grid;
        gap: 10px;
        margin: 12px 0;
        padding: 12px;
        border: 1px solid #eef1f7;
        border-radius: 8px;
        background: #f7f8fc;
      }
      .dynamic-shortages {
        display: grid;
        gap: 8px;
        margin-top: 2px;
      }
      .dynamic-shortages[hidden] {
        display: none;
      }
      .dynamic-shortage-row {
        display: grid;
        grid-template-columns: 1.2fr 120px 1fr 34px;
        gap: 7px;
        align-items: center;
      }
      .dynamic-shortage-row button {
        min-height: 38px;
        padding: 4px 8px;
      }
      .dynamic-receipt-fields .check-line {
        display: flex;
        align-items: center;
        gap: 7px;
      }
      .dynamic-receipt-fields .check-line input { width: auto; }
      .dynamic-stock-base {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-top: 14px;
        max-width: 360px;
        color: #293047;
        font-size: 12px;
      }
      .dynamic-stock-base select {
        min-height: 36px;
        border: 1px solid #d9ddea;
        border-radius: 8px;
        background: #fff;
        padding: 0 10px;
        color: #293047;
      }
      .dynamic-stock-base small {
        color: #5f6b80;
        line-height: 1.4;
      }
      @media (max-width: 850px) {
        .dynamic-layout {
          grid-template-columns: 1fr;
        }
        .dynamic-node-row {
          grid-template-columns: 1fr 1fr;
        }
        .dynamic-form-grid {
          grid-template-columns: 1fr;
        }
      }
      .dynamic-canvas {
        position: relative;
        height: 560px;
        overflow: hidden;
        background-color: #fbfcfe;
        background-image:
          linear-gradient(#e9ecf3 1px, transparent 1px),
          linear-gradient(90deg, #e9ecf3 1px, transparent 1px);
        background-size: 24px 24px;
        border: 1px solid #dde3ee;
        border-radius: 10px;
      }
      .dynamic-canvas-node {
        position: absolute;
        width: 190px;
        min-height: 78px;
        padding: 12px;
        border: 2px solid #65708a;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 4px 14px #0d1b3e1a;
        cursor: grab;
        user-select: none;
        z-index: 2;
      }
      .dynamic-canvas-node:active {
        cursor: grabbing;
      }
      .dynamic-canvas-node.sheet {
        border-color: #fa8700;
      }
      .dynamic-canvas-node.stage {
        border-color: #7658d9;
      }
      .dynamic-canvas-node.component {
        border-color: #179b73;
      }
      .dynamic-canvas-node strong {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .dynamic-canvas-node small {
        display: block;
        color: #5f6b80;
        margin-top: 5px;
      }
      .dynamic-connect {
        position: absolute;
        right: -13px;
        top: 50%;
        width: 25px;
        height: 25px;
        border: 2px solid #fff;
        border-radius: 50%;
        background: #fa8700;
        color: #fff;
        line-height: 18px;
        font-size: 18px;
        cursor: crosshair;
        z-index: 4;
      }
      .dynamic-edge-label {
        position: absolute;
        z-index: 3;
        transform: translate(-50%, -50%);
        min-width: 38px;
        padding: 6px 8px;
        text-align: center;
        border: 2px solid #f1a500;
        border-radius: 7px;
        background: #fff8dc;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 2px 7px #0d1b3e18;
      }
      .dynamic-edge-line {
        position: absolute;
        height: 2px;
        background: #9ca4b5;
        transform-origin: 0 50%;
        z-index: 1;
        pointer-events: none;
      }
      .dynamic-canvas-toolbar {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 10px;
      }
      .dynamic-modal-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: grid;
        place-items: center;
        background: #19213a88;
      }
      .dynamic-modal {
        width: min(420px, calc(100vw - 30px));
        background: #fff;
        border-radius: 10px;
        padding: 20px;
        box-shadow: 0 12px 40px #0003;
      }
      .dynamic-modal-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 16px;
      }
      .dynamic-tree-view {
        padding: 22px;
      }
      .dynamic-tree-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 22px;
      }
      .dynamic-tree-actions {
        display: flex;
        gap: 9px;
        flex-wrap: wrap;
      }
      .dynamic-tree {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 760px;
      }
      .dynamic-tree-branch {
        position: relative;
        margin-left: 24px;
        padding-left: 24px;
      }
      .dynamic-tree-branch:before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 18px;
        width: 1px;
        background: #cbd0db;
      }
      .dynamic-tree-node {
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 64px;
        padding: 11px 14px;
        border: 1px solid #dde3ee;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 3px 12px #0d1b3e0b;
      }
      .dynamic-tree-node:before {
        content: "";
        position: absolute;
        left: -24px;
        top: 31px;
        width: 24px;
        height: 1px;
        background: #cbd0db;
      }
      .dynamic-tree-node-main {
        min-width: 0;
        flex: 1;
      }
      .dynamic-tree-node-main strong {
        display: block;
        font-size: 14px;
      }
      .dynamic-tree-node-main small {
        display: block;
        color: #5f6b80;
        margin-top: 5px;
      }
      .dynamic-tree-qty {
        padding: 5px 9px;
        border: 1px solid #f1b52b;
        border-radius: 6px;
        background: #fff8dc;
        color: #765000;
        font-weight: bold;
        font-size: 12px;
      }
      .dynamic-tree-edit,
      .dynamic-tree-view .secondary,
      .dynamic-tree-view .primary,
      .dynamic-modal .secondary,
      .dynamic-modal .primary,
      .dynamic-canvas-toolbar .secondary {
        font: inherit;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
        border-radius: 6px;
        padding: 10px 14px;
      }
      .dynamic-tree-edit,
      .dynamic-tree-view .secondary,
      .dynamic-modal .secondary,
      .dynamic-canvas-toolbar .secondary {
        border: 1px solid #dde3ee;
        background: #eef1f7;
        color: #0d1b3e;
      }
      .dynamic-tree-view .primary,
      .dynamic-modal .primary {
        border: 0;
        background: #fa8700;
        color: #fff;
      }
      .dynamic-tree-edit:hover,
      .dynamic-tree-view .secondary:hover,
      .dynamic-modal .secondary:hover {
        background: #e3e6ec;
      }
      .dynamic-tree-view .primary:hover,
      .dynamic-modal .primary:hover {
        background: #d97000;
      }
      .dynamic-tree-node .dynamic-tree-qty {
        border: 1px solid #f1b52b;
        border-radius: 6px;
        background: #fff8dc;
        color: #765000;
        padding: 6px 10px;
        font: inherit;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
      }
      .dynamic-tree-node .dynamic-tree-qty:hover {
        background: #ffe9a3;
      }
      .dynamic-editor #dynamicCancel {
        border: 1px solid #dde3ee;
        border-radius: 6px;
        background: #eef1f7;
        color: #0d1b3e;
        padding: 10px 14px;
        font: inherit;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
      }
      .dynamic-editor #dynamicCancel:hover {
        background: #e3e6ec;
      }
      .dynamic-tree-product-edit {
        margin-top: 10px;
      }
      .dynamic-canvas-node strong {
        display: block;
        max-width: 150px;
        font-size: 12px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .dynamic-node-actions {
        position: absolute;
        top: 5px;
        right: 5px;
        display: flex;
        gap: 3px;
        z-index: 5;
      }
      .dynamic-node-action {
        width: 20px;
        height: 20px;
        padding: 0;
        border: 0;
        border-radius: 4px;
        background: #eef1f7;
        color: #0d1b3e;
        font: 700 13px/20px Arial;
        cursor: pointer;
        text-align: center;
      }
      .dynamic-node-action:hover {
        background: #dde3ee;
      }
      .dynamic-connect {
        right: -14px;
        top: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0;
        transform: translateY(-50%);
        line-height: 1;
        font-size: 18px;
      }
      .dynamic-edge-preview {
        opacity: 0.75;
        pointer-events: none;
      }
      .dynamic-list-item {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .dynamic-list-main {
        min-width: 0;
        flex: 1;
      }
      .dynamic-list-main strong {
        display: block;
        max-width: 100%;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .dynamic-list-actions,
      .dynamic-tree-actions-inline {
        display: flex;
        gap: 4px;
        flex: none;
      }
      .dynamic-list-icon,
      .dynamic-tree-icon {
        width: 25px;
        height: 25px;
        padding: 0;
        border: 1px solid #dde3ee;
        border-radius: 5px;
        background: #eef1f7;
        color: #0d1b3e;
        font: 700 13px/23px Arial;
        cursor: pointer;
        text-align: center;
      }
      .dynamic-list-icon:hover,
      .dynamic-tree-icon:hover {
        background: #dde3ee;
      }
      .dynamic-tree-actions-inline {
        margin-left: auto;
      }
      .dynamic-tree-node-main strong {
        font-size: 12px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .dynamic-tree-node {
        min-width: 0;
      }
      .dynamic-tree-node-main {
        overflow: hidden;
      }
      .dynamic-connections-backdrop {
        display: block;
        overflow: auto;
        padding: 20px;
      }
      .dynamic-connections-modal {
        position: relative;
        width: min(1500px, calc(100vw - 30px));
        min-height: min(850px, calc(100vh - 40px));
        margin: 0 auto;
        background: #fff;
        border-radius: 12px;
        padding: 22px;
        box-shadow: 0 12px 40px #0003;
      }
      .dynamic-connections-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 16px;
      }
      .dynamic-connections-canvas {
        position: relative;
        min-width: 1100px;
        min-height: 650px;
        overflow: auto;
        background-color: #fbfcfe;
        background-image:
          linear-gradient(#e9ecf3 1px, transparent 1px),
          linear-gradient(90deg, #e9ecf3 1px, transparent 1px);
        background-size: 24px 24px;
        border: 1px solid #dde3ee;
        border-radius: 10px;
      }
      .dynamic-connection-node {
        position: absolute;
        width: 245px;
        min-height: 68px;
        padding: 10px 34px 10px 12px;
        border: 2px solid #7658d9;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 4px 14px #0d1b3e1a;
        z-index: 2;
      }
      .dynamic-connection-node small {
        display: block;
        color: #7658d9;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .dynamic-connection-node strong {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .dynamic-connection-handle {
        position: absolute;
        right: -14px;
        top: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0;
        transform: translateY(-50%);
        border: 2px solid #fff;
        border-radius: 50%;
        background: #fa8700;
        color: #fff;
        line-height: 1;
        font-size: 18px;
        cursor: crosshair;
        z-index: 4;
      }
      .dynamic-cross-line {
        position: absolute;
        height: 2px;
        background: #179b73;
        transform-origin: 0 50%;
        z-index: 1;
        pointer-events: none;
      }
      .dynamic-cross-preview {
        background: #f1a500;
        opacity: 0.8;
      }
      .dynamic-cross-remove {
        position: absolute;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        padding: 0;
        border: 2px solid #fff;
        border-radius: 50%;
        background: #dc2626;
        color: #fff;
        box-shadow: 0 2px 7px #0d1b3e38;
        font: 700 17px/1 sans-serif;
        cursor: pointer;
      }
      .dynamic-cross-remove:hover {
        background: #c90012;
        transform: scale(1.08);
      }
      .dynamic-connections-head .dynamic-muted {
        max-width: 760px;
      }
      .dynamic-connections-modal .dynamic-actions .secondary,
      .dynamic-connections-modal .dynamic-actions .primary {
        font: inherit;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
        border-radius: 6px;
        padding: 10px 14px;
      }
      .dynamic-connections-modal .dynamic-actions .secondary {
        border: 1px solid #dde3ee;
        background: #eef1f7;
        color: #0d1b3e;
      }
      .dynamic-connections-modal .dynamic-actions .secondary:hover {
        background: #e3e6ec;
      }
      .dynamic-connections-modal .dynamic-actions .primary {
        border: 0;
        background: #fa8700;
        color: #fff;
      }
      .dynamic-connections-modal .dynamic-actions .primary:hover {
        background: #d97000;
      } /* Tasks v2: hierarquia visual, badge lateral e ações claras */
      .tasks-nav-item {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }
      .tasks-nav-badge {
        display: inline-grid;
        place-items: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 999px;
        background: #dc2626;
        color: #fff;
        font-size: 10px;
        font-weight: bold;
        line-height: 1;
      }
      .tasks-nav-badge[hidden] {
        display: none !important;
      }
      .tasks-summary {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 18px;
      }
      .tasks-kpi {
        border: 1px solid #e8ecf4;
        border-radius: 12px;
        background: #fff;
        padding: 16px;
        box-shadow: 0 8px 24px #0d1b3e0a;
      }
      .tasks-kpi strong {
        display: block;
        font-size: 25px;
        color: #0d1b3e;
      }
      .tasks-kpi small {
        display: block;
        margin-top: 6px;
        color: #5f6b80;
        font-size: 10px;
      }
      .tasks-kpi.alert {
        border-left: 4px solid #dc2626;
      }
      .tasks-kpi.info {
        border-left: 4px solid #2563eb;
      }
      .tasks-kpi.stock {
        border-left: 4px solid #d5a623;
      }
      .tasks-kpi.dynamic {
        border-left: 4px solid #7a55d4;
      }
      .tasks-toolbar {
        display: grid;
        grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 0.6fr);
        gap: 12px;
        margin-bottom: 16px;
        padding: 16px;
      }
      .tasks-toolbar input,
      .tasks-toolbar select {
        min-height: 42px;
      }
      .tasks-list {
        display: grid;
        gap: 0;
        padding: 0;
        overflow: hidden;
      }
      .task-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 18px;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #eef1f7;
        background: #fff;
        border-left: 4px solid #dde3ee;
      }
      .task-row:last-child {
        border-bottom: 0;
      }
      .task-row:hover {
        background: #fffaf3;
      }
      .task-row.task-outsourcing {
        border-left-color: #dc2626;
      }
      .task-row.task-stock {
        border-left-color: #d5a623;
      }
      .task-row.task-dynamic {
        border-left-color: #7a55d4;
      }
      .task-row strong {
        font-size: 13px;
        color: #0d1b3e;
      }
      .task-row p {
        margin: 7px 0 0;
        color: #5f6b80;
        font-size: 12px;
        line-height: 1.55;
      }
      .task-context {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 9px;
      }
      .task-context span {
        padding: 4px 7px;
        border-radius: 999px;
        background: #f3f5fb;
        color: #5f6b80;
        font-size: 10px;
      }
      .task-actions {
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
      }
      .task-actions button,
      .secondary-button {
        border: 1px solid #dde3ee;
        border-radius: 6px;
        background: #fff;
        color: #0d1b3e;
        padding: 9px 12px;
        font: inherit;
        font-size: 11px;
        font-weight: bold;
        cursor: pointer;
      }
      .task-actions button:hover,
      .secondary-button:hover {
        border-color: #fa8700;
        color: #fa8700;
        background: #fff7ed;
      }
      .task-actions .task-resolve {
        background: #fa8700;
        border-color: #fa8700;
        color: #fff;
      }
      .task-actions .task-resolve:hover {
        background: #d97000;
        color: #fff;
      }
      .task-resolve-modal {
        display: grid;
        gap: 13px;
      }
      .task-resolve-modal textarea {
        min-height: 110px;
        resize: vertical;
      }
      .task-resolve-modal .primary {
        width: 100%;
        margin-top: 4px;
      }
      .task-history-note {
        margin-top: 8px;
        padding: 9px 11px;
        border-left: 3px solid #23936b;
        background: #f1faf6;
        color: #276d52;
        font-size: 11px;
        line-height: 1.45;
      }
      @media (max-width: 900px) {
        .tasks-summary {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }
      @media (max-width: 650px) {
        .tasks-toolbar {
          grid-template-columns: 1fr;
        }
        .task-row {
          grid-template-columns: 1fr;
          gap: 13px;
          padding: 16px;
        }
        .task-actions {
          justify-content: flex-start;
        }
        .tasks-summary {
          gap: 8px;
        }
        .tasks-kpi {
          padding: 12px;
        }
      }
      /* Responsividade geral v3: menu móvel em painel lateral */
      .mobile-menu-toggle {
        display: none;
        border: 0;
        background: transparent;
        color: #0d1b3e;
        width: 42px;
        height: 42px;
        padding: 9px;
        border-radius: 8px;
        cursor: pointer;
      }
      .mobile-menu-toggle span {
        display: block;
        width: 4px;
        height: 4px;
        background: #0d1b3e;
        border-radius: 50%;
        margin: 3px auto;
        transition:
          transform 0.2s,
          opacity 0.2s;
      }
      .mobile-menu-toggle:hover {
        background: #f3f5fb;
      }
      .mobile-menu-backdrop {
        display: none;
      }
      .task-quantity-detail {
        display: block;
        margin-top: 8px;
        padding: 9px 11px;
        border: 1px solid #f4c7cb;
        border-radius: 7px;
        background: #fff7f7;
        color: #a30d1b;
        font-size: 11px;
        font-weight: bold;
        line-height: 1.5;
      }
      .task-quantity-detail strong {
        color: #7d0914;
        font-size: 11px;
      }
      .task-row .task-context {
        max-width: 100%;
      }
      @media (max-width: 700px) {
        body {
          display: block;
          overflow-x: hidden;
        }
        body > .sidebar {
          display: block;
          width: min(290px, 86vw);
          height: 100vh;
          min-height: 100vh;
          position: fixed;
          left: 0;
          top: 0;
          bottom: 0;
          padding: 22px 14px;
          transform: translateX(-105%);
          transition: transform 0.22s ease;
          z-index: 100;
          box-shadow: 12px 0 35px rgba(20, 30, 60, 0.2);
          overflow-y: auto;
        }
        .sidebar nav {
          display: grid;
          overflow: visible;
          gap: 3px;
        }
        .sidebar nav button {
          width: 100%;
          min-width: 0;
          padding: 11px 12px;
        }
        .sidebar-brand {
          display: block;
        }
        .sidebar.mobile-open {
          transform: translateX(0);
        }
        .mobile-menu-backdrop {
          display: block;
          position: fixed;
          inset: 0;
          background: rgba(20, 30, 60, 0.42);
          z-index: 90;
          opacity: 0;
          pointer-events: none;
          transition: opacity 0.22s ease;
        }
        .mobile-menu-backdrop:not([hidden]) {
          opacity: 1;
          pointer-events: auto;
        }
        .mobile-menu-toggle {
          display: block;
          flex: 0 0 auto;
        }
        .app-shell {
          width: 100%;
          margin-left: 0;
        }
        .topbar {
          padding: 10px 12px;
          min-height: 60px;
          gap: 8px;
        }
        .topbar-title {
          display: block;
          flex: 1;
        }
        .topbar-tools {
          width: auto;
          margin: 0;
          order: 3;
        }
        .warehouse {
          width: 100%;
          order: 4;
        }
        .toolbar-tool {
          top: 50%;
          left: 14px;
          right: 14px;
          width: auto;
        }
        .view-head {
          align-items: flex-start;
          gap: 15px;
          flex-wrap: wrap;
        }
        .view-head .primary,
        .view-head .secondary-button {
          width: 100%;
        }
        main {
          padding: 24px 12px;
        }
        .product-row {
          grid-template-columns: 48px minmax(0, 1fr);
          gap: 12px;
          padding: 13px;
        }
        .product-thumb {
          width: 42px;
          height: 42px;
        }
        .product-main {
          min-width: 0;
        }
        .row-stock {
          grid-column: 2;
          text-align: left;
        }
        .row-actions {
          grid-column: 2;
          justify-content: flex-start;
          flex-wrap: wrap;
        }
        .row-actions button {
          border: 1px solid #dde3ee;
          border-radius: 6px;
          padding: 8px 10px;
          background: #fff;
        }
        .form-grid,
        .catalog-panels {
          grid-template-columns: 1fr;
        }
        .operation-top {
          grid-template-columns: 1fr;
        }
        .operation-line,
        .line-head,
        .transfer-head,
        .operation-line.transfer-line {
          grid-template-columns: 1fr;
          gap: 8px;
        }
        .line-head {
          display: none;
        }
        .action-grid,
        .product-actions-panel .action-grid {
          grid-template-columns: 1fr;
        }
        .tasks-summary {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .tasks-toolbar {
          grid-template-columns: 1fr;
        }
        .task-row {
          grid-template-columns: 1fr;
        }
        .task-actions {
          justify-content: flex-start;
        }
        .table-wrap {
          max-width: 100%;
          overflow-x: auto;
        }
        .dynamic-node-row {
          grid-template-columns: 1fr;
        }
        .dynamic-form-grid {
          grid-template-columns: 1fr;
        }
        .dynamic-canvas {
          height: 440px;
        }
        .dynamic-connections-modal {
          padding: 14px;
        }
        .product-detail-layout {
          grid-template-columns: 1fr;
        }
        .product-actions-panel {
          position: static;
        }
        .modal-card {
          width: calc(100% - 20px);
          padding: 20px 16px;
        }
      }
      @media (min-width: 701px) {
        .mobile-menu-backdrop {
          display: none !important;
        }
      }

.marketplace-submit{width:100%;margin-top:4px;min-height:42px}.marketplace-submit:hover{background:#d97000}#marketplaceSync{min-width:154px;border-color:#d6dbe5;background:#fff;color:#0d1b3e;box-shadow:0 4px 12px rgba(20,20,30,.06)}#marketplaceSync:hover{background:#f4f6fb;border-color:#b9c1d2;color:#11162b}.marketplace-layout{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);gap:24px;align-items:start}.marketplace-left-column,.marketplace-right-column{min-width:0}.marketplace-column-head{margin:4px 0 12px}.marketplace-column-head h2{margin:0}.marketplace-grid{display:grid;grid-template-columns:1fr;gap:16px;margin-bottom:24px}.marketplace-card,.marketplace-listing{background:#fff;border:1px solid #e8e8ec;border-radius:16px;padding:18px;box-shadow:0 6px 20px rgba(20,20,30,.04)}.marketplace-card-head,.marketplace-listing{display:flex;align-items:center;justify-content:space-between;gap:16px}.marketplace-brand{display:flex;align-items:center;gap:12px;min-width:0}.marketplace-brand-mark{width:46px;height:46px;display:grid;place-items:center;flex:0 0 46px}.marketplace-brand-icon{display:block;width:46px;height:46px;overflow:visible;filter:drop-shadow(0 3px 5px rgba(27,35,65,.14))}.marketplace-brand-icon svg{display:block;width:100%;height:100%;overflow:visible}.marketplace-card h3,.marketplace-section-head h2{margin:0}.marketplace-card small{display:block;color:#73747d;margin-top:5px}.marketplace-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.marketplace-actions button,.marketplace-section-head button,.marketplace-listing button{font:inherit;cursor:pointer}.marketplace-section-head{display:flex;align-items:center;justify-content:space-between;margin:22px 0 12px}.marketplace-section-head-first{margin-top:4px}.marketplace-listings{display:grid;gap:10px}.marketplace-listing{align-items:flex-start}.marketplace-listing-main{flex:1;min-width:0}.marketplace-listing-main strong,.marketplace-listing-main small{display:block}.marketplace-listing-main small{color:#73747d;margin-top:4px}.marketplace-badge{display:inline-flex;border-radius:999px;padding:5px 9px;background:#eef2ff;color:#3646a8;font-size:12px;font-weight:700;white-space:nowrap}.marketplace-badge.connected{background:#e8f7ee;color:#237342}.marketplace-badge.pending{background:#fff3d9;color:#8b6410}
@media(max-width:980px){.marketplace-layout{grid-template-columns:1fr}.marketplace-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:800px){.marketplace-grid{grid-template-columns:1fr}.marketplace-section-head{align-items:flex-start;gap:12px;flex-direction:column}}

/* Nova área visual de mapeamento de marketplaces */
.marketplace-integrations{padding:20px;margin-bottom:22px}.marketplace-map-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:22px;align-items:start}.marketplace-workspace{min-width:0;padding:20px}.marketplace-external-workspace,.marketplace-rules-workspace{min-height:720px}.marketplace-listings-large{max-height:790px;overflow:auto;padding-right:4px}.marketplace-catalog-toolbar{display:flex;align-items:center;gap:10px;margin:16px 0}.marketplace-catalog-toolbar input{flex:1;min-width:0}.marketplace-count{font-size:12px;color:#5f6b80;white-space:nowrap}.marketplace-canvas-help{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;margin:15px 0;background:#f7f8fb;border:1px solid #eceef3;border-radius:10px;font-size:12px;color:#626879}.marketplace-help-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.marketplace-help-dot.external{background:#fa8700}.marketplace-help-dot.internal{background:#179b73}.marketplace-help-arrow{font-size:18px;color:#9ca4b5}.marketplace-mapping-canvas{position:relative;min-height:520px;overflow:auto;background:linear-gradient(90deg,#fff7ed 0 49%,#f8fffb 51% 100%);border:1px dashed #dde3ee;border-radius:14px;padding:0;isolation:isolate}.marketplace-canvas-node{position:absolute;width:235px;min-height:65px;padding:10px 16px;border:1px solid #e1e4eb;border-radius:11px;background:#fff;box-shadow:0 4px 12px #0d1b3e0d;z-index:2}.marketplace-canvas-node strong,.marketplace-canvas-node small,.marketplace-canvas-node-kicker{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.marketplace-canvas-node strong{font-size:13px}.marketplace-canvas-node small{margin-top:4px;color:#5f6b80;font-size:11px}.marketplace-canvas-node-kicker{margin-bottom:4px;color:#9298a8;font-size:9px;font-weight:800;letter-spacing:.06em}.marketplace-canvas-source{border-color:#f2a5ad}.marketplace-canvas-target{border-color:#8fd4b8}.marketplace-canvas-handle{position:absolute;width:22px;height:22px;padding:0;border:2px solid #fff;border-radius:50%;color:#fff;line-height:17px;font-size:11px;box-shadow:0 2px 6px #0d1b3e29;cursor:crosshair;z-index:5}.marketplace-canvas-handle.source{right:-12px;top:calc(50% - 11px);background:#fa8700}.marketplace-canvas-handle.target{left:-12px;top:calc(50% - 11px);background:#179b73}.marketplace-canvas-edge{position:absolute;height:2px;background:#a1a9b8;transform-origin:0 50%;z-index:1;pointer-events:none}.marketplace-canvas-edge-label{position:absolute;transform:translate(-50%,-50%);z-index:3;padding:4px 7px;border:1px solid #f1a500;border-radius:6px;background:#fff8dc;font-size:11px;font-weight:700}.marketplace-active-list{margin-top:18px}.marketplace-active-list-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.marketplace-confirm-flow{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;padding:16px;border:1px solid #eceef3;border-radius:10px;background:#f7f8fc}.marketplace-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}@media(max-width:1100px){.marketplace-map-layout{grid-template-columns:1fr}.marketplace-external-workspace,.marketplace-rules-workspace{min-height:0}}@media(max-width:800px){.marketplace-canvas-node{width:200px}.marketplace-mapping-canvas{min-height:500px}.marketplace-confirm-flow{grid-template-columns:1fr}.marketplace-confirm-flow span{display:none}}
/* Operação de APIs: lista principal e mapa visual sob demanda */
.marketplace-orders-workspace,.marketplace-rules-workspace{min-height:0;margin-bottom:22px}
.marketplace-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.marketplace-kpi{padding:15px 16px;border:1px solid #e8eaf0;border-radius:10px;background:#f7f8fc}.marketplace-kpi small{display:block;color:#5f6b80;font-size:11px}.marketplace-kpi strong{display:block;margin-top:7px;font-size:25px}.marketplace-kpi.success strong{color:#179b73}.marketplace-kpi.warning strong{color:#b7791f}
.marketplace-toolbar{margin:0 0 20px;align-items:center}.marketplace-toolbar select{max-width:210px}.marketplace-subsection-head{margin:0 0 10px}.marketplace-subsection-head h3{margin:0}.marketplace-listings-large{max-height:520px}
.marketplace-rule-toolbar{margin:0 0 12px}.marketplace-rule-toolbar input{flex:1}.marketplace-rule-toolbar select{max-width:220px}.marketplace-rules-table{border:1px solid #e8ecf4;border-radius:10px;overflow:hidden}.marketplace-rule-head,.marketplace-rule-row{display:grid;grid-template-columns:minmax(250px,1.4fr) minmax(220px,1.2fr) 110px 150px;gap:16px;align-items:center}.marketplace-rule-head{padding:11px 15px;background:#f7f8fb;color:#5f6b80;font-size:10px;font-weight:bold;text-transform:uppercase;letter-spacing:.5px}.marketplace-rule-row{padding:14px 15px;border-top:1px solid #eef1f7;background:#fff}.marketplace-rule-row:hover{background:#fffaf3}.marketplace-rule-row strong,.marketplace-rule-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.marketplace-rule-row small{margin-top:5px;color:#5f6b80;font-size:11px}.marketplace-rule-qty{font-size:12px;font-weight:bold}.marketplace-rule-row .danger{justify-self:end}.marketplace-pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;color:#5f6b80;font-size:12px}.marketplace-pagination button:disabled{opacity:.45;cursor:not-allowed}
.marketplace-fullscreen .modal-card{width:min(1500px,calc(100vw - 36px));max-width:none;height:calc(100vh - 36px);max-height:none;padding:28px;overflow:auto}.marketplace-fullscreen-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px}.marketplace-fullscreen-head h2{margin:0 0 6px}.marketplace-canvas-toolbar{display:flex;gap:10px;margin:12px 0}.marketplace-canvas-toolbar input{flex:1}.marketplace-fullscreen-canvas{min-height:calc(100vh - 270px);max-height:none}.marketplace-fullscreen .marketplace-canvas-help{margin:10px 0}.marketplace-fullscreen .close{display:none}
@media(max-width:900px){.marketplace-kpis{grid-template-columns:1fr}.marketplace-rule-head{display:none}.marketplace-rule-row{grid-template-columns:1fr 1fr}.marketplace-rule-row .marketplace-rule-qty{order:3}.marketplace-rule-row .danger{justify-self:start;order:4}.marketplace-canvas-toolbar{flex-direction:column}}
@media(max-width:640px){.marketplace-toolbar{align-items:stretch;flex-direction:column}.marketplace-toolbar select,.marketplace-rule-toolbar select{max-width:none}.marketplace-rule-row{grid-template-columns:1fr}.marketplace-fullscreen .modal-card{width:calc(100vw - 18px);height:calc(100vh - 18px);padding:18px}.marketplace-fullscreen-head{flex-direction:column}.marketplace-fullscreen-head .secondary{width:100%}}
.marketplace-brand-icon img{display:block;width:100%;height:100%;object-fit:contain}

/* Módulo separado de conexões */
.api-subnav{display:flex;flex-direction:column;gap:3px;margin:0 0 8px 14px;padding:5px 0 5px 12px;border-left:1px solid #dfe2ea}
.api-subnav[hidden]{display:none}
.api-subnav button{padding:8px 10px;color:#5f6b80;font-size:12px;text-align:left;background:transparent;border:0;border-radius:7px;cursor:pointer}
.api-subnav button:hover,.api-subnav button.active{color:#fa8700;background:#fff4e6}
.api-subnav .api-new-connection{margin-top:4px;color:#fa8700;font-weight:700}
.marketplace-custom-divider{grid-column:1/-1;margin:12px 0 0;padding:18px 0 0;border-top:1px solid #eceef3}
.marketplace-custom-divider.hidden{display:none}
.custom-api-mark{display:grid;place-items:center;width:46px;height:46px;color:#fa8700;font-size:30px;line-height:1}
.custom-api-card code{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;color:#535a72}
.custom-webhook-url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Estoque fornecedor: pedidos e recebimentos parciais. */
.supplier-order-form {
  margin-bottom: 18px;
}
.supplier-orders-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.supplier-summary-card { border:1px solid #e8ecf4; border-radius:10px; padding:14px 16px; background:#fff; min-width:0; border-top:3px solid #2563eb; }
.supplier-summary-card small,.supplier-summary-card span { display:block; color:#5f6b80; font-size:10px; }.supplier-summary-card strong { display:block; font-size:24px; margin:4px 0; }.supplier-summary-total { border-top-color:#7a55d4; }.supplier-summary-progress { border-top-color:#2563eb; }.supplier-summary-partial { border-top-color:#d97706; }.supplier-summary-done { border-top-color:#23936b; }.supplier-summary-card-head { display:flex; justify-content:space-between; align-items:center; }.supplier-summary-card-head strong { color:#2563eb; font-size:22px; }
.supplier-orders-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) 190px 190px; gap:10px; margin-bottom:16px; padding:12px; }
.supplier-orders-toolbar input,.supplier-orders-toolbar select { min-height:42px; }
.supplier-form-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; margin-bottom:16px; }.supplier-form-heading h3 { margin:0; }.supplier-form-heading > span { color:#5f6b80; font-size:11px; padding-top:4px; }.supplier-form-actions { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid #eef1f7; margin-top:18px; padding-top:17px; }
.supplier-order-form h3 {
  margin-top: 0;
}
.supplier-orders-list {
  display: grid;
  gap: 14px;
}
.supplier-order-card {
  display: grid;
  gap: 14px;
}
.supplier-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.supplier-order-head h3 {
  margin: 4px 0 4px;
}
.supplier-order-status {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.supplier-order-status.open { background: #fff3d6; color: #8b5d00; }
.supplier-order-status.partial { background: #e6f1ff; color: #1764a0; }
.supplier-order-status.complete { background: #e4f7ea; color: #24733b; }
.supplier-order-overdue { border-color:#f4c7cb; box-shadow:0 3px 12px rgba(220, 38, 38,.06); }.supplier-order-overdue .supplier-order-status { background:#fef2f2; color:#be123c; }
.supplier-progress-summary { display:grid; gap:7px; }.supplier-progress-label { display:flex; justify-content:space-between; gap:10px; font-size:11px; }.supplier-progress-label strong { color:#2563eb; }.supplier-progress-label span { color:#5f6b80; }.supplier-progress-track { height:9px; overflow:hidden; border-radius:99px; background:#edf0f5; }.supplier-progress-track i { display:block; height:100%; min-width:0; border-radius:inherit; background:linear-gradient(90deg,#2563eb,#52b788); transition:width .25s ease; }.supplier-order-warning { border-left:3px solid #fa8700; padding:9px 11px; background:#fff6f6; color:#a30d1b; font-size:11px; font-weight:700; }.supplier-order-note { padding:9px 11px; background:#f7f8fc; border-radius:7px; font-size:11px; }.supplier-components { display:grid; gap:7px; }.supplier-components > small { color:#5f6b80; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; }.supplier-components > div { display:flex; flex-wrap:wrap; gap:6px; }.supplier-component-tag { display:inline-block; padding:5px 8px; border-radius:99px; background:#f0edff; color:#6842c2; font-size:10px; }
.supplier-receipts-details { border-top:1px solid #eef1f7; padding-top:12px; }.supplier-receipts-details summary { cursor:pointer; color:#0d1b3e; font-size:11px; font-weight:700; list-style:none; }.supplier-receipts-details summary::-webkit-details-marker { display:none; }.supplier-receipts-details summary:before { content:"＋"; color:#2563eb; margin-right:5px; }.supplier-receipts-details[open] summary:before { content:"－"; }.supplier-receipts-details summary span { float:right; min-width:20px; padding:2px 6px; border-radius:99px; background:#eef3fb; color:#2563eb; text-align:center; }
.supplier-order-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.supplier-order-kpis > div {
  border: 1px solid #e6e9f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f8fc;
}
.supplier-order-kpis small {
  display: block;
  color: #5f6b80;
  font-size: 11px;
  margin-bottom: 4px;
}
.supplier-order-kpis strong {
  color: #0d1b3e;
}
.supplier-receipts {
  display: grid;
  gap: 7px;
  border-top: 1px solid #eef1f7;
  padding-top: 12px;
}
.supplier-receipt {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f8f9fb;
  font-size: 12px;
}
.supplier-receipt small {
  grid-column: 1 / -1;
  color: #5f6b80;
}
.supplier-receive-button {
  justify-self: start;
}
.supplier-order-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.supplier-delete-button { padding:10px 14px; }
.sidebar nav button.dashboard-nav-item { margin:0 0 9px; padding:12px 13px; border:1px solid rgba(190,164,255,.55); border-radius:9px; background:linear-gradient(135deg,#8b62e8,#6642bd); color:#fff !important; box-shadow:0 5px 14px rgba(8,12,35,.28); font-weight:800; letter-spacing:.15px; }
.sidebar nav button.logout-account { margin-top:14px; border-top:1px solid rgba(255,255,255,.1); border-radius:8px; color:#ff9aa3; font-weight:700; }
.sidebar nav button.logout-account:hover { background:#4a2630; color:#fff; border-bottom:0; }
.sidebar nav button.logout-account:disabled { opacity:.65; cursor:wait; }
.sidebar nav button.dashboard-nav-item:hover, .sidebar nav button.dashboard-nav-item.active { background:linear-gradient(135deg,#a17ef2,#7650d2); color:#fff !important; border-color:#d5c5ff; box-shadow:0 6px 18px rgba(95,61,181,.42); transform:translateY(-1px); }
.dashboard-view-head { align-items:flex-end; }
.dashboard-period-wrap { min-width:150px; }
.dashboard-period-wrap label { color:#5f6b80; }
.dashboard-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.dashboard-kpi-card { border:1px solid #e8ecf4; border-radius:10px; padding:17px 18px; background:#fff; display:grid; gap:5px; border-top:3px solid #7a55d4; }
.dashboard-kpi-card small { color:#5f6b80; font-size:11px; font-weight:700; }
.dashboard-kpi-card strong { font-size:28px; letter-spacing:-1px; }
.dashboard-kpi-card span { color:#5f6b80; font-size:11px; }
.dashboard-kpi-1 { border-top-color:#fa8700; }.dashboard-kpi-2 { border-top-color:#23936b; }.dashboard-kpi-3 { border-top-color:#2563eb; }
.dashboard-grid { display:grid; grid-template-columns:1.2fr 1fr; gap:18px; margin-bottom:18px; }
.dashboard-grid-main { grid-template-columns:1.2fr 1fr; }
.dashboard-panel { min-width:0; }
.dashboard-panel h2 { margin:0; font-size:17px; }
.dashboard-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:17px; }
.dashboard-muted, .dashboard-panel-head .dashboard-muted { color:#5f6b80; font-size:11px; }
.dashboard-ranking { display:grid; gap:10px; }
.dashboard-rank-row { display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:9px; font-size:12px; }
.dashboard-rank-position { color:#7a55d4; font-weight:800; text-align:center; }
.dashboard-rank-main { min-width:0; }.dashboard-rank-main strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-rank-bar { height:5px; margin-top:7px; border-radius:99px; background:#eef0f5; overflow:hidden; }.dashboard-rank-bar i { display:block; height:100%; border-radius:inherit; background:#7a55d4; }
.dashboard-rank-row b { color:#0d1b3e; white-space:nowrap; font-size:11px; }
.dashboard-dynamic-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; }
.dashboard-dynamic-card { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px; border:1px solid #e6e9f0; border-radius:8px; background:#f7f8fc; }.dashboard-dynamic-card div { min-width:0; }.dashboard-dynamic-card strong,.dashboard-dynamic-card span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.dashboard-dynamic-card span { color:#5f6b80; font-size:10px; margin-top:5px; }.dashboard-dynamic-card b { font-size:16px; white-space:nowrap; }.dashboard-dynamic-card b.is-ok { color:#23936b; }.dashboard-dynamic-card b.is-low { color:#d97706; }.dashboard-dynamic-card b.is-zero { color:#fa8700; }
.dashboard-alert-list { display:grid; gap:10px; }.dashboard-alert-row { display:grid; grid-template-columns:9px minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px 0; border-bottom:1px solid #eef1f7; font-size:12px; }.dashboard-alert-row:last-child { border-bottom:0; }.dashboard-alert-row div { min-width:0; }.dashboard-alert-row strong,.dashboard-alert-row small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.dashboard-alert-row small { color:#5f6b80; margin-top:4px; }.dashboard-alert-row b { color:#5f6b80; font-size:10px; }.dashboard-alert-dot { width:8px; height:8px; border-radius:50%; background:#fa8700; }.dashboard-alert-dot.dynamic { background:#7a55d4; }.dashboard-alert-dot.outsourcing { background:#d97706; }.dashboard-alert-dot.supplier { background:#23936b; }.dashboard-alert-dot.marketplace { background:#2563eb; }.dashboard-alert-dot.warning { background:#fa8700; }
.dashboard-task-summary { display:flex; gap:16px; margin-bottom:4px; color:#5f6b80; font-size:11px; }.dashboard-task-summary strong { color:#fa8700; font-size:15px; }.dashboard-task-summary .completed-task-count strong { color:#23936b; }
.dashboard-empty { color:#5f6b80; font-size:12px; padding:14px 0; }
@media (max-width: 760px) {
  .supplier-order-head { flex-direction: column; }
  .supplier-order-kpis { grid-template-columns: 1fr; }
  .supplier-receipt { grid-template-columns: 1fr; }
  .supplier-orders-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }.supplier-orders-toolbar { grid-template-columns:1fr; }.supplier-form-heading,.supplier-form-actions { flex-direction:column; align-items:stretch; }.supplier-form-actions .primary { align-self:flex-start; }
  .dashboard-kpis,.dashboard-grid { grid-template-columns:1fr; }.dashboard-view-head { align-items:stretch; flex-direction:column; }.dashboard-period-wrap { max-width:none; }
}

/* Seletores ricos, no estilo de catálogos de ERPs: pesquisa, contexto e rolagem. */
.rich-picker-field {
  position: relative;
  z-index: 20;
}
.rich-picker-field:focus-within {
  z-index: 80;
}
.rich-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  max-height: min(390px, 52vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #cfd8e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28, 39, 68, 0.18);
}
.rich-picker-option {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid #f0f2f6;
  border-radius: 7px;
  background: transparent;
  color: #0d1b3e;
  text-align: left;
  cursor: pointer;
}
.rich-picker-option:last-child { border-bottom: 0; }
.rich-picker-option:hover,
.rich-picker-option:focus-visible {
  background: #f1f6ff;
  outline: none;
}
.rich-picker-option strong {
  font-size: 13px;
  font-weight: 700;
}
.rich-picker-option small {
  color: #5f6b80;
  font-size: 11px;
}
.rich-picker-empty {
  padding: 16px 12px;
  color: #5f6b80;
  font-size: 12px;
}
.picker-select {
  min-height: 46px;
}
.picker-select.is-expanded {
  position: relative;
  z-index: 90;
  max-height: min(390px, 52vh);
  overflow-y: auto;
  border-color: #2563eb;
  box-shadow: 0 8px 22px rgba(28, 39, 68, 0.16);
}

/* Central de Comando: dashboard operacional escuro. */
.command-dashboard { --cmd-bg:#0f1419; --cmd-surface:#171d24; --cmd-surface2:#1e262f; --cmd-border:#2a3441; --cmd-text:#e6edf3; --cmd-dim:#8b98a5; --cmd-blue:#4a9eff; --cmd-purple:#7c5cff; --cmd-green:#2ecc71; --cmd-yellow:#f1c40f; --cmd-orange:#ff9f43; --cmd-red:#e74c3c; margin:-40px -42px; padding:24px 42px 60px; background:var(--cmd-bg); color:var(--cmd-text); min-height:calc(100vh - 70px); font-family:Inter,Verdana,Arial,sans-serif; }
.command-dashboard h1,.command-dashboard h2,.command-dashboard h3,.command-dashboard p { color:var(--cmd-text); }
.command-topbar { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; padding:6px 0 20px; border-bottom:1px solid var(--cmd-border); }.command-kicker,.command-section-title { color:var(--cmd-dim); font-size:10px; text-transform:uppercase; letter-spacing:1.5px; font-weight:700; }.command-topbar h1 { margin:4px 0; font-size:29px; letter-spacing:-1px; }.command-subtitle { margin:0; color:var(--cmd-dim) !important; font-size:12px; }.command-live-dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--cmd-green); box-shadow:0 0 10px var(--cmd-green); vertical-align:middle; margin-left:5px; }.command-filters { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }.command-filters label { color:var(--cmd-dim); font-size:9px; text-transform:uppercase; letter-spacing:.4px; }.command-filters select,.command-filters input { margin-top:4px; min-width:125px; background:var(--cmd-surface2); border-color:var(--cmd-border); color:var(--cmd-text); padding:8px 9px; border-radius:6px; font-size:11px; }
.command-section { margin-top:23px; }.command-section-title { display:flex; align-items:center; gap:10px; margin-bottom:10px; }.command-section-title:after { content:""; height:1px; flex:1; background:var(--cmd-border); }.command-section-title span { text-transform:none; letter-spacing:0; font-size:11px; font-weight:400; }
.command-alerts { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:9px; margin-top:17px; }.command-alert { display:flex; align-items:center; gap:10px; text-align:left; border:1px solid var(--cmd-border); border-left:4px solid var(--cmd-yellow); border-radius:9px; padding:11px 12px; background:var(--cmd-surface); color:var(--cmd-text); cursor:pointer; transition:.16s; }.command-alert:hover { transform:translateY(-2px); background:var(--cmd-surface2); }.command-alert.critical { border-left-color:var(--cmd-red); }.command-alert-icon { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; background:rgba(241,196,15,.15); color:var(--cmd-yellow); font-weight:800; font-size:11px; }.command-alert.critical .command-alert-icon { background:rgba(231,76,60,.18); color:var(--cmd-red); }.command-alert span:nth-child(2) { min-width:0; flex:1; }.command-alert strong,.command-alert small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.command-alert strong { font-size:12px; }.command-alert small { color:var(--cmd-dim); font-size:10px; margin-top:3px; }.command-alert b { color:var(--cmd-dim); font-size:9px; }.command-all-good { grid-column:1/-1; padding:12px 15px; border:1px solid rgba(46,204,113,.35); background:rgba(46,204,113,.08); border-radius:8px; color:var(--cmd-green); font-size:12px; }
.command-kpis { display:grid; grid-template-columns:repeat(6,minmax(130px,1fr)); gap:9px; margin-top:17px; }.command-kpi { padding:13px; border:1px solid var(--cmd-border); border-top:3px solid var(--cmd-blue); border-radius:9px; background:var(--cmd-surface); }.command-kpi.green { border-top-color:var(--cmd-green); }.command-kpi.purple { border-top-color:var(--cmd-purple); }.command-kpi.orange { border-top-color:var(--cmd-orange); }.command-kpi.red { border-top-color:var(--cmd-red); }.command-kpi small,.command-kpi span { display:block; color:var(--cmd-dim); font-size:10px; }.command-kpi strong { display:block; font-size:24px; line-height:1.2; margin:6px 0 4px; }.command-kpi span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.command-dynamic-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(350px,1fr)); gap:12px; }.command-dynamic-card,.command-card { border:1px solid var(--cmd-border); border-radius:10px; background:var(--cmd-surface); padding:14px; }.command-dynamic-head,.command-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }.command-dynamic-head strong,.command-card-head strong { display:block; font-size:13px; }.command-dynamic-head small,.command-card-head small { display:block; color:var(--cmd-dim); font-size:10px; margin-top:4px; }.command-pill { border-radius:20px; padding:4px 8px; font-size:9px; font-weight:700; }.command-pill.success { color:var(--cmd-green); background:rgba(46,204,113,.15); }.command-pill.warning { color:var(--cmd-yellow); background:rgba(241,196,15,.15); }.command-dynamic-meta { display:flex; gap:18px; margin:13px 0 10px; color:var(--cmd-dim); font-size:10px; }.command-dynamic-meta b { display:block; color:var(--cmd-text); font-size:15px; margin-top:2px; }.command-tree { border-top:1px solid var(--cmd-border); padding-top:5px; }.command-tree-node { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:6px 0 6px calc(var(--tree-depth) * 17px); border-bottom:1px solid rgba(42,52,65,.6); }.command-tree-node div { min-width:0; }.command-tree-branch { color:var(--cmd-border); margin-right:4px; }.command-tree-node strong { font-size:11px; }.command-tree-node small { display:block; color:var(--cmd-dim); font-size:9px; margin-top:2px; }.command-tree-node b,.command-decision-row b { font-size:10px; white-space:nowrap; }.ok { color:var(--cmd-green) !important; }.bad { color:var(--cmd-red) !important; }.warning { color:var(--cmd-yellow) !important; }.command-sim { margin-top:12px; padding:10px; background:var(--cmd-surface2); border-radius:8px; }.command-sim > div:first-child { display:flex; justify-content:space-between; font-size:10px; }.command-sim input { width:100%; accent-color:var(--cmd-blue); }.command-sim-result { display:grid; gap:3px; margin-top:6px; font-size:10px; }.command-sim-result span { display:flex; justify-content:space-between; }
.command-chart-grid { display:grid; gap:12px; margin-bottom:12px; }.command-chart-grid-2 { grid-template-columns:1.25fr 1fr; }.command-chart-grid-3 { grid-template-columns:repeat(3,1fr); }.command-card-head { margin-bottom:12px; }.command-chart { min-height:205px; }.command-chart-line svg { width:100%; height:220px; overflow:visible; }.command-chart-line svg text { fill:var(--cmd-dim); font-size:10px; }.command-grid-line { stroke:var(--cmd-border); stroke-width:1; }.command-line { fill:none; stroke:var(--cmd-blue); stroke-width:3; }.command-line-area { fill:rgba(74,158,255,.12); stroke:none; }.command-chart-line circle { fill:var(--cmd-blue); stroke:var(--cmd-surface); stroke-width:2; }.command-bar-row { display:grid; grid-template-columns:20px minmax(0,1fr) 40px; align-items:center; gap:8px; margin:10px 0; font-size:10px; }.command-rank { color:var(--cmd-purple); font-weight:800; }.command-bar-main { min-width:0; }.command-bar-main strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:11px; }.command-bar-track { height:7px; margin-top:5px; border-radius:99px; background:var(--cmd-surface2); overflow:hidden; }.command-bar-track i { display:block; height:100%; border-radius:inherit; background:var(--cmd-blue); }.command-bar-track i.green { background:var(--cmd-green); }.command-bar-row > b { text-align:right; color:var(--cmd-text); }.command-donut-chart { display:flex; align-items:center; justify-content:center; gap:15px; }.command-donut { width:142px; height:142px; border-radius:50%; display:grid; place-items:center; flex-shrink:0; }.command-donut > div { width:82px; height:82px; display:grid; place-items:center; align-content:center; border-radius:50%; background:var(--cmd-surface); font-weight:800; font-size:18px; }.command-donut small { display:block; color:var(--cmd-dim); font-size:9px; font-weight:400; }.command-legend { display:grid; gap:6px; font-size:10px; color:var(--cmd-dim); }.command-legend span { display:flex; gap:5px; align-items:center; }.command-legend i { width:8px; height:8px; border-radius:50%; background:var(--cmd-blue); }.command-legend .legend-1 { background:var(--cmd-purple); }.command-legend .legend-2 { background:var(--cmd-green); }.command-legend .legend-3 { background:var(--cmd-orange); }.command-health-chart { min-height:205px; display:grid; place-items:center; align-content:center; gap:10px; }.command-health-chart p { color:var(--cmd-dim); font-size:11px; margin:0; }.command-health-ring { --health:180deg; width:150px; height:150px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--cmd-green) 0 var(--health),var(--cmd-red) var(--health) 360deg); }.command-health-ring > div { width:105px; height:105px; border-radius:50%; background:var(--cmd-surface); display:grid; place-items:center; align-content:center; }.command-health-ring strong { font-size:26px; }.command-health-ring small { color:var(--cmd-dim); font-size:10px; }
.command-table-list { display:grid; gap:0; }.command-decision-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--cmd-border); }.command-decision-row:last-child { border-bottom:0; }.command-decision-row div { min-width:0; }.command-decision-row strong,.command-decision-row small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.command-decision-row strong { font-size:11px; }.command-decision-row small { color:var(--cmd-dim); font-size:10px; margin-top:3px; }.command-kanban { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }.command-kanban-col { min-height:130px; padding:8px; border-radius:7px; background:var(--cmd-surface2); }.command-kanban-col > small { display:block; color:var(--cmd-dim); text-transform:uppercase; font-size:9px; margin-bottom:7px; }.command-kanban-col div { padding:7px; margin-bottom:5px; border:1px solid var(--cmd-border); border-radius:6px; background:var(--cmd-surface); }.command-kanban-col div strong,.command-kanban-col div span { display:block; font-size:10px; }.command-kanban-col div span,.command-kanban-col em { color:var(--cmd-dim); font-size:9px; }.command-link { border:0; background:transparent; color:var(--cmd-blue); cursor:pointer; font-size:10px; }.command-task-summary { display:flex; align-items:baseline; gap:5px; padding:10px 0; color:var(--cmd-dim); font-size:10px; }.command-task-summary strong { color:var(--cmd-red); font-size:19px; }.command-task-summary .ok { margin-left:10px; }.command-empty { padding:14px 5px; color:var(--cmd-dim); text-align:center; font-size:11px; }
@media (max-width:1050px) { .command-kpis { grid-template-columns:repeat(3,1fr); }.command-chart-grid-3 { grid-template-columns:1fr 1fr; }.command-topbar { align-items:flex-start; flex-direction:column; }.command-filters { justify-content:flex-start; } }
@media (max-width:700px) { .command-dashboard { margin:-24px -16px; padding:18px 16px 40px; }.command-kpis,.command-chart-grid-2,.command-chart-grid-3 { grid-template-columns:1fr; }.command-dynamic-grid { grid-template-columns:1fr; }.command-filters label { flex:1; }.command-filters select,.command-filters input { min-width:0; width:100%; }.command-filters { width:100%; }.command-kanban { grid-template-columns:1fr; } }

/* Paleta final do Dashboard alinhada à interface principal. */
.command-dashboard { --cmd-bg:#121829; --cmd-surface:#1a2133; --cmd-surface2:#232c43; --cmd-border:#35425e; --cmd-text:#f4f6fb; --cmd-dim:#aab4ca; --cmd-blue:#2563eb; --cmd-purple:#7c5cff; --cmd-green:#23936b; --cmd-yellow:#d5a623; --cmd-orange:#e68a2e; --cmd-red:#fa8700; }
.command-dashboard .command-kicker { color:#fa8700; }
.command-dashboard .command-line { stroke:#2563eb; }
.command-dashboard .command-line-area { fill:rgba(37, 99, 235,.16); }
.command-dashboard .command-chart-line circle { fill:#2563eb; }
.command-dashboard .command-bar-track i { background:#2563eb; }
.command-dashboard .command-bar-track i.green { background:#23936b; }
.command-dashboard .command-alert.critical { border-left-color:#fa8700; }
.command-dashboard .command-alert.critical .command-alert-icon { color:#fa8700; background:rgba(250, 135, 0,.16); }
.command-dashboard .command-alert.warning { border-left-color:#d5a623; }
.command-dashboard .command-health-ring { background:conic-gradient(#23936b 0 var(--health),#fa8700 var(--health) 360deg); }
.command-dashboard .command-legend .legend-0 { background:#fa8700; }
.command-dashboard .command-legend .legend-1 { background:#2563eb; }
.command-dashboard .command-legend .legend-2 { background:#7c5cff; }
.command-dashboard .command-legend .legend-3 { background:#23936b; }
.command-dashboard .command-link { color:#2563eb; }


/* Tela inicial de autenticação — layout Stock. */
.auth-screen{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:#f4f6fa;padding:30px}.auth-screen[hidden]{display:none}.auth-layout{width:min(1050px,100%);min-height:610px;display:grid;grid-template-columns:1.04fr .96fr;background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 28px 80px rgba(13,27,53,.18)}.auth-hero{position:relative;display:flex;flex-direction:column;justify-content:center;padding:70px;background:#0d1b3e;color:#fff;overflow:hidden}.auth-hero:after{content:"";position:absolute;width:360px;height:360px;border:1px solid rgba(255,255,255,.08);border-radius:50%;right:-150px;bottom:-130px;box-shadow:0 0 0 35px rgba(255,255,255,.025),0 0 0 70px rgba(255,255,255,.018)}.auth-hero-brand{position:relative;z-index:1;font-size:72px;line-height:1;font-weight:800;letter-spacing:-4px}.auth-hero-brand span{color:#fa8700}.auth-hero p{position:relative;z-index:1;font-size:22px;font-weight:500;margin:22px 0 0;color:#f6f8fc}.auth-hero-line{position:relative;z-index:1;width:58px;height:4px;border-radius:4px;background:#fa8700;margin:38px 0 22px}.auth-hero small{position:relative;z-index:1;max-width:260px;color:#b9c7db;line-height:1.6;font-size:14px}.auth-panel{display:flex;flex-direction:column;justify-content:center;padding:64px 72px}.auth-panel-head{margin-bottom:30px}.auth-kicker{font-size:11px;font-weight:800;letter-spacing:1.7px;color:#fa8700}.auth-panel h1{margin:10px 0 7px;font-size:29px;letter-spacing:-.6px;color:#182338}.auth-panel-head p{margin:0;color:#7c8492;font-size:14px}.auth-form{display:grid;gap:16px}.auth-form label{display:grid;gap:8px;font-size:13px;font-weight:700;color:#343b4a}.auth-form input[type=email],.auth-form input[type=password]{width:100%;box-sizing:border-box;border:1px solid #dfe4ec;border-radius:10px;padding:13px 14px;font:inherit;font-weight:400;outline:none;transition:.2s}.auth-form input:focus{border-color:#fa8700;box-shadow:0 0 0 3px rgba(250, 135, 0,.1)}.auth-remember{display:flex!important;grid-template-columns:auto 1fr;align-items:center;gap:8px!important;font-weight:500!important;color:#7c8492!important}.auth-submit{margin-top:4px;width:100%;padding:13px}.auth-message{min-height:18px;margin:0;color:#d71920;font-size:13px;text-align:center}.first-account{display:flex;justify-content:center;align-items:center;gap:5px;margin-top:25px;padding-top:21px;border-top:1px solid #edf0f4;color:#7c8492;font-size:13px;flex-wrap:wrap}.first-account button{border:0;background:none;color:#fa8700;font:inherit;font-weight:700;cursor:pointer;padding:0}.auth-back{border:0;background:none;color:#6f7886;font:inherit;cursor:pointer;padding:4px}.captcha-row{display:grid;grid-template-columns:1fr 34px 100px;align-items:end;gap:8px}.captcha-label{display:block;font-size:13px;font-weight:700;color:#343b4a;margin-bottom:8px}.captcha-visual{height:43px;display:flex;align-items:center;justify-content:center;border:1px dashed #c5ccd8;border-radius:9px;background:repeating-linear-gradient(135deg,#f1f4f8 0,#f1f4f8 7px,#e8edf4 7px,#e8edf4 9px);font-family:Georgia,serif;font-size:20px;font-weight:800;letter-spacing:5px;color:#18345d;text-decoration:line-through;user-select:none}.captcha-refresh{height:43px;border:1px solid #dfe4ec;border-radius:9px;background:#fff;color:#18345d;font-size:22px;cursor:pointer}.captcha-input{height:43px!important;padding:10px!important;text-transform:uppercase}.auth-required .app-shell,.auth-required .sidebar,.auth-required #mobileMenuBackdrop{display:none!important}
@media (max-width:760px){.auth-screen{padding:0;place-items:stretch}.auth-layout{min-height:100vh;display:flex;flex-direction:column;border-radius:0}.auth-hero{min-height:250px;padding:42px 32px;justify-content:flex-end}.auth-hero-brand{font-size:52px}.auth-hero p{font-size:18px;margin-top:12px}.auth-hero-line,.auth-hero small{display:none}.auth-panel{padding:38px 28px;justify-content:flex-start}.auth-panel-head{margin-bottom:25px}.captcha-row{grid-template-columns:1fr 34px 92px}}

/* Ajustes finais da autenticação */
.auth-panel [hidden]{display:none!important}.auth-hero{background:#0d1b3e}.auth-hero p{line-height:1.55}.auth-panel{justify-content:center;text-align:left}.auth-panel-head{max-width:390px;width:100%;margin-left:auto;margin-right:auto}.auth-panel>.auth-form,.auth-panel>.first-account{max-width:390px;width:100%;margin-left:auto;margin-right:auto}.auth-panel h1{font-size:28px}.auth-kicker{display:none}.auth-panel-head{margin-bottom:27px}.auth-hero-brand{font-size:68px}.auth-hero p{max-width:300px}
/* Marca e composição finais aprovadas para o acesso */
.auth-panel-head{text-align:center}
.auth-panel>.first-account{text-align:center}


/* Composição calculada no estoque fornecedor */
.supplier-dynamic-plan-preview, .supplier-receipt-plan {
  border: 1px solid #f0d7da;
  border-radius: 10px;
  padding: 14px;
  background: #fffaf3;
}
.supplier-plan-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 5px; }
.supplier-plan-head span { color: #fa8700; font-size: 11px; font-weight: bold; }
.supplier-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 9px; }
.supplier-plan-row { position: relative; display: grid; gap: 3px; padding: 22px 12px 11px; border: 1px solid #dfe4ec; border-radius: 10px; background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 62,.04); overflow: hidden; }
.supplier-plan-row::before { content: "•••"; position: absolute; top: 3px; left: 12px; color: #9aa5b5; font-size: 12px; font-weight: 900; letter-spacing: 2px; line-height: 1; }
.supplier-plan-row strong { font-size: 12px; }
.supplier-plan-row span { color: #fa8700; font-size: 12px; font-weight: bold; }
.supplier-plan-row small, .supplier-receipt-plan span { color: #5f6b80; font-size: 10px; }
.supplier-plan-depth-1 { border-color: #c8d1df; background: #f6f8fb; }
.supplier-plan-depth-1::before { content: "•"; color: #59677d; }
.supplier-plan-depth-2 { border-color: #efb8bd; background: #fff7ed; }
.supplier-plan-depth-2::before { content: "••"; color: #d56b76; }
.supplier-plan-depth-3 { border-color: #efd19b; background: #fffaf1; }
.supplier-plan-depth-3::before { content: "•••"; color: #c58c28; }
.supplier-plan-depth-4 { border-color: #d6c8ee; background: #faf8ff; }
.supplier-plan-depth-4::before { content: "•••"; color: #8665bd; }
.supplier-plan-depth-5 { border-color: #bfe1d2; background: #f5fcf8; }
.supplier-plan-depth-5::before { content: "•••"; color: #40966d; }
.supplier-plan-depth-6 { border-color: #c4d9ef; background: #f5faff; }
.supplier-plan-depth-6::before { content: "•••"; color: #5688bb; }
.supplier-receipt-plan { display: grid; gap: 6px; }
.supplier-receipt-plan > strong { margin-bottom: 2px; }
.supplier-quantity { font-weight: 800; }
.supplier-quantity-below { color: #fa8700; }
.supplier-quantity-match { color: #23936b; }
.supplier-quantity-above { color: #2563eb; }
.supplier-excess-note { color: #2563eb !important; font-size: 10px !important; font-weight: 700; }
.supplier-composition-note { color: #b36b00 !important; font-size: 10px !important; font-weight: 700; line-height: 1.25; }

/* Hierarquia visual da árvore no Estoque fornecedor */
.supplier-plan-level { margin-top: 12px; }
.supplier-plan-level:first-child { margin-top: 0; }
.supplier-plan-level-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; border-left: 4px solid #0d1b3e; color: #0d1b3e; font-size: 10px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.supplier-plan-level-title small { color: #5f6b80; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.supplier-plan-level-1 .supplier-plan-level-title { border-color: #0d1b3e; }
.supplier-plan-level-2 .supplier-plan-level-title { border-color: #fa8700; }
.supplier-plan-level-3 .supplier-plan-level-title { border-color: #e58a1f; }
.supplier-plan-level-4 .supplier-plan-level-title { border-color: #7a55d4; }
.supplier-plan-level-5 .supplier-plan-level-title { border-color: #23936b; }
.supplier-plan-level-6 .supplier-plan-level-title { border-color: #2563eb; }
.supplier-plan-level-1 .supplier-plan-row { border-color: #0d1b3e; }
.supplier-plan-level-2 .supplier-plan-row { border-color: #fa8700; }
.supplier-plan-level-3 .supplier-plan-row { border-color: #e58a1f; }
.supplier-plan-level-4 .supplier-plan-row { border-color: #7a55d4; }
.supplier-plan-level-5 .supplier-plan-row { border-color: #23936b; }
.supplier-plan-level-6 .supplier-plan-row { border-color: #2563eb; }
.supplier-plan-level .supplier-plan-grid { margin-top: 6px; }


/* Faltas de componentes no recebimento de fornecedor */
.supplier-shortage-fields { border: 1px solid #f0d7da; border-radius: 10px; padding: 12px; background: #fffaf3; }
.supplier-shortage-rows { display: grid; gap: 8px; margin: 9px 0; }
.supplier-shortage-row { display: grid; grid-template-columns: minmax(130px, 1fr) 120px minmax(130px, 1fr) auto; gap: 7px; align-items: center; }
.supplier-shortage-row button { min-height: 38px; }
@media (max-width: 700px) { .supplier-shortage-row { grid-template-columns: 1fr 1fr; } .supplier-shortage-row input[name=shortage_note], .supplier-shortage-row select { grid-column: span 2; } }


.history-actions { width: 48px; text-align: center; white-space: nowrap; }
.history-delete { border: 0; background: transparent; color: #b42318; cursor: pointer; font-size: 16px; padding: 5px 7px; border-radius: 6px; }
.history-delete:hover { background: #fff0f0; }

.dynamic-lock-badge { display:inline-flex; align-items:center; padding:2px 6px; border-radius:999px; background:#eef2ff; color:#4b4bb2; font-size:10px; font-weight:700; }


/* ADD11: módulos especiais opcionais na barra lateral */
.add11-menu { position: relative; }
.add11-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 5px; padding: 11px 13px !important; border: 1px solid rgba(250, 135, 0,.35) !important; border-radius: 8px; background: rgba(250, 135, 0,.08) !important; color: #fa8700 !important; font-weight: 800 !important; }
.add11-trigger:hover, .add11-trigger[aria-expanded="true"] { background: rgba(250, 135, 0,.15) !important; border-bottom: 1px solid rgba(250, 135, 0,.45) !important; }
.add11-chevron { font-size: 12px; transition: transform .16s ease; }
.add11-trigger[aria-expanded="true"] .add11-chevron { transform: rotate(180deg); }
.add11-panel { margin: 0 0 7px; padding: 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; background: #292e49; box-shadow: 0 10px 22px rgba(0,0,0,.18); }
.add11-panel[hidden] { display: none; }
.add11-panel-title { color: #fff; font-size: 12px; font-weight: 800; }
.add11-panel-help { margin: 5px 0 11px; color: #b9bfd0; font-size: 10px; line-height: 1.45; }
.add11-options { display: grid; gap: 5px; }
.add11-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 7px; border: 0; border-radius: 6px; background: transparent; color: #dfe3ef; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.add11-option:hover { background: rgba(255,255,255,.08); color: #fff; }
.add11-option i { position: relative; width: 29px; height: 16px; flex: 0 0 29px; border-radius: 99px; background: #686f83; transition: background .16s ease; }
.add11-option i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform .16s ease; }
.add11-option[aria-pressed="true"] { color: #fff; }
.add11-option[aria-pressed="true"] i { background: #35c78a; }
.add11-option[aria-pressed="true"] i::after { transform: translateX(13px); }
.special-nav-items { display: grid; gap: 1px; }
.special-nav-items:empty { display: none; }
.special-nav-items .special-nav-item { width: 100%; text-align: left; }
@media (max-width: 700px) { .add11-panel { margin-left: 0; margin-right: 0; } }
/* From Uiverse.io by _2944 */ 
.switch {
  --button-width: 4em;
  --button-height: 2.2em;
  --circle-diameter: 1.8em;
  --circle-offset: 3px;
  --button-hue: 120;
  --button-saturation: 80%;
  --button-lightness: 40%;

  font-size: 17px;
  position: relative;
  display: inline-block;
  width: var(--button-width);
  height: var(--button-height);
  outline: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.switch:focus-within {
  outline: 2px solid
    hsl(var(--button-hue), var(--button-saturation), var(--button-lightness));
  outline-offset: 3px;
  border-radius: var(--button-height);
}

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

.slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e8e8, #d4d4d4);
  border-radius: var(--button-height);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 -1px 2px rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Внутренний градиент для сочности */
.slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  border-radius: var(--button-height);
  pointer-events: none;
}

.slider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--circle-offset);
  width: var(--circle-diameter);
  height: var(--circle-diameter);
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 50%;
  transform: translateY(-50%);
  transition:
    left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    width 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    box-shadow 0.4s ease,
    transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  will-change: left, width, transform;
  z-index: 2;
}

/* Эффект свечения сзади при активации */
.slider .glow {
  position: absolute;
  top: 50%;
  left: calc(var(--circle-diameter) / 2 + var(--circle-offset));
  width: 0;
  height: 0;
  background: hsl(
    var(--button-hue),
    var(--button-saturation),
    var(--button-lightness)
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
  opacity: 0;
  z-index: 1;
}

/* Hover эффект */
.slider:hover::before {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-50%) scale(1.05);
}

/* Активное состояние - ЭФФЕКТ СЛИПАНИЯ */
.switch input:checked + .slider {
  background: linear-gradient(
    135deg,
    hsl(
      var(--button-hue),
      var(--button-saturation),
      calc(var(--button-lightness) + 15%)
    ),
    hsl(var(--button-hue), var(--button-saturation), var(--button-lightness))
  );
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 -1px 2px rgba(255, 255, 255, 0.3),
    0 2px 8px
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0.3
      ),
    0 0 20px
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0.1
      );
}

.switch input:checked + .slider:hover {
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 -1px 2px rgba(255, 255, 255, 0.3),
    0 4px 12px
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0.4
      ),
    0 0 30px
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0.2
      );
}

.switch input:checked + .slider .glow {
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.switch input:checked + .slider::before {
  left: calc(100% - var(--circle-diameter) - var(--circle-offset));
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

/* ЭФФЕКТ СЛИПАНИЯ ПРИ НАЖАТИИ */
.switch input:active + .slider::before {
  width: calc(var(--button-width) - 2 * var(--circle-offset));
  border-radius: var(--button-height);
  transition:
    left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease;
}

.switch input:active:not(:checked) + .slider::before {
  left: var(--circle-offset);
  width: calc(var(--button-width) - 2 * var(--circle-offset));
}

.switch input:checked:active + .slider::before {
  left: var(--circle-offset);
  width: calc(var(--button-width) - 2 * var(--circle-offset));
}

/* Иконки внутри переключателя */
.switch .icon-on,
.switch .icon-off {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc(var(--button-height) * 0.5);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  color: white;
}

.switch .icon-on {
  left: 12px;
}

.switch .icon-off {
  right: 12px;
  color: #999;
}

.switch input:checked + .slider .icon-on {
  opacity: 1;
}

.switch input:not(:checked) + .slider .icon-off {
  opacity: 1;
}

/* ПУЛЬСАЦИЯ при активации */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0.4
      );
  }
  70% {
    box-shadow: 0 0 0 10px
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0
      );
  }
  100% {
    box-shadow: 0 0 0 0
      hsl(
        var(--button-hue),
        var(--button-saturation),
        var(--button-lightness),
        0
      );
  }
}

.switch input:checked + .slider {
  animation: pulse 0.6s ease-out;
}

/* Disabled состояние */
.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(30%);
}

.switch input:disabled + .slider:hover::before {
  transform: translateY(-50%);
}

/* Тёмная тема */
@media (prefers-color-scheme: dark) {
  .slider {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    box-shadow:
      inset 0 1px 3px rgba(0, 0, 0, 0.3),
      inset 0 -1px 2px rgba(255, 255, 255, 0.05),
      0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .slider::before {
    background: linear-gradient(145deg, #555, #444);
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.3),
      0 1px 3px rgba(0, 0, 0, 0.2),
      inset 0 2px 4px rgba(255, 255, 255, 0.1),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  }

  .switch input:checked + .slider {
    box-shadow:
      inset 0 1px 3px rgba(0, 0, 0, 0.4),
      inset 0 -1px 2px rgba(255, 255, 255, 0.15),
      0 2px 8px
        hsl(
          var(--button-hue),
          var(--button-saturation),
          var(--button-lightness),
          0.3
        ),
      0 0 25px
        hsl(
          var(--button-hue),
          var(--button-saturation),
          var(--button-lightness),
          0.15
        );
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slider,
  .slider::before {
    transition-duration: 0.1s;
  }

  .switch input:checked + .slider {
    animation: none;
  }

  .slider::before {
    will-change: auto;
  }
}

/* Addons: integração do switch Uiverse no painel lateral */
.add11-option { cursor: default; }
.add11-option > span:first-child { min-width: 0; }
.add11-option .switch { flex: 0 0 auto; font-size: 11px; }

/* Página exclusiva de Addons */
.addons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; max-width: 980px; }
.addon-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 170px; padding: 24px; border: 1px solid #e8ecf4; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(13, 27, 62,.04); }
.addon-card-copy { min-width: 0; }
.addon-card h2 { margin: 5px 0 8px; font-size: 19px; color: #0d1b3e; }
.addon-card-copy > p:last-child { margin: 0; color: #5f6b80; font-size: 12px; line-height: 1.65; }
.addon-kicker { margin: 0; color: #fa8700; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.addon-card .switch { flex: 0 0 auto; }
@media (max-width: 640px) { .addons-grid { grid-template-columns: 1fr; } .addon-card { align-items: flex-start; padding: 20px; } }

.expiry-list { display: grid; gap: 12px; }
.expiry-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; border: 1px solid #e8ecf4; border-left: 4px solid #2563eb; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(13, 27, 62,.04); }
.expiry-card.expiry-expired { border-left-color: #fa8700; }
.expiry-card.expiry-warning { border-left-color: #ec9b17; }
.expiry-card.expiry-resolved { border-left-color: #23936b; opacity: .78; }
.expiry-card h3 { margin: 4px 0 6px; color: #0d1b3e; }
.expiry-card p:not(.addon-kicker), .expiry-card small { display: block; margin: 4px 0; color: #5f6b80; font-size: 12px; }
.expiry-card strong { display: block; margin-top: 8px; color: #0d1b3e; font-size: 13px; }
.expiry-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.expiry-lot-id { color: #9b9eaa; font-size: 10px; }
.expiry-resolve { white-space: nowrap; }
@media (max-width: 640px) { .expiry-card { align-items: flex-start; flex-direction: column; } .expiry-card-actions { align-items: flex-start; flex-direction: row; } }
.entry-head, .operation-line.entry-line { grid-template-columns: minmax(210px, 2fr) minmax(140px, 1fr) 105px 145px minmax(150px, 1fr) 34px; }
@media (max-width: 900px) { .entry-head, .operation-line.entry-line { grid-template-columns: 1fr 1fr 100px 34px; } .operation-line.entry-line .productInput, .operation-line.entry-line .lineNote { grid-column: 1/-1; } }

/* ===== Controle de validade v2 (prefixo vx-) ===== */
.vx-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 0 0 18px; }
.vx-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fef2f2; border: 1px solid #dc2626; border-left-width: 5px; border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; }
.vx-banner b { display: block; font-size: 15px; margin-bottom: 3px; } .vx-banner span { color: #5f6b80; font-size: 12px; }
.vx-banner.vx-ok { background: #eaf7f2; border-color: #23936b; }
.vx-grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 18px; }
.vx-panel { border-radius: 12px; } .vx-panel h3 { margin: 0 0 4px; font-size: 14px; } .vx-panel > p { margin: 0 0 14px; }
.vx-bar { display: grid; grid-template-columns: 110px 1fr 130px; gap: 12px; align-items: center; margin: 11px 0; font-size: 12px; }
.vx-bar span:last-child { text-align: right; color: #5f6b80; }
.vx-track { height: 14px; background: #eef1f7; border-radius: 8px; overflow: hidden; } .vx-fill { height: 100%; border-radius: 8px; }
.vx-fefo { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid #eef1f7; } .vx-fefo:first-child { border-top: 0; }
.vx-rank { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #0d1b3e; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: bold; }
.vx-fefo > div { flex: 1; min-width: 0; } .vx-fefo b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vx-fefo small { color: #5f6b80; font-size: 11px; }
.vx-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e8ecf4; margin-bottom: 16px; overflow-x: auto; }
.vx-tab { border: 0; background: none; color: #5f6b80; font: inherit; font-size: 12px; font-weight: bold; padding: 12px 16px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.vx-tab[aria-selected="true"] { color: #0d1b3e; border-bottom-color: #fa8700; } .vx-tab i { font-style: normal; background: #eef1f7; border-radius: 10px; padding: 2px 8px; margin-left: 6px; font-size: 10px; }
.vx-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: end; }
.vx-tools label { display: grid; gap: 4px; font-size: 11px; color: #5f6b80; } .vx-tools select, .vx-tools input { min-height: 38px; border: 1px solid #dde3ee; border-radius: 6px; padding: 0 10px; font: inherit; font-size: 12px; background: #fff; color: #0d1b3e; }
.vx-tools input { flex: 1; min-width: 180px; }
.vx-tab:focus-visible, .vx-tools select:focus-visible, .vx-tools input:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.vx-view { display: grid; gap: 10px; } .vx-note { margin: 0 0 4px; }
.vx-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border: 1px solid #e8ecf4; border-left: 4px solid #2563eb; border-radius: 12px; background: #fff; }
.vx-card.vx-exp { border-left-color: #fa8700; } .vx-card.vx-warn { border-left-color: #ec9b17; } .vx-card.vx-done { border-left-color: #23936b; opacity: .72; }
.vx-card h4 { margin: 4px 0 5px; font-size: 14px; } .vx-card p:not(.addon-kicker) { margin: 3px 0; color: #5f6b80; font-size: 12px; }
.vx-life { height: 6px; background: #eef1f7; border-radius: 4px; margin-top: 9px; width: min(320px, 100%); overflow: hidden; } .vx-life i { display: block; height: 100%; }
.vx-act { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; } .vx-days { text-align: right; min-width: 92px; } .vx-days b { display: block; font-size: 24px; } .vx-days small { color: #5f6b80; font-size: 10px; }
.vx-chip { display: inline-block; border-radius: 12px; padding: 3px 10px; font-size: 10px; font-weight: bold; margin-bottom: 4px; }
.vx-chip.r { background: #fef2f2; color: #dc2626; } .vx-chip.a { background: #fff8e8; color: #b87400; } .vx-chip.g { background: #eaf7f2; color: #23936b; } .vx-chip.m { background: #eef1f7; color: #5f6b80; }
.vx-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) 2fr 190px; gap: 18px; align-items: center; padding: 15px 20px; border: 1px solid #e8ecf4; border-radius: 12px; background: #fff; }
.vx-row b { font-size: 13px; } .vx-row small { display: block; color: #5f6b80; font-size: 11px; margin-top: 3px; }
.vx-gauge { position: relative; height: 12px; background: #eef1f7; border-radius: 8px; } .vx-gauge i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; } .vx-gauge u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #0d1b3e; }
.vx-gl { display: flex; justify-content: space-between; font-size: 10px; color: #5f6b80; margin-top: 6px; }
.vx-wrap { overflow-x: auto; border: 1px solid #e8ecf4; border-radius: 12px; background: #fff; }
.vx-table { width: 100%; border-collapse: collapse; font-size: 12px; } .vx-table th { text-align: left; color: #5f6b80; font-size: 10px; padding: 10px 12px; border-bottom: 1px solid #e8ecf4; white-space: nowrap; } .vx-table td { padding: 12px; border-bottom: 1px solid #eef1f7; } .vx-table tr:hover td { background: #f7f8fc; }
@media (max-width: 1000px) { .vx-kpis { grid-template-columns: repeat(2, 1fr); } .vx-grid2 { grid-template-columns: 1fr; } .vx-row { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .vx-card { flex-direction: column; align-items: flex-start; } .vx-act { flex-direction: row; align-items: center; } .vx-days { text-align: left; } .vx-bar { grid-template-columns: 90px 1fr; } .vx-bar span:last-child { grid-column: 1/-1; text-align: left; } }

/* ===== Dashboard v2 (prefixo vd-) ===== */
#home-dashboard .vd{font-family:Verdana,Arial,sans-serif;color:#0d1b3e} #home-dashboard .vd *{box-sizing:border-box} #home-dashboard .vd-panel{border:1px solid #e8ecf4;border-radius:12px;background:#fff;padding:18px 20px;min-width:0} #home-dashboard .vd-panel h3{margin:0;font-size:14px} #home-dashboard .vd-s{margin:3px 0 12px;color:#5f6b80;font-size:11px} #home-dashboard .vd-ph{display:flex;justify-content:space-between;align-items:flex-start;gap:10px} #home-dashboard .vd-filters{margin:14px 0} #home-dashboard .vd-tools{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end;margin-bottom:8px} #home-dashboard .vd-tools label{display:grid;gap:4px;font-size:10px;color:#5f6b80;font-weight:bold} #home-dashboard .vd-tools select, #home-dashboard .vd-tools input{min-height:36px;border:1px solid #dde3ee;border-radius:6px;background:#fff;color:#0d1b3e;padding:0 10px;font:inherit;font-size:12px} #home-dashboard .vd-tools input:disabled{background:#f3f5fb;color:#98a0bb} #home-dashboard .vd-decide{border-left:5px solid #fa8700} #home-dashboard .vd-sec{font-size:15px;margin:26px 0 12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap} #home-dashboard .vd-grid{display:grid;gap:14px;margin-bottom:14px} #home-dashboard .vd-c1{grid-template-columns:1fr} #home-dashboard .vd-c2{grid-template-columns:1.5fr 1fr} #home-dashboard .vd-c2e{grid-template-columns:1fr 1fr} #home-dashboard .vd-c3{grid-template-columns:repeat(3,1fr)} #home-dashboard .vd-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:14px} #home-dashboard .vd-kpi{border:1px solid #e8ecf4;border-left:4px solid #2563eb;border-radius:12px;padding:13px 14px;background:#fff;box-shadow:0 8px 24px #0d1b3e0a;min-width:0} #home-dashboard .vd-kpi small{display:flex;justify-content:space-between;gap:6px;color:#5f6b80;font-size:10px} #home-dashboard .vd-kpi strong{display:block;font-size:23px;margin:5px 0 3px} #home-dashboard .vd-kpi span{font-size:10px;color:#5f6b80} #home-dashboard .vd-kpi em{font-style:normal;font-size:8px;font-weight:bold;color:#2563eb} #home-dashboard .vd-kg{border-left-color:#23936b} #home-dashboard .vd-kr{border-left-color:#fa8700} #home-dashboard .vd-kp{border-left-color:#7a55d4} #home-dashboard .vd-ka{border-left-color:#ec9b17} #home-dashboard .vd-dl{font-weight:bold;font-size:11px;margin-right:4px} #home-dashboard .vd-up{color:#23936b} #home-dashboard .vd-dn{color:#fa8700} #home-dashboard .vd-nt{color:#5f6b80} #home-dashboard .vd-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px} #home-dashboard .vd-chip{border:1px solid #e8ecf4;background:#fff;color:#5f6b80;border-radius:18px;padding:6px 12px;font:inherit;font-size:11px;font-weight:bold;cursor:pointer} #home-dashboard .vd-chip[aria-pressed="true"]{background:#0d1b3e;color:#fff;border-color:#0d1b3e} #home-dashboard .vd-chip i{font-style:normal;margin-left:6px;opacity:.75} #home-dashboard .vd-item{display:grid;grid-template-columns:30px 1fr auto auto;gap:12px;align-items:center;padding:9px 0;border-top:1px solid #eef1f7} #home-dashboard .vd-item:first-of-type{border-top:0} #home-dashboard .vd-ic{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;font-weight:bold;font-size:13px} #home-dashboard .vd-c.vd-ic{background:#fff4e6;color:#fa8700} #home-dashboard .vd-w.vd-ic{background:#fff8e8;color:#b87400} #home-dashboard .vd-i.vd-ic{background:#e9f1fc;color:#2563eb} #home-dashboard .vd-item b{display:block;font-size:12px} #home-dashboard .vd-item small{color:#5f6b80;font-size:11px} #home-dashboard .vd-btn{min-height:30px;border:1px solid #dde3ee;border-radius:6px;background:#fff;color:#5f6b80;padding:0 12px;font:inherit;font-size:11px;font-weight:bold;cursor:pointer} #home-dashboard .vd-btn:hover{border-color:#fa8700;color:#fa8700} #home-dashboard .vd-chip:focus-visible, #home-dashboard .vd-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px} #home-dashboard .vd-leg{display:flex;gap:14px;font-size:11px;color:#5f6b80} #home-dashboard .vd-leg i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px} #home-dashboard .vd svg{width:100%;height:auto;display:block} #home-dashboard .vd svg text{fill:#5f6b80;font-size:10px;font-family:inherit} #home-dashboard .vd-stack{display:flex;height:22px;border-radius:8px;overflow:hidden;gap:2px;margin-bottom:12px} #home-dashboard .vd-stack div{min-width:4px} #home-dashboard .vd-hr{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-top:1px solid #eef1f7;font-size:12px} #home-dashboard .vd-hr:first-of-type{border-top:0} #home-dashboard .vd-hr span{display:flex;align-items:center;gap:8px} #home-dashboard .vd-hr i{width:10px;height:10px;border-radius:3px;display:inline-block} #home-dashboard .vd-bar{display:grid;grid-template-columns:minmax(0,1.3fr) 2fr 56px;gap:10px;align-items:center;margin:8px 0;font-size:12px} #home-dashboard .vd-bar>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} #home-dashboard .vd-tr{height:11px;background:#eef1f7;border-radius:7px;overflow:hidden} #home-dashboard .vd-tr i{display:block;height:100%;border-radius:7px} #home-dashboard .vd-bar>span:last-child{text-align:right;color:#5f6b80} #home-dashboard .vd-sub{font-size:10px;color:#5f6b80;margin:-4px 0 4px} #home-dashboard .vd-op{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #eef1f7;font-size:12px} #home-dashboard .vd-op:first-of-type{border-top:0} #home-dashboard .vd-op small{color:#5f6b80;display:block;font-size:10px;margin-top:2px} #home-dashboard .vd-tag{font-size:10px;font-weight:bold;border-radius:12px;padding:3px 9px;text-align:center;white-space:nowrap;display:inline-block} #home-dashboard .vd-t-r{background:#fef2f2;color:#dc2626} #home-dashboard .vd-t-a{background:#fff8e8;color:#b87400} #home-dashboard .vd-t-g{background:#eaf7f2;color:#23936b} #home-dashboard .vd-t-b{background:#e9f1fc;color:#2563eb} #home-dashboard .vd-t-m{background:#eef1f7;color:#5f6b80} #home-dashboard .vd-mini{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px} #home-dashboard .vd-mini div{background:#f7f8fc;border:1px solid #eef1f7;border-radius:10px;padding:9px;text-align:center} #home-dashboard .vd-mini strong{display:block;font-size:19px} #home-dashboard .vd-mini small{font-size:10px;color:#5f6b80} #home-dashboard .vd-abc{display:flex;height:30px;border-radius:8px;overflow:hidden;gap:2px;margin-bottom:10px} #home-dashboard .vd-abc div{display:grid;place-items:center;color:#fff;font-weight:bold;font-size:12px} #home-dashboard .vd-scr{overflow-x:auto} #home-dashboard .vd-hm{display:grid;grid-template-columns:minmax(130px,1.3fr) repeat(12,1fr) 70px;gap:3px;font-size:10px;align-items:center;min-width:620px} #home-dashboard .vd-h{color:#5f6b80;text-align:center;font-weight:bold} #home-dashboard .vd-nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px} #home-dashboard .vd-ce{height:24px;border-radius:4px} #home-dashboard .vd-pk{text-align:center;font-weight:bold;font-size:10px;color:#fa8700} #home-dashboard .vd-table{width:100%;border-collapse:collapse;font-size:11px} #home-dashboard .vd-table th{text-align:left;color:#5f6b80;font-size:10px;padding:8px;border-bottom:1px solid #e8ecf4} #home-dashboard .vd-table td{padding:8px;border-bottom:1px solid #eef1f7;vertical-align:top} #home-dashboard .vd-mut{color:#5f6b80} #home-dashboard .vd-empty{border:1px dashed #dde3ee;border-radius:10px;padding:18px;text-align:center;color:#5f6b80;font-size:12px}
@media(max-width:1200px){#home-dashboard .vd-kpis{grid-template-columns:repeat(3,1fr)} #home-dashboard .vd-c3{grid-template-columns:1fr 1fr}}
@media(max-width:1000px){#home-dashboard .vd-c2,#home-dashboard .vd-c2e,#home-dashboard .vd-c3{grid-template-columns:1fr}}
@media(max-width:760px){#home-dashboard .vd-kpis{grid-template-columns:repeat(2,1fr)} #home-dashboard .vd-item{grid-template-columns:30px 1fr} #home-dashboard .vd-item .vd-btn, #home-dashboard .vd-item .vd-tag{grid-column:2;justify-self:start} #home-dashboard .vd-mini{grid-template-columns:1fr 1fr}}

/* Dashboard em tema claro: redefine a paleta da "Central de Comando" só dentro desta tela, para o texto não ficar branco sobre fundo claro. */
#home-dashboard.command-dashboard { --cmd-bg:#f7f8fc; --cmd-surface:#ffffff; --cmd-surface2:#f3f5fb; --cmd-border:#e8ecf4; --cmd-text:#0d1b3e; --cmd-dim:#5f6b80; --cmd-blue:#2563eb; --cmd-purple:#7a55d4; --cmd-green:#23936b; --cmd-yellow:#d5a623; --cmd-orange:#e68a2e; --cmd-red:#fa8700; background:transparent; color:#0d1b3e; margin:0; padding:0 0 40px; min-height:0; }
#home-dashboard .vd h1, #home-dashboard .vd h2, #home-dashboard .vd h3 { color:#0d1b3e; }

/* Recebimento em lote de vários componentes de um pedido dinâmico. */
.supplier-receipt-rows { grid-column: 1 / -1; display: grid; gap: 9px; }
.supplier-receipt-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .7fr) 40px; gap: 9px; align-items: end; }
.supplier-receipt-row > label { min-width: 0; }
.supplier-receipt-row > button { min-height: 40px; }
@media (max-width: 700px) {
  .supplier-receipt-row { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) 38px; gap: 6px; }
}

/* ===== Ajustes 14/11/2026: identidade QG Digital + novos componentes ===== */
body, button, input, select, textarea { font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif; }
#home-dashboard .vd, .command-dashboard { font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif; }
body > .sidebar { background: linear-gradient(180deg, var(--qg-navy) 0%, var(--qg-navy-3) 100%); }
body > .sidebar::after { content: ""; position: fixed; left: 0; bottom: 0; width: 248px; height: 3px; background: linear-gradient(90deg, var(--qg-navy-2), var(--qg-orange), var(--qg-orange-light)); pointer-events: none; }
.sidebar nav button.active { box-shadow: inset 3px 0 0 var(--qg-orange); }
.primary { background: var(--qg-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 2px 8px rgba(250, 135, 0, .28); }
.primary:hover { filter: brightness(1.04); box-shadow: 0 4px 16px rgba(250, 135, 0, .38); }
.primary:disabled, .is-busy { opacity: .65; cursor: progress !important; }
.eyebrow { letter-spacing: .14em; }
.auth-hero { background: radial-gradient(circle at 85% 90%, rgba(250, 135, 0, .18), transparent 45%), var(--qg-navy) !important; }
.auth-hero-line { background: var(--qg-grad) !important; }
.captcha-visual { font-family: 'Poppins', sans-serif !important; font-size: 16px !important; letter-spacing: 0 !important; text-decoration: none !important; color: var(--qg-navy) !important; background: var(--qg-tint) !important; border-color: #ffd8a8 !important; }
.captcha-input { text-transform: none !important; }
.danger-link { color: var(--qg-danger) !important; }
.archived-badge { display: inline-block; margin-top: 8px; padding: 2px 9px; border-radius: 12px; background: var(--qg-surface-2); color: var(--qg-text-2); font-size: 11px; font-weight: 600; border: 1px solid var(--qg-border); }
.modal-discard-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #ffd8a8; color: var(--qg-navy); font-size: 13px; font-weight: 600; }
.modal-discard-bar span { flex: 1 1 180px; }
.modal-discard-bar.shake { animation: qgShake .35s; }
@keyframes qgShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.mkt-token-info { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #ecfdf5; color: #166534; font-size: 12px; }
.mkt-token-info.expired { background: #fef2f2; color: #b91c1c; }
.rest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rest-panel { min-width: 0; }
.rest-panel h3 { margin: 0 0 4px; }
.rest-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.rest-docs { grid-column: 1 / -1; }
.rest-list { display: grid; gap: 8px; }
.rest-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--qg-border); border-radius: 10px; background: var(--qg-surface); }
.rest-item > div:first-child { display: grid; gap: 3px; min-width: 0; }
.rest-item small { color: var(--qg-text-2); font-size: 11.5px; overflow-wrap: anywhere; }
.rest-item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rest-item-actions button, .rest-item > button { white-space: nowrap; }
.rest-log-item.ok { border-left: 4px solid var(--qg-ok); }
.rest-log-item.fail { border-left: 4px solid var(--qg-danger); }
.rest-error { color: var(--qg-danger) !important; }
.rest-code { margin: 8px 0 10px; padding: 12px 14px; border-radius: 10px; background: var(--qg-navy); color: #ffd8a8; font: 12px/1.55 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.rest-secret { font-size: 14px; color: #fff; user-select: all; }
.rest-docs code, .rest-panel code { background: var(--qg-surface-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; color: var(--qg-navy); }
.rest-endpoints { display: grid; gap: 6px; margin: 10px 0 14px; }
.rest-endpoints > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--qg-bg); border: 1px solid var(--qg-border); }
.rest-endpoints small { flex-basis: 100%; color: var(--qg-text-2); font-size: 11.5px; }
.rest-endpoints .m { font: 700 10px/1 'Poppins', sans-serif; padding: 4px 7px; border-radius: 5px; color: #fff; letter-spacing: .05em; }
.rest-endpoints .m.get { background: var(--qg-info); }
.rest-endpoints .m.post { background: var(--qg-orange); }
.rest-events { border: 1px solid var(--qg-border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rest-events legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.backups-panel .rest-list { margin-top: 10px; }
@media (max-width: 900px) { .rest-grid { grid-template-columns: 1fr; } .rest-panel-head { flex-direction: column; } .rest-item { flex-direction: column; align-items: stretch; } }
.sidebar nav button.dashboard-nav-item { background: rgba(255, 255, 255, .06); border: 1px solid rgba(250, 135, 0, .45); box-shadow: none; transform: none; }
.sidebar nav button.dashboard-nav-item:hover { background: rgba(250, 135, 0, .14); border-color: var(--qg-orange); box-shadow: none; transform: none; }
.sidebar nav button.dashboard-nav-item.active { background: var(--qg-grad); border-color: transparent; box-shadow: 0 6px 18px rgba(250, 135, 0, .35); }
.dashboard-kpi-card { border-top-color: var(--qg-orange); }
.sidebar-brand small { color: #b9c7db; }
.rest-panel-head > button { white-space: nowrap; flex-shrink: 0; }
#restLog { max-height: 420px; overflow: auto; }
.rest-grid > .rest-panel:last-child { grid-column: 1 / -1; }
.warehouse-card-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.warehouseDelete, .warehouseUnarchive { border: 0; background: transparent; font: inherit; font-size: 10px; font-weight: bold; cursor: pointer; padding: 0; color: #5f6b80; }
.warehouseDelete:hover { color: var(--qg-danger); }
.warehouseUnarchive:hover { color: var(--qg-orange); }
.modal-discard-bar button { flex: 0 0 auto; }
.rest-events .check-line, .modal-form .check-line { display: flex !important; align-items: center; gap: 9px; font-weight: 600; }
.rest-events .check-line input { margin: 0; flex: 0 0 auto; }

/* Crédito QG Digital */
.qg-credit { display: flex; align-items: center; gap: 10px; margin: 18px 6px 4px; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: #b9c7db; text-decoration: none; transition: .2s; }
.qg-credit:hover { border-color: rgba(250, 135, 0, .55); background: rgba(250, 135, 0, .08); color: #fff; }
.qg-credit img { width: 30px; height: auto; flex: 0 0 auto; }
.qg-credit span { display: grid; font-size: 10.5px; line-height: 1.25; letter-spacing: .02em; }
.qg-credit b { font-size: 13px; color: #fff; font-weight: 700; }
.qg-credit:hover b { color: var(--qg-orange-light); }
.auth-qg-credit { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; margin-top: 44px; padding: 9px 14px 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: #b9c7db; font-size: 13px; text-decoration: none; width: fit-content; transition: .2s; }
.auth-qg-credit:hover { border-color: rgba(250, 135, 0, .6); color: #fff; }
.auth-qg-credit b { color: #fff; }
.auth-required .qg-credit { display: none; }
.qg-credit img, .auth-qg-credit img { background: #fff; border-radius: 8px; padding: 3px 4px; box-sizing: content-box; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.qg-credit img { width: 28px; }
.auth-qg-credit img { width: 30px; height: auto; }

/* Estoque de defeito */
.operation-line .defect-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 2px 0 6px; }
.defect-toggle { display: inline-flex !important; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--qg-text-2); cursor: pointer; white-space: nowrap; }
.defect-toggle input { margin: 0; }
.defect-row .defect-field { display: none; gap: 4px; font-size: 11px; font-weight: 700; color: var(--qg-danger); }
.defect-row .defect-field input { min-width: 90px; }
.defect-row .defect-note { flex: 1 1 260px; }
.defect-row .defect-note input { width: 100%; }
.operation-line.has-defect { background: #fff7f7; border-radius: 10px; box-shadow: inset 3px 0 0 var(--qg-danger); padding-left: 6px; }
.operation-line.has-defect .defect-field { display: grid; }
.product-defect-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 8px 0; }
.product-defect-row:has(.lineDefectOn:checked) .defect-field { display: grid; }
.task-row.task-defect { box-shadow: inset 4px 0 0 var(--qg-danger); }
.task-row.task-supplier { box-shadow: inset 4px 0 0 var(--qg-info); }
.defect-history { margin: 0 0 12px; padding-left: 18px; font-size: 12px; color: var(--qg-text-2); }
.out-confirm-list { margin: 4px 0 14px; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.defect-toggle input[type="checkbox"] { width: 18px !important; height: 18px !important; min-height: 0 !important; flex: 0 0 18px; }

/* ===== Rodada 4: ícones, tutoriais, primeiros passos, grade ===== */
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.sidebar nav button { display: flex !important; align-items: center; gap: 11px; }
.sidebar nav button svg.i { width: 17px; height: 17px; opacity: .8; }
.sidebar nav button.active svg.i, .sidebar nav button:hover svg.i { opacity: 1; color: var(--qg-orange-light); }
.sidebar nav button.dashboard-nav-item.active svg.i { color: #fff; }
.tutorial-nav-btn { margin-top: 10px; color: #ffd8a8 !important; font-weight: 700; }
.tool-button.icon-tool { display: inline-flex; align-items: center; gap: 7px; }
.tool-button.icon-tool svg.i { width: 17px; height: 17px; color: var(--qg-navy); }
@media (max-width: 900px) { .tool-button.icon-tool { width: 42px; height: 42px; padding: 0; justify-content: center; } .tool-button.icon-tool .tool-label { display: none; } }
.field-hint { font-weight: 500; color: var(--qg-text-3); font-size: 11px; }
/* linhas de operação: rótulos só no celular */
.operation-line .ln { display: contents; }
.operation-line .ln > span { display: none; }
@media (max-width: 760px) {
  .operation-line .ln { display: grid; gap: 4px; min-width: 0; }
  .operation-line .ln > span { display: block; font-size: 11px; font-weight: 700; color: var(--qg-text-2); text-transform: uppercase; letter-spacing: .04em; }
  .operation-line .ln input, .operation-line .ln select { width: 100%; }
  .operation-line .ln-expiry:has(input[style*="hidden"]) { display: none; }
  .operation-line .remove-line { justify-self: end; align-self: start; }
  .line-head { display: none !important; }
}
/* tutorial */
.tmodal { position: fixed; inset: 0; z-index: 14000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 15, 34, .78); backdrop-filter: blur(9px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .28s, visibility .28s; }
.tmodal.show { opacity: 1; visibility: visible; pointer-events: auto; }
.tcard { width: min(520px, 100%); padding: 34px; text-align: center; color: #fff; border: 1px solid rgba(255, 216, 168, .24); border-radius: 22px; background: radial-gradient(circle at 50% 0%, rgba(250, 135, 0, .17), transparent 43%), linear-gradient(145deg, #162d5e, #080f22 70%); box-shadow: 0 28px 90px rgba(0, 0, 0, .5), 0 0 50px rgba(250, 135, 0, .12); transform: translateY(14px) scale(.98); transition: transform .35s; }
.tmodal.show .tcard { transform: none; }
.tcard .ic { width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 18px; background: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(250, 135, 0, .28); }
.tcard .ic img { width: 48px; }
.tcard .eb { margin-bottom: 9px; color: #ffc266; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tcard h1 { font-size: 24px; font-weight: 800; letter-spacing: -.04em; margin: 0; color: #fff; }
.tcard p { margin: 12px auto 0; max-width: 400px; color: rgba(232, 236, 244, .78); font-size: 13.5px; line-height: 1.6; }
.tcard .acts { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 26px; }
.tbtn { min-height: 46px; border-radius: 11px; font-weight: 800; font-size: 13px; cursor: pointer; transition: all .2s; font-family: inherit; }
.tbtn.sec { border: 1px solid rgba(255, 216, 168, .3); background: rgba(255, 255, 255, .04); color: #e8ecf4; }
.tbtn.pri { border: 0; background: linear-gradient(135deg, #ffaa33, #d97000); color: #080f22; box-shadow: 0 10px 26px rgba(250, 135, 0, .35); }
.tcard .note { margin-top: 14px; color: rgba(232, 236, 244, .5); font-size: 11px; }
.tour { position: fixed; inset: 0; z-index: 15000; display: none; }
.tour.show { display: block; }
.tour.centro { background: rgba(8, 15, 34, .78); }
.spot { position: fixed; left: 0; top: 0; width: 0; height: 0; border: 2px solid #ffc266; border-radius: 11px; background: rgba(250, 135, 0, .08); box-shadow: 0 0 0 9999px rgba(8, 15, 34, .78), 0 0 0 5px rgba(255, 170, 51, .16), 0 0 28px rgba(255, 170, 51, .62); pointer-events: none; transition: left .32s, top .32s, width .32s, height .32s, opacity .2s; }
.spot.off { opacity: 0; }
.tip { position: fixed; left: 16px; top: 16px; width: min(370px, calc(100vw - 24px)); padding: 21px; color: var(--qg-text); border: 1px solid rgba(255, 216, 168, .6); border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .36), 0 0 30px rgba(250, 135, 0, .12); transition: left .32s, top .32s; }
.tip .top { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--qg-orange-dark); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tip .top span:last-child { color: var(--qg-text-3); letter-spacing: 0; }
.tip h2 { font-size: 18px; font-weight: 800; letter-spacing: -.035em; margin: 0 0 9px; }
.tip .tx { color: var(--qg-text-2); font-size: 13px; line-height: 1.6; }
.tip .tx b { color: var(--qg-text); }
.tip .dots { display: flex; gap: 4px; margin-top: 14px; }
.tip .dots i { height: 4px; flex: 1; border-radius: 9px; background: var(--qg-border); }
.tip .dots i.on { background: var(--qg-orange); }
.tip .acts { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.tip .acts .primary { margin-left: auto; }
.tip .acts button { min-height: 38px; padding: 0 14px; }
.tour-skip { border: 0; background: none; color: var(--qg-text-3); font: inherit; font-weight: 600; cursor: pointer; }
body.tour-mobile-menu .sidebar { z-index: 14500 !important; }
/* add-ons */
.addon-tutorial-btn { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--qg-border); background: var(--qg-surface-2); color: var(--qg-navy); border-radius: 9px; padding: 7px 12px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.addon-tutorial-btn:hover { border-color: var(--qg-orange); color: var(--qg-orange-dark); }
.addon-tutorial-btn svg.i { width: 15px; height: 15px; }
/* primeiros passos */
#home-dashboard.is-empty .vd > *:not(.command-topbar) { display: none !important; }
.fs-card { background: #fff; border: 1px solid var(--qg-border); border-radius: 16px; padding: 26px; margin-bottom: 18px; box-shadow: 0 8px 26px rgba(13, 27, 62, .05); }
.fs-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.fs-head h1 { margin: 4px 0 6px; font-size: 26px; }
.fs-progress { min-width: 160px; text-align: right; }
.fs-progress strong { font-size: 13px; color: var(--qg-navy); }
.fs-bar { height: 8px; border-radius: 9px; background: var(--qg-surface-2); overflow: hidden; margin-top: 6px; }
.fs-bar i { display: block; height: 100%; background: var(--qg-grad); border-radius: 9px; transition: width .4s; }
.fs-step { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--qg-border); }
.fs-step > div { flex: 1; display: grid; gap: 3px; }
.fs-step small { color: var(--qg-text-2); font-size: 12.5px; }
.fs-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--qg-tint); color: var(--qg-orange-dark); flex: 0 0 auto; }
.fs-step.done .fs-n { background: #dcfce7; color: #15803d; }
.fs-step.done strong { color: var(--qg-text-2); }
.fs-ok { color: #15803d; font-weight: 700; font-size: 12px; }
.fs-foot { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--qg-border); }
.fs-foot button { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 640px) { .fs-step { flex-wrap: wrap; } .fs-step button { width: 100%; } .fs-progress { text-align: left; } }
/* grade */
.grid-box { border: 1px dashed #ffd8a8; background: #fffaf3; border-radius: 12px; padding: 12px 14px; }
#gridFields { gap: 10px; margin-top: 10px; }
.grid-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--qg-border); background: #fff; border-radius: 20px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; color: var(--qg-navy); }
.chip:hover, .chip.on { border-color: var(--qg-orange); color: var(--qg-orange-dark); background: var(--qg-tint); }
.grid-preview { font-size: 12px; color: var(--qg-text-2); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0; }
.grid-move-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; }
.grid-move-btn[hidden] { display: none !important; }
.grid-scroll { overflow-x: auto; }
.grid-table { border-collapse: collapse; width: 100%; }
.grid-table th, .grid-table td { padding: 6px; text-align: center; border-bottom: 1px solid var(--qg-border); font-size: 13px; }
.grid-table thead th { color: var(--qg-orange-dark); font-weight: 800; }
.grid-table tbody th { text-align: left; color: var(--qg-navy); white-space: nowrap; }
.grid-table input { width: 64px; text-align: center; padding: 8px 4px; }
.grid-total { margin: 0; font-weight: 700; color: var(--qg-navy); }

/* Polimento: Tasks com ícone e texto juntos, badge à direita */
.tasks-nav-item{justify-content:flex-start !important}
.tasks-nav-item .tasks-nav-badge{margin-left:auto}
#home-dashboard.is-empty .command-topbar{display:none}
/* Polimento: linhas de entrada/saída empilhadas no celular */
@media (max-width: 760px) {
  .operation-line { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; padding: 12px; border: 1px solid var(--qg-border); border-radius: 12px; background: var(--qg-surface-2); position: relative; }
  .operation-line > * { min-width: 0; }
  .operation-line .ln-prod, .operation-line .ln-note, .operation-line .ln-obs, .operation-line .line-defect, .operation-line > :not(.ln):not(.remove-line) { grid-column: 1 / -1; }
  .operation-line .remove-line { position: absolute; top: 6px; right: 8px; }
  .operation-line .ln-prod { padding-right: 26px; }
  .operation-line .ln:has(.lineNote) { grid-column: 1 / -1; }
}
/* ===== Assinatura (Ponto do Estoque) — cores QG Digital ===== */
.billing-nav-btn { position: relative; }
.billing-nav-badge { margin-left: auto; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; background: var(--qg-orange); color: #fff; font-size: 11px; font-weight: 800; }
.billing-chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--qg-border); background: var(--qg-surface); color: var(--qg-navy); font: 600 12px/1 inherit; cursor: pointer; }
.billing-chip svg.i { width: 16px; height: 16px; }
.billing-chip.trial { background: var(--qg-tint); border-color: #ffd8a8; color: #9a4d00; }
.billing-chip.warn { background: #fff7e0; border-color: #f5c453; color: #8a5a00; }
.billing-chip.bad { background: #fde8e8; border-color: #f3a5a5; color: #b42318; }
@media (max-width: 900px) { .billing-chip span { display: none; } .billing-chip { width: 42px; height: 42px; padding: 0; justify-content: center; } }
.billing-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 18px; padding: 14px 18px; border-radius: 14px; background: var(--qg-tint); border: 1px solid #ffd8a8; color: var(--qg-navy); font-size: 14px; }
.billing-banner.bad { background: #fdecec; border-color: #f3a5a5; }
.billing-banner .primary { white-space: nowrap; }
@media (max-width: 700px) { .billing-banner { flex-direction: column; align-items: stretch; } }
.bill-loading { padding: 40px; text-align: center; color: var(--qg-text-3); }
.bill-status { position: relative; display: flex; align-items: center; gap: 18px; padding: 24px 26px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 85% 0%, rgba(250, 135, 0, .28), transparent 45%), linear-gradient(135deg, var(--qg-navy-2), var(--qg-navy-3)); box-shadow: 0 18px 40px rgba(13, 27, 62, .18); margin-bottom: 18px; }
.bill-status img { width: 52px; height: 44px; flex: none; }
.bill-status h2 { margin: 2px 0 4px; font-size: 24px; color: #fff; }
.bill-status p { margin: 0; color: #d6dcef; font-size: 14px; }
.bill-kicker { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--qg-orange-light); }
.bill-status.expirado { background: linear-gradient(135deg, #5b1720, #2a0b10); }
.bill-days { margin-left: auto; text-align: center; padding: 10px 18px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 216, 168, .25); }
.bill-days b { display: block; font-size: 30px; color: var(--qg-orange-light); line-height: 1; }
.bill-days span { font-size: 11px; color: #d6dcef; text-transform: uppercase; letter-spacing: .1em; }
.bill-sub { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: #ffd8a8; }
.bill-sub svg.i { width: 16px; height: 16px; }
.afil-ok { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--qg-navy); }
.afil-ok svg { width: 22px; height: 22px; color: #16a34a; flex: none; }
.afil-form input { text-transform: uppercase; }
.bill-card { padding: 22px; border-radius: 18px; background: var(--qg-surface); border: 1px solid var(--qg-border); margin-bottom: 18px; }
.bill-card h3 { margin: 0 0 14px; font-size: 16px; color: var(--qg-navy); }
.bill-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .bill-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bill-plan { position: relative; display: grid; gap: 4px; padding: 18px 14px 14px; border-radius: 14px; border: 2px solid var(--qg-border); background: var(--qg-surface-2); text-align: left; cursor: pointer; font: inherit; color: var(--qg-navy); transition: border-color .15s, transform .15s; }
.bill-plan:hover { transform: translateY(-1px); border-color: #ffd8a8; }
.bill-plan.on { border-color: var(--qg-orange); background: var(--qg-tint); box-shadow: 0 8px 22px rgba(250, 135, 0, .15); }
.bill-plan-name { font-size: 13px; font-weight: 700; color: var(--qg-text-2); }
.bill-plan strong { font-size: 22px; }
.bill-plan small { color: var(--qg-text-3); font-size: 12px; }
.bill-tag { position: absolute; top: -10px; right: 10px; padding: 3px 8px; border-radius: 999px; background: var(--qg-grad); color: #fff; font: 800 10px/1.2 inherit; font-style: normal; letter-spacing: .04em; }
.bill-tag.green { background: var(--qg-navy); }
.bill-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 14px; padding-top: 14px; border-top: 1px dashed var(--qg-border); }
.bill-total span { font-weight: 700; color: var(--qg-text-2); }
.bill-total b { font-size: 26px; color: var(--qg-navy); }
.bill-total small { color: var(--qg-text-3); }
.bill-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .bill-actions { grid-template-columns: 1fr; } }
.bill-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font: 700 15px/1 inherit; cursor: pointer; color: #fff; }
.bill-btn svg.i { width: 18px; height: 18px; }
.bill-btn.pix { background: var(--qg-grad); box-shadow: 0 8px 20px rgba(250, 135, 0, .25); }
.bill-btn.card { background: var(--qg-navy); }
.bill-btn.monthly { background: transparent; color: var(--qg-orange-dark); border: 2px solid var(--qg-orange); }
.bill-btn:disabled { opacity: .6; cursor: wait; }
.bill-monthly { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--qg-surface-2); }
.bill-monthly > div { flex: 1 1 260px; display: grid; gap: 2px; font-size: 13px; color: var(--qg-text-2); }
.bill-monthly b { color: var(--qg-navy); font-size: 14px; }
.bill-note { margin: 14px 0 0; font-size: 12px; color: var(--qg-text-3); }
.bill-hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.bill-hist th, .bill-hist td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--qg-border); }
.bill-hist th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--qg-text-3); }
.bill-modal h2 { display: flex; align-items: center; gap: 8px; }
.bill-modal h2 svg.i { width: 22px; height: 22px; color: var(--qg-orange); }
.bill-qr { display: block; width: 220px; height: 220px; margin: 14px auto; border-radius: 12px; border: 1px solid var(--qg-border); padding: 8px; background: #fff; }
.bill-copy { display: flex; gap: 8px; }
.bill-copy input { flex: 1; min-width: 0; font-size: 12px; }
.bill-wait { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 14px 0 0; font-size: 14px; color: var(--qg-text-2); }
.bill-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--qg-orange); animation: billPulse 1.2s infinite; }
@keyframes billPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.bill-err { color: #b42318; font-size: 13px; }
.bill-ok { text-align: center; padding: 10px 0; }
.bill-ok svg.i { width: 54px; height: 54px; color: var(--qg-ok); }
.mp-form { display: grid; gap: 10px; }
.mp-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--qg-text-2); }
.mp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mp-field { height: 44px; padding: 0 12px; border: 1px solid var(--qg-border); border-radius: 10px; background: #fff; }
.billing-banner[hidden], .billing-chip[hidden], .billing-nav-badge[hidden] { display: none !important; }
.bill-status img { background: #fff; border-radius: 14px; padding: 8px; width: 60px; height: 52px; box-sizing: border-box; }

.bill-status img { background: none; padding: 0; width: 64px; height: 64px; border-radius: 16px; }

/* ===================================================================
   MODS EXTRAS — igual nos três sistemas. Foto, Estoque pessoal, Entrada geral.
   =================================================================== */
/* ---------- campo de foto ---------- */
.mx-photo { display: grid; gap: 6px; margin-bottom: 4px; }
.mx-photo-label { font-weight: 600; font-size: 13px; color: var(--qg-text-2, #3d4a5c); }
.mx-photo-label small, .mx-form label small { font-weight: 400; color: var(--qg-text-3, #9aa3b5); }
.mx-photo-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mx-photo-prev { width: 84px; height: 84px; border-radius: 12px; border: 1px dashed var(--qg-border, #e8ecf4); background: var(--qg-surface-2, #f3f5fb); display: grid; place-items: center; overflow: hidden; flex: none; }
.mx-photo-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-photo-prev svg { width: 30px; height: 30px; opacity: .35; }
.mx-photo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; min-width: 200px; }
.mx-photo-actions button { width: auto; }
.mx-photo-hint { width: 100%; color: var(--qg-text-3, #9aa3b5); font-size: 12px; }
.product-thumb img { object-fit: cover; }

/* ---------- barra de ferramentas, botões segmentados, KPIs ---------- */
.mx-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.mx-toolbar input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.mx-toolbar select, .mx-toolbar input[type="search"] { width: auto; }
.mx-toolbar > button { width: auto; }
.mx-seg { display: inline-flex; background: var(--qg-surface-2, #f3f5fb); border: 1px solid var(--qg-border, #e8ecf4); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.mx-seg button { background: transparent; border: 0; box-shadow: none; color: var(--qg-text-2, #3d4a5c); padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; width: auto; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.mx-seg button .i { width: 15px; height: 15px; }
.mx-seg button.on { background: var(--qg-surface, #fff); color: var(--qg-navy, #0d1b3e); box-shadow: 0 1px 4px rgba(13, 27, 62, .12); }
.mx-nav { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mx-nav b { min-width: 150px; text-align: center; }
.mx-nav input[type="date"] { width: auto; }
.mx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mx-kpis > div { background: var(--qg-surface, #fff); border: 1px solid var(--qg-border, #e8ecf4); border-radius: 14px; padding: 12px 14px; display: grid; }
.mx-kpis small { color: var(--qg-text-3, #9aa3b5); font-size: 12px; }
.mx-kpis b { font-size: 24px; color: var(--qg-navy, #0d1b3e); }
.mx-loading, .mx-muted { color: var(--qg-text-3, #9aa3b5); }
.mx-loading { padding: 24px; text-align: center; }
.mx-sub { margin: 18px 0 8px; font-size: 15px; }
.mx-mini { display: inline-flex !important; align-items: center; justify-content: center; margin: 0; min-width: 0 !important; flex: none; width: 30px !important; height: 30px; padding: 0 !important; border-radius: 8px; border: 1px solid var(--qg-border, #e8ecf4); background: var(--qg-surface, #fff); color: var(--qg-navy, #0d1b3e); font-weight: 700; cursor: pointer; line-height: 1; }
.mx-mini:hover { border-color: var(--qg-orange, #fa8700); color: var(--qg-orange-dark, #d97000); }
.mx-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.mx-pill.in { background: #dcfce7; color: #166534; }
.mx-pill.out { background: #fee2e2; color: #991b1b; }

/* ---------- cartões do estoque pessoal ---------- */
.mx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mx-card { background: var(--qg-surface, #fff); border: 1px solid var(--qg-border, #e8ecf4); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.mx-card:hover { box-shadow: 0 8px 24px rgba(13, 27, 62, .09); transform: translateY(-1px); }
.mx-card.zero { opacity: .7; }
.mx-card-photo { all: unset; cursor: pointer; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--qg-surface-2, #f3f5fb); overflow: hidden; }
.mx-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-card-photo span, .mx-detail-photo span { font-size: 34px; font-weight: 800; color: var(--qg-text-3, #9aa3b5); }
.mx-card-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.mx-card-body h3 { margin: 0; font-size: 16px; cursor: pointer; }
.mx-card-meta { margin: 0; display: flex; gap: 10px; flex-wrap: wrap; color: var(--qg-text-2, #3d4a5c); font-size: 12px; min-height: 16px; }
.mx-card-meta span { display: inline-flex; gap: 4px; align-items: center; }
.mx-card-meta .i { width: 13px; height: 13px; }
.mx-card-qty { margin: 0; color: var(--qg-text-2, #3d4a5c); }
.mx-card-qty b { font-size: 22px; color: var(--qg-navy, #0d1b3e); }
.mx-card-act { display: flex; gap: 6px; flex-wrap: wrap; }
.mx-card-act button { width: auto; padding: 7px 10px; font-size: 13px; display: inline-flex; gap: 5px; align-items: center; }
.mx-card-act .i { width: 14px; height: 14px; }
.mx-detail { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.mx-detail-photo { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--qg-surface-2, #f3f5fb); display: grid; place-items: center; }
.mx-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.mx-detail h2 { margin: 2px 0 6px; }
@media (max-width: 600px) { .mx-detail { grid-template-columns: 1fr; } .mx-detail-photo { max-width: 220px; } }

/* ---------- planilha estilo Excel ---------- */
.mx-sheet-wrap { overflow: auto; max-height: 70vh; border: 1px solid #c8c8c8; border-radius: 6px; background: #fff; }
.mx-sheet { border-collapse: separate; border-spacing: 0; width: 100%; font: 13px/1.35 "Segoe UI", Calibri, Arial, sans-serif; color: #1f1f1f; }
.mx-sheet th, .mx-sheet td { border-right: 1px solid #d4d4d4; border-bottom: 1px solid #d4d4d4; padding: 4px 8px; white-space: nowrap; text-align: left; background: #fff; }
.mx-sheet thead th { position: sticky; z-index: 2; background: #f3f3f3; font-weight: 600; text-transform: none; letter-spacing: normal; font-size: 13px; }
.mx-sheet .mx-letters th { top: 0; height: 22px; text-align: center; color: #616161; font-weight: 400; font-size: 12px; background: #e9e9e9; }
.mx-sheet .mx-head th { top: 23px; cursor: pointer; user-select: none; background: #217346; color: #fff; border-right-color: #1a5c38; }
.mx-sheet .mx-head th.mx-rn { background: #e9e9e9; color: #616161; cursor: default; }
.mx-sheet .mx-head th i::after { content: ""; margin-left: 6px; font-style: normal; opacity: .9; }
.mx-sheet .mx-head th.asc i::after { content: "▲"; font-size: 10px; }
.mx-sheet .mx-head th.desc i::after { content: "▼"; font-size: 10px; }
.mx-sheet .mx-filter th { top: 54px; padding: 2px 3px; background: #fafafa; }
.mx-sheet .mx-filter input { width: 100%; min-width: 60px; height: 26px; padding: 2px 6px; font: inherit; font-weight: 400; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; box-shadow: none; }
.mx-sheet .mx-filter input:focus { outline: 2px solid #217346; outline-offset: -1px; }
.mx-sheet .mx-corner, .mx-sheet .mx-rn { position: sticky; left: 0; z-index: 1; width: 42px; min-width: 42px; text-align: center !important; background: #e9e9e9 !important; color: #616161; font-size: 12px; font-weight: 400; }
.mx-sheet thead .mx-corner, .mx-sheet thead .mx-rn { z-index: 3; }
.mx-sheet tbody tr:hover td:not(.mx-rn) { background: #f2f8f4; }
.mx-sheet td.mx-num, .mx-sheet td.mx-num + td.mx-c.mx-num { text-align: right; font-variant-numeric: tabular-nums; }
.mx-sheet td.mx-date { font-variant-numeric: tabular-nums; }
.mx-sheet td.mx-photo { padding: 2px 4px; text-align: center; }
.mx-sheet-thumb { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; overflow: hidden; background: #f3f3f3; color: #9aa3b5; }
.mx-sheet-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mx-sheet td.sel { outline: 2px solid #217346; outline-offset: -2px; }
.mx-sheet td.mx-empty { text-align: center; color: #8a8a8a; padding: 22px; white-space: normal; }
.mx-sheet td.mx-act { white-space: nowrap; text-align: left; padding: 2px 4px; min-width: 96px; }
.mx-sheet th.mx-act-h { min-width: 96px; }
.mx-sheet td.mx-act .mx-mini { width: 26px !important; height: 26px; margin-right: 3px; }
.mx-sheet tfoot td { position: sticky; bottom: 0; background: #f3f3f3; font-weight: 700; border-top: 2px solid #217346; }

/* ---------- entrada geral ---------- */
.mx-ge-form { display: grid; grid-template-columns: 2.2fr .8fr .5fr 1fr 1.6fr auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.mx-ge-form button[type="submit"] { width: auto; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.mx-ge-tip { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--qg-text-3, #9aa3b5); }
@media (max-width: 900px) {
  .mx-ge-form { grid-template-columns: 1fr 1fr; }
  .mx-ge-name, .mx-ge-note, .mx-ge-form button[type="submit"] { grid-column: 1 / -1; }
  .mx-ge-form button[type="submit"] { width: 100%; justify-content: center; }
  .mx-sheet-wrap { max-height: none; }
}
@media print {
  body.mx-printing * { visibility: hidden !important; }
  body.mx-printing #mxGeSheet, body.mx-printing #mxGeSheet * { visibility: visible !important; }
  body.mx-printing #mxGeSheet { position: absolute; left: 0; top: 0; width: 100%; }
  body.mx-printing .mx-sheet-wrap { max-height: none; overflow: visible; border: 0; }
  body.mx-printing .mx-filter, body.mx-printing .mx-act, body.mx-printing .mx-act-h { display: none !important; }
  body.mx-printing .mx-sheet thead th { position: static; }
}

/* ===== Mod Estoque de caixas (igual nos três sistemas) ===== */
.bx-empty { text-align: center; padding: 36px 16px; border: 1px dashed var(--qg-line, #d6dbe6); border-radius: 14px; }
.bx-empty .i { width: 40px; height: 40px; opacity: .55; }
.bx-empty p { max-width: 520px; margin: 8px auto 16px; }
.bx-table td.num, .bx-table th.num { text-align: right; }
.bx-table tr.bx-zero td { background: rgba(214, 79, 106, .07); }
.bx-table tr.bx-low td { background: rgba(250, 135, 0, .07); }
.bx-acts { white-space: nowrap; text-align: right; }
.bx-acts .mx-mini { margin-left: 4px; }
.bx-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #e9edf5; color: #34405a; vertical-align: middle; }
.bx-tag.bad { background: #fde3e8; color: #a3223c; }
.bx-tag.warn { background: #fff0dc; color: #9a5200; }
.bx-rules-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; justify-content: space-between; margin: 6px 0 14px; }
.bx-rules-head p { flex: 1 1 320px; margin: 0; }
.bx-add { display: flex; gap: 8px; flex: 1 1 320px; }
.bx-add input { flex: 1; min-width: 0; }
.bx-rule-list { display: grid; gap: 12px; }
.bx-rule { border: 1px solid var(--qg-line, #d6dbe6); border-radius: 12px; padding: 12px 14px; background: var(--qg-card, #fff); }
.bx-rule-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bx-rule-item .mx-mini { margin-left: auto; }
.bx-opts { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.bx-opts li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 10px; border-radius: 10px; background: rgba(13, 27, 62, .04); border-left: 3px solid #fa8700; }
.bx-opts li + li { border-left-color: #9aa6bf; }
.bx-ord { font-size: 12px; color: #6b7790; min-width: 150px; }
.bx-fits { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.bx-fits input { width: 70px; padding: 4px 6px; }
.bx-oacts { margin-left: auto; display: inline-flex; gap: 4px; }
.bx-optadd select { max-width: 100%; }
.bx-save { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.bx-help h3 { margin: 16px 0 4px; font-size: 15px; }
.bx-help p { margin: 0; max-width: 720px; }
/* Tela de saída */
.bx-exit-bar { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(250, 135, 0, .07); border: 1px solid rgba(250, 135, 0, .25); }
.bx-exit-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.bx-preview { margin-top: 8px; font-size: 14px; line-height: 1.8; }
.bx-preview:empty { display: none; }
.bx-chip { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #e7f6ee; color: #11683f; margin-right: 4px; }
.bx-chip.warn { background: #fff0dc; color: #8a4a00; }
.bx-chip.bad { background: #fde3e8; color: #a3223c; }
.bx-line { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; font-size: 13px; color: #5c6880; }
.bx-line label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bx-gtag { color: var(--bx-c, #fa8700); font-weight: 600; }
.operation-line.bx-grouped { box-shadow: inset 4px 0 0 var(--bx-c, #fa8700); border-radius: 10px; }
@media (max-width: 640px) { .bx-ord { min-width: 0; width: 100%; } .bx-add { flex-direction: column; } }

/* ===== Terceirização por lotes (igual nos três sistemas) ===== */
.tz-lot h3 { margin: 4px 0 8px; }
.tz-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tz-code { font-weight: 800; font-size: 12px; color: var(--qg-navy, #0d1b3e); background: var(--qg-surface-2, #f3f5fb); border: 1px solid var(--qg-border, #e8ecf4); border-radius: 6px; padding: 3px 8px; letter-spacing: .5px; }
.tz-warn-badge { font-size: 11px; font-weight: 700; color: #fff; background: var(--qg-danger, #dc2626); border-radius: 999px; padding: 2px 8px; }
.tz-where { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--qg-text-2, #3d4a5c); margin-bottom: 10px; }
.tz-dot { width: 9px; height: 9px; border-radius: 50%; background: #2563eb; }
.tz-where.sent .tz-dot { background: #23936b; box-shadow: 0 0 0 3px rgba(35,147,107,.18); }
.tz-where.returned .tz-dot { background: #d5a623; }
.tz-where.confirmed .tz-dot { background: var(--qg-text-3, #9aa3b5); }
.tz-rel { margin: -4px 0 8px; }
.tz-route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 10px; font-size: 12px; }
.tz-route i { color: var(--qg-text-3, #9aa3b5); font-style: normal; }
.tz-step { padding: 3px 8px; border-radius: 999px; border: 1px solid var(--qg-border, #e8ecf4); color: var(--qg-text-3, #9aa3b5); }
.tz-step.done { background: #e7f6ef; border-color: #bfe6d3; color: #1f7a57; }
.tz-step.now { background: var(--qg-orange, #fa8700); border-color: var(--qg-orange, #fa8700); color: #fff; font-weight: 700; }
.tz-step.next { border-color: var(--qg-orange, #fa8700); color: var(--qg-orange-dark, #d97000); font-weight: 700; }
.tz-items { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.tz-items th { text-align: left; font-size: 11px; color: var(--qg-text-3, #9aa3b5); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--qg-border, #e8ecf4); }
.tz-items td { padding: 6px; border-bottom: 1px solid #f1f3f8; vertical-align: top; }
.tz-items td small { display: block; font-size: 11px; color: var(--qg-text-3, #9aa3b5); }
.tz-items td:not(:first-child), .tz-items th:not(:first-child) { text-align: right; white-space: nowrap; }
.tz-diff { color: var(--qg-danger, #dc2626); font-weight: 700; }
.tz-prev { text-decoration: line-through; }
.tz-bad { color: var(--qg-danger, #dc2626) !important; font-weight: 600; }
.tz-ok { color: var(--qg-ok, #16a34a); font-weight: 600; }
.tz-info { color: var(--qg-info, #2563eb); font-weight: 600; }
.tz-timeline { margin: 6px 0 10px; font-size: 13px; }
.tz-timeline summary { cursor: pointer; font-weight: 700; color: var(--qg-text-2, #3d4a5c); }
.tz-timeline summary span { background: var(--qg-surface-2, #f3f5fb); border-radius: 999px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.tz-timeline ol { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--qg-border, #e8ecf4); display: grid; gap: 8px; }
.tz-ev { position: relative; display: grid; gap: 1px; }
.tz-ev::before { content: ""; position: absolute; left: -18px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--qg-text-3, #9aa3b5); }
.tz-ev.send::before { border-color: #23936b; } .tz-ev.return::before { border-color: #d5a623; } .tz-ev.confirm::before { border-color: #2563eb; background: #2563eb; } .tz-ev.entry::before { border-color: var(--qg-orange, #fa8700); }
.tz-ev.inherited { opacity: .6; }
.tz-ev span, .tz-ev small { font-size: 12px; color: var(--qg-text-3, #9aa3b5); }
.tz-dest-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.tz-dest-chip { border: 1px solid #bfe6d3; background: #e7f6ef; color: #1f7a57; border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.tz-dest-chip b { margin-left: 4px; }
.warning-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tz-rows { display: grid; gap: 10px; }
.tz-row, .tz-ret { border: 1px solid var(--qg-border, #e8ecf4); border-radius: 10px; padding: 10px; background: var(--qg-surface, #fff); }
.tz-row-main { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(80px, 1fr) minmax(80px, 1fr) auto auto; gap: 8px; align-items: end; }
.tz-ret .tz-row-main { grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) auto; }
.tz-calc-btn { min-width: 42px; height: 40px; font-size: 18px; padding: 0 10px; }
.tz-row .remove-out-line { height: 40px; }
.tz-calc { margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--qg-tint, #fff4e6); border: 1px dashed var(--qg-orange, #fa8700); }
.tz-calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tz-calc-out { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.tz-ret-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tz-ret-head span { font-size: 12px; color: var(--qg-text-3, #9aa3b5); }
.tz-ret-diff { min-height: 18px; font-size: 12px; margin-top: 6px; display: flex; gap: 10px; }
.tz-ret-checks { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.tz-ret-list { display: grid; gap: 10px; }
.tz-partial { background: #eef4ff; border-radius: 8px; padding: 10px; }
.tz-gear-form h3 { margin: 14px 0 0; font-size: 15px; }
.tz-dest-row, .tz-route-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--qg-border, #e8ecf4); border-radius: 8px; margin-bottom: 8px; }
.tz-dest-row .tz-d-name { flex: 2 1 160px; } .tz-dest-row .tz-d-serv { flex: 1 1 120px; } .tz-dest-row select { flex: 1 1 200px; }
.tz-d-tolw { display: inline-flex; align-items: center; gap: 4px; } .tz-d-tolw input { width: 70px; }
.tz-d-act { display: inline-flex !important; align-items: center; gap: 5px; font-size: 12px; }
.tz-route-row .tz-r-name { flex: 1 1 180px; }
.tz-r-steps { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; flex: 3 1 300px; }
.tz-r-steps i { font-style: normal; color: var(--qg-text-3, #9aa3b5); }
@media (max-width: 640px) {
  .tz-row-main { grid-template-columns: 1fr 1fr auto auto; }
  .tz-row-main .tz-name { grid-column: 1 / -1; }
  .tz-ret .tz-row-main { grid-template-columns: 1fr 1fr auto; }
  .tz-calc-grid { grid-template-columns: 1fr 1fr; }
  .tz-calc-grid label:last-child { grid-column: 1 / -1; }
}
.tz-ret [hidden], .tz-row [hidden], #tzNewDest[hidden], .tz-d-tolw[hidden] { display: none !important; }
.tz-ret-checks .return-check { display: inline-flex !important; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--qg-border, #e8ecf4); border-radius: 6px; cursor: pointer; }
.tz-ret-checks .return-check input { width: 18px; height: 18px; margin: 0; }
.outsourcing-head-actions { flex-wrap: wrap; } .outsourcing-head-actions button { white-space: nowrap; }
.tz-partial { display: flex !important; align-items: center; gap: 9px; }
.tz-partial input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
@media (max-width: 640px) {
  .tz-row { position: relative; padding-top: 12px; }
  .tz-row .remove-out-line { position: absolute; top: 4px; right: 6px; height: 28px; width: 28px; padding: 0; }
  .tz-row .tz-name { padding-right: 30px; }
  .tz-row-main { grid-template-columns: 1fr 1fr auto; }
}
