* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f7f3;
  color: #17211b;
  font-family: Arial, Helvetica, sans-serif;
}

.topbar {
  align-items: center;
  background: #1f4e3d;
  border-bottom: 4px solid #86a96f;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

nav {
  align-items: center;
  display: flex;
  gap: 14px;
}

nav a,
nav button,
.button-link,
.back,
.side-back {
  background: #e2f0d9;
  border: 1px solid #b7c9aa;
  color: #244b33;
  cursor: pointer;
  font: 700 14px Arial, Helvetica, sans-serif;
  padding: 8px 12px;
  text-decoration: none;
}

.side-back {
  align-items: center;
  background: #1f4e3d;
  border-color: #163a2d;
  color: #fff;
  display: flex;
  font-size: 20px;
  justify-content: center;
  left: 12px;
  min-height: 54px;
  min-width: 96px;
  padding: 15px 18px;
  position: fixed;
  top: 82px;
  z-index: 20;
}

.side-back:hover {
  background: #285f49;
}

nav form {
  margin: 0;
}

main {
  margin: 0 auto;
  max-width: 1220px;
  padding: 24px;
}

.hero {
  background: #ffffff;
  border: 1px solid #d7e2d2;
  border-left: 8px solid #1f4e3d;
  margin-bottom: 18px;
  padding: 22px 24px;
}

.hero.compact {
  padding: 16px 20px;
}

.home-hero {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e2d2;
  display: grid;
  gap: 26px;
  grid-template-columns: 300px 1fr;
  margin-bottom: 18px;
  min-height: 250px;
  padding: 24px;
}

.logo-mark {
  display: block;
  max-height: 240px;
  max-width: 100%;
  object-fit: contain;
}

.home-copy h1 {
  color: #1f4e3d;
  font-size: 34px;
}

.home-copy p {
  color: #4f5d51;
  font-size: 16px;
}

.actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.action-card {
  align-items: center;
  background: #1f4e3d;
  border: 3px solid #143629;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 118px;
  padding: 20px 22px;
  position: relative;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.action-card:hover {
  background: #285f49;
  box-shadow: 0 8px 18px rgba(25, 61, 46, 0.22);
  transform: translateY(-1px);
}

.action-card:active {
  box-shadow: 0 3px 8px rgba(25, 61, 46, 0.2);
  transform: translateY(0);
}

.action-card::after {
  background: #e2f0d9;
  border: 1px solid #b7c9aa;
  bottom: 12px;
  color: #244b33;
  content: "CLIC PARA ABRIR";
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 1;
  padding: 4px 8px;
  position: absolute;
  right: 50%;
  text-transform: uppercase;
  transform: translateX(50%);
  white-space: nowrap;
}

.action-card strong,
.action-card span {
  display: block;
}

.action-card strong {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
}

.action-card span {
  color: #e7f0e6;
  line-height: 1.35;
  margin-bottom: 22px;
  max-width: 92%;
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

h2 {
  font-size: 20px;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
}

.metrics div,
.panel {
  background: #fff;
  border: 1px solid #d7e2d2;
}

.metrics div {
  padding: 14px;
}

.metrics span {
  color: #637064;
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.metrics strong {
  font-size: 22px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.week-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.week-card {
  background: #ffffff;
  border: 2px solid #cbd8c5;
  color: #17211b;
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
}

.week-card:hover {
  border-color: #1f4e3d;
  box-shadow: 0 6px 16px rgba(25, 61, 46, 0.16);
}

.week-card strong {
  color: #1f4e3d;
  font-size: 22px;
}

.week-card span {
  color: #5a665b;
  font-size: 13px;
}

.week-card em {
  background: #e2f0d9;
  color: #244b33;
  font-style: normal;
  font-weight: 700;
  padding: 5px 8px;
}

.lot-card {
  background: #fff;
  border: 1px solid #d7e2d2;
  color: inherit;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  text-decoration: none;
}

.lot-card:hover {
  border-color: #86a96f;
  box-shadow: 0 4px 16px rgba(25, 61, 46, 0.12);
}

.lot-number {
  color: #1f4e3d;
  font-size: 19px;
  font-weight: 700;
}

.panel {
  overflow: auto;
  padding: 18px;
}

.inline-form {
  margin-top: 12px;
}

.inline-form button,
.purchase-filters button {
  background: #1f4e3d;
  border: 1px solid #1f4e3d;
  color: #fff;
  cursor: pointer;
  font: 700 14px Arial, Helvetica, sans-serif;
  min-height: 38px;
  padding: 8px 12px;
}

.purchase-shell {
  display: grid;
  gap: 16px;
}

.purchase-filters {
  align-items: end;
  background: #fff;
  border: 1px solid #d7e2d2;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.purchase-filters label,
.purchase-toolbar label {
  color: #47594c;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 5px;
  min-width: 170px;
}

.purchase-filters input,
.purchase-filters select,
.purchase-toolbar select {
  border: 1px solid #b7c9aa;
  border-radius: 6px;
  color: #17211b;
  font: 14px Arial, Helvetica, sans-serif;
  min-height: 38px;
  padding: 7px 9px;
  width: 100%;
}

.purchase-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.purchase-metrics div,
.purchase-panel {
  background: #fff;
  border: 1px solid #d7e2d2;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(23, 33, 27, 0.06);
}

.purchase-metrics div {
  padding: 15px;
}

.purchase-metrics span {
  color: #637064;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.purchase-metrics strong {
  color: #17211b;
  display: block;
  font-size: 23px;
}

.purchase-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-panel {
  overflow: hidden;
  padding: 16px;
}

.purchase-panel h2 {
  color: #17211b;
  font-size: 18px;
  margin-bottom: 10px;
}

.purchase-panel canvas {
  display: block;
  height: 290px;
  width: 100%;
}

.purchase-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.purchase-table-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.purchase-table-head span {
  color: #637064;
  font-size: 13px;
}

.purchase-table-wrap {
  max-height: 520px;
  overflow: auto;
}

.purchase-table {
  min-width: 980px;
}

.purchase-table th {
  background: #edf5ea;
  position: sticky;
  top: 0;
  z-index: 1;
}

.purchase-table .num {
  text-align: right;
}

.form-shell {
  background: #fff;
  border: 1px solid #d7e2d2;
  max-width: 720px;
  padding: 20px;
}

.form-shell.wide {
  max-width: 1120px;
}

.lot-form {
  display: grid;
  gap: 14px;
}

.lot-form label,
.cedula-form label {
  color: #344238;
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.lot-form input,
.cedula-form input,
.cedula-form select,
.cedula-form textarea {
  border: 1px solid #b7c9aa;
  color: #17211b;
  font: 16px Arial, Helvetica, sans-serif;
  padding: 10px 12px;
  width: 100%;
}

.lot-form input:disabled {
  background: #f1f4ef;
  color: #69746c;
}

.cedula-form input:disabled,
.cedula-form .inactive-field {
  background: #eef1ec;
  color: #8a948b;
  cursor: not-allowed;
}

.lot-form button {
  background: #1f4e3d;
  border: 1px solid #1f4e3d;
  color: #fff;
  cursor: pointer;
  font: 700 15px Arial, Helvetica, sans-serif;
  padding: 12px 14px;
  width: fit-content;
}

.cedula-form {
  display: grid;
  gap: 14px;
}

.product-picker {
  border: 1px solid #d7e2d2;
  background: #f8fbf6;
  padding: 12px;
}

.product-picker summary {
  color: #1f4e3d;
  cursor: pointer;
  font-weight: 700;
}

.picker-panel {
  margin-top: 12px;
  max-height: 360px;
  overflow: auto;
}

.picker-panel table {
  background: #fff;
}

.picker-panel th:first-child,
.picker-panel td:first-child {
  text-align: center;
  width: 72px;
}

.picker-panel input[type="checkbox"] {
  height: 16px;
  width: 16px;
}

.secondary-action {
  background: #ffffff;
  border: 1px solid #1f4e3d;
  color: #1f4e3d;
  cursor: pointer;
  font: 700 13px Arial, Helvetica, sans-serif;
  margin-top: 10px;
  padding: 8px 10px;
}

.secondary-action:hover {
  background: #e9f3ec;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row button,
.button-link.small {
  background: #1f4e3d;
  border: 1px solid #1f4e3d;
  color: #fff;
  cursor: pointer;
  font: 700 13px Arial, Helvetica, sans-serif;
  padding: 8px 10px;
  text-decoration: none;
}

.confirm-panel {
  display: grid;
  gap: 14px;
}

.confirm-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.confirm-summary div {
  background: #f8fbf6;
  border: 1px solid #d7e2d2;
  padding: 10px;
}

.confirm-summary span,
.confirm-meta span {
  color: #657066;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.confirm-summary strong {
  color: #17211b;
  display: block;
  overflow-wrap: anywhere;
}

.confirm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.confirm-instruction {
  background: #e8efe4;
  border-left: 5px solid #1f4e3d;
  color: #344238;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  padding: 11px 12px;
}

.confirm-table {
  min-width: 960px;
}

.confirm-table input {
  border: 1px solid #b7c9aa;
  color: #17211b;
  font: 14px Arial, Helvetica, sans-serif;
  padding: 8px 9px;
  width: 100%;
}

.confirm-table input[readonly] {
  background: #eef1ec;
  color: #59645d;
}

.dose-unit {
  color: #5f6f62;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.table-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.table-toolbar span {
  color: #5f6f62;
  font-size: 13px;
}

.table-toolbar button {
  background: #1f4e3d;
  border: 1px solid #1f4e3d;
  color: #fff;
  cursor: pointer;
  font: 700 13px Arial, Helvetica, sans-serif;
  padding: 9px 12px;
}

.week-selector {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.week-selector label {
  color: #344238;
  display: grid;
  font-weight: 700;
  gap: 6px;
  min-width: min(360px, 100%);
}

.week-selector select {
  border: 1px solid #b7c9aa;
  color: #17211b;
  font: 16px Arial, Helvetica, sans-serif;
  padding: 10px 12px;
  width: 100%;
}

.week-selector button {
  background: #1f4e3d;
  border: 1px solid #1f4e3d;
  color: #fff;
  cursor: pointer;
  font: 700 13px Arial, Helvetica, sans-serif;
  padding: 11px 14px;
}

.report-panel {
  margin-top: 14px;
}

.report-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.report-meta strong {
  color: #1f4e3d;
  font-size: 20px;
}

.report-meta span {
  color: #5f6f62;
  font-weight: 700;
}

.report-table th:nth-child(2),
.report-table td:nth-child(2) {
  text-align: right;
  width: 190px;
}

.report-table th:nth-child(3),
.report-table td:nth-child(3) {
  width: 42%;
}

.amount-cell {
  font-weight: 700;
}

.report-warning {
  background: #fff2cc;
  border: 1px solid #d6b656;
  color: #5f4700;
  margin-top: 14px;
  padding: 12px;
}

.report-warning ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.print-only {
  display: none;
}

.select-cell {
  text-align: center;
  width: 48px;
}

.select-cell input {
  height: 16px;
  width: 16px;
}

.activity-group {
  margin-top: 20px;
}

.activity-group:first-of-type {
  margin-top: 12px;
}

.activity-group-title {
  align-items: center;
  border-bottom: 1px solid #d7e2d2;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.activity-group-title h2 {
  color: #1f4e3d;
  font-size: 18px;
  margin: 0;
}

.activity-group-title span {
  color: #657066;
  font-size: 13px;
  font-weight: 700;
}

.cedula-cell {
  min-width: 118px;
}

.cedula-actions {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cedula-button {
  background: #1f4e3d;
  border: 1px solid #1f4e3d;
  color: #fff;
  display: inline-block;
  font: 700 13px Arial, Helvetica, sans-serif;
  line-height: 1;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.trace-link {
  background: #e8efe4;
  border: 1px solid #b7c9aa;
  color: #1f4e3d;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  text-decoration: none;
  white-space: nowrap;
}

.trace-link:hover {
  background: #dce9d5;
}

.cedula-state {
  color: #35643f;
  font-size: 12px;
  font-weight: 700;
}

.cedula-state.pending {
  color: #7f6000;
}

.cedula-state.printed {
  color: #1f4e78;
}

.cedula-state.neutral,
.muted-cell {
  color: #748075;
  font-size: 12px;
  font-weight: 700;
}

.apply-form {
  margin: 0;
}

.status-checks {
  justify-items: center;
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.apply-form-label {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.apply-form-label input[type="checkbox"] {
  accent-color: #1f4e3d;
  height: 16px;
  margin: 0;
  width: 16px;
}

.applied-date-control {
  display: grid;
  gap: 5px;
  justify-items: center;
  margin-top: 2px;
}

.applied-date-control span {
  color: #657066;
  font-size: 11px;
  font-weight: 700;
}

.applied-date-control input {
  border: 1px solid #b7c9aa;
  color: #17211b;
  font: 12px Arial, Helvetica, sans-serif;
  padding: 5px 6px;
  width: 138px;
}

.applied-date-control button {
  background: #e8efe4;
  border: 1px solid #b7c9aa;
  color: #1f4e3d;
  cursor: pointer;
  font: 700 12px Arial, Helvetica, sans-serif;
  padding: 5px 8px;
  width: fit-content;
}

.hidden-apply-form {
  display: none;
}

.check-row {
  align-items: center;
  display: flex !important;
  grid-template-columns: none;
}

.check-row input {
  width: auto;
}

.check-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.form-note {
  color: #657066;
  font-size: 13px;
  margin: 14px 0 0;
}

.alert {
  background: #f4cccc;
  border: 1px solid #d99a9a;
  color: #7a1f1f;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.alert.ok {
  background: #d9ead3;
  border-color: #9dc38d;
  color: #274e13;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background: #1f4e78;
  color: #fff;
  text-align: left;
}

td,
th {
  border: 1px solid #cbd8c5;
  padding: 9px 10px;
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background: #f8fbf6;
}

.work-table {
  min-width: 1120px;
  table-layout: fixed;
}

.work-table .col-lot {
  width: 8%;
}

.work-table .col-date {
  width: 11%;
}

.work-table .col-activity {
  width: 18%;
}

.work-table .col-status {
  width: 18%;
}

.work-table .col-products {
  width: 23%;
}

.work-table .col-cedula {
  width: 12%;
}

.work-table .col-select {
  width: 10%;
}

.work-table th,
.work-table td {
  text-align: center;
  vertical-align: middle;
  word-break: normal;
}

.work-table td:nth-child(3) {
  font-weight: 700;
}

.product-list {
  display: grid;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.product-head,
.product-row {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 78px;
  text-align: left;
}

.product-head {
  color: #5f6f62;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-row {
  border-top: 1px solid #e4ece0;
  font-size: 13px;
  padding-top: 4px;
}

.product-row span,
.product-head span {
  overflow-wrap: anywhere;
}

.product-head span:last-child,
.product-row span:last-child {
  text-align: right;
}

.status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 7px;
}

.status.done {
  background: #d9ead3;
  color: #274e13;
}

.status.pending {
  background: #fff2cc;
  color: #7f6000;
}

.status.late {
  background: #f4cccc;
  color: #7a1f1f;
}

pre {
  white-space: pre-wrap;
}

.platano-body {
  background: #f4f6f3;
  color: #14221a;
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  margin: 0;
}

.platano-app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  margin: 0;
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

.platano-sidebar {
  background: #123b2a;
  color: #fff;
  padding: 18px 14px;
}

.platano-brand {
  align-items: center;
  color: #fff;
  display: grid;
  font-size: 17px;
  font-weight: 750;
  gap: 10px;
  grid-template-columns: 52px 1fr;
  margin: 4px 6px 24px;
  text-decoration: none;
}

.platano-brand img {
  background: #fff;
  border-radius: 8px;
  height: 52px;
  object-fit: contain;
  padding: 4px;
  width: 52px;
}

.platano-brand small {
  color: #b9d5c3;
  font-size: 12px;
  font-weight: 700;
}

.platano-nav {
  display: grid;
  gap: 6px;
}

.platano-nav a {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #cfe4d6;
  display: flex;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 12px;
  text-decoration: none;
}

.platano-nav a:hover {
  background: #1a5139;
}

.platano-nav a.active {
  background: #2f8f5b;
  color: #fff;
}

.platano-import {
  border-top: 1px solid rgba(207, 228, 214, 0.18);
  margin: 18px 6px 0;
  padding-top: 14px;
}

.platano-import button {
  background: #e7f4ea;
  border: 1px solid #b9d5c3;
  border-radius: 8px;
  color: #123b2a;
  cursor: pointer;
  font: 700 13px Inter, "Segoe UI", Arial, sans-serif;
  min-height: 40px;
  padding: 8px 12px;
  width: 100%;
}

.platano-content {
  padding: 24px;
}

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

.platano-header h1 {
  font-size: 30px;
  margin-bottom: 4px;
}

.platano-header p {
  color: #647267;
  margin-bottom: 0;
}

.platano-content .inline-form {
  margin-top: 0;
}

.platano-content .inline-form button,
.platano-content .purchase-filters button {
  border-radius: 8px;
  min-height: 40px;
}

.platano-content .purchase-filters {
  border-color: #dde7dc;
  box-shadow: 0 1px 2px rgba(20, 34, 26, 0.06);
  margin-bottom: 0;
}

.platano-content .purchase-metrics div,
.platano-content .purchase-panel {
  border-color: #dde7dc;
  box-shadow: 0 1px 2px rgba(20, 34, 26, 0.06);
}

.platano-content .purchase-panel,
.platano-content .purchase-metrics div,
.platano-content .purchase-filters {
  border-radius: 8px;
}

.platano-content .side-back {
  display: none;
}

.platano-content .home-hero,
.platano-content .hero,
.platano-content .panel,
.platano-content .form-shell {
  border-color: #dde7dc;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 34, 26, 0.06);
}

.platano-content .home-hero {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdf9 100%);
  grid-template-columns: 120px 1fr;
  min-height: 0;
  padding: 26px;
}

.platano-content .logo-mark {
  max-height: 120px;
}

.platano-content .home-copy h1 {
  color: #163525;
}

.platano-content .home-copy p {
  color: #5c6b60;
}

.platano-content .actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platano-content .action-card {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #dce8dc;
  border-radius: 8px;
  color: #14221a;
  justify-content: flex-start;
  min-height: 132px;
  overflow: hidden;
  padding: 18px 18px 46px;
  text-align: left;
}

.platano-content .action-card:hover {
  background: #fbfdf9;
  border-color: #91bd9d;
  box-shadow: 0 8px 20px rgba(20, 58, 36, 0.1);
}

.platano-content .action-card strong {
  color: #143524;
  font-size: 17px;
  margin-bottom: 8px;
  text-align: left;
}

.platano-content .action-card span {
  color: #5f6d62;
  margin-bottom: 0;
  max-width: none;
  text-align: left;
}

.platano-content .action-card::after {
  background: #2f7d4d;
  border: 0;
  border-radius: 0;
  bottom: 0;
  color: #ffffff;
  content: "";
  height: 5px;
  left: 0;
  padding: 0;
  right: 0;
  transform: none;
  width: 100%;
}

.platano-content .action-card.sync-card {
  background: #f8fbf3;
  border-color: #cadfbd;
}

.platano-content .action-card.sync-card::after {
  background: #86a63a;
}

.platano-content .metrics div {
  background: #ffffff;
  border-color: #dde7dc;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 34, 26, 0.06);
}

@media (max-width: 900px) {
  .metrics,
  .grid,
  .week-grid,
  .home-hero,
  .actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  nav {
    flex-wrap: wrap;
  }

  .confirm-summary {
    grid-template-columns: 1fr;
  }

  .platano-app {
    grid-template-columns: 1fr;
  }

  .platano-sidebar {
    padding: 12px;
  }

  .platano-brand {
    margin-bottom: 12px;
  }

  .platano-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .platano-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .platano-content {
    padding: 14px;
  }

  .platano-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar,
  .no-print,
  .side-back {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .hero,
  .panel {
    border: 0;
    margin: 0;
    padding: 0;
  }

  .report-header {
    display: none;
  }

  .report-panel {
    overflow: visible;
  }

  .print-only {
    display: block;
  }

  .print-title {
    border-bottom: 2px solid #000;
    margin-bottom: 18px;
    padding-bottom: 10px;
  }

  .print-title h1 {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .report-meta {
    border-bottom: 1px solid #000;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  th {
    background: #e6e6e6 !important;
    color: #000;
  }

  td,
  th {
    border-color: #000;
  }
}

/* Responsive confirmation table for mobile phones */
@media (max-width: 600px) {
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .topbar {
    padding: 12px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: auto !important;
  }

  .brand {
    font-size: 15px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: block !important;
    width: 100% !important;
  }

  main {
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero.compact {
    padding: 14px !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .hero.compact h1 {
    font-size: 20px !important;
  }

  .hero.compact p {
    font-size: 13px !important;
    margin-top: 4px !important;
    color: #4a5568 !important;
  }

  .panel.confirm-panel {
    padding: 16px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  }

  .confirm-summary {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .confirm-summary div {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    background: #f7fafc !important;
    border: 1px solid #edf2f7 !important;
  }

  .confirm-summary span {
    font-size: 11px !important;
    color: #718096 !important;
    margin-bottom: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  .confirm-summary strong {
    font-size: 13px !important;
    color: #2d3748 !important;
    text-align: right !important;
  }

  .confirm-instruction {
    background: #fffaf0 !important;
    border-left: 4px solid #dd6b20 !important;
    color: #7b341e !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    padding: 12px !important;
    border-radius: 0 6px 6px 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .confirm-form {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 16px !important;
  }

  .confirm-table {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
  }

  .confirm-table, 
  .confirm-table thead, 
  .confirm-table tbody, 
  .confirm-table th, 
  .confirm-table td, 
  .confirm-table tr {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .confirm-table thead {
    display: none !important;
  }

  .confirm-table tr {
    margin-bottom: 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
    width: 100% !important;
  }

  .confirm-table tr:last-child {
    margin-bottom: 0 !important;
  }

  .confirm-table td {
    text-align: left !important;
    padding: 8px 0 !important;
    border: none !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .confirm-table td:not(:last-child) {
    border-bottom: 1px dashed #edf2f7 !important;
  }

  .confirm-table td::before {
    content: attr(data-label) !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #a0aec0 !important;
    display: block !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
  }

  .confirm-table td input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-top: 2px !important;
    padding: 10px !important;
    font-size: 14px !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 6px !important;
    background: #f7fafc !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
  }

  .confirm-table td input:focus {
    border-color: #319795 !important;
    box-shadow: 0 0 0 3px rgba(49, 151, 149, 0.15) !important;
    outline: none !important;
  }

  .confirm-table td input[readonly] {
    background: #edf2f7 !important;
    color: #4a5568 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
  }

  .confirm-table td .dose-unit {
    display: inline-block !important;
    margin-top: 2px !important;
    font-size: 12px !important;
    color: #718096 !important;
    font-weight: 700 !important;
  }

  .button-row {
    width: 100% !important;
    margin-top: 8px !important;
  }

  .button-row button {
    width: 100% !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: #1f4e3d !important;
    color: #ffffff !important;
    border: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 6px rgba(31, 78, 61, 0.2) !important;
    transition: background-color 0.2s, transform 0.1s !important;
  }

  .button-row button:active {
    transform: scale(0.98) !important;
  }
}

@media (max-width: 900px) {
  .purchase-grid,
  .purchase-metrics {
    grid-template-columns: 1fr;
  }

  .purchase-filters,
  .purchase-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .purchase-filters label,
  .purchase-toolbar label {
    min-width: 0;
  }

  .purchase-panel {
    padding: 12px;
  }

  .purchase-panel canvas {
    height: 300px;
  }

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

.login-body {
  align-items: center;
  background: #f3f7f1;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-shell {
  margin: 0;
  max-width: none;
  padding: 0;
  width: min(420px, 100%);
}

.login-card {
  background: #ffffff;
  border: 1px solid #dce8dc;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(20, 58, 36, 0.12);
  padding: 30px;
}

.login-card img {
  display: block;
  height: 72px;
  margin-bottom: 18px;
  object-fit: contain;
  width: 72px;
}

.login-card h1 {
  color: #163525;
  font-size: 26px;
  margin-bottom: 6px;
}

.login-card p {
  color: #5f6d62;
  margin-bottom: 24px;
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-card label {
  color: #34483a;
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  border: 1px solid #cfdccf;
  border-radius: 8px;
  font-size: 16px;
  padding: 12px 13px;
}

.login-card input:focus {
  border-color: #2f7d4d;
  box-shadow: 0 0 0 3px rgba(47, 125, 77, 0.14);
  outline: none;
}

.login-card button {
  background: #1f6845;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  margin-top: 8px;
  padding: 13px 16px;
}

.login-card button:hover {
  background: #185539;
}

.login-error {
  background: #fff4f2;
  border: 1px solid #f1c7bf;
  border-radius: 8px;
  color: #9b2f1d;
  font-size: 14px;
  margin-bottom: 16px;
  padding: 11px 12px;
}
