:root {
  --vfc-primary: #1e6bb8;
  --vfc-primary-hover: #1555a0;
  --vfc-primary-light: #e8f0fe;
  --vfc-bg: #f5f7fa;
  --vfc-card: #ffffff;
  --vfc-text: #1a2332;
  --vfc-text-muted: #6b7280;
  --vfc-border: #d1d9e6;
  --vfc-destructive: #dc2626;
  --vfc-destructive-bg: #fef2f2;
  --vfc-success: #16a34a;
  --vfc-warning: #f59e0b;
  --vfc-radius: 8px;
}

/* === Reset Elementor interference === */
.vfc-public-app button,
.vfc-public-app .elementor-button,
.vfc-public-app .elementor-button:hover,
.vfc-public-app .elementor-button:focus {
  background: none !important;
  border: 1px solid transparent !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  color: inherit !important;
  font: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  line-height: 1.4 !important;
  transition: all 0.15s ease !important;
}

.vfc-public-app input,
.vfc-public-app select,
.vfc-public-app textarea {
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  background: var(--vfc-card) !important;
  color: var(--vfc-text) !important;
  border: 1px solid var(--vfc-border) !important;
  border-radius: 6px !important;
  padding: 9px 12px !important;
  height: auto !important;
}

.vfc-public-app input:focus,
.vfc-public-app select:focus {
  outline: none !important;
  border-color: var(--vfc-primary) !important;
  box-shadow: 0 0 0 3px rgba(30,107,184,0.12) !important;
}
/* ================================= */

.vfc-public-app {
  min-height: 100vh;
  background: var(--vfc-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  color: var(--vfc-text);
  line-height: 1.5;
}
.vfc-public-app * { box-sizing: border-box; }

/* --- Navigation --- */
.vfc-nav {
  background: var(--vfc-card);
  border-bottom: 1px solid var(--vfc-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.vfc-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
}
.vfc-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--vfc-primary);
  white-space: nowrap;
  text-decoration: none;
}
.vfc-nav-brand:hover { color: var(--vfc-primary-hover); }
.vfc-nav-links { display: flex; gap: 2px; }
.vfc-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--vfc-text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}
.vfc-nav-link:hover { background: var(--vfc-primary-light); color: var(--vfc-primary); }
.vfc-nav-link.active { background: var(--vfc-primary); color: #fff; }
.vfc-nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.vfc-nav-email { color: var(--vfc-text-muted); }
.vfc-nav-logout {
  color: var(--vfc-destructive);
  text-decoration: none;
  font-weight: 500;
}
.vfc-nav-logout:hover { text-decoration: underline; }

.vfc-public-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
}
.vfc-public-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--vfc-text-muted);
  border-top: 1px solid var(--vfc-border);
}

/* --- Login --- */
.vfc-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vfc-bg);
  padding: 20px;
}
.vfc-login-card {
  background: var(--vfc-card);
  border: 1px solid var(--vfc-border);
  border-radius: var(--vfc-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.vfc-login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--vfc-primary-light);
  margin-bottom: 16px;
}
.vfc-login-icon .dashicons { color: var(--vfc-primary); font-size: 28px; width: 28px; height: 28px; }
.vfc-login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--vfc-text);
  margin: 0 0 4px 0;
}
.vfc-login-subtitle {
  font-size: 13px;
  color: var(--vfc-text-muted);
  margin: 0 0 28px 0;
}
.vfc-login-field {
  text-align: left;
  margin-bottom: 16px;
}
.vfc-login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--vfc-text-muted);
  margin-bottom: 4px;
}
.vfc-login-field input[type="text"],
.vfc-login-field input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--vfc-border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--vfc-text);
  background: var(--vfc-card);
}
.vfc-login-field input:focus {
  outline: none;
  border-color: var(--vfc-primary);
  box-shadow: 0 0 0 3px rgba(30,107,184,0.12);
}
.vfc-login-remember label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--vfc-text);
  cursor: pointer;
}
.vfc-login-remember input[type="checkbox"] { margin: 0; }
.vfc-login-btn {
  width: 100%;
  padding: 11px 20px;
  background: var(--vfc-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 8px;
}
.vfc-login-btn:hover { background: var(--vfc-primary-hover); }
.vfc-login-btn:disabled { opacity: 0.6; cursor: default; }
.vfc-login-error {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--vfc-destructive);
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--vfc-destructive-bg);
  border-radius: 6px;
}

