/* ═══════════════════════════════════════════════════════════
   UPSC Store — Account Pages CSS  v2.0
   Clean responsive: desktop sidebar + mobile sticky tabs
═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   ACCOUNT TOPBAR  (replaces full site header on account pages)
══════════════════════════════════════════════════════════ */
.upsc-acct-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 56px;
  background: #ffffff;
  border-bottom: 1.5px solid #eaecf0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}
.upsc-acct-bar-back {
  width: 38px; height: 38px; min-width: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #f5f6fa;
  color: #374151; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.upsc-acct-bar-back:hover { background: #e9eef5; color: #2d6cb5; }
.upsc-acct-bar-title {
  font-size: 15px; font-weight: 700; color: #111827;
  letter-spacing: -0.2px; flex: 1; text-align: center;
}
/* Prevent theme JS from setting a different padding-top; contain full-bleed hero */
body.woocommerce-account {
  padding-top: 56px !important;
  overflow-x: hidden !important;
}

/* ── Page shell ────────────────────────────────────────────── */
/* overflow-x:hidden stops the full-bleed hero from causing horizontal scroll */
.upsc-account-page {
  min-height: calc(100vh - 56px);
  background: #f5f6fa;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   HERO BANNER
══════════════════════════════════════════════════════════ */
.upsc-account-hero {
  background: linear-gradient(135deg, #5b5ef4 0%, #2d6cb5 100%);
  padding: 28px 0 52px;       /* bottom: 52px — cards overlap only 28px into hero */
  /* full bleed — overflow-x:hidden on .upsc-account-page + body keeps it tidy */
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.upsc-account-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.upsc-account-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.upsc-account-hero-text h2 {
  color: #fff; font-size: 20px; font-weight: 800;
  margin: 0 0 3px; line-height: 1.2;
}
.upsc-account-hero-text p {
  color: rgba(255,255,255,0.75); font-size: 13px; margin: 0;
}

/* ══════════════════════════════════════════════════════════
   MAIN LAYOUT  — cards lifted up from hero bottom
══════════════════════════════════════════════════════════ */
.upsc-account-layout {
  max-width: 1200px;
  margin: -28px auto 0;        /* lift cards 28px into hero's 52px bottom padding */
  padding: 0 32px 60px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.upsc-account-columns {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR NAV  (desktop)
══════════════════════════════════════════════════════════ */
.upsc-account-nav-wrap { /* desktop: transparent pass-through */ }

.upsc-account-nav {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eaecf0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  position: sticky;
  top: 80px; /* 56px fixed topbar + 24px gap */
}
.upsc-account-nav-inner {
  display: flex;
  flex-direction: column;
}
.upsc-nav-divider {
  height: 1px;
  background: #f1f3f7;
  margin: 4px 0;
}

.upsc-nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.upsc-nav-item:hover {
  background: #f5f8fc;
  color: #2d6cb5;
}
.upsc-nav-item.is-active {
  background: linear-gradient(90deg, #eef2ff, #f5f8fc);
  color: #235aa0;
  border-left-color: #2d6cb5;
}
.upsc-nav-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.upsc-nav-item:hover   .upsc-nav-icon,
.upsc-nav-item.is-active .upsc-nav-icon { background: #e9eef5; }
.upsc-nav-item:hover   .upsc-nav-icon svg,
.upsc-nav-item.is-active .upsc-nav-icon svg { stroke: #2d6cb5; }

.upsc-nav-item.nav-logout { color: #ef4444; }
.upsc-nav-item.nav-logout:hover { background: #fff5f5; }
.upsc-nav-item.nav-logout .upsc-nav-icon { background: #fee2e2; }
.upsc-nav-item.nav-logout .upsc-nav-icon svg { stroke: #ef4444; }
.upsc-nav-item.nav-logout.is-active { background: #fff5f5; border-left-color: #ef4444; }

/* ══════════════════════════════════════════════════════════
   CONTENT CARD
══════════════════════════════════════════════════════════ */
.upsc-account-content {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eaecf0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: visible;
  min-height: 400px;
}
.upsc-content-header {
  padding: 20px 28px;
  border-bottom: 1px solid #f1f3f7;
  display: flex; align-items: center; justify-content: space-between;
}
.upsc-content-header h2 {
  font-size: 16px; font-weight: 800; color: #111827; margin: 0;
}
.upsc-content-body { padding: 28px; }

/* ══════════════════════════════════════════════════════════
   DASHBOARD STATS
══════════════════════════════════════════════════════════ */
.upsc-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.upsc-stat-card {
  background: linear-gradient(135deg, #f5f8fc 0%, #eef2ff 100%);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(45,108,181,0.1);
}
.upsc-stat-icon {
  width: 38px; height: 38px;
  background: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(45,108,181,0.12);
}
.upsc-stat-value {
  font-size: 22px; font-weight: 800; color: #235aa0; margin-bottom: 2px;
}
.upsc-stat-label {
  font-size: 11px; color: #6b7280; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* ── Quick links grid ──────────────────────────────────── */
.upsc-dash-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upsc-dash-link {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  text-decoration: none;
  color: #374151; font-weight: 600; font-size: 14px;
  transition: all 0.18s;
}
.upsc-dash-link:hover {
  border-color: #a5b4fc;
  background: #f5f8fc;
  color: #235aa0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45,108,181,0.1);
}
.upsc-dash-link svg { stroke: #2d6cb5; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   ORDERS LIST
══════════════════════════════════════════════════════════ */
.upsc-orders-list { display: flex; flex-direction: column; gap: 12px; }
.upsc-order-card {
  border: 1.5px solid #eaecf0;
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: #fff;
}
.upsc-order-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 4px 14px rgba(45,108,181,0.09);
}
.upsc-order-top {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.upsc-order-num { font-size: 15px; font-weight: 800; color: #111827; }
.upsc-order-num a { color: inherit; text-decoration: none; }
.upsc-order-num a:hover { color: #2d6cb5; }
.upsc-order-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.status-processing       { background: #dbeafe; color: #1d4ed8; }
.status-completed        { background: #d1fae5; color: #065f46; }
.status-pending,
.status-pending-payment  { background: #fef3c7; color: #92400e; }
.status-cancelled,
.status-refunded         { background: #fee2e2; color: #991b1b; }
.status-on-hold          { background: #f3f4f6; color: #374151; }

.upsc-order-meta {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.upsc-order-meta-item {
  font-size: 13px; color: #6b7280;
  display: flex; align-items: center; gap: 4px;
}
.upsc-order-meta-item strong { color: #374151; }
.upsc-order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upsc-order-btn {
  font-size: 12px; font-weight: 700; padding: 7px 16px;
  border-radius: 8px; text-decoration: none; border: none;
  cursor: pointer; font-family: inherit; transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.upsc-order-btn-primary {
  background: linear-gradient(135deg, #2d6cb5, #2d6cb5);
  color: #fff; box-shadow: 0 2px 8px rgba(45,108,181,0.25);
}
.upsc-order-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.upsc-order-btn-secondary {
  background: #f5f8fc; color: #2d6cb5;
  border: 1.5px solid #c4b5fd;
}
.upsc-order-btn-secondary:hover { background: #e9eef5; }

/* Empty state */
.upsc-orders-empty { text-align: center; padding: 60px 20px; }
.upsc-orders-empty-icon {
  width: 72px; height: 72px; background: #f5f8fc;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.upsc-orders-empty h3 { font-size: 16px; font-weight: 800; color: #111827; margin: 0 0 6px; }
.upsc-orders-empty p  { font-size: 13px; color: #6b7280; margin: 0 0 22px; }
.upsc-orders-empty a  {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2d6cb5, #2d6cb5);
  color: #fff; padding: 12px 28px; border-radius: 10px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(45,108,181,0.28);
}

/* ══════════════════════════════════════════════════════════
   FORMS — edit account / address
══════════════════════════════════════════════════════════ */
.upsc-field { margin-bottom: 18px; }
.upsc-field label {
  display: block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #374151; margin-bottom: 6px;
}
.upsc-field label .required { color: #ef4444; margin-left: 2px; }
.upsc-field input[type="text"],
.upsc-field input[type="email"],
.upsc-field input[type="password"] {
  width: 100%; height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px; padding: 0 14px;
  font-size: 15px; font-family: inherit;
  color: #111827; background: #fafafa;
  outline: none; box-sizing: border-box;
  transition: border-color .18s, box-shadow .18s, background .18s;
  -webkit-appearance: none;
}
.upsc-field input:focus {
  border-color: #2d6cb5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45,108,181,.1);
}
.upsc-field-hint { font-size: 12px; color: #9ca3af; margin-top: 5px; display: block; }
.upsc-form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Password section */
.upsc-password-section {
  border: 1.5px solid #eaecf0; border-radius: 14px;
  padding: 20px; margin: 24px 0 8px; background: #fafafa;
}
.upsc-password-section-title {
  font-size: 13px; font-weight: 700; color: #374151;
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.upsc-optional { font-weight: 400; color: #9ca3af; font-size: 12px; }
.upsc-password-wrap { position: relative; }
.upsc-password-wrap input { padding-right: 44px !important; width: 100%; }
.upsc-eye-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #9ca3af; transition: color .15s; line-height: 0;
}
.upsc-eye-toggle:hover, .upsc-eye-toggle.active { color: #2d6cb5; }

/* Save button */
.upsc-form-actions { margin-top: 24px; }
.upsc-save-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2d6cb5, #2d6cb5);
  color: #fff; border: none; border-radius: 12px;
  padding: 13px 28px; font-size: 14px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  box-shadow: 0 4px 12px rgba(45,108,181,.25);
  transition: all .2s; -webkit-appearance: none;
}
.upsc-save-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.upsc-save-btn svg { flex-shrink: 0; }

/* WC default form elements inside content */
.upsc-account-content .woocommerce-EditAccountForm,
.upsc-account-content .woocommerce-address-fields__field-wrapper { padding: 0; }
.upsc-account-content .woocommerce-form-row,
.upsc-account-content .woocommerce-address-fields .form-row { margin-bottom: 16px; }
.upsc-account-content .woocommerce-form-row label,
.upsc-account-content .woocommerce-address-fields label,
.upsc-account-content fieldset label {
  display: block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #374151; margin-bottom: 6px;
}
.upsc-account-content .woocommerce-form-row input,
.upsc-account-content .woocommerce-address-fields input,
.upsc-account-content .woocommerce-address-fields select,
.upsc-account-content .woocommerce-address-fields textarea {
  width: 100%; height: 48px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  padding: 0 14px; font-size: 15px; font-family: inherit;
  color: #111827; background: #fafafa; outline: none;
  box-sizing: border-box; -webkit-appearance: none;
  transition: border-color .18s, box-shadow .18s;
  display: block;
}
.upsc-account-content .woocommerce-address-fields select { cursor: pointer; }
.upsc-account-content .woocommerce-address-fields textarea { height: auto; min-height: 90px; padding: 12px 14px; }
.upsc-account-content .woocommerce-form-row input:focus,
.upsc-account-content .woocommerce-address-fields input:focus,
.upsc-account-content .woocommerce-address-fields select:focus {
  border-color: #2d6cb5; background: #fff;
  box-shadow: 0 0 0 3px rgba(45,108,181,.1);
}
.upsc-account-content .form-row-first,
.upsc-account-content .form-row-last {
  display: inline-block; width: calc(50% - 8px); vertical-align: top;
}
.upsc-account-content .form-row-first { margin-right: 14px; }
.upsc-account-content fieldset {
  border: 1.5px solid #eaecf0; border-radius: 14px;
  padding: 20px 20px 4px; margin: 24px 0 20px; background: #fafafa;
}
.upsc-account-content fieldset legend {
  font-size: 12px; font-weight: 700; color: #374151;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0 8px; background: #fafafa;
}
.upsc-account-content button[type="submit"],
.upsc-account-content input[type="submit"],
.upsc-account-content [name="save_account_details"],
.upsc-account-content [name="save_address"] {
  background: linear-gradient(135deg, #2d6cb5, #2d6cb5) !important;
  color: #fff !important; border: none !important; border-radius: 12px !important;
  padding: 13px 32px !important; font-size: 14px !important; font-weight: 700 !important;
  font-family: inherit !important; cursor: pointer; margin-top: 8px;
  box-shadow: 0 4px 12px rgba(45,108,181,.25) !important;
  transition: all .2s; -webkit-appearance: none !important;
}
.upsc-account-content button[type="submit"]:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Addresses two-column */
.woocommerce-Addresses {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 4px 0 0;
}
.woocommerce-Address {
  border: 1.5px solid #eaecf0; border-radius: 14px;
  padding: 20px; background: #fafafa;
}
.woocommerce-Address-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eaecf0;
}
.woocommerce-Address-title h2 {
  font-size: 14px !important; font-weight: 800 !important;
  color: #111827 !important; margin: 0 !important;
}
.woocommerce-Address-title .edit {
  font-size: 12px; font-weight: 700; color: #2d6cb5;
  text-decoration: none; padding: 5px 12px;
  border: 1.5px solid #c4b5fd; border-radius: 8px;
}
.woocommerce-Address-title .edit:hover { background: #f5f8fc; }
address { font-style: normal; font-size: 13px; color: #6b7280; line-height: 1.75; }

/* ── WC page headings (Billing address, Shipping address, Edit account etc.)
   Target every possible h2/h3 WooCommerce renders inside the content card ── */
.upsc-account-content .woocommerce-MyAccount-content > h2,
.upsc-account-content .woocommerce-MyAccount-content > h3,
.upsc-account-content .woocommerce > h2,
.upsc-account-content .woocommerce > h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin: 0 !important;
  padding: 20px 28px !important;
  border-bottom: 1px solid #f1f3f7 !important;
  background: #fff !important;
  border-radius: 16px 16px 0 0;
  display: block !important;
}

/* WC form body — proper padding */
.upsc-account-content .woocommerce {
  padding: 0;
}
.upsc-account-content .woocommerce-MyAccount-content > form,
.upsc-account-content .woocommerce > form {
  padding: 24px 28px 28px;
  display: block;
}

/* All WC form-row p elements — full block by default */
.upsc-account-content .woocommerce-MyAccount-content .form-row {
  margin-bottom: 16px;
  padding: 0 !important;
  float: none;
}

/* Two-col first/last only on desktop */
@media (min-width: 769px) {
  .upsc-account-content .form-row-first {
    float: left; width: calc(50% - 8px); margin-right: 16px;
    display: inline-block !important;
  }
  .upsc-account-content .form-row-last {
    float: right; width: calc(50% - 8px);
    display: inline-block !important;
  }
}

/* WC input wrapper fills full width */
.upsc-account-content .woocommerce-input-wrapper {
  display: block !important;
  width: 100%;
}

/* WC notices */
.upsc-account-content .woocommerce-notices-wrapper { padding: 20px 28px 0; }
.upsc-account-content .woocommerce-message,
.upsc-account-content .woocommerce-error,
.upsc-account-content .woocommerce-info {
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 13px; list-style: none; border-left-width: 3px;
  padding-left: 16px !important; margin: 0 0 16px !important;
}
.upsc-account-content .woocommerce-error li { list-style: disc; }
.upsc-account-content > p:first-of-type { font-size: 13px; color: #6b7280; margin: 0 0 8px; }

/* ══════════════════════════════════════════════════════════
   LOGIN FORM
══════════════════════════════════════════════════════════ */
.upsc-auth-wrap {
  min-height: calc(100vh - 160px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #f5f8fc 0%, #e9eef5 50%, #f0f9ff 100%);
}
.upsc-auth-card {
  background: #fff; border-radius: 24px;
  box-shadow: 0 20px 60px rgba(45,108,181,0.12), 0 4px 16px rgba(0,0,0,0.06);
  width: 100%; max-width: 480px; overflow: hidden;
}
.upsc-auth-header {
  background: linear-gradient(135deg, #2d6cb5 0%, #2d6cb5 100%);
  padding: 32px 36px 28px; text-align: center;
}
.upsc-auth-logo { height: 36px; width: auto; margin: 0 auto 16px; display: block; filter: brightness(0) invert(1); }
.upsc-auth-header h1 { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.upsc-auth-header p  { color: rgba(255,255,255,0.8); font-size: 13px; margin: 0; }
.upsc-auth-tabs { display: flex; border-bottom: 1px solid #e5e7eb; }
.upsc-auth-tab {
  flex: 1; padding: 16px; text-align: center;
  font-size: 14px; font-weight: 700; color: #6b7280;
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s; font-family: inherit;
}
.upsc-auth-tab.is-active { color: #2d6cb5; border-bottom-color: #2d6cb5; }
.upsc-auth-panel { display: none; padding: 32px 36px 36px; }
.upsc-auth-panel.is-active { display: block; }
.upsc-auth-panel .upsc-field input {
  width: 100%; height: 48px; border: 1.5px solid #e5e7eb;
  border-radius: 10px; padding: 0 14px; font-size: 15px;
  font-family: inherit; color: #111827; background: #fafafa;
  transition: border-color .18s, box-shadow .18s; outline: none;
  box-sizing: border-box; -webkit-appearance: none;
}
.upsc-auth-panel .upsc-field input:focus {
  border-color: #2d6cb5; background: #fff;
  box-shadow: 0 0 0 3px rgba(45,108,181,.12);
}
.upsc-auth-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.upsc-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; cursor: pointer; }
.upsc-remember input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2d6cb5; cursor: pointer; }
.upsc-forgot { font-size: 13px; color: #2d6cb5; text-decoration: none; font-weight: 600; }
.upsc-auth-submit {
  width: 100%; height: 50px;
  background: linear-gradient(135deg, #2d6cb5, #2d6cb5);
  color: #fff; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 14px rgba(45,108,181,.3);
  transition: all 0.2s;
}
.upsc-auth-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.upsc-auth-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none !important; }
.upsc-register-note { font-size: 12px; color: #9ca3af; text-align: center; margin-top: 14px; line-height: 1.5; }
.upsc-auth-panel .woocommerce-error,
.upsc-auth-panel .woocommerce-message,
.upsc-auth-panel .woocommerce-info {
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 13px; list-style: none; border-left-width: 3px;
  padding-left: 16px !important;
}
.upsc-auth-panel .woocommerce-error li { list-style: disc; }
.upsc-field-row { display: flex; gap: 12px; }
.upsc-field-row .upsc-field { flex: 1; }

/* ══════════════════════════════════════════════════════════
   DESKTOP  ≥ 769px
══════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .upsc-account-page { padding-bottom: 0; }
}

/* ══════════════════════════════════════════════════════════
   TABLET  769–1024px  (shrink sidebar a bit)
══════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  .upsc-account-layout { padding: 0 20px 48px; margin-top: -24px; }
  .upsc-account-columns { grid-template-columns: 220px 1fr; gap: 18px; }
  .upsc-content-body { padding: 22px; }
  .upsc-content-header { padding: 18px 22px; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE  ≤ 768px
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Strip page.php wrapper styles that add unwanted margin/padding */
  body.woocommerce-account .page-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Strip WC's own margin on its content wrapper */
  .woocommerce-MyAccount-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hero: compact */
  .upsc-account-hero { padding: 20px 0 24px; margin-bottom: 0; }
  .upsc-account-hero-inner { padding: 0 16px; gap: 12px; }
  .upsc-account-avatar { width: 44px; height: 44px; font-size: 17px; }
  .upsc-account-hero-text h2 { font-size: 15px; }
  .upsc-account-hero-text p  { font-size: 12px; }

  /* Layout: no overlap lift, full width */
  .upsc-account-layout {
    margin-top: 0; padding: 0 0 40px; background: #f5f6fa;
    width: 100%; box-sizing: border-box;
  }
  .upsc-account-columns {
    display: flex; flex-direction: column; gap: 0;
    width: 100%;
  }

  /* Nav: sticky horizontal tab bar — top:56px keeps it below the fixed topbar */
  .upsc-account-nav-wrap {
    position: sticky; top: 56px; z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eaecf0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: none; mask-image: none;
  }
  .upsc-account-nav-wrap::-webkit-scrollbar { display: none; }
  .upsc-account-nav {
    background: transparent; border: none; border-radius: 0;
    box-shadow: none; overflow: visible; position: static;
  }
  .upsc-account-nav-inner {
    display: flex; flex-direction: row;
    width: max-content; min-width: 100%;
    padding: 0 4px;
  }
  .upsc-nav-divider { width: 1px; height: 28px; margin: auto 2px; background: #eaecf0; }
  .upsc-nav-item {
    flex-direction: column; align-items: center;
    gap: 3px; padding: 10px 14px;
    font-size: 10px; font-weight: 600;
    white-space: nowrap; min-width: 64px;
    border-left: none; border-bottom: 2px solid transparent;
  }
  .upsc-nav-item:hover { background: none; color: #2d6cb5; }
  .upsc-nav-item.is-active {
    color: #2d6cb5; border-bottom-color: #2d6cb5;
    border-left: none; background: none;
  }
  .upsc-nav-icon {
    width: 28px; height: 28px; background: transparent !important;
    border-radius: 6px;
  }
  .upsc-nav-item.is-active .upsc-nav-icon { background: #e9eef5 !important; }
  .upsc-nav-item.nav-logout .upsc-nav-icon { background: transparent !important; }

  /* Content: flat card on mobile — full screen width */
  .upsc-account-content {
    border-radius: 0; border: none; box-shadow: none;
    background: #fff; min-height: 0;
    margin: 0; overflow: hidden;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  .upsc-content-header {
    padding: 14px 16px; background: #fff;
    border-bottom: 1px solid #eaecf0;
    border-radius: 0; margin-bottom: 0;
  }
  .upsc-content-body { padding: 16px; }

  /* WC page headings on mobile — match content-header style */
  .upsc-account-content .woocommerce-MyAccount-content > h2,
  .upsc-account-content .woocommerce-MyAccount-content > h3,
  .upsc-account-content .woocommerce > h2,
  .upsc-account-content .woocommerce > h3 {
    font-size: 15px !important;
    padding: 14px 16px !important;
    border-radius: 0 !important;
  }

  /* WC form padding on mobile */
  .upsc-account-content .woocommerce-MyAccount-content > form,
  .upsc-account-content .woocommerce > form {
    padding: 16px !important;
  }

  /* Force all form rows full-width on mobile */
  .upsc-account-content .form-row-first,
  .upsc-account-content .form-row-last,
  .upsc-account-content .woocommerce-MyAccount-content .form-row {
    width: 100% !important;
    display: block !important;
    float: none !important;
    margin-right: 0 !important;
    clear: both;
  }

  /* WC inputs full-width on mobile */
  .upsc-account-content .woocommerce-MyAccount-content input,
  .upsc-account-content .woocommerce-MyAccount-content select,
  .upsc-account-content .woocommerce-MyAccount-content textarea {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Stats: 3 equal cols */
  .upsc-dash-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; margin-bottom: 12px;
  }
  .upsc-stat-card { padding: 14px 10px; border-radius: 12px; }
  .upsc-stat-icon { width: 30px; height: 30px; margin-bottom: 8px; border-radius: 8px; }
  .upsc-stat-value { font-size: 18px; }
  .upsc-stat-label { font-size: 9px; letter-spacing: 0; }

  /* Quick links: 2 cols */
  .upsc-dash-links { grid-template-columns: 1fr 1fr; gap: 8px; }
  .upsc-dash-link {
    padding: 14px 12px; font-size: 13px; gap: 8px;
    border-radius: 12px; flex-direction: column; align-items: flex-start;
    min-height: 72px; justify-content: center;
  }

  /* Order cards */
  .upsc-order-card { padding: 16px; background: #fff; }
  .upsc-orders-list { gap: 8px; }
  .upsc-order-top { flex-direction: row; }

  /* Forms */
  .upsc-form-row-half { grid-template-columns: 1fr; gap: 0; }
  .upsc-save-btn { width: 100%; justify-content: center; }
  .upsc-account-content .form-row-first,
  .upsc-account-content .form-row-last { width: 100%; display: block; margin-right: 0; }
  .woocommerce-Addresses { grid-template-columns: 1fr; padding: 0; }
  .upsc-orders-empty a { display: flex !important; justify-content: center; }

  /* Login */
  .upsc-auth-wrap { padding-bottom: 100px; min-height: calc(100vh - 160px - 70px); }
  .upsc-auth-panel { padding: 24px 20px 28px; }
}

/* Very small phones */
@media (max-width: 360px) {
  .upsc-dash-stats { grid-template-columns: 1fr 1fr; }
  .upsc-dash-stats .upsc-stat-card:last-child { grid-column: 1 / -1; }
  .upsc-dash-links { grid-template-columns: 1fr; }
}
