/* ============================================================
   TecnoSYS — Windows Vista Aero Style
   Unificado y coherente — Rojo #dc2626 como acento
   ============================================================ */

/* ── Root / Variables ── */
:root {
  --win-bg: #e9ecef;
  --win-fg: #000000;
  --win-title: #000080;
  --win-title-text: #ffffff;
  --win-hover: #000080;
  --win-hover-text: #ffffff;
  --win-disabled: #6c757d;
  --win-border-light: #ffffff;
  --win-border-dark: #adb5bd;
  --win-border-darker: #6c757d;
  --win-input-bg: #ffffff;
  --win-panel-bg: #f8f9fa;
  --win-font-ui: "Segoe UI", "Microsoft Sans Serif", system-ui, sans-serif;
  --win-font-mono: Consolas, "Courier New", monospace;

  /* Acentos */
  --accent-red: #dc2626;
  --accent-red-light: #fecaca;
  --accent-red-bg: #fef2f2;
  --accent-green: #008000;
  --accent-orange: #ff8000;
  --accent-blue: #0000ff;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-width: 1024px;
  font-family: var(--win-font-ui);
  font-size: 13px;
  color: var(--win-fg);
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  overflow: hidden;
}

/* Uppercase solo en contenido, NO en placeholders */
html, body, h1, h2, h3, h4, h5, h6, p, label, th, td, button, a, span, div {
  text-transform: uppercase;
}

input, textarea, select {
  text-transform: uppercase;
}

input::placeholder, textarea::placeholder {
  text-transform: none;
  opacity: 0.7;
}

input[type="email"] {
  text-transform: lowercase;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Main Window Frame ── */
.win-window {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--win-bg);
  border: 1px solid var(--win-border-dark);
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow: hidden;
}

/* ── Title Bar ── */
.win-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 8px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: var(--win-title-text);
  font-weight: bold;
  font-size: 13px;
  user-select: none;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.win-titlebar .title-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-titlebar .title-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.win-titlebar .title-controls {
  display: flex;
  gap: 4px;
}

.win-titlebar .win-btn-control {
  width: 22px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  font-size: 11px;
  font-family: var(--win-font-ui);
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 50%, #dee2e6 100%);
  color: var(--win-fg);
  border: 1px solid var(--win-border-dark);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}

.win-titlebar .win-btn-control:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 50%, #e8eaed 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.9);
}

.win-titlebar .win-btn-control:active {
  background: linear-gradient(180deg, #dee2e6 0%, #e9ecef 50%, #f1f3f4 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* ── Menu Bar ── */
.win-menubar {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 6px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid var(--win-border-dark);
  flex-shrink: 0;
  user-select: none;
}

.win-menu {
  position: relative;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 20px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.win-menu:hover,
.win-menu.active {
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, var(--win-title) 100%);
  color: var(--win-hover-text);
  border: 1px solid var(--win-title);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.4);
}

.win-menu.active {
  background: linear-gradient(180deg, var(--win-title) 0%, #0f3460 100%);
}

/* ── Submenu ── */
.win-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid var(--win-border-dark);
  padding: 4px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  border-radius: 10px;
}

.win-menu.active .win-submenu {
  display: block;
}

.win-submenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px 4px 24px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--win-fg);
  position: relative;
  border-radius: 6px;
}

