:root {
  --sage:        #7A9E87;
  --sage-light:  #A8C5AF;
  --sage-dark:   #4F7A5E;
  --sage-pale:   #EAF2EC;
  --sage-mid:    #C5DBC8;
  --gold:        #C9843A;
  --gold-light:  #E8A85F;
  --gold-pale:   #FBF1E6;
  --mauve:       #9B6B8A;
  --mauve-light: #C49AB5;
  --mauve-pale:  #F0EDF8;
  --cream:       #FAF8F4;
  --dark:        #1C2420;
  --dark-mid:    #2A3830;
  --mid:         #3D4F45;
  --text:        #2D3D35;
  --text-light:  #6B7D72;
  --border:      #D8E8DA;
  --white:       #FFFFFF;

  --success:     #4F7A5E;
  --success-bg:  #EAF2EC;
  --danger:      #B85450;
  --danger-bg:   #FAEAEA;
  --warning:     #C9843A;
  --warning-bg:  #FBF1E6;
  --info:        #4F6A8A;
  --info-bg:     #E8EFF8;

  /* Header / Sidebar — LIGHT theme, matches the real production plugin
     (white header + white sidebar, sage accents only — NOT dark/teal) */
  --hdr-bg:        #FFFFFF;
  --hdr-border:    #EAEFEC;
  --hdr-text:      #1C2420;
  --hdr-text-dim:  #8A9A90;
  --hdr-surface:   #F4F8F5;
  --sb-bg:         #FFFFFF;
  --sb-border:     #EAEFEC;
  --sb-text:       #4A5A50;
  --sb-text-dim:   #9AABA0;
  --sb-hover-bg:   #F0F5F1;
  --sb-active-bg:  #E8F2EA;

  --sidebar-w:   264px;
  --header-h:    64px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: 'Poppins', sans-serif; background: var(--cream); color: var(--text); font-size: 14px; line-height: 1.55; }
h1, h2, h3, h4, h5, h6, strong, b, button, input, select, textarea { font-family: 'Poppins', sans-serif; }
a { text-decoration: none; color: inherit; }
button { font-family: 'Poppins', sans-serif; cursor: pointer; }
ul { list-style: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--sage-mid); border-radius: 4px; }

/* ───────────────────────────
   DEMO BANNER (remove in real build)
─────────────────────────── */
#demo-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--dark); color: #fff; font-size: 11.5px;
  padding: 7px 16px; display: flex; justify-content: space-between; align-items: center;
  border-top: 2px solid var(--gold);
}
#demo-banner b { color: var(--gold-light); }
#demo-banner button { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 11px; }

