/* Módulos POS separados con el mismo comportamiento visual de Ventas */
.fe-pos-module-view {
  width: 100%;
}

body.fe-pos-fullscreen .fe-pos-module-view:not(.hidden) {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.pos-admin-terminal {
  background: #e9f6f9;
  border: 5px solid #00a6c8;
  border-radius: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  box-shadow: none;
}

.pos-admin-topbar {
  background: #e8f6fb;
  border-bottom: 4px solid #00a6c8;
}

.pos-admin-main {
  height: calc(100vh - 58px);
  min-height: 0;
  padding: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.pos-admin-title-row {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(7, 89, 112, .16);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pos-admin-title-row h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pos-admin-actions-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pos-maestro-btn,
.pos-row-btn {
  border: 0;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 16px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .24);
  cursor: pointer;
  text-transform: none;
}

.pos-maestro-btn:hover,
.pos-row-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.pos-btn-primary { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.pos-btn-success { background: linear-gradient(135deg, #4ade80, #16a34a); }
.pos-btn-warning { background: linear-gradient(135deg, #0ea5b4, #075985); }
.pos-btn-danger { background: linear-gradient(135deg, #f87171, #b91c1c); }

.pos-admin-body {
  min-height: 0;
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.pos-admin-body-products {
  grid-template-columns: minmax(280px, 30%) minmax(720px, 70%);
}

.pos-admin-body-cats {
  grid-template-columns: minmax(280px, 30%) minmax(720px, 70%);
}

.pos-maestro-form,
.pos-maestro-right {
  min-height: 0;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(7, 89, 112, .14);
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
}

.pos-maestro-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pos-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pos-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #111827;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.pos-form-control {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  border-radius: 6px;
  padding: 0 10px;
  outline: none;
  font-size: 14px;
  font-weight: 650;
}

.pos-form-control:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .14);
}

.pos-input-file {
  padding: 7px 10px;
  font-size: 12px;
}

.pos-help-text {
  color: #64748b;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
}

.pos-image-preview {
  height: 72px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #94a3b8;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

.pos-image-preview.has-image {
  border-style: solid;
}

.pos-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.pos-image-clear {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 0;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  padding: 5px 10px;
  font-weight: 900;
}

.pos-maestro-right {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.exe-like-toolbar {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.cats-toolbar {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.pos-sede-box {
  min-height: 52px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f8fbff;
  padding: 7px 10px;
  display: grid;
  align-content: center;
  gap: 3px;
}

.pos-sede-box label {
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pos-sede-box strong {
  color: #1e293b;
  font-size: 13px;
  font-weight: 1000;
}

.pos-admin-status {
  min-height: 24px;
  color: #64748b;
  font-weight: 850;
  font-size: 12px;
}


.pos-admin-status:empty {
  display: none;
}

.pos-admin-status.ok { color: #15803d; }
.pos-admin-status.error { color: #b91c1c; }

.pos-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #fff;
}

.pos-exe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 820px;
}

.pos-exe-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111827;
  color: #fff;
  text-align: left;
  padding: 9px 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.pos-exe-table td {
  padding: 8px;
  border-bottom: 1px solid #dbe4ef;
  color: #0f172a;
  font-weight: 650;
  vertical-align: middle;
}

.pos-exe-table tr:hover,
.pos-exe-table tr.selected {
  background: #e9f8ff;
}

.pos-actions-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

/* Categorías: centrar botones Editar / Eliminar sin afectar Productos */
.pos-table-wrap-cats .pos-actions-cell {
  justify-content: center;
}

.pos-table-wrap-cats .pos-exe-table th:last-child,
.pos-table-wrap-cats .pos-exe-table td:last-child {
  text-align: center;
}

.pos-row-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  text-transform: uppercase;
}

.pos-row-edit { background: linear-gradient(135deg, #0ea5b4, #0369a1); }
.pos-row-delete { background: linear-gradient(135deg, #f87171, #b91c1c); }

.pos-empty-row {
  text-align: center;
  color: #64748b !important;
  font-weight: 900 !important;
  padding: 30px !important;
}

@media (max-width: 1100px) {
  body.fe-pos-fullscreen { overflow: auto !important; }
  body.fe-pos-fullscreen .fe-pos-module-view:not(.hidden),
  .pos-admin-terminal { height: auto; min-height: 100vh; overflow: visible; }
  .pos-admin-main { height: auto; }
  .pos-admin-body-products,
  .pos-admin-body-cats { grid-template-columns: 1fr; }
  .pos-maestro-form,
  .pos-maestro-right { overflow: visible; }
  .pos-table-wrap { max-height: 60vh; }
}

@media (max-width: 720px) {
  .pos-admin-title-row { align-items: stretch; flex-direction: column; }
  .pos-admin-actions-top { justify-content: stretch; }
  .pos-maestro-btn { flex: 1 1 120px; }
  .pos-form-row,
  .exe-like-toolbar,
  .cats-toolbar { grid-template-columns: 1fr; }
  .pos-exe-table { min-width: 720px; }
  .pos-admin-topbar .fe-pos-clock { display: none; }
}
