/* ============================================================
   SmartHub IT Store — Main CSS Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --color-primary:        #1a56db;
  --color-primary-dark:   #1e3a8a;
  --color-primary-light:  #2563eb;
  --color-accent:         #1d4ed8;
  --color-accent-light:   #60a5fa;
  --color-bg-tint:        #eff6ff;
  --color-bg-light:       #f8fafc;
  --color-white:          #ffffff;
  --color-gray-50:        #f9fafb;
  --color-gray-100:       #f3f4f6;
  --color-gray-200:       #e5e7eb;
  --color-gray-300:       #d1d5db;
  --color-gray-400:       #9ca3af;
  --color-gray-500:       #6b7280;
  --color-gray-700:       #374151;
  --color-gray-900:       #111827;
  --color-text:           #1a1a2e;
  --color-text-muted:     #6b7280;
  --color-success:        #16a34a;
  --color-success-bg:     #dcfce7;
  --color-warning:        #d97706;
  --color-warning-bg:     #fef3c7;
  --color-danger:         #dc2626;
  --color-danger-bg:      #fee2e2;
  --color-info:           #2563eb;
  --color-info-bg:        #dbeafe;

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --radius-full:  9999px;

  --shadow-xs:    0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:    0 1px 6px rgba(0,0,0,0.07);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
  --shadow-card:  0 2px 12px rgba(26,86,219,0.08);

  --font-main:    'Inter', 'Roboto', system-ui, sans-serif;
  --transition:   all 0.22s ease;

  --header-h1:    48px;  /* top bar */
  --header-h2:    48px;  /* nav bar */
  --header-total: 96px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Container ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,86,219,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-bg-tint);
}
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; border-radius: var(--radius-md); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  width: fit-content;
}
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.badge--in {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.badge--in .badge__dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}
.badge--low {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge--low .badge__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.badge--out {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.badge--out .badge__dot {
  background: #ef4444;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  border-left: 4px solid transparent;
}
.alert--success { background: var(--color-success-bg); color: var(--color-success); border-color: var(--color-success); }
.alert--error   { background: var(--color-danger-bg);  color: var(--color-danger);  border-color: var(--color-danger);  }
.alert--info    { background: var(--color-info-bg);    color: var(--color-info);    border-color: var(--color-info);    }
.alert--warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: var(--color-warning); }

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

/* ── Section Heading ─────────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-heading h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  padding-left: 14px;
}
.section-heading h2::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}
.section-heading a {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.section-heading a:hover { color: var(--color-primary); }

/* ── Grid Utilities ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* ── Quantity Stepper ────────────────────────────────────────── */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 38px;
  background: #fff;
  flex-shrink: 0;
}
.qty-stepper button {
  width: 30px;
  height: 38px;
  border: none;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  font-size: 1.05rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.qty-stepper button:hover {
  background: var(--color-primary);
  color: #fff;
}
.qty-stepper input {
  width: 38px;
  height: 38px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-gray-200);
  border-right: 1px solid var(--color-gray-200);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  background: #fff;
  color: var(--color-text);
  -moz-appearance: textfield;
  padding: 0;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Page Wrapper ────────────────────────────────────────────── */
.page-wrapper {
  padding-top: var(--header-total);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* ── Section Spacing ─────────────────────────────────────────── */
.section { padding: 36px 0; }
.section + .section { padding-top: 0; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding: 12px 0;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--color-gray-300); }

/* ── Form Elements ───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--color-bg-tint);
  color: var(--color-text);
  transition: var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.form-input::placeholder { color: var(--color-gray-400); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-gray-700);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── SVG Icons (feather-style via CSS mask or inline) ────────── */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ── Scrollbar Styling ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .container { padding: 0 14px; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; }
}

/* ── SmartHub Modern UI Alert / Dialog Modal ─────────────────── */
.sh-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}
.sh-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.sh-modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 30px 24px 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.06);
  position: relative;
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
.sh-modal-overlay.is-visible .sh-modal-box {
  transform: scale(1) translateY(0);
}
.sh-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sh-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.sh-modal-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.sh-modal-icon-wrap.delete,
.sh-modal-icon-wrap.danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
  color: #dc2626;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.08);
}
.sh-modal-icon-wrap.network,
.sh-modal-icon-wrap.offline {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
  color: #dc2626;
}
.sh-modal-icon-wrap.email {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid #fdba74;
  color: #ea580c;
}
.sh-modal-icon-wrap.error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
  color: #dc2626;
}
.sh-modal-icon-wrap.warning {
  background: linear-gradient(135deg, #fefce8 0%, #fef08a 100%);
  border: 2px solid #fde047;
  color: #ca8a04;
}
.sh-modal-icon-wrap.info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #93c5fd;
  color: #2563eb;
}
.sh-modal-icon-wrap.success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  color: #16a34a;
}
.sh-modal-icon-wrap svg {
  width: 30px;
  height: 30px;
}
.sh-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.3;
}
.sh-modal-message {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 16px;
  word-break: break-word;
}
.sh-modal-item-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 20px;
  text-align: left;
}
.sh-modal-item-preview img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 4px;
  flex-shrink: 0;
}
.sh-modal-item-preview__placeholder {
  width: 52px;
  height: 52px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}
.sh-modal-item-preview__placeholder svg {
  width: 24px;
  height: 24px;
}
.sh-modal-item-preview__info {
  min-width: 0;
  flex: 1;
}
.sh-modal-item-preview__brand {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.sh-modal-item-preview__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-modal-item-preview__meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sh-modal-item-preview__price {
  font-weight: 700;
  color: var(--color-primary, #3d0e6b);
}
.sh-modal-hint {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 18px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.sh-modal-hint svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #3b82f6;
}
.sh-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.sh-modal-btn {
  flex: 1;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sh-modal-btn-primary {
  background: linear-gradient(135deg, #1a56db 0%, #1e3a8a 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
}
.sh-modal-btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #172554 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 86, 219, 0.35);
}
.sh-modal-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
}
.sh-modal-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.38);
}
.sh-modal-btn-secondary {
  background: #f1f5f9;
  color: #334155;
}
.sh-modal-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