/* ───────────────────────────
   AUTH (Login / Register)
─────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: none; background: var(--cream);
}
.auth-wrap.active { display: flex; }
.auth-panel {
  flex: 1.05; display: none; position: relative; overflow: hidden;
  background: var(--dark);
  color: #fff; padding: 56px;
}
@media (min-width: 920px) { .auth-panel { display: flex; flex-direction: column; } }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.auth-brand .mark { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--sage); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-brand .mark svg { width: 22px; height: 22px; }
.auth-brand strong { display: block; font-size: 16px; font-weight: 700; color: #fff; }
.auth-brand span { display: block; font-size: 10px; letter-spacing: .18em; opacity: .55; margin-top: 1px; }

.auth-pitch { margin-top: auto; position: relative; z-index: 2; max-width: 420px; }
.auth-pitch h2 { font-size: 30px; line-height: 1.3; font-weight: 600; margin: 0 0 14px; color: #fff; }
.auth-pitch p { font-size: 14px; opacity: .75; line-height: 1.7; margin: 0 0 28px; font-weight: 300; }
.auth-stats { display: flex; gap: 26px; position: relative; z-index: 2; }
.auth-stats div strong { display: block; font-size: 22px; font-weight: 700; color: var(--gold-light); }
.auth-stats div span { display: block; font-size: 11px; opacity: .65; margin-top: 2px; }

.auth-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 408px; }
.auth-box-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
@media (min-width: 920px) { .auth-box-mobile-brand { display: none; } }
.auth-box-mobile-brand .mark { width: 38px; height: 38px; border-radius: 50%; background: var(--sage-dark); color: #fff; display: flex; align-items: center; justify-content: center; }
.auth-box-mobile-brand .mark svg { width: 18px; height: 18px; }
.auth-box-mobile-brand strong { font-size: 15px; font-weight: 700; color: var(--dark); }

.auth-box h1 { font-size: 24px; font-weight: 600; margin: 0 0 6px; color: var(--dark); }
.auth-box .sub { font-size: 13.5px; color: var(--text-light); margin: 0 0 28px; }
.auth-box .sub a { color: var(--sage-dark); font-weight: 600; cursor: pointer; }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--mid); margin-bottom: 7px; }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-wrap .ico { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--text-light); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.auth-input-wrap .ico svg { width: 16px; height: 16px; }
.auth-field input {
  width: 100%; padding: 12px 14px 12px 40px; border-radius: 10px;
  border: 1.5px solid var(--border); font-size: 14px; font-family: 'Poppins', sans-serif;
  transition: border-color .15s, box-shadow .15s; background: #fff; color: var(--text);
}
.auth-field input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-pale); }
.auth-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .auth-row-split { grid-template-columns: 1fr; } }

.auth-toggle-pass { position: absolute; right: 12px; cursor: pointer; color: var(--text-light); width: 18px; height: 18px; display: flex; align-items: center; }
.auth-toggle-pass svg { width: 18px; height: 18px; }

.auth-remember { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; font-size: 12.5px; }
.auth-remember label { display: flex; align-items: center; gap: 7px; color: var(--mid); cursor: pointer; }
.auth-remember input { accent-color: var(--sage); width: 15px; height: 15px; }
.auth-remember a { color: var(--sage-dark); font-weight: 600; cursor: pointer; }

.auth-submit {
  width: 100%; padding: 13px; border: none; border-radius: 24px;
  background: var(--sage-dark);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.auth-submit:hover { background: var(--dark); }

.auth-error {
  background: var(--danger-bg); color: #8A3936; border: 1px solid rgba(184,84,80,.3);
  border-radius: 10px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 18px; display: none;
}
.auth-error.show { display: block; }

.auth-footer { text-align: center; font-size: 12px; color: var(--text-light); margin-top: 26px; }

/* ───────────────────────────
   DASHBOARD SHELL
─────────────────────────── */
#dashboard-app { display: none; }
#dashboard-app.active { display: block; }

#hel-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--header-h); background: var(--hdr-bg);
  display: flex; align-items: center; padding: 0 20px 0 0;
  border-bottom: 1px solid var(--hdr-border);
  box-shadow: 0 1px 3px rgba(28,36,32,.04);
}
.hel-logo-block { width: var(--sidebar-w); flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 20px; height: 100%; }
.hel-logo-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--sage-dark); border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hel-logo-mark svg { width: 18px; height: 18px; }
.hel-logo-name strong { font-size: 13px; font-weight: 700; color: var(--hdr-text); display: block; }
.hel-logo-name span { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--hdr-text-dim); }
.hel-mob-toggle { display: none; background: var(--hdr-surface); border: 1px solid var(--hdr-border); color: var(--hdr-text); font-size: 18px; padding: 6px 10px; border-radius: 6px; cursor: pointer; margin-right: 8px; }

