@import "./styles/tokens.css";
@import "./styles/base.css";
@import "./styles/components.css";
@import "./styles/views.css";
@import "./styles/layout.css";
@import "./styles/print.css";
.input-mini {
  width: 92px;
  max-width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 0.5rem;
  background: var(--surface, #fff);
  color: inherit;
}

.settings-view {
  display: grid;
  gap: 18px;
}

.settings-view.hidden-view {
  display: none;
}

.settings-data-head h2 {
  margin: 4px 0 6px;
}

.settings-data-head .helper-text {
  margin: 0;
}

.settings-data-actions {
  margin-top: 16px;
}

.overview-quick-guide-wrap {
  margin: 16px 0;
}

.quick-guide-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.5fr) auto;
  gap: 16px;
  align-items: center;
}

.quick-guide-card h2 {
  margin: 4px 0 6px;
}

.quick-guide-card p {
  margin: 0;
  color: var(--muted, #667085);
}

.quick-guide-plain {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.quick-guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.quick-guide-step {
  border: 1px solid var(--border, #d9d9d9);
  background: var(--surface, #fff);
  color: inherit;
  text-align: left;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}

.quick-guide-step strong,
.test-checklist strong {
  display: block;
  font-size: 0.92rem;
}

.quick-guide-step span,
.test-checklist span {
  display: block;
  margin-top: 4px;
  color: var(--muted, #667085);
  font-size: 0.82rem;
  line-height: 1.35;
}

.quick-guide-step.done {
  border-color: var(--success, #16a34a);
}

.quick-guide-step.done strong::after {
  content: " pronto";
  color: var(--success, #16a34a);
  font-weight: 600;
}

.quick-guide-demo {
  grid-template-columns: 1fr auto;
}

.test-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.test-checklist > div {
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface, #fff);
}

@media (max-width: 980px) {
  .quick-guide-card,
  .quick-guide-demo {
    grid-template-columns: 1fr;
  }

  .quick-guide-steps,
  .test-checklist {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .quick-guide-steps,
  .test-checklist {
    grid-template-columns: 1fr;
  }
}

.installed-app-note {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 8px;
  padding: 0 12px;
  background: #eef7f2;
  color: var(--ok, #166534);
  font-size: 13px;
  font-weight: 800;
}

.installed-app-note[hidden] {
  display: none;
}

.grade-builder-details {
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm, 8px);
  background: #ffffff;
  overflow: hidden;
}

.grade-builder-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.grade-builder-details > summary::-webkit-details-marker {
  display: none;
}

.grade-builder-details > summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef7f2;
  color: var(--ok, #166534);
  font-weight: 900;
}

.grade-builder-details[open] > summary::after {
  content: "−";
}

.grade-builder-details summary span,
.grade-builder-details summary small {
  display: block;
}

.grade-builder-details summary span {
  font-weight: 900;
}

.grade-builder-details summary small {
  margin-top: 3px;
  color: var(--muted, #667085);
  font-size: 12px;
  line-height: 1.3;
}

.grade-builder-details .grade-builder {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    font-size: 15px;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 1200;
    gap: 10px;
    padding: 10px 12px;
  }

  .app-brand {
    min-height: 36px;
    padding: 0;
  }

  .app-brand img {
    width: 32px;
    height: 32px;
  }

  .app-brand h1 {
    font-size: 16px;
  }

  .app-brand p {
    display: none;
  }

  .app-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .app-nav::-webkit-scrollbar {
    display: none;
  }

  .app-nav .tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 118px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .nav-icon {
    width: 16px;
    height: 16px;
  }

  .app-topbar {
    position: static;
    padding: 12px;
  }

  .sheet-workspace {
    padding: 12px 10px 24px;
  }

  .card,
  .product-editor,
  .inventory-panel,
  .operation-editor,
  .history-panel,
  .sale-editor,
  .import-editor,
  .import-preview-panel,
  .settings-panel {
    padding: 14px;
  }

  .btn,
  .input,
  .select,
  .textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .input-mini {
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }

  .table-wrap {
    border-radius: 8px;
  }

  table {
    min-width: 720px;
  }

  th,
  td {
    padding: 10px;
  }

  .table-actions,
  .history-actions,
  .product-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .table-actions .btn,
  .history-actions .btn,
  .product-actions .btn {
    width: 100%;
  }

  .sale-variant-quick-list,
  .overview-entry-grid,
  .sale-price-grid,
  .variant-fields {
    grid-template-columns: 1fr;
  }

  .installed-app-note {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .app-nav .tab {
    min-width: 104px;
  }

  .app-eyebrow {
    font-size: 18px;
  }

  .app-subtitle {
    font-size: 12px;
  }
}
