/* HubEurope Warehouse – site.css (BRAND COMPLIANT V2.0)
   Design system refactored to match 2024 Brand Refresh
   Clean, professional, accessible interface */

:root {
  /* BRAND COLORS - HubEurope 2024 */
  --brand-orange:    #FF4400;      /* Primary brand color */
  --brand-orange-2:  #FF6A26;      /* Hover states */
  --brand-orange-3:  #FF7733;      /* Tertiary accents */
  --brand-orange-4:  #FF904C;      /* Light accents */
  
  --black:           #000000;      /* Pure black */
  --black-90:        #191919;      /* Headings */
  --black-80:        #333333;      /* Body text */
  --black-70:        #4C4C4C;      /* Tertiary text */
  
  --gray-50:         #808080;      /* Muted text */
  --gray-70:         #4D4D4D;      /* Secondary text */
  
  --white:           #FFFFFF;      /* Pure white */
  --off-white:       #F9FAFB;      /* Subtle backgrounds */
  --light-gray:      #F3F4F6;      /* Cards, inputs */
  
  /* SEMANTIC COLORS */
  --success:         #10B981;      /* Green for success */
  --warning:         #F59E0B;      /* Yellow for warnings */
  --danger:          #EF4444;      /* Red for errors */
  --info:            #3B82F6;      /* Blue for info */
  
  /* LEGACY MAPPINGS (for compatibility) */
  --bg:              var(--off-white);
  --card:            var(--white);
  --ink:             var(--black-80);
  --muted:           var(--gray-50);
  --accent:          var(--brand-orange);
  --accent-2:        var(--brand-orange-2);
  --ring:            var(--brand-orange);
  
  /* DESIGN TOKENS */
  --shadow-sm:       0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:       0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:       0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow:          var(--shadow-lg);
  
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       16px;
  
  /* TYPOGRAPHY - Brand Fonts */
  --font-title:      'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:       'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui:         var(--font-body);
}

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

/* ============================================================
 * RESET & BASE STYLES
 * ============================================================ */
* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

body {
  margin: 0;
  background: var(--off-white);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================================
 * LAYOUT CONTAINERS
 * ============================================================ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

/* ============================================================
 * HEADER
 * ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  padding: 20px 0;
  border-bottom: 1px solid #E5E7EB;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-hu {
  height: 56px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 68, 0, 0.1);
  color: var(--brand-orange);
  border: 1px solid rgba(255, 68, 0, 0.2);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: none;
}

/* ============================================================
 * CARDS
 * ============================================================ */
.card {
  background: var(--white);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  transition: all 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--login {
  width: min(560px, 100%);
  margin: 40px auto;
}

/* ============================================================
 * TYPOGRAPHY
 * ============================================================ */
.h1 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--black-90);
  margin: 0 0 8px;
  line-height: 1.2;
}

.subtle {
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ============================================================
 * FORM CONTROLS
 * ============================================================ */
.form-row {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.label {
  color: var(--black-80);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: block;
}

.input {
  width: 100%;
  background: var(--white);
  color: var(--ink);
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all 0.15s ease;
}

.input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(255, 68, 0, 0.1);
}

.input::placeholder {
  color: var(--gray-50);
}

/* ============================================================
 * BUTTONS & ACTIONS
 * ============================================================ */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  outline: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand-orange);
  color: var(--white);
  box-shadow: 0 2px 4px rgba(255, 68, 0, 0.2);
}

.btn-primary:hover {
  background: var(--brand-orange-2);
  box-shadow: 0 4px 8px rgba(255, 68, 0, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--black-80);
  border-color: #E5E7EB;
}

.btn-secondary:hover {
  background: var(--light-gray);
  border-color: var(--gray-50);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* ============================================================
 * ALERTS
 * ============================================================ */
.alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 12px 0;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid;
}

.alert--error {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #FCA5A5;
}

.alert--ok {
  background: #D1FAE5;
  color: #065F46;
  border-color: #6EE7B7;
}

.alert--info {
  background: #DBEAFE;
  color: #1E40AF;
  border-color: #93C5FD;
}

.alert--warning {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
}

/* ============================================================
 * HELPER TEXT
 * ============================================================ */
.helper {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

.helper a {
  color: var(--brand-orange);
  text-decoration: none;
  font-weight: 600;
}

.helper a:hover {
  text-decoration: underline;
}

/* ============================================================
 * RESPONSIVE - MOBILE
 * ============================================================ */
@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .card--login {
    margin: 20px auto;
    padding: 24px;
  }
  
  .container {
    padding: 20px 16px 48px;
  }
  
  .h1 {
    font-size: 28px;
  }
}

/* ============================================================
 * RETURNS PAGE STYLING
 * ============================================================ */

/* Print button positioning */
.printbar--top {
  margin: 20px 0 12px 0;
  text-align: center;
}

/* Label card styling - clean shipping label */
.label-card {
  max-width: 4in;
  margin: 0 auto;
  padding: 0.25in;
  background: var(--white);
  border: 2px solid var(--black-80);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

/* Brand logo in label */
.label-card .brand {
  text-align: center;
  margin-bottom: 0.2in;
  padding-bottom: 0.15in;
  border-bottom: 2px solid var(--black);
}

.label-card .brand-logo {
  max-width: 2.5in;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Returns info grid */
.returns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15in;
  margin-bottom: 0.2in;
  font-size: 11pt;
}

.returns-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.returns-grid > div.full {
  grid-column: 1 / -1;
}

.returns-lbl {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 9pt;
  text-transform: uppercase;
  color: var(--gray-50);
  letter-spacing: 0.05em;
}

.returns-val {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14pt;
  color: var(--black);
  word-break: break-word;
  line-height: 1.2;
}

/* Barcode container */
#barcode-wrap {
  margin-top: 0.2in;
  text-align: center;
  background: var(--white);
  padding: 0.1in;
  border-radius: var(--radius-sm);
}

#barcode {
  max-width: 100%;
  height: auto;
}

/* ============================================================
 * PRINT STYLES
 * ============================================================ */
@media print {
  @page {
    margin: 0.25in;
    size: 4in auto;
  }
  
  body {
    margin: 0;
    background: white;
  }
  
  .label-card {
    box-shadow: none;
    border: 2px solid #000;
  }
  
  .printbar--top {
    display: none;
  }
}

/* ============================================================
 * ACCESSIBILITY
 * ============================================================ */
*:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--black-80);
  }
  
  .input {
    border: 2px solid var(--black-80);
  }
}

/* Selection styling */
::selection {
  background-color: rgba(255, 68, 0, 0.2);
  color: var(--black);
}

::-moz-selection {
  background-color: rgba(255, 68, 0, 0.2);
  color: var(--black);
}