/* Alamo POS - global styles */

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.alert-success { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.alert-danger  { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.alert-warning { background:#fffbeb; color:#92400e; border-color:#fde68a; }
.alert-info    { background:#eff6ff; color:#1e40af; border-color:#bfdbfe; }

/* Sidebar nav links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  color: #cbd5e1;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.nav-link:hover { background:#1e293b; color:#fff; }
.nav-link.active {
  background: #0f172a;
  color: #fff;
  border-left-color: #f2750a;
}
.nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; }

/* Cards */
.card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.card-body { padding: 1.25rem; }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
}

/* Buttons */
.btn {
  display:inline-flex; align-items:center; gap:.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: all .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background:#f2750a; color:#fff; }
.btn-primary:hover:not(:disabled) { background:#e35a06; }
.btn-secondary { background:#fff; color:#334155; border-color:#cbd5e1; }
.btn-secondary:hover:not(:disabled) { background:#f1f5f9; }
.btn-danger { background:#dc2626; color:#fff; }
.btn-danger:hover:not(:disabled) { background:#b91c1c; }
.btn-success { background:#059669; color:#fff; }
.btn-success:hover:not(:disabled) { background:#047857; }
.btn-warning { background:#d97706; color:#fff; }
.btn-warning:hover:not(:disabled) { background:#b45309; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.825rem; }
.btn-block { width: 100%; justify-content: center; }

/* Form controls */
.form-label { display:block; font-size: .85rem; font-weight: 500; color:#334155; margin-bottom: .35rem; }
.form-control, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.92rem;
  color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: #f2750a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(242,117,10,.15);
}
textarea.form-control { min-height: 5rem; }
.form-check { display:flex; align-items:center; gap:.5rem; font-size:.9rem; }

/* Tables */
.table { width:100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: .9rem;
  vertical-align: middle;
}
.table tbody tr:hover { background: #f8fafc; }

/* Badges */
.badge {
  display:inline-block; padding: 0.15rem 0.6rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.badge-success { background:#d1fae5; color:#065f46; }
.badge-warning { background:#fef3c7; color:#92400e; }
.badge-danger  { background:#fee2e2; color:#991b1b; }
.badge-info    { background:#dbeafe; color:#1e40af; }
.badge-gray    { background:#e2e8f0; color:#334155; }
.badge-bargain { background:#fef3c7; color:#92400e; border:1px solid #fde68a; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-panel {
  background: #fff; border-radius: 0.75rem;
  width: 100%; max-width: 36rem;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 1.25rem; }
.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  display: flex; gap: 0.5rem; justify-content: flex-end;
}

/* POS product card */
.pos-product {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
  display: flex; flex-direction: column;
  min-height: 5.5rem;
}
.pos-product:hover { border-color: #f2750a; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,.08); }
.pos-product.bargain { border-color: #fbbf24; background: linear-gradient(135deg, #fffbeb 0%, #fff 100%); }

/* Receipts (print) */
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
}
.thermal-receipt {
  font-family: 'Courier New', monospace;
  width: 80mm;
  max-width: 80mm;
  font-size: 11px;
  line-height: 1.35;
  padding: 4mm;
  background: #fff;
  margin: 0 auto;
  color: #000;
}
.thermal-receipt h1 { font-size: 14px; font-weight: 700; }

/* Stat cards on dashboard */
.stat-card {
  background:#fff; border-radius:.75rem; padding:1.25rem;
  border:1px solid #e2e8f0; box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.stat-label { font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; color:#64748b; font-weight:600; }
.stat-value { font-size:1.6rem; font-weight:700; color:#0f172a; margin-top:.25rem; }
.stat-sub { font-size:.8rem; color:#64748b; margin-top:.25rem; }

/* Util */
.divider { border-top:1px dashed #cbd5e1; margin: .5rem 0; }
.text-muted { color:#64748b; }
.text-success-strong { color:#065f46; }
.text-danger-strong { color:#991b1b; }