.win-submenu-item:hover {
  background: linear-gradient(180deg, var(--win-title) 0%, #0f3460 100%);
  color: var(--win-hover-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.win-submenu-item.selected {
  background: linear-gradient(180deg, var(--win-title) 0%, #0f3460 100%);
  color: var(--win-hover-text);
  outline: 2px solid var(--accent-red);
  outline-offset: -2px;
}

.win-submenu-item.disabled {
  color: var(--win-disabled);
  cursor: default;
}

.win-submenu-item.disabled:hover {
  background: transparent;
  color: var(--win-disabled);
  box-shadow: none;
}

.win-submenu-item .shortcut {
  margin-left: 24px;
  font-size: 12px;
  color: var(--win-fg);
}

.win-submenu-item:hover .shortcut {
  color: var(--win-hover-text);
}

.win-submenu-item.disabled .shortcut {
  color: var(--win-disabled);
}

.win-submenu-item::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 12px;
  text-align: center;
}

/* ── Separator ── */
.win-separator {
  height: 1px;
  margin: 4px 6px;
  background: linear-gradient(90deg, transparent 0%, var(--win-border-dark) 50%, transparent 100%);
  border: none;
}

/* ── Toolbar ── */
.win-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid var(--win-border-dark);
  flex-shrink: 0;
}

.win-toolbar .win-button {
  height: 26px;
  padding: 3px 12px;
  font-size: 12px;
}

/* ── Content Area ── */
.win-content {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
  background: var(--win-bg);
  position: relative;
}

/* ── Buttons ── */
.win-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 16px;
  font-family: var(--win-font-ui);
  font-size: 13px;
  color: var(--win-fg);
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 50%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}

.win-button:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 50%, #e8eaed 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}

.win-button:active,
.win-button.pressed {
  background: linear-gradient(180deg, #dee2e6 0%, #e9ecef 50%, #f1f3f4 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  padding: 6px 15px 4px 17px;
}

.win-button:disabled,
.win-button.disabled {
  color: var(--win-disabled);
  cursor: default;
  background: linear-gradient(180deg, #f1f3f4 0%, #e8eaed 100%);
  box-shadow: none;
}

.win-button-sm {
  padding: 3px 10px;
  font-size: 12px;
  height: 24px;
}

.win-button-lg {
  padding: 10px 24px;
  font-size: 14px;
}

.win-button-primary {
  background: linear-gradient(180deg, var(--win-title) 0%, #0f3460 100%);
  color: var(--win-title-text);
  border: 1px solid var(--win-title);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}

.win-button-primary:hover {
  background: linear-gradient(180deg, #1a1a8e 0%, #16213e 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
}

.win-button-primary:active {
  background: linear-gradient(180deg, #0f3460 0%, #1a1a2e 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.win-button-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 50%, #dee2e6 100%);
  color: var(--win-fg);
  border: 1px solid var(--win-border-dark);
}

.win-button-success {
  background: linear-gradient(180deg, #00a000 0%, #008000 50%, #006000 100%);
  color: #ffffff;
  border: 1px solid #006000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}

.win-button-success:hover {
  background: linear-gradient(180deg, #00b000 0%, #009000 50%, #007000 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}

.win-button-success:active {
  background: linear-gradient(180deg, #006000 0%, #008000 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.win-button-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff;
  border: 1px solid #991b1b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}

.win-button-danger:hover {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #b91c1c 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}

.win-button-danger:active {
  background: linear-gradient(180deg, #991b1b 0%, #dc2626 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* ── Inputs ── */
.win-input,
.win-select,
.win-textarea {
  font-family: var(--win-font-ui);
  font-size: 13px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  color: var(--win-fg);
  border: 2px solid var(--win-border-dark);
  border-radius: 8px;
  outline: none;
  width: 100%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.8);
}

.win-input:focus,
.win-select:focus,
.win-textarea:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15), inset 0 2px 4px rgba(0,0,0,0.06);
}

.win-button:focus {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.win-button-primary:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.win-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 0h8L4 8z' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 20px;
}

.win-textarea {
  resize: vertical;
  min-height: 60px;
}

/* ── Focus styles ── */
.win-table tr:focus,
.win-table tr.selected {
  background: var(--win-hover);
  color: var(--win-hover-text);
  outline: 2px solid var(--accent-red);
  outline-offset: -2px;
}

.win-table tr.selected td {
  color: var(--win-hover-text);
}

*:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ── Panels ── */
.win-panel {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.win-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.win-panel:last-child {
  margin-bottom: 0;
}

.win-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: -12px -12px 10px -12px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 50%, #e8eaed 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  min-height: 32px;
}

.win-panel-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--win-title);
  margin: 0;
}

.win-panel-inset {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.8);
  padding: 12px;
}

/* ── Forms ── */
.win-form-group {
  margin-bottom: 10px;
}

.win-form-group:last-child {
  margin-bottom: 0;
}

.win-label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--win-fg);
}

.win-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.win-form-row label {
  min-width: 100px;
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

.win-form-row .win-input,
.win-form-row .win-select {
  flex: 1;
}

.win-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.win-form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

/* ── Tables ── */
.win-table-container {
  overflow: auto;
  max-height: 400px;
  border-radius: 10px;
  border: 1px solid var(--win-border-dark);
  background: var(--win-input-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.win-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--win-font-ui);
  font-size: 13px;
  background: var(--win-input-bg);
}

.win-table th {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid var(--win-border-dark);
  padding: 6px 10px;
  text-align: left;
  font-weight: bold;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.win-table th:first-child {
  border-radius: 10px 0 0 0;
}

.win-table th:last-child {
  border-radius: 0 10px 0 0;
}

.win-table td {
  border: 1px solid #dee2e6;
  padding: 5px 10px;
}

.win-table tr:nth-child(even) {
  background: #f1f3f4;
}

.win-table tr:hover {
  background: rgba(220, 38, 38, 0.08);
}

.win-table tr.selected {
  background: var(--win-hover);
  color: var(--win-hover-text);
}

/* ── Status Bar ── */
.win-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid var(--win-border-dark);
  flex-shrink: 0;
  font-size: 12px;
  white-space: nowrap;
  user-select: none;
}

.win-statusbar .status-section {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.win-statusbar .status-box {
  padding: 2px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 6px;
  min-width: 80px;
  text-align: center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.win-statusbar .status-label {
  font-size: 11px;
  font-weight: bold;
  color: #495057;
  white-space: nowrap;
}

/* ── Datos de licencia / propiedad intelectual, dentro del mismo status bar ── */
.win-statusbar-license {
  flex: 1;
  min-width: 0;
  justify-content: center;
  padding: 0 12px;
}

.win-statusbar-license #licenseBar {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #1a1a1a;
  font-weight: bold;
}

/* ── Boton flotante de WhatsApp ── */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  z-index: 2000;
  transition: transform 0.15s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

/* ── Scrollbar (Windows Vista) ── */
.win-scrollbar::-webkit-scrollbar,
.win-content::-webkit-scrollbar,
.win-table-container::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.win-scrollbar::-webkit-scrollbar-track,
.win-content::-webkit-scrollbar-track,
.win-table-container::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 8px;
  border: 1px solid var(--win-border-dark);
}

.win-scrollbar::-webkit-scrollbar-thumb,
.win-content::-webkit-scrollbar-thumb,
.win-table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f8f9fa 0%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.win-scrollbar::-webkit-scrollbar-thumb:hover,
.win-content::-webkit-scrollbar-thumb:hover,
.win-table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 100%);
}

.win-scrollbar::-webkit-scrollbar-thumb:active,
.win-content::-webkit-scrollbar-thumb:active,
.win-table-container::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #dee2e6 0%, #f8f9fa 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.win-scrollbar::-webkit-scrollbar-button,
.win-content::-webkit-scrollbar-button,
.win-table-container::-webkit-scrollbar-button {
  background: linear-gradient(180deg, #f8f9fa 0%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 4px;
  width: 14px;
  height: 14px;
}

/* Firefox scrollbar */
.win-scrollbar,
.win-content,
.win-table-container {
  scrollbar-width: thin;
  scrollbar-color: var(--win-border-dark) #e9ecef;
}

/* ── Modal ── */
.win-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.win-modal-overlay.active {
  display: flex;
}

.win-modal {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 15px;
  min-width: 320px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.win-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 15px 15px 0 0;
  pointer-events: none;
}

.win-modal .win-titlebar {
  cursor: default;
  border-radius: 15px 15px 0 0;
}

.win-modal-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
}

.win-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--win-border-dark);
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

/* ── Toast ── */
.win-toast-container {
  position: fixed;
  top: 40px;
  right: 12px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.win-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  min-width: 220px;
  max-width: 360px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 10px;
  font-size: 13px;
  pointer-events: auto;
  animation: toastSlide 0.2s ease-out;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.win-toast.success { border-left: 4px solid var(--accent-green); }
.win-toast.error   { border-left: 4px solid #ff0000; }
.win-toast.warning { border-left: 4px solid var(--accent-orange); }
.win-toast.info    { border-left: 4px solid var(--accent-blue); }

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Badge ── */
.win-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  background: linear-gradient(180deg, var(--win-title) 0%, #0f3460 100%);
  color: var(--win-title-text);
  border: 1px solid var(--win-title);
  border-radius: 6px;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.win-badge.gray {
  background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%);
  color: var(--win-fg);
  border: 1px solid var(--win-border-dark);
}

.win-badge-success {
  background: linear-gradient(180deg, #00a000 0%, #008000 100%);
  color: #ffffff;
  border: 1px solid #006000;
}

.win-badge-warning {
  background: linear-gradient(180deg, #ff8000 0%, #cc6600 100%);
  color: #ffffff;
  border: 1px solid #cc6600;
}

.win-badge-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid #991b1b;
}

.win-badge-info {
  background: linear-gradient(180deg, #4169e1 0%, #0000cc 100%);
  color: #ffffff;
  border: 1px solid #0000cc;
}

.win-badge-secondary {
  background: linear-gradient(180deg, #adb5bd 0%, #6c757d 100%);
  color: #ffffff;
  border: 1px solid #6c757d;
}

/* ── Alert ── */
.win-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.win-alert-danger {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid var(--accent-red);
  color: #991b1b;
}

.win-alert-success {
  background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid var(--accent-green);
  color: #006000;
}

.win-alert-warning {
  background: linear-gradient(180deg, #fff3e0 0%, #ffe0b2 100%);
  border: 1px solid var(--accent-orange);
  color: #cc6600;
}

.win-alert-info {
  background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid var(--accent-blue);
  color: #0000cc;
}

/* ── Grid ── */
.win-grid {
  display: grid;
  gap: 12px;
}

.win-grid.cols-2,
.win-grid-2 { grid-template-columns: repeat(2, 1fr); }
.win-grid.cols-3,
.win-grid-3 { grid-template-columns: repeat(3, 1fr); }
.win-grid.cols-4,
.win-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Login Page ── */
.win-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 50%, #ced4da 100%);
}

.win-login-box,
.win-login-card {
  width: 380px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.win-login-box::before,
.win-login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 15px 15px 0 0;
  pointer-events: none;
}

.win-login-box .win-titlebar,
.win-login-card .win-titlebar {
  margin: 0;
  border-radius: 15px 15px 0 0;
}

.win-login-body {
  padding: 24px;
}

.win-login-body .win-form-row label {
  min-width: 80px;
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo h1 {
  font-size: 24px;
  color: var(--win-title);
  margin: 0 0 4px 0;
}

.login-logo p {
  font-size: 12px;
  color: var(--win-disabled);
  margin: 0;
}

/* ── Dashboard ── */
.win-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.win-stat-panel {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.win-stat-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.win-stat-panel .stat-value {
  font-family: var(--win-font-mono);
  font-size: 22px;
  font-weight: bold;
  color: var(--win-title);
  margin: 4px 0;
}

.win-stat-panel .stat-label {
  font-size: 11px;
  color: var(--win-fg);
}

/* Dashboard custom styles (moved from inline) */
.db-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.db-stat-card {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.db-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.db-stat-card .db-stat-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.db-stat-card .db-stat-value {
  font-family: var(--win-font-mono);
  font-size: 20px;
  font-weight: bold;
  color: var(--win-title);
  margin: 2px 0;
}

.db-stat-card .db-stat-label {
  font-size: 11px;
  color: var(--win-fg);
}

.db-stat-card .db-stat-trend {
  font-size: 10px;
  margin-top: 2px;
}

.db-stat-trend.up { color: #006400; }
.db-stat-trend.down { color: #8b0000; }
.db-stat-trend.neutral { color: #666; }

.success { color: var(--accent-green); }
.danger { color: var(--accent-red); }
.warning { color: var(--accent-orange); }

.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.text-warning { color: var(--accent-orange); }

/* Gráfico de barras CSS */
.db-chart-container {
  padding: 12px;
}

.db-chart-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--win-title);
}

.db-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--win-border-dark);
  position: relative;
}

.db-chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--win-title), #4169e1);
  border: 1px solid var(--win-title);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  position: relative;
  transition: height 0.3s;
}

.db-chart-bar:hover {
  background: linear-gradient(to top, var(--win-title), #6495ed);
}

.db-chart-bar-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  white-space: nowrap;
}

.db-chart-bar-value {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: var(--win-title);
  white-space: nowrap;
}

.db-chart-empty {
  text-align: center;
  color: var(--win-fg);
  font-size: 12px;
  padding: 40px 0;
}

/* Layout 2 columnas dashboard */
.db-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* Stock crítico mini */
.db-stock-critico {
  max-height: 200px;
  overflow-y: auto;
}

.db-stock-critico .critico-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px dotted var(--win-border-dark);
  font-size: 11px;
}

.db-stock-critico .critico-row:last-child {
  border-bottom: none;
}

.db-stock-critico .critico-nombre {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-stock-critico .critico-stock {
  font-family: var(--win-font-mono);
  font-weight: bold;
  color: #8b0000;
  margin-left: 8px;
}

/* ── Search Bar ── */
.win-search-bar {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.win-search-bar .win-input {
  flex: 1;
}

/* ── Button Group ── */
.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Stat Cards (Caja) ── */
.stat-card {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--win-fg);
  display: block;
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-family: var(--win-font-mono);
  font-size: 18px;
  font-weight: bold;
  color: var(--win-title);
}

/* ── Ticket / Receipt ── */
.win-ticket {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.8);
  padding: 14px;
  font-family: var(--win-font-mono);
  font-size: 13px;
  max-width: 400px;
  margin: 0 auto;
}

.win-ticket-header {
  text-align: center;
  border-bottom: 1px dashed var(--win-border-dark);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.win-ticket-line {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.win-ticket-total {
  border-top: 1px solid var(--win-border-dark);
  margin-top: 6px;
  padding-top: 6px;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

/* ── Print ── */
@media print {
  html, body {
    background: #fff;
    overflow: visible;
  }

  .win-window {
    border: none;
    height: auto;
    overflow: visible;
    box-shadow: none;
    border-radius: 0;
  }

  .win-titlebar,
  .win-menubar,
  .win-toolbar,
  .win-statusbar,
  .win-toast-container,
  .win-modal-overlay {
    display: none !important;
  }

  .win-content {
    overflow: visible;
    padding: 0;
    background: #fff;
  }

  .win-panel,
  .win-panel-inset {
    border: 1px solid #000;
    break-inside: avoid;
    box-shadow: none;
    border-radius: 0;
  }

  .win-panel::before,
  .win-panel-inset::before {
    display: none;
  }

  .win-table {
    border: 1px solid #000;
  }

  .win-table th,
  .win-table td {
    border: 1px solid #000;
  }

  .win-button {
    display: none;
  }
}

/* ── Utility ── */
.hidden { display: none !important; }
.win-hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-mono { font-family: var(--win-font-mono); }
.w-full { width: 100%; }
.h-full { height: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 4px; }
.gap-4 { gap: 8px; }
.mb-2 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 8px; }
.mt-2 { margin-top: 4px; }
.mt-4 { margin-top: 8px; }
.p-2 { padding: 4px; }
.p-4 { padding: 8px; }

.win-text-center { text-align: center; }
.win-text-right { text-align: right; }
.win-text-left { text-align: left; }
.win-text-muted { color: var(--win-disabled); }

/* ── Menu disabled ── */
.pos-menu-disabled {
  pointer-events: none !important;
  opacity: 0.4 !important;
  user-select: none !important;
}
.pos-menu-disabled .win-menu,
.pos-menu-disabled .win-submenu {
  pointer-events: none !important;
}

/* ── Responsive guard ── */
@media (max-width: 1023px) {
  html, body {
    min-width: 1024px;
  }
}

@media (max-width: 900px) {
  .db-stats-row { grid-template-columns: repeat(2, 1fr); }
  .db-two-col { grid-template-columns: 1fr; }
}

/* ============================================================
   TecnoSYS POS — Paleta Rojo · Blanco · Negro
   Mantener estilo nativo recto (NO border-radius)
   ============================================================ */

/* Override para pagina POS */
/* ============================================================
   TecnoSYS POS — Estilo Windows Vista Aero
   Unificado con el tema global del sistema
   ============================================================ */

body.pos-page {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}
body.pos-page .win-content {
  background: transparent !important;
  padding: 0 !important;
}
body.pos-page .win-window {
  border: none !important;
}

/* Header POS — gradiente con color del tema */
.pos-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%), linear-gradient(180deg, var(--accent-red) 0%, var(--win-title) 100%);
  color: white;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  height: 40px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  position: relative;
  z-index: 10;
}
.pos-header .pos-brand {
  font-size: 15px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.pos-header .pos-brand span {
  color: rgba(255,255,255,0.75);
  font-weight: normal;
}
.pos-header .pos-info {
  color: rgba(255,255,255,0.8);
  font-size: 12px;
}

/* Layout principal */
.pos-layout {
  display: flex;
  gap: 12px;
  padding: 12px;
  height: calc(100vh - 40px - 32px - 24px - 22px);
  box-sizing: border-box;
}

/* Panel POS — estilo Vista Aero */
.pos-panel {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #adb5bd;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.6);
  position: relative;
  overflow: hidden;
}
.pos-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
  z-index: 0;
}
.pos-panel > * {
  position: relative;
  z-index: 1;
}

.pos-input-wrapper {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pos-input-wrapper .pos-input {
  flex: 1;
  min-width: 0;
}
.pos-btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--win-border-dark);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 100%);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}
.pos-btn-icon:hover {
  background: linear-gradient(180deg, #f8f9fa 0%, #dee2e6 100%);
  border-color: var(--accent-red);
}
.pos-btn-icon:active {
  background: linear-gradient(180deg, #e9ecef 0%, #ced4da 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  transform: translateY(1px);
}

/* Escaner modal */
.pos-escaner-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pos-escaner-video {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  border: 3px solid var(--accent-red);
  background: #000;
}
.pos-escaner-info {
  color: white;
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
}
.pos-escaner-boton {
  margin-top: 12px;
  padding: 8px 24px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  background: var(--accent-red);
  color: white;
  cursor: pointer;
}
.pos-escaner-boton:hover {
  background: #b91c1c;
}

/* Mobile: botones más grandes */
@media (max-width: 767px) {
  .pos-btn-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .pos-input-wrapper {
    gap: 8px;
  }
}
.pos-input-label {
  font-size: 11px;
  font-weight: bold;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.pos-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 2px solid var(--win-border-dark);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  outline: none;
  box-sizing: border-box;
  font-family: var(--win-font-ui);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pos-input:focus {
  border-color: var(--accent-red);
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15), inset 0 2px 4px rgba(0,0,0,0.06);
}
.pos-input-hint {
  font-size: 10px;
  color: var(--win-disabled);
  margin-top: 3px;
}

/* Tabla de ticket */
.pos-table-container {
  overflow-y: auto;
  max-height: calc(100% - 80px);
  border-radius: 10px;
  border: 1px solid var(--win-border-dark);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}
.pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: white;
}
.pos-table thead th {
  background: linear-gradient(180deg, var(--accent-red) 0%, var(--win-title) 100%);
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: bold;
  font-size: 11px;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  text-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.pos-table thead th:first-child {
  border-radius: 10px 0 0 0;
}
.pos-table thead th:last-child {
  border-radius: 0 10px 0 0;
}
.pos-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid #e9ecef;
}
.pos-table tbody tr:nth-child(even) {
  background: var(--accent-red-bg);
}
.pos-table tbody tr:hover {
  background: var(--accent-red-light);
}
.pos-table .pos-col-num { width: 30px; text-align: center; }
.pos-table .pos-col-codigo { width: 70px; }
.pos-table .pos-col-prod { min-width: 180px; }
.pos-table .pos-col-cant { width: 90px; text-align: center; white-space: nowrap; }
.pos-table .pos-cant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  background: #fff;
  color: var(--accent-red);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: 0 2px;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.1s;
}
.pos-table .pos-cant-btn:hover {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.pos-table .pos-cant-btn:active {
  transform: scale(0.92);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.pos-table .pos-cant-val {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  font-weight: bold;
}
.pos-table .pos-col-precio { width: 80px; text-align: right; }
.pos-table .pos-col-total { width: 80px; text-align: right; }
.pos-table .pos-col-del { width: 30px; text-align: center; }
.pos-table .pos-del-btn {
  color: var(--accent-red);
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.1s;
}
.pos-table .pos-del-btn:hover {
  transform: scale(1.2);
}
.pos-table .pos-empty {
  text-align: center;
  color: var(--win-disabled);
  padding: 40px 0;
}

/* Sidebar derecho */
.pos-sidebar {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Empresa */
.pos-empresa {
  text-align: center;
  padding: 10px 8px;
  border-bottom: 3px solid var(--accent-red);
  background: transparent;
  border-radius: 0;
  margin-bottom: 8px;
  box-shadow: none;
}
.pos-empresa-nombre {
  font-size: 22px;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.pos-empresa-dato {
  font-size: 13px;
  color: #000000;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Total */
.pos-total-label {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--win-title);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-shadow: none;
}
.pos-total-gs {
  background: linear-gradient(180deg, var(--accent-red) 0%, var(--win-title) 100%);
  color: #ffffff;
  border: 3px solid var(--win-title);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  font-family: var(--win-font-mono);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2);
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}
.pos-total-otras {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #000000;
  margin-top: 8px;
  letter-spacing: 0.3px;
}
.pos-cotizaciones {
  text-align: center;
  font-size: 12px;
  color: #000000;
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: 0.2px;
}
.pos-cotizaciones-title {
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  color: #000000;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}

/* Botones POS — estilo Vista Aero */
.pos-btn {
  border: 1px solid var(--win-border-dark);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  font-family: var(--win-font-ui);
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 50%, #dee2e6 100%);
  color: var(--win-fg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.pos-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 50%, #e8eaed 100%);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-1px);
}
.pos-btn:active {
  background: linear-gradient(180deg, #dee2e6 0%, #e9ecef 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  transform: translateY(1px);
}
.pos-btn-red {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%), linear-gradient(180deg, var(--accent-red) 0%, var(--win-title) 100%);
  color: white;
  border: 1px solid rgba(0,0,0,0.15);
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.pos-btn-red:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%), linear-gradient(180deg, var(--accent-red) 0%, var(--win-title) 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.pos-btn-red:active {
  background: linear-gradient(180deg, var(--win-title) 0%, var(--accent-red) 100%);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}
.pos-btn-red-dark {
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%), linear-gradient(180deg, var(--win-title) 0%, #1a1a2e 100%);
  color: white;
  border: 1px solid rgba(0,0,0,0.2);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.pos-btn-red-dark:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%), linear-gradient(180deg, var(--win-title) 0%, #1a1a2e 100%);
}
.pos-btn-red-dark:active {
  background: linear-gradient(180deg, #1a1a2e 0%, var(--win-title) 100%);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}
.pos-btn-finalizar {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%), linear-gradient(180deg, var(--accent-red) 0%, var(--win-title) 100%);
  color: white;
  font-size: 14px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
  transition: all 0.15s;
}
.pos-btn-finalizar:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}
.pos-btn-finalizar:active {
  background: linear-gradient(180deg, var(--win-title) 0%, var(--accent-red) 100%);
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.2);
  transform: translateY(1px);
}
.pos-btn-finalizar .pos-btn-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  font-weight: normal;
}

/* Separador */
.pos-sep {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-red) 50%, transparent 100%);
  margin: 8px 0;
  border: none;
  opacity: 0.6;
}

/* Caja cerrada banner */
.pos-caja-cerrada {
  background: linear-gradient(180deg, var(--accent-red-bg) 0%, #ffffff 100%);
  border: 1px solid var(--accent-red);
  border-radius: 10px;
  padding: 10px 16px;
  margin: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--accent-red);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pos-caja-cerrada strong {
  color: var(--accent-red);
}

/* Scrollbar custom POS — estilo Vista */
.pos-table-container::-webkit-scrollbar {
  width: 14px;
}
.pos-table-container::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 8px;
  border: 1px solid var(--win-border-dark);
}
.pos-table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f8f9fa 0%, #dee2e6 100%);
  border-radius: 8px;
  border: 1px solid var(--win-border-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.pos-table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e9ecef 100%);
}
.pos-table-container::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #dee2e6 0%, #ced4da 100%);
}

/* ============================================================
   ARQUEO DE CAJA
   ============================================================ */

.arqueo-container {
  max-height: 500px;
  overflow-y: auto;
}
.arqueo-section {
  margin-bottom: 16px;
  border: 1px solid var(--win-border-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  overflow: hidden;
  background: white;
}
.arqueo-section-title {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  color: white;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 1px solid #991b1b;
}
.arqueo-section-body {
  padding: 12px 14px;
  background: white;
}
.arqueo-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12px;
  border-bottom: 1px dashed #d0d0d0;
}
.arqueo-row:last-child {
  border-bottom: none;
}
.arqueo-row .label {
  color: #4b5563;
}
.arqueo-row .value {
  font-weight: bold;
  color: #1a1a1a;
  font-family: var(--win-font-mono);
}
.arqueo-row .value.positive {
  color: var(--accent-green);
}
.arqueo-row .value.negative {
  color: var(--accent-red);
}
.arqueo-row .value.total {
  color: var(--accent-red);
  font-size: 14px;
}
.arqueo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  background: white;
  border: 1px solid var(--win-border-dark);
  border-radius: 8px;
  overflow: hidden;
}
.arqueo-table th {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  padding: 5px 8px;
  text-align: left;
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  border: 1px solid var(--accent-red-light);
}
.arqueo-table td {
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
}
.arqueo-table tr:hover {
  background: var(--accent-red-bg);
}
.arqueo-resumen-box {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  color: white;
  border: 1px solid #991b1b;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}
.arqueo-resumen-box .label {
  font-size: 11px;
  opacity: 0.9;
}
.arqueo-resumen-box .value {
  font-size: 22px;
  font-weight: bold;
  font-family: var(--win-font-mono);
}
.arqueo-password-box {
  text-align: center;
  padding: 20px;
}
.arqueo-password-box input {
  width: 220px;
  padding: 8px 10px;
  font-size: 14px;
  border: 2px solid var(--win-border-dark);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  text-align: center;
  margin-top: 10px;
  font-family: var(--win-font-ui);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.arqueo-password-box input:focus {
  border-color: var(--accent-red);
  background: white;
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15), inset 0 2px 4px rgba(0,0,0,0.06);
}
.arqueo-password-box .hint {
  font-size: 11px;
  color: var(--win-disabled);
  margin-top: 8px;
}

/* ============================================================
   BUSQUEDA PRODUCTO / CLIENTES — Tablas fijas
   ============================================================ */

#searchProductosTable,
#clientesSearchTable {
  table-layout: fixed;
  width: 100%;
}

#searchProductosTable tbody,
#clientesSearchTable tbody {
  display: table-row-group;
}

#searchProductosTable tbody tr,
#clientesSearchTable tbody tr {
  height: 28px !important;
  max-height: 28px !important;
  min-height: 28px !important;
  box-sizing: border-box;
}

#searchProductosTable tbody tr td,
#clientesSearchTable tbody tr td {
  height: 28px !important;
  max-height: 28px !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
  line-height: 1;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

#searchProductosTable tbody tr.search-row-empty td,
#clientesSearchTable tbody tr.search-row-empty td {
  background: #f9f9f9;
}

#searchProductosTable tbody tr.search-row:hover,
#clientesSearchTable tbody tr.search-row:hover {
  background: var(--accent-red-light);
}

#searchProductosTable tbody tr.search-row.selected,
#clientesSearchTable tbody tr.search-row.selected,
#clientesSearchTable tbody tr.selected {
  background: var(--accent-red) !important;
  color: white !important;
}

#searchProductosTable tbody tr.search-row.selected td,
#clientesSearchTable tbody tr.search-row.selected td,
#clientesSearchTable tbody tr.selected td {
  color: white !important;
  font-weight: bold;
}

