:root {
  --background-color: #fafcfa;
  --surface-color: #ffffff;
  --surface-soft-color: #f3f7f3;
  --text-color: #000000;
  --muted-text-color: #5d665d;
  --line-color: #dfe7df;
  --accent-color: #1565c0;
  --accent-dark-color: #0d47a1;
  --success-color: #207044;
  --warning-color: #986600;
  --error-color: #c62828;
  --shadow-color: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--background-color);
  color: var(--text-color);
  font-family: Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button {
  background: var(--accent-color);
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.72rem 1rem;
  transition: background 0.18s ease, transform 0.18s ease;
}

button:hover {
  background: var(--accent-dark-color);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.secondary-button {
  background: #eef3ee;
  border: 1px solid var(--line-color);
  color: var(--text-color);
}

.secondary-button:hover {
  background: #e1eae1;
}

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

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

.cash-register-close-button {
  background: #23864f;
}

.cash-register-close-button:hover {
  background: #1d6d40;
}

.compact-button {
  border-radius: 8px;
  font-size: 0.88rem;
  padding: 0.46rem 0.72rem;
}

.login-page {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  place-items: center;
}

.login-card {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 24px;
  box-shadow: 0 18px 45px var(--shadow-color);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 980px;
  overflow: hidden;
  width: 100%;
}

.login-copy {
  background: linear-gradient(135deg, #f5faf5 0%, #e9f2e9 100%);
  padding: 3rem;
}

.login-copy h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  margin: 0 0 1rem;
}

.login-copy p {
  color: var(--muted-text-color);
  max-width: 36rem;
}

.login-form {
  display: grid;
  gap: 1rem;
  padding: 3rem;
}

.login-form label,
.backoffice-form label {
  color: var(--muted-text-color);
  display: grid;
  font-size: 0.92rem;
  gap: 0.4rem;
}

.login-form input,
.backoffice-form input,
.backoffice-form select,
.inline-form input,
.inline-form select,
.table-number-input,
.search-toolbar input {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 10px;
  color: var(--text-color);
  min-height: 42px;
  padding: 0.68rem 0.78rem;
  width: 100%;
}

.login-form input:focus,
.backoffice-form input:focus,
.backoffice-form select:focus,
.inline-form input:focus,
.inline-form select:focus,
.search-toolbar input:focus,
.table-number-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
  outline: none;
}

.form-feedback,
.muted-text,
.workspace-kicker {
  color: var(--muted-text-color);
}

.form-feedback.error,
.notification-message.error,
.amount-negative {
  color: var(--error-color);
}

.form-feedback.neutral {
  color: var(--accent-color);
}

.amount-positive {
  color: var(--accent-color);
}

.amount-neutral {
  color: var(--text-color);
}

.backoffice-shell {
  min-height: 100vh;
}

.top-navigation-header {
  align-items: center;
  background: var(--surface-color);
  border-bottom: 1px solid var(--line-color);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 76px;
  padding: 0.85rem 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-navigation-brand-panel {
  display: grid;
  gap: 0.55rem;
}

.top-navigation-brand,
.top-navigation-session {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.top-navigation-brand small,
.top-navigation-session small {
  color: var(--muted-text-color);
  display: block;
  font-size: 0.78rem;
}

.brand-mark {
  align-items: center;
  background: var(--text-color);
  border-radius: 12px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.top-navigation-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  overflow: visible;
  padding: 0.2rem;
}

.top-navigation-menu a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-color);
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.48rem 0.74rem;
  text-decoration: none;
}

.top-navigation-dropdown {
  position: relative;
}

.top-navigation-dropdown-button {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-color);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.48rem 0.74rem;
  text-decoration: none;
}

.top-navigation-dropdown.active .top-navigation-dropdown-button,
.top-navigation-dropdown.open .top-navigation-dropdown-button,
.top-navigation-dropdown-button:hover {
  background: var(--surface-soft-color);
  color: var(--text-color);
  transform: none;
}