.hel-header-mid { flex: 1; padding: 0 20px; position: relative; }
.hel-search-wrap { position: relative; display: inline-block; }
.hel-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--hdr-text-dim); display:flex; }
.hel-search-icon svg { width: 14px; height: 14px; }
.hel-search-wrap input { width: 300px; padding: 8px 30px 8px 32px; background: var(--hdr-surface); border: 1px solid var(--hdr-border); border-radius: 8px; color: var(--hdr-text); font-size: 13px; font-family: 'Poppins', sans-serif; outline: none; }
.hel-search-wrap input::placeholder { color: var(--hdr-text-dim); }
.hel-search-wrap input:focus { border-color: var(--sage); background: #fff; }
.hel-search-clear { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--hdr-text-dim); cursor: pointer; display: none; width:14px; height:14px; }
.hel-search-clear.show { display: block; }
.hel-search-drop { position: absolute; top: calc(100% + 6px); left: 0; width: 380px; max-height: 360px; overflow-y: auto; background: #fff; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(28,36,32,.18); z-index: 500; display: none; }
.hel-search-drop.open { display: block; }
.hsd-group-label { padding: 9px 14px 5px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); }
.hsd-item { padding: 9px 14px; display: flex; gap: 10px; align-items: center; cursor: pointer; transition: background .12s; }
.hsd-item:hover { background: var(--sage-pale); }
.hsd-item .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--sage-pale); color: var(--sage-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hsd-item .ico svg { width: 15px; height: 15px; }
.hsd-item .body strong { font-size: 12.5px; color: var(--dark); display: block; }
.hsd-item .body span { font-size: 11px; color: var(--text-light); }
.hsd-empty { padding: 24px 14px; text-align: center; color: var(--text-light); font-size: 13px; }

.hel-hdr-right { display: flex; align-items: center; gap: 10px; }
.hel-wallet-pill { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--gold-pale); border: 1px solid rgba(201,132,58,.25); border-radius: 24px; cursor: pointer; }
.hel-wallet-pill .ico { width:14px; height:14px; color: var(--gold); }
.hel-wallet-pill .wp-label { font-size: 10px; color: #9A6B2F; display: block; line-height: 1; }
.hel-wallet-pill .wp-amount { color: #8B5A1F; font-weight: 700; font-size: 13.5px; }
.hdr-icon { position: relative; width: 36px; height: 36px; background: var(--hdr-surface); border: 1px solid var(--hdr-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--mid); cursor: pointer; transition: background .2s; }
.hdr-icon svg { width: 16px; height: 16px; }
.hdr-icon:hover { background: var(--sage-pale); color: var(--sage-dark); }
.hdr-badge { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hdr-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sage); color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--sage-pale); cursor: pointer; flex-shrink: 0; }
.hdr-user strong { color: var(--hdr-text); font-size: 13px; font-weight: 600; display: block; }
.hdr-user small { color: var(--hdr-text-dim); font-size: 11px; }

