/* =========================================================
   LifeComp — unified design system
   Premium laptop & hardware storefront tokens + shared
   components. Every page (storefront, auth, profile,
   checkout, admin) reads from these variables.
   ========================================================= */

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

:root {
  /* Neutrals */
  --ink: #0F1220;
  --ink-soft: #4E5568;
  --muted: #6B7280;
  --paper: #F6F7FB;
  --ivory: #F6F7FB;
  --ivory-deep: #ECEEF6;
  --surface: #FFFFFF;
  --line: #E3E6EF;
  --line-strong: #C9CEDC;

  /* Brand — kept under historical names so existing pages auto-pick up */
  --forest: #4338CA;
  /* primary */
  --forest-dark: #312E81;
  /* primary hover */
  --forest-tint: #EEF0FF;
  /* primary tint */
  --gold: #C98A24;
  /* secondary accent */
  --gold-soft: #F7E4BE;
  --maroon: #DC2626;
  /* danger */

  --brand: #4338CA;
  --brand-dark: #312E81;
  --brand-tint: #EEF0FF;
  --accent: #C98A24;
  --success: #15803D;
  --success-bg: #ECFDF3;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --info: #0E7490;
  --info-bg: #ECFEFF;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 18, 32, 0.05);
  --shadow-sm: 0 2px 10px rgba(15, 18, 32, 0.06);
  --shadow: 0 14px 32px -10px rgba(15, 18, 32, 0.18);
  --shadow-lg: 0 32px 64px -18px rgba(15, 18, 32, 0.3);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --maxw: 1240px;
}

/* ---------- Logout confirmation dialog ---------- */
.logout-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: start center;
  padding: 18vh 1rem 1rem;
  background: rgba(11, 13, 20, 0.55);
  backdrop-filter: blur(3px);
}

.logout-confirm-dialog {
  width: min(100%, 420px);
  padding: 30px;
  color: var(--ink);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: lcRise 0.25s ease-out;
}

.logout-confirm-dialog h2 {
  margin-bottom: 10px;
  font-family: var(--font-display);
}

.logout-confirm-dialog p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

.logout-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.logout-confirm-actions .btn {
  flex: 1;
}

@keyframes lcRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-dark);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.wrap {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

.main-content {
  flex: 1;
}

/* ---------- Typography helpers ---------- */
.kicker {
  display: inline-block;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.eyebrow {
  display: block;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-tight {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 30px;
}

.section-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

.text-link {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  position: relative;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.65, 0, 0.35, 1);
}

.text-link:hover::after {
  transform: scaleX(1);
}

.text-link:hover {
  color: var(--brand-dark);
}

/* ---------- Buttons ---------- */
.btn,
.btn.btn-primary,
.btn.btn-outline,
.btn.btn-outline-primary,
.btn.btn-outline-secondary,
.btn.btn-secondary,
.btn.btn-light,
.btn.btn-success,
.btn.btn-warning,
.btn.btn-danger,
.btn.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(67, 56, 202, 0.5);
}

.btn.btn-outline,
.btn-outline-primary,
.btn-outline-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.btn-outline:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-tint);
  transform: translateY(-1px);
}

.btn.btn-light {
  background: #fff;
  color: var(--brand-dark);
  border-color: transparent;
}

.btn.btn-light:hover {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.btn.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

.btn.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.btn-link {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
  padding: 0.4rem 0.2rem;
  box-shadow: none;
}

.btn.btn-link:hover {
  background: transparent;
  color: var(--brand-dark);
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-block,
.btn.w-100 {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Forms ---------- */
.form-control,
.form-select,
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
select,
textarea,
.category-form-card input,
.category-form-card select,
.category-form-card textarea,
#checkoutForm input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}

.form-label,
label {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
  display: inline-block;
  letter-spacing: -0.005em;
}

.form-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.form-field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.form-success:not(:empty) {
  padding: 12px 14px;
  margin-bottom: 14px;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid #BBF0D2;
  border-radius: var(--radius-sm);
}

.form-note[role="alert"],
.invalid-feedback {
  color: var(--danger);
}

.form-note:not(:empty) {
  margin-top: 10px;
  font-size: 0.85rem;
}

.input-group-text {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--muted);
}

.form-check-input {
  accent-color: var(--brand);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Bootstrap overrides ---------- */
.container {
  width: min(100% - 40px, var(--maxw));
  max-width: var(--maxw);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  background: var(--surface);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-family: var(--font-display);
}

.card-footer {
  background: #fff;
  border-top: 1px solid var(--line);
}

.alert {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.15rem;
  font-size: 0.92rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: #BBF0D2;
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #FBD5D5;
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: #FDE4B8;
}

.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: #BEF0F7;
}

.badge {
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.4em 0.75em;
  letter-spacing: 0.01em;
}

.text-bg-primary {
  background: var(--brand) !important;
}

.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom-width: 1px;
  border-color: var(--line);
}

.table td {
  vertical-align: middle;
  font-size: 0.9rem;
  border-color: var(--line);
}

.table-hover tbody tr:hover {
  background: var(--paper);
}

.pagination {
  justify-content: center;
  margin-top: 30px;
}

.page-link {
  color: var(--brand);
  border-radius: 8px;
  margin: 0 3px;
  border: 1px solid var(--line);
}

.page-link:hover {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.page-item.active .page-link {
  background: var(--brand);
  border-color: var(--brand);
}

.modal-content {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.modal-header,
.modal-footer {
  border-color: var(--line);
}

.progress {
  background: var(--line);
  border-radius: var(--radius-pill);
  height: 8px;
}

.progress-bar {
  border-radius: var(--radius-pill);
  background: var(--brand);
}

.spinner-border {
  color: currentColor;
}

.rounded-4 {
  border-radius: var(--radius) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.text-primary {
  color: var(--brand) !important;
}

.text-muted {
  color: var(--muted) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.bg-light {
  background: var(--paper) !important;
}

.bg-white {
  background: #fff !important;
}

.bg-danger {
  background: var(--danger) !important;
}

.bg-warning {
  background: var(--warning) !important;
}

.bg-info {
  background: var(--info) !important;
}

.bg-success {
  background: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

.text-secondary {
  color: var(--ink-soft) !important;
}

.min-vh-100 {
  min-height: 100vh;
}

/* ---------- Value cards / generic content grid ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: var(--transition);
}

.value-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

/* Two-column layouts */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.contact-layout>* {
  min-width: 0;
}

@media (max-width: 760px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.35s ease-out;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ivory-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 6px;
  border: 2px solid var(--ivory-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {

  .site-header,
  .site-footer,
  .btn,
  .no-print {
    display: none !important;
  }
}