.top-navigation-dropdown-menu {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  box-shadow: 0 12px 24px var(--shadow-color);
  display: none;
  min-width: 150px;
  padding: 0.35rem;
  position: absolute;
  top: calc(100% + 0.35rem);
  z-index: 30;
}

.top-navigation-dropdown.open .top-navigation-dropdown-menu {
  display: grid;
}

.top-navigation-dropdown-menu a {
  border-radius: 8px;
  font-size: 0.88rem;
  padding: 0.52rem 0.65rem;
}

.top-navigation-menu a.active {
  background: var(--accent-color);
  color: #ffffff;
}

.top-navigation-menu a:hover:not(.active) {
  background: var(--surface-soft-color);
  border-color: var(--line-color);
}

.brand-action-button {
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 10px;
  color: var(--text-color);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.48rem 0.72rem;
  text-decoration: none;
  width: fit-content;
}

.brand-action-button:hover {
  background: #e5eee5;
}

.workspace-panel {
  padding: 1.2rem 20px 2rem;
}

.afip-certificate-alert {
  border-radius: 14px;
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
}

.afip-certificate-alert strong {
  font-size: 0.95rem;
}

.afip-certificate-alert span {
  line-height: 1.45;
}

.afip-certificate-alert-warning {
  background: #fff8e6;
  border: 1px solid #f0d28a;
  color: var(--warning-color);
}

.afip-certificate-alert-critical {
  background: rgba(198, 40, 40, 0.08);
  border: 1px solid rgba(198, 40, 40, 0.28);
  color: var(--error-color);
}

.workspace-title-row {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.workspace-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 0.28rem;
  text-transform: uppercase;
}

.workspace-title-row h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  margin: 0;
}

.screen-content {
  display: grid;
  gap: 1.1rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.metric-card,
.content-card,
.detail-card {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  padding: 1rem;
}

.metric-card {
  display: grid;
  gap: 0.38rem;
}

.metric-card span {
  color: var(--muted-text-color);
}

.metric-card strong {
  font-size: clamp(1.8rem, 4vw, 2.45rem);
}

.metric-card.accent {
  background: var(--text-color);
  color: #ffffff;
}

.metric-card.negative strong,
.metric-card.negative span {
  color: var(--error-color);
}

.split-screen {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}

.split-screen.wide-detail {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.75fr);
}

.sales-history-layout {
  align-items: start;
}

.sales-history-full-layout {
  width: 100%;
}

.sales-history-link-button {
  align-items: center;
  display: inline-flex;
  text-decoration: none;
}

.sales-history-filters-card {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  margin-bottom: 1rem;
  padding: 0.9rem;
}

.sales-history-filters-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.sales-history-receipt-filter {
  grid-column: span 2;
}

