* {
  box-sizing: border-box;
}



body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f5f7;
  color: #1f2933;
}

.route-comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.route-summary-card {
  padding: 14px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #ffffff;
}

.route-summary-card h3 {
  margin-top: 0;
}

@media (min-width: 900px) {
  .route-comparison-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.routes-view {
  margin-top: 16px;
}

.route-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.route-form label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.route-form input,
.route-form select {
  width: 100%;
  padding: 13px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 15px;
}

.route-client-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.route-client-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #f8fafc;
}

.route-client-item input {
  width: auto;
}

.route-client-item strong {
  display: block;
}

.route-client-item span,
.route-client-item small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.route-client-item.missing-coords {
  background: #fff7ed;
}

.route-result {
  margin-top: 16px;
}

.route-summary,
.route-warning {
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.route-warning {
  background: #fff7ed;
}

.route-step-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #edf0f5;
}

.route-order {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111827;
  color: white;
  font-weight: 700;
}

.route-step-card p {
  margin: 3px 0;
  color: #64748b;
  font-size: 13px;
}

.route-step-card a {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.stock-subnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.stock-tab-button {
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.stock-tab-button.active {
  background: #111827;
  color: white;
}

.stock-movement-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #edf0f5;
}

.stock-movement-box h3 {
  margin: 0 0 12px;
}

.stock-movement-box label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.stock-movement-box input,
.stock-movement-box select,
.stock-movement-box textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
}

.stock-view {
  margin-top: 16px;
}

.stock-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.stock-title-row h2 {
  margin: 0;
}

.stock-title-row p {
  margin: 4px 0 0;
  color: #64748b;
}

.stock-filter {
  margin-top: 14px;
}

.stock-filter label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #64748b;
}

.stock-filter select {
  width: 100%;
  padding: 14px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 16px;
  background: white;
}

.stock-container {
  margin-top: 16px;
}

.stock-sede-card {
  margin-top: 16px;
}

.stock-sede-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f5;
}

.stock-sede-header h3 {
  margin: 0;
  font-size: 18px;
}

.small-action-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: #111827;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stock-category-block {
  margin-top: 18px;
}

.stock-category-block h4 {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stock-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #f8fafc;
}

.stock-item-card strong {
  display: block;
  font-size: 14px;
}

.stock-item-card span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.stock-values {
  text-align: right;
  white-space: nowrap;
}

.stock-values p {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.stock-values small {
  color: #64748b;
  font-size: 12px;
}

@media (min-width: 720px) {
  .stock-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.edit-client-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 16px;
  overflow-y: auto;
  z-index: 35;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.2);
}

.edit-client-form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 24px;
}

.edit-client-form label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.edit-client-form input,
.edit-client-form textarea,
.edit-client-form select {
  width: 100%;
  padding: 13px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
}

.edit-client-form textarea {
  resize: vertical;
}

.action-button.edit {
  background: #f59e0b;
  color: #111827;
}

@media (min-width: 720px) {
  .edit-client-panel {
    left: auto;
    width: 480px;
    max-height: 92vh;
    border-radius: 24px 0 0 24px;
  }
}

.app-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.nav-button {
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.nav-button.active {
  background: #111827;
  color: #ffffff;
}

.admin-prices-view {
  margin-top: 16px;
}

.admin-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.admin-card h2 {
  margin: 0;
}

.admin-card p {
  color: #64748b;
}

.price-select {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 16px;
  background: white;
}

.admin-table-wrapper {
  margin-top: 16px;
  overflow-x: auto;
}

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

.admin-prices-table th {
  text-align: left;
  padding: 10px 4px;
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
}

.admin-prices-table td {
  padding: 10px 4px;
  border-top: 1px solid #edf0f5;
  vertical-align: middle;
}

.admin-prices-table td strong {
  display: block;
  font-size: 14px;
}

.admin-prices-table td span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.price-input {
  width: 110px;
  padding: 10px;
  border: 1px solid #d9dee8;
  border-radius: 10px;
  font-size: 15px;
}

.admin-status {
  margin-top: 10px;
  font-weight: 700;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f4f5f7;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
}

.login-card p {
  color: #64748b;
}

.login-card input {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 16px;
}

.login-card button {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.login-error {
  color: #dc2626 !important;
  font-size: 14px;
}

.logout-button {
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.app {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.app-header {
  margin-bottom: 18px;
}

.app-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.app-header p {
  margin: 4px 0 0;
  color: #64748b;
}

.search-card,
.client-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.search-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.search-card input {
  width: 100%;
  padding: 14px;
  border: 1px solid #d9dee8;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
}

.search-card input:focus {
  border-color: #111827;
}

.client-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.client-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid #edf0f5;
  cursor: pointer;
}

.client-item:last-child {
  border-bottom: none;
}

.client-item strong {
  display: block;
  font-size: 15px;
}

.client-item span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

.chevron {
  font-size: 28px !important;
  color: #94a3b8 !important;
}

.empty-item,
.empty-prices,
.loading {
  padding: 14px;
  color: #64748b;
  text-align: center;
}

.client-detail {
  margin-top: 16px;
}

.client-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.client-number {
  display: inline-block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 13px;
}

.client-card h2 {
  margin: 0;
  font-size: 23px;
}

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.info-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
}

.info-item span,
.reference-box span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.info-item strong {
  font-size: 15px;
  line-height: 1.35;
}

.info-item a {
  color: #0f172a;
  text-decoration: none;
}

.reference-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff7ed;
}

.reference-box p {
  margin: 0;
  line-height: 1.4;
}

.card-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.action-button {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  background: #2563eb;
  color: #ffffff;
}

.secondary {
  background: #111827;
  color: #ffffff;
}

.disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.price-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 20;
}

.price-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78vh;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 16px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.2);
}

.price-panel-header {
  position: sticky;
  top: -16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0 12px;
  background: #ffffff;
  border-bottom: 1px solid #edf0f5;
}

.price-panel-header h2 {
  margin: 0;
  font-size: 20px;
}

.price-panel-header p {
  margin: 4px 0 0;
  color: #64748b;
}

.close-button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 18px;
  cursor: pointer;
}

.price-list {
  padding-bottom: 20px;
}

.price-category {
  margin: 18px 0 8px;
  color: #334155;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f5;
}

.price-row strong {
  display: block;
  font-size: 15px;
}

.price-row span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.price-row p {
  margin: 0;
  white-space: nowrap;
  font-weight: 800;
}

.price-row small {
  color: #64748b;
  font-weight: 500;
}

.hidden {
  display: none;
}

@media (min-width: 720px) {
  .price-panel {
    left: auto;
    width: 460px;
    max-height: 90vh;
    border-radius: 24px 0 0 24px;
  }
}