.hel-notif-drop { position: fixed; top: var(--header-h); right: 80px; width: 340px; background: #fff; border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(28,36,32,.15); z-index: 400; display: none; overflow: hidden; }
.hel-notif-drop.open { display: block; }
.ndf-hdr { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.ndf-hdr h4 { font-size: 14px; font-weight: 600; }
.ndf-hdr a { font-size: 12px; color: var(--sage-dark); font-weight: 600; cursor: pointer; }
.ndf-list { max-height: 360px; overflow-y: auto; }
.ndf-item { padding: 12px 16px; display: flex; gap: 10px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.ndf-item:hover { background: var(--cream); }
.ndf-item.unread { background: var(--sage-pale); border-left: 3px solid var(--sage); }
.ndf-item .ico { width: 30px; height:30px; border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.ndf-item .ico svg { width:15px; height:15px; }
.ndf-item h5 { font-size: 12px; font-weight: 600; margin-bottom: 2px; color: var(--dark); }
.ndf-item p { font-size: 11px; color: var(--text-light); }
.ndf-item time { font-size: 10px; color: #9ca3af; }

#hel-sidebar { position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 200; width: var(--sidebar-w); background: var(--sb-bg); overflow-y: auto; padding: 16px 0 70px; display: flex; flex-direction: column; border-right: 1px solid var(--sb-border); transition: transform .3s; }
.sb-banner { margin: 0 12px 16px; background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%); border-radius: 10px; padding: 12px 14px; }
.sb-banner strong { color: #fff; font-size: 12px; font-weight: 700; display: block; margin-bottom: 2px; }
.sb-banner span { color: rgba(255,255,255,.75); font-size: 11px; }
.sb-section { margin-bottom: 4px; }
.sb-label { padding: 8px 18px 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--sb-text-dim); }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: var(--sb-text); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .18s; border-left: 3px solid transparent; }
.sb-item:hover { background: var(--sb-hover-bg); color: var(--sage-dark); }
.sb-item.active { background: var(--sb-active-bg); color: var(--sage-dark); border-left-color: var(--sage-dark); font-weight: 600; }
.sb-icon { width: 18px; height: 18px; flex-shrink: 0; display:flex; }
.sb-icon svg { width:16px; height:16px; }
.sb-count { margin-left: auto; padding: 2px 7px; border-radius: 10px; font-size: 10px; font-weight: 700; background: var(--danger); color: #fff; min-width: 20px; text-align: center; }
.sb-count.gold { background: var(--gold); color: #fff; }
.sb-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--sb-border); }
.hel-mob-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }

#hel-main { margin-left: var(--sidebar-w); margin-top: var(--header-h); min-height: calc(100vh - var(--header-h)); background: var(--cream); }
.hel-module { display: none; padding: 26px; }
.hel-module.active { display: block; animation: helFade .18s ease; }
@keyframes helFade { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform:none; } }

.pg-hdr { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.pg-hdr-left h1 { font-size: 23px; font-weight: 600; color: var(--dark); }
.pg-hdr-left .bc { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.pg-hdr-left .bc span { color: var(--sage-dark); cursor: pointer; }
.pg-hdr-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
	border-radius: 24px; font-size: 13px; font-weight: 600; border: none;
	cursor: pointer; transition: all .2s; white-space: nowrap;
	/* Reset browser <button> user-agent styles so .btn paints identically
	   whether rendered as <a> or <button>. Without this, <button.btn> in
	   Chromium picks up system `background: buttonface` (grey) and a
	   platform-specific hover, which combined with our color-only :hover
	   rule made text invisible on Print Label / Download Invoice /
	   Copy AWB (Session 36 screenshot). Explicit background is set by
	   each variant below; the reset here just clears the platform paint. */
	-webkit-appearance: none; appearance: none;
	font-family: inherit; line-height: 1.2; text-decoration: none;
	background: transparent; color: inherit;
	box-sizing: border-box;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--sage-dark); color: #fff; }
.btn-primary:hover { background: var(--dark); color: #fff; }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { background: var(--gold-light); color: var(--dark); }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--mid); }
.btn-outline:hover { background: #fff; border-color: var(--sage); color: var(--sage-dark); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--mid); color: #fff; }
.btn-danger-outline { background: #fff; border: 1.5px solid var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 20px; }
.btn-xs { padding: 4px 11px; font-size: 11px; border-radius: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; flex-shrink:0; }
.b-delivered { background: var(--success-bg); color: var(--success); }
.b-transit { background: var(--info-bg); color: var(--info); }
.b-pending { background: var(--warning-bg); color: var(--warning); }
.b-pickup { background: var(--mauve-pale); color: var(--mauve); }
.b-rts { background: var(--sage-pale); color: var(--sage-dark); }
.b-cancelled { background: var(--danger-bg); color: var(--danger); }
.b-rto { background: var(--mauve-pale); color: var(--mauve); }
.b-out { background: var(--gold-pale); color: #8B5A1F; }
.b-ndr { background: var(--danger-bg); color: var(--danger); }
.b-cod { background: var(--warning-bg); color: var(--warning); }
.b-prepaid { background: var(--info-bg); color: var(--info); }

.card { background: #fff; border-radius: 14px; padding: 20px; border: 1px solid var(--border); }
.card-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.card-hdr h3 { font-size: 15.5px; font-weight: 600; color: var(--dark); }
.card-link { font-size: 12px; color: var(--sage-dark); font-weight: 600; cursor: pointer; }
.card-link:hover { text-decoration: underline; }

.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 14px; padding: 18px 20px; border: 1px solid var(--border); display: flex; align-items: center; gap: 14px; transition: box-shadow .2s; }
.stat-card:hover { box-shadow: 0 6px 20px rgba(79,122,94,.1); }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 21px; height: 21px; }
.si-sage { background: var(--sage-pale); color: var(--sage-dark); }
.si-gold { background: var(--gold-pale); color: var(--gold); }
.si-mauve { background: var(--mauve-pale); color: var(--mauve); }
.si-dark { background: #EBF0ED; color: var(--mid); }
.si-info { background: var(--info-bg); color: var(--info); }
.si-danger { background: var(--danger-bg); color: var(--danger); }
.stat-body h2 { font-size: 25px; font-weight: 700; color: var(--dark); line-height: 1; }
.stat-body p { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.stat-body .delta { font-size: 11px; margin-top: 4px; font-weight: 600; }
.delta.up { color: var(--sage-dark); }
.delta.down { color: var(--danger); }

.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.hel-tbl { width: 100%; border-collapse: collapse; min-width: 900px; }
.hel-tbl thead { background: #F4F8F5; }
.hel-tbl th { padding: 11px 12px; text-align: left; font-size: 10.5px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.hel-tbl td { padding: 11px 12px; border-bottom: 1px solid #F0F5F1; font-size: 12.5px; vertical-align: middle; }
.hel-tbl tbody tr:last-child td { border-bottom: none; }
.hel-tbl tbody tr:hover { background: var(--sage-pale); }
.order-id { font-weight: 700; color: var(--dark); font-size: 13px; cursor: pointer; }
.order-id:hover { color: var(--sage-dark); text-decoration: underline; }
.awb-no { font-size: 11.5px; color: var(--mid); font-family: 'Poppins',sans-serif; font-weight: 500; margin-top: 2px; letter-spacing: .02em; }
.btn-view { padding: 5px 13px; background: var(--dark); color: #fff; border-radius: 14px; font-size: 11.5px; font-weight: 600; border: none; cursor: pointer; transition: background .2s; }
.btn-view:hover { background: var(--sage-dark); }
.btn-icon-only { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--mid); }
.btn-icon-only:hover { border-color: var(--sage); color: var(--sage-dark); }
.btn-icon-only svg { width: 13px; height: 13px; }
.btn-icon-only:disabled { opacity: .35; cursor: not-allowed; }
.row-actions { display: flex; gap: 5px; align-items: center; }

.cc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.cc-delhivery { background: var(--info-bg); color: var(--info); }
.cc-xpressbees { background: var(--gold-pale); color: #8B5A1F; }
.cc-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink:0; }

.filters-bar { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters-bar select, .filters-bar input[type=date] { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; font-family: 'Poppins',sans-serif; color: var(--text); outline: none; background: #fff; }
.filters-bar select:focus, .filters-bar input:focus { border-color: var(--sage); }
.filters-clear { font-size: 12px; color: var(--sage-dark); font-weight: 600; cursor: pointer; padding: 8px 4px; }
.filters-status-pill { margin-left: auto; font-size: 11.5px; color: var(--text-light); }

.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot-wrap { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); border: 2px solid var(--border); flex-shrink: 0; }
.tl-dot.done { background: var(--sage); border-color: var(--sage); }
.tl-dot.active { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-pale); }
.tl-dot.exception { background: var(--danger); border-color: var(--danger); }
.tl-line { flex: 1; width: 2px; background: var(--border); margin: 3px 0; min-height: 14px; }
.tl-item:last-child .tl-line { display: none; }
.tl-body h5 { font-size: 12.5px; font-weight: 600; color: var(--dark); margin-bottom: 2px; }
.tl-body p { font-size: 11.5px; color: var(--text-light); }
.tl-body .tl-loc { color: var(--mid); font-weight: 500; }

.detail-section { background: var(--sage-pale); border-radius: 10px; padding: 16px; }
.detail-section h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); margin-bottom: 12px; display:flex; align-items:center; gap:6px; }
.detail-section h4 svg { width:13px; height:13px; }
.detail-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; gap: 10px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .lbl { color: var(--text-light); font-weight: 500; flex-shrink:0; }
.detail-row .val { font-weight: 600; color: var(--dark); text-align: right; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.col3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.col1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; position: relative; }
.form-group label { font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 6px; }
.form-group label .req { color: var(--danger); }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px;
  font-family: 'Poppins', sans-serif; color: var(--text); outline: none; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-pale); }
.form-group input.invalid, .form-group select.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.field-error { font-size: 11px; color: var(--danger); display:none; margin-top:2px; }
.field-error.show { display:block; }
.field-hint { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.field-hint.success { color: var(--sage-dark); font-weight: 600; }
.field-spinner { position: absolute; right: 12px; top: 34px; width: 13px; height: 13px; border: 2px solid var(--border); border-top-color: var(--sage); border-radius: 50%; animation: helspin .7s linear infinite; display: none; }
.field-spinner.show { display: block; }
@keyframes helspin { to { transform: rotate(360deg); } }
.section-sep { font-size: 14.5px; font-weight: 600; color: var(--dark); padding: 18px 0 12px; border-bottom: 1px solid var(--sage-mid); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-sep svg { width: 15px; height: 15px; color: var(--sage-dark); }
.section-sep:first-child { padding-top: 0; }

.hel-alert { border-radius: 10px; padding: 12px 16px; font-size: 12.5px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.hel-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.al-warning { background: var(--warning-bg); color: #7A4A0A; border: 1px solid rgba(201,132,58,.35); }
.al-success { background: var(--success-bg); color: var(--sage-dark); border: 1px solid var(--sage-mid); }
.al-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(79,106,138,.25); }
.al-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(184,84,80,.3); }

.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 5px 5px 0 0; min-height: 4px; }
.bar-lbl { font-size: 10px; color: var(--text-light); }

.act-list { display: flex; flex-direction: column; gap: 10px; }
.act-item { display: flex; gap: 10px; padding: 12px; background: var(--cream); border-radius: 10px; border: 1px solid var(--border); }
.act-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.act-icon svg { width: 15px; height: 15px; }
.ai-sage { background: var(--sage-pale); color: var(--sage-dark); }
.ai-gold { background: var(--gold-pale); color: var(--gold); }
.ai-info { background: var(--info-bg); color: var(--info); }
.ai-alert { background: var(--danger-bg); color: var(--danger); }
.act-body h5 { font-size: 12.5px; font-weight: 600; color: var(--dark); margin-bottom: 2px; }
.act-body p { font-size: 11.5px; color: var(--text-light); }
.act-time { font-size: 10px; color: #9ca3af; margin-top: 3px; }

.qa-list { display: flex; flex-direction: column; gap: 8px; }
.qa-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--cream); border-radius: 10px; cursor: pointer; border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--mid); transition: all .2s; }
.qa-btn:hover { background: var(--sage-pale); border-color: var(--sage); color: var(--sage-dark); }
.qa-btn svg { width:15px; height:15px; flex-shrink:0; }
.qa-arrow { margin-left: auto; opacity: .5; }

.pager-row { display: flex; justify-content: space-between; align-items: center; margin-top: 0; font-size: 12.5px; color: var(--text-light); flex-wrap: wrap; gap: 8px; }
.pager { display: flex; gap: 4px; }
.pager button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--mid); transition: all .2s; }
.pager button:hover { border-color: var(--sage); color: var(--sage-dark); }
.pager button.active { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

.wallet-hero { background: var(--dark); border-radius: 16px; padding: 28px 32px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.wallet-hero .wh-label { color: rgba(255,255,255,.5); font-size: 12px; margin-bottom: 6px; }
.wallet-hero .wh-amount { color: #fff; font-size: 38px; font-weight: 700; }
.wallet-hero .wh-amount sup { font-size: 19px; }
.wallet-hero .wh-note { color: rgba(255,255,255,.4); font-size: 12px; margin-top: 6px; }
.wallet-acts { display: flex; flex-direction: column; gap: 8px; }

.profile-stat { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.profile-stat:last-child { border-bottom: none; }
.profile-stat .lbl { font-size: 12px; color: var(--text-light); }
.profile-stat .val { font-size: 15px; font-weight: 700; color: var(--sage-dark); }

.wh-card { border-left: 4px solid var(--sage); }
.wh-dot { width: 7px; height: 7px; background: var(--sage); border-radius: 50%; display: inline-block; margin-right: 4px; }

.coming-soon { text-align: center; padding: 70px 40px; }
.coming-soon svg { width: 48px; height: 48px; color: var(--sage-mid); margin-bottom: 14px; }
.coming-soon h2 { font-size: 19px; color: var(--sage-dark); margin-bottom: 8px; font-weight: 600; }
.coming-soon p { color: var(--text-light); font-size: 14px; }

.ndr-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.ndr-tab { padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--text-light); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .18s; white-space: nowrap; }
.ndr-tab:hover { color: var(--sage-dark); }
.ndr-tab.active { color: var(--sage-dark); border-bottom-color: var(--sage-dark); }
.ndr-count { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; font-size: 10px; font-weight: 700; margin-left: 5px; background: var(--border); color: var(--text-light); }
.ndr-tab.active .ndr-count { background: var(--sage-dark); color: #fff; }
.ndr-panel { display: none; }
.ndr-panel.active { display: block; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(20,28,24,.55); z-index: 900; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; max-width: 560px; width: 100%; max-height: 86vh; overflow-y: auto; }
.modal-box.wide { max-width: 760px; }
.modal-hdr { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-hdr h3 { font-size: 16px; font-weight: 600; color: var(--dark); }
.modal-close { width: 30px; height: 30px; border-radius: 50%; background: var(--cream); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--mid); }
.modal-close svg { width: 14px; height: 14px; }
.modal-body { padding: 22px; }

.toast-wrap { position: fixed; top: 76px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: toastIn .25s ease; min-width: 240px; }
.toast.success { border-left: 3px solid var(--sage); }
.toast.error { border-left: 3px solid var(--danger); }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform:none; } }

.live-courier-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.lc-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; transition: all .15s; }
.lc-item:hover { border-color: var(--sage-mid); }
.lc-item.selected { border-color: var(--sage); background: var(--sage-pale); }
.lc-item input[type=radio] { accent-color: var(--sage-dark); width: 16px; height: 16px; }
.lc-item .cc { flex-shrink: 0; }
.lc-item .lc-body { flex: 1; }
.lc-item .lc-body strong { font-size: 12.5px; color: var(--dark); display: block; }
.lc-item .lc-body span { font-size: 11px; color: var(--text-light); }
.lc-item .lc-eta { font-size: 11px; color: var(--sage-dark); font-weight: 600; }
.lc-empty { text-align: center; padding: 16px; color: var(--text-light); font-size: 12.5px; background: var(--cream); border-radius: 10px; }

@media (max-width: 1100px) { .stats-row { grid-template-columns: repeat(2,1fr); } }

/* Responsive layout utility classes — replace inline 2-col/3-col grids so
   they can collapse to a single column on tablets/phones. Using classes
   instead of inline styles so the breakpoints below can actually apply. */
.rg-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.rg-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rg-1-1-1 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.rg-1-1.gap14 { gap: 14px; }

@media (max-width: 900px) {
  .rg-2-1, .rg-1-1-1 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rg-1-1 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hel-mob-toggle { display: block; }
  #hel-sidebar { transform: translateX(-264px); }
  #hel-sidebar.open { transform: translateX(0); box-shadow: 8px 0 24px rgba(0,0,0,.12); }
  .hel-mob-overlay.open { display: block; }
  #hel-main { margin-left: 0; }
  .hel-module { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-body h2 { font-size: 19px; }
  .form-grid, .form-grid.col3 { grid-template-columns: 1fr; }
  .hel-logo-block { width: auto; padding: 0 10px; border-right: none; }
  .hel-logo-name span { display: none; }
  .hel-header-mid { padding: 0 8px; min-width: 0; }
  .hel-search-wrap { display: block; width: 100%; }
  .hel-search-wrap input { width: 100%; }
  .hel-search-drop { width: calc(100vw - 32px); left: 0; }
  .hel-wallet-pill .wp-label { display: none; }
  .hdr-user { display: none; }
  .wallet-hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .wallet-acts { width: 100%; }
  .wallet-acts .btn { width: 100%; justify-content: center; }
  .pg-hdr { flex-direction: column; align-items: stretch; }
  .pg-hdr-right { width: 100%; }
  .pg-hdr-right .btn { flex: 1; justify-content: center; }
  .filters-bar { padding: 10px 12px; }
  .filters-bar select, .filters-bar input[type=date] { flex: 1 1 140px; min-width: 0; }
  .filters-status-pill { margin-left: 0; width: 100%; }
  .card { padding: 16px; }
  .ndr-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .ndr-tab { flex-shrink: 0; }
  .modal-box, .modal-box.wide { max-width: calc(100vw - 24px); }
  .modal-body { padding: 16px; }
  .auth-row-split { grid-template-columns: 1fr; }
  .toast-wrap { left: 12px; right: 12px; top: 70px; }
  .toast { min-width: 0; width: 100%; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .pager-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pager { flex-wrap: wrap; }
  .hel-tbl th, .hel-tbl td { font-size: 11.5px; padding: 9px 8px; }
  .lc-item { flex-wrap: wrap; }
  .lc-item .lc-eta { width: 100%; text-align: left; margin-left: 24px; }
  .filters-bar select, .filters-bar input[type=date] { flex: 1 1 100%; }
}

/* =====================================================
   HSD ADDITIONS — real-plugin-specific (not in static demo)
   ===================================================== */

/* Server-rendered auth/dashboard shell is always the "active" branch
   PHP decided to print — .active is applied inline by templates, these
   just make sure the wrap actually displays without needing JS. */
.auth-wrap { display: none; }
.auth-wrap.active { display: flex; }
#dashboard-app { display: none; }
#dashboard-app.active { display: block; }

/* Generic courier chip for couriers without a dedicated colour (manual
   couriers, or any courier added later via HEL Courier Master admin). */
.cc-generic { background: #EEF1EF; color: var(--mid); }

/* Horizontal shipment-status stepper — single order view page, locked
   design source: franzenmart popup reference screenshot (session
   confirmed: only this component copied from that screenshot, rest of
   page follows hel-seller-dashboard-demo.html). */
.hstep-row { display: flex; align-items: flex-start; padding: 6px 4px 2px; overflow-x: auto; }
.hstep { display: flex; flex-direction: column; align-items: center; min-width: 92px; text-align: center; position: relative; }
.hstep-circle {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  color: var(--text-light); flex-shrink: 0;
}
.hstep-circle svg { width: 15px; height: 15px; }
.hstep-circle.done { background: var(--sage); border-color: var(--sage); color: #fff; }
.hstep-circle.active { background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: 0 0 0 4px var(--gold-pale); }
.hstep-label { font-size: 11.5px; font-weight: 600; color: var(--text-light); margin-top: 8px; }
.hstep-label.done { color: var(--sage-dark); }
.hstep-label.active { color: #8B5A1F; }
.hstep-current { font-size: 9.5px; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.hstep-line { flex: 1; height: 2px; background: var(--border); margin-top: 17px; min-width: 24px; }
.hstep-line.done { background: var(--sage); }

@media (max-width: 640px) {
  .hstep-row { justify-content: flex-start; }
  .hstep { min-width: 76px; }
}

/* Courier-card enrichment (logo + ETA) layered onto HEL_Orders' own
   shared courier-card markup by JS — see assets/js/dashboard.js. Kept
   purely additive/cosmetic so the shared form's field ownership is
   untouched (Document 1 §13.1). */
.hel-courier-card { position: relative; }
.hel-courier-card .hel-sd-cc-logo { height: 18px; max-width: 64px; object-fit: contain; margin-right: 2px; }
.hel-courier-card .hel-sd-cc-eta { font-size: 10.5px; color: var(--sage-dark); font-weight: 600; margin-left: auto; }
.hel-courier-card .hel-sd-cc-service-note { display: block; font-size: 10px; color: var(--text-light); width: 100%; margin-top: 2px; }