.sales-history-results-heading {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.sales-history-table {
  min-width: 1220px;
}

.sales-history-text-cell {
  max-width: 240px;
  min-width: 220px;
  white-space: normal;
}

.sales-history-actions {
  flex-wrap: wrap;
}

.sales-history-dialog-backdrop {
  align-items: flex-start;
  overflow: auto;
  padding-block: 2rem;
}

.sales-history-detail-dialog,
.sales-history-cancellation-dialog {
  max-width: 1120px;
  width: min(100%, 1120px);
}

.sales-history-cancellation-dialog {
  max-width: 980px;
}

.sales-history-detail-section {
  border: 1px solid var(--line-color);
  border-radius: 14px;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.sales-history-detail-section-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.sales-history-detail-section-header h4 {
  margin: 0;
}

.sales-history-detail-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sales-history-detail-row {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem;
}

.sales-history-cancellation-summary {
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid rgba(179, 38, 30, 0.18);
  border-radius: 12px;
  padding: 0.9rem;
}

.sales-history-cancellation-summary p {
  margin: 0.35rem 0 0;
}

.sales-history-detail-actions {
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

.sales-history-action-reason {
  color: #8c1d2b;
  font-size: 0.92rem;
  max-width: 28rem;
  text-align: right;
}

.billing-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  width: 100%;
}

.billing-layout .content-card {
  width: 100%;
}

.billing-entry-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.billing-entry-header h3 {
  margin: 0 0 0.2rem;
}

.billing-entry-table td,
.billing-entry-table th {
  vertical-align: top;
}

.billing-entry-table {
  min-width: 1040px;
  table-layout: fixed;
}

.billing-entry-code-column {
  width: 260px;
}

.billing-entry-description-column {
  width: auto;
}

.billing-entry-quantity-column,
.billing-entry-price-column,
.billing-entry-discount-column,
.billing-entry-total-column {
  width: 120px;
}

.billing-entry-code-header,
.billing-entry-code-value {
  white-space: nowrap;
}

.billing-entry-code-value {
  max-width: 0;
}

.billing-entry-code-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-entry-code-cell {
  position: relative;
}

.billing-entry-description-cell {
  min-width: 260px;
}

.billing-entry-product-code-input,
.billing-entry-quantity-input,
.billing-entry-price-input,
.billing-entry-discount-input {
  display: block;
  width: 100%;
}

.billing-entry-product-code-input {
  min-width: 15ch;
}

.billing-entry-total-value {
  align-items: center;
  display: flex;
  font-weight: 700;
  min-height: 42px;
  white-space: nowrap;
}

.billing-entry-total-value.empty {
  color: var(--muted-text-color);
  font-weight: 400;
}

.billing-entry-remove-button {
  margin-top: 0.45rem;
}

.billing-product-search-results {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  box-shadow: 0 12px 24px var(--shadow-color);
  display: grid;
  gap: 0.2rem;
  left: 0;
  margin-top: 0.35rem;
  max-height: 260px;
  max-width: calc(100vw - 2rem);
  min-width: min(42rem, calc(100vw - 2rem));
  overflow-y: auto;
  padding: 0.35rem;
  position: absolute;
  top: 100%;
  width: min(42rem, calc(100vw - 2rem));
  z-index: 20;
}

.billing-customer-search-block {
  position: relative;
}

.billing-customer-search-results {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  box-shadow: 0 12px 24px var(--shadow-color);
  display: grid;
  gap: 0.2rem;
  left: 0;
  margin-top: 0.35rem;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem;
  position: absolute;
  top: 100%;
  width: 100%;
  z-index: 20;
}

.billing-customer-search-empty-state {
  display: grid;
  gap: 0.35rem;
}

.billing-customer-search-result-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-color);
  display: grid;
  gap: 0.15rem;
  justify-items: start;
  padding: 0.45rem 0.65rem;
  text-align: left;
  width: 100%;
}

.billing-customer-search-result-button:hover {
  background: var(--surface-soft-color);
  border-color: var(--line-color);
}

.billing-customer-search-result-button strong,
.billing-customer-search-result-button small {
  width: 100%;
}

.billing-customer-dialog-backdrop {
  align-items: center;
  background: rgba(17, 24, 39, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.5rem;
  position: fixed;
  z-index: 60;
}

.billing-customer-dialog {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 18px;
  display: grid;
  gap: 1rem;
  max-height: calc(100vh - 3rem);
  max-width: 780px;
  overflow: auto;
  padding: 1.25rem;
  width: min(100%, 780px);
}

.billing-customer-dialog-header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.billing-customer-dialog-header h3 {
  margin: 0 0 0.25rem;
}

.billing-entry-panel {
  overflow: visible;
  position: relative;
  z-index: 4;
}

.billing-lines-panel {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
}

.billing-lines-panel-header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.billing-lines-panel-header h3 {
  margin: 0;
}

.billing-lines-table-wrapper {
  max-height: none;
  overflow: visible;
}

.billing-lines-table-wrapper.responsive-table-wrapper {
  overflow: visible;
}

.billing-product-search-result-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-color);
  display: grid;
  gap: 0.1rem;
  justify-items: start;
  padding: 0.45rem 0.65rem;
  text-align: left;
  width: 100%;
}