/* --- Shared classes from admin.css --- */
.vfc-wrap { width: 100%; }
.vfc-card {
  background: var(--vfc-card); border: 1px solid var(--vfc-border);
  border-radius: var(--vfc-radius); box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.vfc-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--vfc-border);
  display: flex; justify-content: space-between; align-items: center;
}
.vfc-card-header h2, .vfc-card-header h3 {
  font-size: 15px; font-weight: 600; margin: 0; color: var(--vfc-text);
  display: flex; align-items: center; gap: 8px;
}
.vfc-card-body { padding: 20px; }
.vfc-card-body-p0 { padding: 0; }
.vfc-table-wrap { overflow-x: auto; }
.vfc-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.vfc-table th {
  text-align: left; padding: 10px 14px; font-weight: 600;
  color: var(--vfc-text-muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 2px solid var(--vfc-border);
  white-space: nowrap;
}
.vfc-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--vfc-border);
  color: var(--vfc-text);
}
.vfc-table tr:hover td { background: #f9fafc; }
.vfc-table .vfc-mono { font-family: 'Courier New', monospace; font-size: 12px; }
.vfc-table .vfc-empty { text-align: center; padding: 40px 14px; color: var(--vfc-text-muted); font-size: 13px; }
.vfc-badge {
  display: inline-flex; align-items: center; padding: 2px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  white-space: nowrap; line-height: 1.6;
}
.vfc-badge-default { background: #e8f5e9; color: #2e7d32; }
.vfc-badge-secondary { background: #eef2f6; color: #475569; }
.vfc-badge-destructive { background: #fef2f2; color: #dc2626; }
.vfc-badge-primary { background: var(--vfc-primary-light); color: var(--vfc-primary); }
.vfc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; font-size: 13px;
  font-weight: 500; cursor: pointer; border: 1px solid transparent;
  text-decoration: none; transition: all 0.15s ease; line-height: 1.4;
}
.vfc-btn-primary {
  background: var(--vfc-primary); color: #fff; border-color: var(--vfc-primary);
}
.vfc-btn-primary:hover { background: var(--vfc-primary-hover); color: #fff; }
.vfc-btn-outline {
  background: transparent; color: var(--vfc-text); border-color: var(--vfc-border);
}
.vfc-btn-outline:hover { background: #f0f4f8; }
.vfc-btn-destructive { background: var(--vfc-destructive); color: #fff; }
.vfc-btn-destructive:hover { background: #b91c1c; }
.vfc-btn-sm { padding: 5px 10px; font-size: 12px; }
.vfc-btn-icon {
  padding: 6px; border: none; background: transparent; cursor: pointer;
  border-radius: 4px; color: var(--vfc-text-muted);
}
.vfc-btn-icon:hover { background: #f0f4f8; color: var(--vfc-text); }
.vfc-btn-icon-danger:hover { color: var(--vfc-destructive); }
.vfc-btn:disabled { opacity: 0.5; cursor: default; }
.vfc-btn-group { display: flex; gap: 6px; justify-content: flex-end; }
.vfc-search-wrap {
  position: relative; max-width: 400px; margin-bottom: 16px;
}
.vfc-search-wrap .vfc-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--vfc-text-muted);
}
.vfc-search-wrap input {
  width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--vfc-border);
  border-radius: 6px; font-size: 13px; background: var(--vfc-card);
  color: var(--vfc-text);
}
.vfc-search-wrap input:focus {
  outline: none; border-color: var(--vfc-primary);
  box-shadow: 0 0 0 3px rgba(30,107,184,0.12);
}
.vfc-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.vfc-form-group { display: flex; flex-direction: column; gap: 4px; }
.vfc-form-group-full { grid-column: 1 / -1; }
.vfc-form-group label { font-size: 12px; font-weight: 600; color: var(--vfc-text-muted); }
.vfc-form-group input, .vfc-form-group select {
  padding: 9px 12px; border: 1px solid var(--vfc-border); border-radius: 6px;
  font-size: 13px; background: var(--vfc-card); color: var(--vfc-text); height: 38px;
}
.vfc-form-group input:focus, .vfc-form-group select:focus {
  outline: none; border-color: var(--vfc-primary);
  box-shadow: 0 0 0 3px rgba(30,107,184,0.12);
}
.vfc-alert-card {
  border: 1px solid var(--vfc-destructive); border-radius: var(--vfc-radius);
  background: var(--vfc-destructive-bg); padding: 16px 20px; margin-bottom: 20px;
}
.vfc-alert-card h3 {
  color: var(--vfc-destructive); font-size: 14px; margin: 0 0 10px 0;
  display: flex; align-items: center; gap: 8px;
}
.vfc-alert-card .vfc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.vfc-flex { display: flex; }
.vfc-flex-center { align-items: center; }
.vfc-flex-between { justify-content: space-between; }
.vfc-flex-wrap { flex-wrap: wrap; }
.vfc-gap-2 { gap: 8px; }
.vfc-gap-3 { gap: 12px; }
.vfc-gap-4 { gap: 16px; }
.vfc-mb-4 { margin-bottom: 16px; }
.vfc-mt-4 { margin-top: 16px; }
.vfc-text-center { text-align: center; }
.vfc-text-right { text-align: right; }
.vfc-text-muted { color: var(--vfc-text-muted); }
.vfc-font-bold { font-weight: 700; }
.vfc-text-sm { font-size: 12px; }
.vfc-w-full { width: 100%; }
.vfc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vfc-stock-low { color: var(--vfc-destructive); font-weight: 700; }
.vfc-stock-ok { color: var(--vfc-success); }
.vfc-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 99999; align-items: center; justify-content: center;
}
.vfc-modal-overlay.active { display: flex; }
.vfc-modal {
  background: var(--vfc-card); border-radius: var(--vfc-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15); width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
}
.vfc-modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--vfc-border);
  display: flex; justify-content: space-between; align-items: center;
}
.vfc-modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.vfc-modal-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--vfc-text-muted); padding: 4px; line-height: 1;
}
.vfc-modal-close:hover { color: var(--vfc-text); }
.vfc-modal-body { padding: 20px; }
.vfc-modal-footer {
  padding: 16px 20px; border-top: 1px solid var(--vfc-border);
  display: flex; justify-content: flex-end; gap: 8px;
}
.vfc-dropdown-wrap { position: relative; }
.vfc-dropdown {
  position: absolute; z-index: 1000; width: 100%; margin-top: 4px;
  background: var(--vfc-card); border: 1px solid var(--vfc-border);
  border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 240px; overflow-y: auto;
}
.vfc-dropdown-item {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  border: none; background: none; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
}
.vfc-dropdown-item:hover { background: #f5f7fa; }
.vfc-dropdown-item .vfc-badge { float: right; }
.vfc-loading { text-align: center; padding: 40px; color: var(--vfc-text-muted); }
.vfc-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.vfc-header h1 {
  font-size: 24px; font-weight: 700; color: var(--vfc-text); margin: 0;
}
.vfc-header p { color: var(--vfc-text-muted); font-size: 13px; margin: 4px 0 0 0; }
.vfc-page-desc { color: var(--vfc-text-muted); font-size: 13px; margin: 4px 0 0 0; }
.vfc-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.vfc-stat-card {
  background: var(--vfc-card); border: 1px solid var(--vfc-border);
  border-radius: var(--vfc-radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.vfc-stat-card .vfc-stat-number {
  font-size: 28px; font-weight: 700; color: var(--vfc-primary); margin: 4px 0;
}
.vfc-stat-card .vfc-stat-label { font-size: 13px; color: var(--vfc-text-muted); }
.vfc-center-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  margin: 0 auto 12px;
}
.vfc-center-icon.bg-primary { background: var(--vfc-primary-light); }
.vfc-center-icon .dashicons { color: var(--vfc-primary); font-size: 24px; width: 24px; height: 24px; }
.vfc-taller-card-selected {
  border: 2px solid var(--vfc-primary); background: var(--vfc-primary-light);
}
.vfc-catalog-section { margin-bottom: 0; }
.vfc-error-msg { color: var(--vfc-destructive); font-size: 13px; font-weight: 500; margin-top: 4px; }

.vfc-row-cancelado { opacity: 0.75; }
.vfc-row-cancelado td { background: #fef2f2 !important; text-decoration: line-through; }
.vfc-text-cancelado { color: var(--vfc-destructive) !important; font-weight: 700; }

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

@media (max-width: 768px) {
  .vfc-grid-2 { grid-template-columns: 1fr; }
  .vfc-form-grid { grid-template-columns: 1fr; }
  .vfc-header { flex-direction: column; align-items: flex-start; }
  .vfc-nav-inner { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 6px; }
  .vfc-nav-links { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .vfc-nav-user { margin-left: auto; }
}

/* --- Ticket styles --- */
.vfc-ticket-body { padding: 0; }
.vfc-ticket {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 13px; line-height: 1.6; padding: 20px;
  max-width: 340px; margin: 0 auto;
}
.vfc-ticket-header { text-align: center; margin-bottom: 8px; }
.vfc-ticket-logo { margin-bottom: 4px; }
.vfc-ticket-title { font-size: 16px; font-weight: 700; color: var(--vfc-primary); }
.vfc-ticket-sub { font-size: 11px; color: var(--vfc-text-muted); }
.vfc-ticket-divider { border-top: 1px dashed var(--vfc-border); margin: 10px 0; }
.vfc-ticket-info { font-size: 12px; }
.vfc-ticket-info div { margin-bottom: 2px; }
.vfc-ticket-label { color: var(--vfc-text-muted); }
.vfc-ticket-detail { font-size: 12px; }
.vfc-ticket-detail div { margin-bottom: 2px; }
.vfc-ticket-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 700; color: var(--vfc-text);
}
.vfc-ticket-footer {
  text-align: center; font-size: 12px; color: var(--vfc-text-muted);
  font-family: inherit;
}
.vfc-ticket-actions {
  display: flex; gap: 8px; justify-content: center;
  padding: 16px 20px; border-top: 1px solid var(--vfc-border);
}

@media print {
  body * { visibility: hidden; }
  #vfc-ticket-modal.active,
  #vfc-ticket-modal.active * { visibility: visible; }
  #vfc-ticket-modal.active {
    position: fixed; left: 0; top: 0; width: 80mm;
    background: #fff; box-shadow: none;
  }
  #vfc-ticket-modal.active .vfc-modal {
    max-width: 80mm; box-shadow: none; border: none;
  }
  #vfc-ticket-modal.active .vfc-ticket-body { padding: 0; }
  .vfc-ticket-actions { display: none !important; }
}