#searchProductosBody {
  display: table-row-group;
}

/* POS specific focus styles */
.pos-input:focus {
  border-color: var(--accent-red);
  background: white;
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.pos-table tbody tr:hover {
  background: var(--accent-red-light);
}

.busqueda-row:hover {
  background: var(--accent-red-light) !important;
  cursor: pointer;
}

.busqueda-row-selected {
  background: #dc2626 !important;
  color: #fff !important;
}

.pos-table tbody tr.selected-row {
  background: var(--accent-red) !important;
  color: white !important;
}

.pos-table tbody tr.selected-row td {
  color: white !important;
  font-weight: bold;
}

/* Modal form inputs focus */
.prod-modal-input:focus,
.prod-modal-select:focus,
.prod-modal-textarea:focus {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ============================================================
   TEMAS DE COLORES — Tarjetas de selección
   ============================================================ */

.tema-card {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%);
  border: 1px solid var(--win-border-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 10px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.tema-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.tema-card:hover {
  border: 1px solid var(--accent-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}

.tema-card.tema-selected {
  border: 2px solid var(--accent-red);
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}

.tema-card.tema-selected .tema-nombre {
  color: var(--accent-red);
  font-weight: bold;
}

.tema-preview {
  height: 40px;
  margin-bottom: 6px;
  border: 1px solid var(--win-border-dark);
  border-radius: 6px;
}

.tema-nombre {
  font-size: 11px;
  color: var(--win-fg);
}

/* ── Tabs ── */
.win-tabs {
  display: flex;
  border-bottom: 2px solid var(--win-border);
  margin-bottom: 8px;
  gap: 2px;
}

.win-tab {
  padding: 6px 14px;
  cursor: pointer;
  border: 1px solid var(--win-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  font-size: 12px;
  font-weight: 500;
  color: var(--win-fg);
  user-select: none;
  transition: all 0.15s ease;
}

.win-tab:hover {
  background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
}

.win-tab.active {
  background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  border-color: var(--tema-accent);
  color: var(--tema-accent);
  font-weight: bold;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}


/* ============================================================
   RESPONSIVE: 3 RESOLUCIONES
   ============================================================ */

/* ── Resolución PEQUEÑA: < 768px ── */
@media (max-width: 767px) {
  html, body {
    min-width: 320px;
    font-size: 12px;
  }
  .win-window {
    border-radius: 0;
    height: 100vh;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
  }
  .pos-layout {
    flex-direction: column;
    height: auto;
    min-height: auto;
    overflow-y: visible;
  }
  .pos-panel {
    overflow-y: visible;
  }
  .win-titlebar {
    border-radius: 0;
    height: 28px;
    font-size: 11px;
  }
  .win-content {
    padding: 4px;
    padding-bottom: 80px;
    overflow: auto;
    min-height: 0;
  }
  .win-panel {
    padding: 6px;
    padding-bottom: 20px;
    overflow: visible;
  }
  .win-form-row,
  .win-form-row-2,
  .win-form-row-3,
  .win-form-row-4 {
    flex-direction: column !important;
    gap: 4px !important;
  }
  .win-form-row > .win-form-group,
  .win-form-row-2 > .win-form-group,
  .win-form-row-3 > .win-form-group,
  .win-form-row-4 > .win-form-group {
    flex: 1 1 100% !important;
    min-width: auto !important;
    max-width: none !important;
  }
  .win-grid,
  .win-grid-2,
  .win-grid-3,
  .win-grid-4 {
    grid-template-columns: 1fr !important;
  }
  .win-table-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none;
  }
  .win-table th,
  .win-table td {
    padding: 2px 4px;
    font-size: 11px;
  }
  .win-login-box {
    width: 95% !important;
    max-width: 360px;
  }
  .pos-main {
    flex-direction: column;
  }
  .pos-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 40px - 32px - 24px - 22px);
  }
  .pos-sidebar {
    width: 100%;
    min-width: auto;
    border-left: none;
    border-top: 2px solid var(--accent-red);
    order: 2;
  }
  .pos-layout > div:first-child {
    order: 1;
  }
  .pos-input-section {
    width: 100%;
  }
  .pos-ticket {
    max-height: 200px;
  }
  .win-menubar {
    flex-wrap: wrap;
    gap: 1px;
    padding: 1px 2px;
  }
  .win-menu {
    padding: 2px 4px;
    font-size: 10px;
  }
  .win-menu span {
    font-size: 10px;
    letter-spacing: 0.3px;
  }
  .win-submenu {
    font-size: 11px;
    min-width: 160px;
  }
  .win-submenu-item {
    padding: 4px 8px;
    font-size: 11px;
  }
  .win-submenu-item .shortcut {
    font-size: 9px;
    margin-left: 8px;
  }
  .win-separator {
    margin: 2px 4px;
  }
  .win-modal-overlay {
    padding: 4px;
  }
  .win-modal-content {
    max-width: 98vw;
    max-height: 95vh;
  }
  .win-modal-header {
    padding: 6px 10px;
  }
  .win-modal-body {
    padding: 8px;
  }
  .btn-group {
    flex-wrap: wrap;
    gap: 4px;
  }
  .btn-group .win-button {
    flex: 1 1 auto;
    min-width: 80px;
  }
}

/* ── Resolución MEDIANA: 768px - 1199px ── */
@media (min-width: 768px) and (max-width: 1199px) {
  html, body {
    min-width: 768px;
    font-size: 12px;
  }
  .win-content {
    padding: 6px;
  }
  .win-panel {
    padding: 8px;
  }
  .win-form-row-2 {
    flex-direction: row;
  }
  .win-form-row-2 > .win-form-group {
    flex: 1 1 48%;
    min-width: 280px;
    max-width: 50%;
  }
  .win-form-row-3 {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .win-form-row-3 > .win-form-group {
    flex: 1 1 48%;
    min-width: 280px;
    max-width: 50%;
  }
  .win-form-row-4 {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .win-form-row-4 > .win-form-group {
    flex: 1 1 48%;
    min-width: 280px;
    max-width: 50%;
  }
  .win-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .win-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .win-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .win-table-container {
    overflow-x: auto;
  }
  .pos-sidebar {
    width: 280px;
  }
  .win-modal-content {
    max-width: 90vw;
  }
  .win-login-box {
    width: 500px !important;
  }
}

/* ── Resolución GRANDE: >= 1200px ── */
@media (min-width: 1200px) {
  html, body {
    min-width: 1024px;
    font-size: 13px;
  }
  .win-content {
    padding: 10px;
  }
  .win-panel {
    padding: 12px;
  }
  .win-form-row-2 > .win-form-group {
    flex: 1 1 48%;
    min-width: 300px;
    max-width: 50%;
  }
  .win-form-row-3 > .win-form-group {
    flex: 1 1 30%;
    min-width: 250px;
    max-width: 33%;
  }
  .win-form-row-4 > .win-form-group {
    flex: 1 1 23%;
    min-width: 200px;
    max-width: 25%;
  }
  .win-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .win-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .win-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .pos-sidebar {
    width: 340px;
  }
  .win-modal-content {
    max-width: 800px;
  }
  .win-login-box {
    width: 400px !important;
  }
}

/* ── Clases de utilidad responsive ── */
.res-small .win-form-row-2 > .win-form-group,
.res-small .win-form-row-3 > .win-form-group,
.res-small .win-form-row-4 > .win-form-group {
  flex: 1 1 100% !important;
  max-width: none !important;
}
.res-medium .win-form-row-3 > .win-form-group {
  flex: 1 1 48%;
  max-width: 50%;
}
.res-medium .win-form-row-4 > .win-form-group {
  flex: 1 1 48%;
  max-width: 50%;
}
.res-large .win-form-row-3 > .win-form-group {
  flex: 1 1 30%;
  max-width: 33%;
}
.res-large .win-form-row-4 > .win-form-group {
  flex: 1 1 23%;
  max-width: 25%;
}

/* ── Scroll horizontal en tablas ── */
.win-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.win-table-responsive .win-table {
  min-width: 600px;
}

/* ── Ajuste de ancho máximo para formularios ── */
.win-form-max-sm { max-width: 400px; margin: 0 auto; }
.win-form-max-md { max-width: 600px; margin: 0 auto; }
.win-form-max-lg { max-width: 900px; margin: 0 auto; }

/* ── Hidden / Visible según resolución ── */
@media (max-width: 767px) {
  .hidden-mobile { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .hidden-tablet { display: none !important; }
}
@media (min-width: 1200px) {
  .hidden-desktop { display: none !important; }
}

/* ── Fin de responsive ── */