.billing-product-search-result-button:hover {
  background: var(--surface-soft-color);
  border-color: var(--line-color);
}

.billing-product-search-result-button strong {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.billing-product-search-result-button small {
  color: var(--muted-text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.billing-operation-feedback-row {
  margin-bottom: 1rem;
}

.billing-summary-panel {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.billing-summary-panel-heading h3 {
  margin: 0 0 0.2rem;
}

.billing-summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 260px) repeat(3, minmax(180px, 1fr));
}

.billing-discount-input-block {
  display: grid;
  gap: 0.4rem;
}

.billing-close-actions-panel {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.billing-close-actions-panel label {
  display: grid;
  gap: 0.4rem;
}

.billing-close-actions-row {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 260px) max-content minmax(220px, 1fr) auto auto;
}

.billing-close-actions-row .checkbox-inline {
  align-items: center;
  display: inline-flex;
  gap: 0.55rem;
}

.billing-close-actions-row .checkbox-inline input {
  min-height: auto;
  width: auto;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading h2,
.content-card h2,
.detail-card h2 {
  margin: 0;
}

.responsive-table-wrapper {
  overflow-x: auto;
}

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

.backoffice-table th {
  color: var(--muted-text-color);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.backoffice-table th,
.backoffice-table td {
  border-bottom: 1px solid var(--line-color);
  padding: 0.82rem 0.65rem;
  vertical-align: middle;
}

.backoffice-table tr:hover td {
  background: #fbfdfb;
}

.clickable-row {
  cursor: pointer;
}

.critical-row {
  background: rgba(198, 40, 40, 0.06);
}

.detail-code {
  color: var(--accent-color);
  font-weight: 800;
}

.detail-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

.detail-grid span {
  color: var(--muted-text-color);
}

.detail-grid strong {
  text-align: right;
}

.backoffice-form {
  display: grid;
  gap: 0.85rem;
}

.backoffice-form .checkbox-label {
  align-items: center;
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  gap: 0.55rem;
  padding: 0.62rem 0.72rem;
}

.checkbox-label input {
  accent-color: var(--accent-color);
  min-height: auto;
  width: auto;
}

.password-visibility-field {
  align-items: center;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-visibility-field button {
  min-height: 42px;
  white-space: nowrap;
}

.compact-form {
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 0.2rem;
}

.products-list-section-hidden,
.products-editor-section-hidden {
  display: none;
}

.products-editor-section {
  width: 100%;
}

.form-grid-two {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-two .checkbox-label {
  align-self: end;
}

.form-actions,
.inline-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.inline-form {
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  margin-bottom: 1rem;
  padding: 0.8rem;
}

.inline-form input,
.inline-form select {
  min-width: 190px;
  width: auto;
}

.billing-add-product-form {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(260px, 1.2fr) minmax(180px, 1.3fr) minmax(140px, 0.8fr) 120px 140px;
}

.billing-add-product-form input {
  width: 100%;
}

.billing-operation-workspace {
  display: grid;
  gap: 1rem;
  overflow: visible;
  width: 100%;
}

.billing-pending-operations-card,
.billing-detail-card {
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  overflow: visible;
  padding: 1rem;
}

.billing-detail-card h3,
.billing-pending-operations-card h3 {
  margin: 0 0 0.85rem;
}

.billing-draft-cell {
  align-items: center;
  background: #f7fbf7;
  border-radius: 10px;
  display: flex;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
}

.billing-draft-cell.empty {
  background: transparent;
  border: 1px dashed transparent;
  min-height: 42px;
  padding: 0;
}

.billing-draft-total-value {
  align-items: center;
  display: flex;
  min-height: 42px;
}

.billing-line-description-cell {
  display: grid;
  gap: 0.18rem;
}

.billing-line-description-cell button {
  width: fit-content;
}

.billing-line-description-cell small {
  color: var(--muted-text-color);
}

.billing-line-total-cell {
  display: grid;
  gap: 0.55rem;
}

.billing-line-secondary-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.billing-line-secondary-actions label {
  color: var(--muted-text-color);
  display: grid;
  font-size: 0.82rem;
  gap: 0.3rem;
}

.billing-line-secondary-actions .table-number-input {
  max-width: 130px;
}

.billing-discount-rule-note {
  color: rgba(255, 255, 255, 0.86);
  display: block;
  width: 100%;
}

.billing-closure-panel {
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  margin-top: 1rem;
  padding: 1rem;
}

.billing-closure-panel h3 {
  margin: 0 0 0.8rem;
}

.billing-total-panel {
  display: grid;
  gap: 0.18rem;
  text-align: right;
}

.billing-line-price-input {
  max-width: 140px;
}

.search-toolbar {
  align-items: center;
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
}

.search-toolbar input {
  flex: 1;
  min-width: 240px;
}

.search-toolbar small {
  color: var(--muted-text-color);
}

.search-field-wrapper {
  position: relative;
}

.inline-form .search-field-wrapper {
  flex: 1;
  min-width: min(420px, 100%);
}

.suggestions-panel {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  box-shadow: 0 16px 36px var(--shadow-color);
  display: grid;
  gap: 0.35rem;
  left: 0;
  max-height: 310px;
  overflow: auto;
  padding: 0.45rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 25;
}

.suggestions-panel.hidden {
  display: none;
}

.suggestion-option {
  background: transparent;
  border-radius: 10px;
  color: var(--text-color);
  display: grid;
  gap: 0.15rem;
  justify-items: start;
  padding: 0.72rem;
  text-align: left;
}

.suggestion-option:hover {
  background: var(--surface-soft-color);
  color: var(--text-color);
  transform: none;
}

.suggestion-option small,
.suggestion-message {
  color: var(--muted-text-color);
}

.suggestion-message {
  padding: 0.65rem;
}

.suggestion-message.error {
  color: var(--error-color);
}

.separated-form {
  border-top: 1px solid var(--line-color);
  margin-top: 1rem;
  padding-top: 1rem;
}

.status-pill {
  background: #eef3ee;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  color: var(--text-color);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.28rem 0.55rem;
}

.status-pill.success {
  background: rgba(32, 112, 68, 0.1);
  border-color: rgba(32, 112, 68, 0.26);
  color: var(--success-color);
}

.status-pill.danger {
  background: rgba(198, 40, 40, 0.1);
  border-color: rgba(198, 40, 40, 0.26);
  color: var(--error-color);
}

.operation-summary-card {
  background: var(--surface-soft-color);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.sale-document-panel {
  background: #ffffff;
  border: 1px solid var(--line-color);
  border-radius: 14px;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.9rem;
}

.sale-document-panel.muted {
  background: var(--surface-soft-color);
}

.sale-document-panel.cancelled {
  background: rgba(198, 40, 40, 0.06);
  border-color: rgba(198, 40, 40, 0.28);
}

.sale-document-panel-copy {
  display: grid;
  gap: 0.2rem;
}

.sale-document-panel-copy strong {
  font-size: 0.98rem;
}

.sale-document-panel-copy span {
  color: var(--muted-text-color);
}

.sale-document-panel .notification-message {
  margin-top: 0;
}

.operation-total-row {
  align-items: center;
  background: var(--text-color);
  border-radius: 14px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem;
}

.operation-total-row strong {
  font-size: 1.6rem;
}

.billing-total-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.billing-total-summary label {
  color: #ffffff;
}

.billing-total-summary input {
  max-width: 120px;
}

.cash-register-summary-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.cash-register-screen-layout {
  width: 100%;
}

.cash-register-current-card,
.cash-register-history-card {
  width: 100%;
}

.cash-register-current-period-card {
  align-items: start;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
  padding: 1rem;
}

.cash-register-current-period-card div {
  display: grid;
  gap: 0.2rem;
}

.cash-register-current-period-card span {
  color: var(--muted-text-color);
}

.cash-register-current-metrics-grid,
.cash-register-current-totals-grid,
.cash-register-history-summary-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.cash-register-current-metrics-grid,
.cash-register-history-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cash-register-current-totals-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cash-register-withdrawal-panel {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  margin-top: 1rem;
  padding: 1rem;
}

.cash-register-withdrawal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cash-register-history-filter-form {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.cash-register-history-filter-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cash-register-history-table {
  min-width: 1080px;
}

.cash-explanation-card,
.closure-explanation-card {
  background: var(--surface-color);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  display: grid;
  gap: 0.32rem;
  padding: 1rem;
}

.cash-explanation-card span {
  color: var(--muted-text-color);
  font-size: 0.86rem;
  font-weight: 800;
}

.cash-explanation-card strong {
  font-size: 1.55rem;
}

.cash-explanation-card small,
.closure-explanation-card span {
  color: var(--muted-text-color);
}

.income-card {
  border-left: 5px solid var(--success-color);
}

.expense-card,
.adjustment-card {
  border-left: 5px solid var(--error-color);
}

.final-balance-card {
  border-left: 5px solid var(--accent-color);
}

.final-balance-card.negative-balance {
  border-left-color: var(--error-color);
}

.cash-register-legacy-notice {
  background: #fff8e6;
  border: 1px solid #f0d28a;
  border-radius: 14px;
  color: var(--warning-color);
  margin-bottom: 1rem;
  padding: 0.85rem;
}

.table-number-input {
  max-width: 120px;
  padding: 0.45rem;
}

.loading-state,
.empty-state,
.notification-message {
  background: var(--surface-soft-color);
  border: 1px dashed var(--line-color);
  border-radius: 14px;
  padding: 1rem;
}

.notification-message.success {
  color: var(--success-color);
}

.loading-state {
  align-items: center;
  display: flex;
  gap: 0.8rem;
}

.loading-spinner {
  animation: spin 0.85s linear infinite;
  border: 3px solid var(--line-color);
  border-radius: 999px;
  border-top-color: var(--accent-color);
  height: 24px;
  width: 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .top-navigation-header {
    grid-template-columns: 1fr;
  }

  .top-navigation-menu {
    justify-content: flex-start;
  }

  .top-navigation-session {
    justify-content: space-between;
  }

  .billing-layout,
  .split-screen,
  .split-screen.wide-detail {
    grid-template-columns: 1fr;
  }

  .sales-history-receipt-filter {
    grid-column: auto;
  }

  .sales-history-results-heading {
    align-items: start;
    flex-direction: column;
  }

  .billing-configuration-grid,
  .billing-summary-grid,
  .billing-close-actions-row,
  .cash-register-current-period-card,
  .cash-register-current-metrics-grid,
  .cash-register-current-totals-grid,
  .cash-register-history-summary-grid,
  .cash-register-withdrawal-form,
  .cash-register-history-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-copy,
  .login-form {
    padding: 2rem;
  }

  .workspace-panel {
    padding: 1rem 14px 1.5rem;
  }

  .top-navigation-header {
    padding: 0.75rem 14px;
  }

  .dashboard-grid,
  .cash-register-summary-grid,
  .cash-register-current-period-card,
  .cash-register-current-metrics-grid,
  .cash-register-current-totals-grid,
  .cash-register-history-summary-grid,
  .cash-register-withdrawal-form,
  .cash-register-history-filter-grid,
  .form-grid-two,
  .billing-add-product-form {
    grid-template-columns: 1fr;
  }

  .billing-total-summary,
  .operation-total-row {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-total-panel {
    text-align: left;
  }

  .inline-form input,
  .inline-form select,
  .inline-form button {
    width: 100%;
  }

.section-heading,
.workspace-title-row {
  align-items: stretch;
  flex-direction: column;
}
}

.product-price-cash-amount {
  color: #008000;
}

.product-price-card-amount {
  color: #ff2c2c;
}
