/**
 * ComprasGuate Theme — my-account + auth styles.
 * Loaded only on /my-account/ and its endpoints.
 */

/* =========================
   PAGE WRAPPER (sidebar + content)
   We use our own .cg-account-grid wrapper (added in my-account.php)
   instead of relying on WC's .woocommerce parent — that approach was
   fragile across WC versions and the grid wasn't applying.
   ========================= */
.woocommerce-account .cg-main {
  padding: 24px 0;
}

/* Defeat WC's default grid on the .woocommerce parent — it puts our
   .cg-account-grid into the first narrow column, squeezing the sidebar. */
body.woocommerce-account .cg-main > .woocommerce,
body.woocommerce-account .woocommerce {
  display: block !important;
  grid-template-columns: none !important;
  width: 100% !important;
}

.cg-account-grid {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: start;
  width: 100%;
}
@media (max-width: 900px) {
  .cg-account-grid { grid-template-columns: 1fr !important; }
}

/* WC core CSS floats .woocommerce-MyAccount-navigation (left, 30%) and
   .woocommerce-MyAccount-content (right, 65%). Floats remove children
   from grid flow, so my grid was being ignored. Kill the floats so the
   grid columns can take over. */
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .cg-account-nav,
body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-account .cg-account-content {
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
}

/* =========================
   SIDEBAR NAVIGATION
   ========================= */
.cg-account-nav {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 0;
  position: sticky;
  top: 16px;
  overflow: hidden;
}
.cg-account-nav-heading {
  font-size: 11px;
  font-weight: 800;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--c-border-soft);
}

.cg-account-nav-list {
  list-style: none;
  margin: 0 !important;
  padding: 8px 0 !important;
}
.cg-account-nav-list li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.cg-account-nav-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  border-left: 3px solid transparent;
}
.cg-account-nav-list li a:hover {
  background: var(--c-page-bg);
  color: var(--c-blue);
  text-decoration: none;
}
.cg-account-nav-list li.is-active > a,
.cg-account-nav-list li.woocommerce-MyAccount-navigation-link--is-active > a {
  background: #EFF6FF;
  color: var(--c-blue);
  border-left-color: var(--c-blue);
}
.cg-account-nav-icon {
  font-size: 16px;
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Vendor-only "Gestionar mi tienda" nav item (v0.15.0) */
.cg-account-nav-list li.is-vendor-item > a {
  background: #EFF6FF;
  color: var(--c-blue);
  font-weight: 700;
  border-left: 3px solid var(--c-blue);
  padding-left: 13px; /* compensate for the 3px border so labels stay aligned */
}
.cg-account-nav-list li.is-vendor-item > a:hover {
  background: #DBEAFE;
}
.cg-account-nav-badge {
  margin-left: auto;
  background: var(--c-promo);
  color: var(--c-promo-text);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

/* =========================
   CONTENT AREA
   ========================= */
.cg-account-content {
  min-width: 0;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.cg-account-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

/* =========================
   DASHBOARD
   ========================= */
/* Greeting block: avatar + name + clock */
.cg-dashboard-greeting-block {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
}
.cg-dashboard-greeting-avatar {
  flex-shrink: 0;
  text-align: center;
}
.cg-dashboard-greeting-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}
.cg-dashboard-greeting-edit {
  display: block;
  font-size: 10.5px;
  color: var(--c-blue);
  text-decoration: none;
  font-weight: 700;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cg-dashboard-greeting-edit:hover { text-decoration: underline; }
.cg-dashboard-greeting-text {
  flex: 1 1 auto;
  min-width: 0;
}
.cg-dashboard-greeting-time {
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin: 4px 0 0;
  font-weight: 500;
}

.cg-dashboard-greeting h1,
.cg-dashboard-greeting-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.cg-dashboard-greeting p,
.cg-dashboard-intro {
  font-size: 14px;
  color: var(--c-text-muted);
  margin: 0 0 22px;
  line-height: 1.55;
}
.cg-dashboard-intro a {
  color: var(--c-blue);
  text-decoration: none;
  font-weight: 600;
}
.cg-dashboard-intro a:hover { text-decoration: underline; }

/* ----- Stats row (4 stat cards) ----- */
.cg-account-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 768px) { .cg-account-stats { grid-template-columns: repeat(2, 1fr); } }
.cg-account-stat {
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.cg-account-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-blue);
  line-height: 1;
}
.cg-account-stat-label {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* ----- 6-tile grid (or 4-tile in empty state) ----- */
.cg-account-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.cg-account-tiles--four {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .cg-account-tiles,
  .cg-account-tiles--four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cg-account-tiles,
  .cg-account-tiles--four { grid-template-columns: 1fr; }
}
.cg-account-tile {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none !important;
  display: block;
  color: var(--c-text);
}
.cg-account-tile:hover {
  border-color: var(--c-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 115, 190, 0.12);
  color: var(--c-text);
}
.cg-account-tile-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #EFF6FF;
  color: var(--c-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.cg-account-tile-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text);
  margin: 0 0 4px;
}
.cg-account-tile-desc {
  font-size: 11.5px;
  color: var(--c-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ----- Empty-state hero (no orders) ----- */
.cg-account-empty {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 60px 30px;
  text-align: center;
  margin-bottom: 18px;
}
.cg-account-empty-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #F3F4F6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 16px;
}
.cg-account-empty-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 8px;
}
.cg-account-empty-desc {
  font-size: 14px;
  color: var(--c-text-muted);
  max-width: 520px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.cg-account-empty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.cg-account-empty-actions .cg-btn {
  padding: 12px 24px;
  font-size: 14px;
}

.cg-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
@media (max-width: 600px) {
  .cg-dashboard-cards { grid-template-columns: 1fr; }
}
.cg-dashboard-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--c-page-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none !important;
  color: var(--c-text);
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.cg-dashboard-card:hover {
  border-color: var(--c-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 115, 190, 0.10);
  color: var(--c-text);
  text-decoration: none;
}
.cg-dashboard-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #EFF6FF;
  color: var(--c-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cg-dashboard-card-info { display: flex; flex-direction: column; gap: 2px; }
.cg-dashboard-card-info strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-text);
}
.cg-dashboard-card-info span {
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.4;
}

/* Recent orders */
.cg-dashboard-recent-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.cg-dashboard-recent-head h2 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--c-text);
}
.cg-dashboard-link {
  font-size: 12.5px;
  color: var(--c-blue);
  text-decoration: none;
  font-weight: 700;
}
.cg-dashboard-link:hover { text-decoration: underline; }

.cg-dashboard-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cg-dashboard-order {
  display: block;
  padding: 12px 14px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none !important;
  color: var(--c-text);
  transition: border-color 0.12s, background 0.12s;
}
.cg-dashboard-order:hover {
  border-color: var(--c-blue);
  background: #FAFBFC;
  text-decoration: none;
}
.cg-dashboard-order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.cg-dashboard-order-head strong { font-size: 13.5px; font-weight: 800; color: var(--c-text); }
.cg-dashboard-order-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-muted);
}
.cg-dashboard-order-total {
  margin-left: auto;
  font-weight: 800;
  color: var(--c-text);
}

/* Empty dashboard */
.cg-dashboard-empty {
  text-align: center;
  padding: 60px 30px;
  background: var(--c-page-bg);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-lg);
}
.cg-dashboard-empty-icon { font-size: 56px; margin-bottom: 14px; }
.cg-dashboard-empty h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--c-text);
}
.cg-dashboard-empty p {
  font-size: 13.5px;
  color: var(--c-text-muted);
  margin: 0 0 18px;
}

/* =========================
   ORDER STATUS PILL (shared)
   ========================= */
.cg-order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--c-border-soft);
  color: var(--c-text-muted);
  white-space: nowrap;
}
.cg-order-status--pending,
.cg-order-status--on-hold {
  background: #FEF3C7;
  color: #92400E;
}
.cg-order-status--processing {
  background: #DBEAFE;
  color: #1E40AF;
}
.cg-order-status--completed {
  background: #DCFCE7;
  color: #166534;
}
.cg-order-status--cancelled,
.cg-order-status--failed {
  background: #FEE2E2;
  color: #991B1B;
}
.cg-order-status--refunded {
  background: #F3E8FF;
  color: #6B21A8;
}

/* =========================
   ORDERS LIST
   ========================= */
.cg-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cg-order-row {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--c-card);
  transition: border-color 0.12s;
}
.cg-order-row:hover { border-color: var(--c-blue); }
.cg-order-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}
.cg-order-row-head strong { font-size: 14px; color: var(--c-text); }
.cg-order-row-date {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-left: 10px;
}
.cg-order-row-meta {
  font-size: 12.5px;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cg-order-row-total { font-weight: 800; color: var(--c-text); }
.cg-order-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cg-btn-sm {
  padding: 7px 14px !important;
  font-size: 12px !important;
}

.cg-orders-empty {
  text-align: center;
  padding: 60px 30px;
}
.cg-orders-empty-icon { font-size: 56px; margin-bottom: 14px; }
.cg-orders-empty h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--c-text);
}
.cg-orders-empty p {
  font-size: 13.5px;
  color: var(--c-text-muted);
  margin: 0 0 18px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.cg-orders-pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

/* =========================
   VIEW ORDER (single order detail)
   ========================= */
.cg-view-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.cg-view-order-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.cg-view-order-meta {
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin: 0;
}

/* Status timeline */
.cg-order-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 18px;
  background: var(--c-page-bg);
  border-radius: var(--radius);
  margin-bottom: 22px;
  position: relative;
}
.cg-order-timeline::before {
  content: '';
  position: absolute;
  top: 38px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--c-border);
  z-index: 0;
}
.cg-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.cg-timeline-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--c-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--c-text-muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.cg-timeline-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--c-text-muted);
  letter-spacing: 0.02em;
}
.cg-timeline-step--done .cg-timeline-dot {
  background: var(--c-trust);
  border-color: var(--c-trust);
  color: #fff;
}
.cg-timeline-step--done .cg-timeline-label { color: var(--c-trust); }
.cg-timeline-step--active .cg-timeline-dot {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(30, 115, 190, 0.15);
}
.cg-timeline-step--active .cg-timeline-label { color: var(--c-blue); }
.cg-timeline-step--inactive .cg-timeline-dot {
  background: var(--c-border-soft);
  border-color: var(--c-border);
  color: var(--c-text-soft);
}

.cg-order-status-banner {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.cg-order-status-banner--cancelled,
.cg-order-status-banner--failed { background: #FEE2E2; color: #991B1B; }
.cg-order-status-banner--refunded { background: #F3E8FF; color: #6B21A8; }

/* Two-column layout (items+addresses left, summary right) */
.cg-view-order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1024px) {
  .cg-view-order-grid { grid-template-columns: 1fr; }
}

.cg-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

/* Items grouped by vendor */
.cg-order-items { margin-bottom: 22px; }
.cg-order-group {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.cg-order-group-head {
  background: var(--c-page-bg);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border-soft);
}
.cg-order-group-head strong { color: var(--c-blue); margin-left: 4px; font-weight: 700; }
.cg-order-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border-soft);
  align-items: center;
}
.cg-order-item:last-child { border-bottom: 0; }
.cg-order-item-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: #fff;
}
.cg-order-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cg-order-item-name {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.4;
}
.cg-order-item-name a {
  color: var(--c-text);
  text-decoration: none;
}
.cg-order-item-name a:hover { color: var(--c-blue); }
.cg-order-item-qty {
  font-size: 12px;
  color: var(--c-text-muted);
  margin: 0;
}
.cg-order-item .wc-item-meta {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  font-size: 11.5px;
  color: var(--c-text-muted);
}
.cg-order-item .wc-item-meta li { margin: 0; padding: 0; }
.cg-order-item-subtotal {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-text);
  white-space: nowrap;
}

/* Addresses */
.cg-order-addresses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 600px) {
  .cg-order-addresses { grid-template-columns: 1fr; }
}
.cg-order-address {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--c-card);
}
.cg-order-address h3 {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  margin: 0 0 8px;
}
.cg-order-address address {
  font-style: normal;
  font-size: 13px;
  color: var(--c-text);
  line-height: 1.5;
}
.cg-order-address-email,
.cg-order-address-phone {
  display: inline-block;
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin-top: 4px;
}

/* Customer order notes */
.cg-order-notes {
  margin-bottom: 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--c-card);
}
.cg-order-notes h3 {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  margin: 0 0 10px;
}
.cg-order-note {
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border-soft);
  font-size: 13px;
}
.cg-order-note:last-child { border-bottom: 0; }
.cg-order-note-date {
  font-size: 11.5px;
  color: var(--c-text-muted);
  margin-bottom: 2px;
}

/* Summary card (right column) */
.cg-order-summary-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.cg-order-summary-card h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--c-text);
}
.cg-order-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 13px;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border-soft);
}
.cg-order-summary-row:last-of-type { border-bottom: 0; }
.cg-order-summary-row--total {
  border-top: 2px solid var(--c-border);
  margin-top: 6px;
  padding-top: 12px !important;
  font-size: 16px !important;
  font-weight: 800;
}
.cg-order-summary-row--total span:last-child {
  color: var(--c-blue);
  font-size: 18px;
  font-weight: 800;
}

.cg-order-support-card {
  background: var(--c-trust-bg);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius);
  padding: 18px;
}
.cg-order-support-card h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #065F46;
}
.cg-order-support-card p {
  font-size: 12.5px;
  color: #047857;
  margin: 0 0 10px;
  line-height: 1.5;
}

/* =========================
   AUTH (sign in / register)
   ========================= */
.cg-auth-page {
  padding: 24px 0 48px;
}
.cg-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .cg-auth-grid { grid-template-columns: 1fr; }
}
.cg-auth-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.cg-auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.cg-auth-sub {
  font-size: 13.5px;
  color: var(--c-text-muted);
  margin: 0 0 22px;
  line-height: 1.5;
}
.cg-auth-form .form-row {
  margin-bottom: 14px;
}
.cg-auth-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 6px;
}
.cg-auth-form input[type="text"],
.cg-auth-form input[type="email"],
.cg-auth-form input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--c-text);
  transition: border-color 0.12s, box-shadow 0.12s;
  box-sizing: border-box;
}
.cg-auth-form input:focus {
  outline: 0;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.10);
}
.cg-auth-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
}
.cg-auth-row-actions label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.cg-auth-row-actions input[type="checkbox"] { margin: 0; }
.cg-auth-forgot {
  color: var(--c-blue);
  text-decoration: none;
  font-weight: 700;
}
.cg-auth-forgot:hover { text-decoration: underline; }

.cg-btn-wide {
  display: block !important;
  width: 100% !important;
  padding: 12px 18px !important;
  font-size: 14px !important;
}

/* Auth submit — brand-blue pill, white text. Matches the demo. */
.cg-auth-submit {
  background: var(--c-blue) !important;
  color: #fff !important;
  border: 0 !important;
  padding: 12px 32px !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  cursor: pointer;
  transition: background 0.15s ease !important;
  display: inline-block;
}
.cg-auth-submit:hover {
  background: var(--c-blue-dark) !important;
  color: #fff !important;
}

/* Benefits list inside the registration card */
.cg-auth-benefits {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--c-border-soft);
}
.cg-auth-benefits-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 12px;
}
.cg-auth-benefits-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.cg-auth-benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin: 0 !important;
  list-style: none !important;
}
.cg-auth-benefits-list li::before {
  content: "✓";
  color: var(--c-trust);
  font-weight: 800;
  flex-shrink: 0;
  width: 18px;
  font-size: 14px;
}

/* =========================
   AVATAR UPLOAD (in edit-account form)
   ========================= */
.cg-avatar-fieldset {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 22px !important;
  margin: 0 0 22px !important;
  background: var(--c-page-bg);
}
.cg-avatar-fieldset legend {
  font-size: 13px;
  font-weight: 800;
  padding: 0 8px;
  color: var(--c-text);
}
.cg-avatar-row {
  display: flex;
  align-items: center;
  gap: 22px;
}
.cg-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  flex-shrink: 0;
  background: var(--c-card);
}
.cg-avatar-controls { flex: 1; min-width: 0; }
.cg-avatar-hint {
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.cg-avatar-button {
  display: inline-block;
  background: var(--c-blue);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  margin: 0 10px 0 0 !important;
  transition: background 0.12s;
}
.cg-avatar-button:hover { background: var(--c-blue-dark); }
.cg-avatar-filename {
  font-size: 12px;
  color: var(--c-text-muted);
}
.cg-avatar-remove-row {
  margin-top: 10px !important;
  font-size: 12px;
  color: var(--c-text-muted);
}
.cg-avatar-remove-row label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 600 !important;
  margin: 0 !important;
  cursor: pointer;
}
@media (max-width: 600px) {
  .cg-avatar-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* =========================
   EDIT FORMS (account / address)
   ========================= */
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
  max-width: 640px;
}
.woocommerce-EditAccountForm fieldset {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 18px 0;
}
.woocommerce-EditAccountForm fieldset legend {
  font-size: 13px;
  font-weight: 800;
  padding: 0 8px;
  color: var(--c-text);
}
.woocommerce-EditAccountForm .form-row,
.woocommerce-address-fields .form-row {
  margin-bottom: 14px;
}
.woocommerce-EditAccountForm label,
.woocommerce-address-fields label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 5px;
}
.woocommerce-EditAccountForm .input-text,
.woocommerce-address-fields .input-text,
.woocommerce-EditAccountForm select,
.woocommerce-address-fields select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}
.woocommerce-EditAccountForm .button,
.woocommerce-address-fields .button {
  background: var(--c-promo) !important;
  color: var(--c-promo-text) !important;
  border: 0 !important;
  border-radius: 4px !important;
  padding: 11px 22px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}
.woocommerce-EditAccountForm .button:hover,
.woocommerce-address-fields .button:hover {
  filter: brightness(0.96);
}

/* =========================
   NOTIFICACIONES PAGE (v0.11.1)
   /my-account/notificaciones/ — inbox + preferences.
   ========================= */
.cg-notif-page {
  max-width: 880px;
}

/* Section card shell shared by inbox + prefs. */
.cg-notif-inbox-section,
.cg-notif-prefs-section {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
}

/* ---------- Inbox ---------- */
.cg-notif-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cg-notif-inbox-head h2,
.cg-notif-prefs-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.005em;
}
.cg-notif-inbox-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cg-notif-mark-all-btn {
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-blue);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cg-notif-mark-all-btn:hover {
  background: #EFF6FF;
  border-color: var(--c-blue);
}
/* Web Push enable/disable button (v1.1.1) */
.cg-notif-push-btn {
  background: var(--c-blue);
  color: #fff;
  border: 1px solid var(--c-blue);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.cg-notif-push-btn:hover {
  background: var(--c-blue-dark);
  border-color: var(--c-blue-dark);
}
.cg-notif-push-btn[data-cgmp-push-state="subscribed"] {
  background: var(--c-trust-bg);
  color: var(--c-trust);
  border-color: var(--c-trust);
}
.cg-notif-push-btn[data-cgmp-push-state="subscribed"]:hover {
  background: #D1FAE5;
}
.cg-notif-push-btn[data-cgmp-push-state="denied"],
.cg-notif-push-btn[data-cgmp-push-state="unsupported"] {
  background: #F3F4F6;
  color: var(--c-text-muted);
  border-color: var(--c-border);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Filter chips */
.cg-notif-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--c-border-soft);
}
.cg-notif-filter {
  background: var(--c-page-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cg-notif-filter:hover {
  background: #fff;
  color: var(--c-text);
  border-color: var(--c-text-soft);
}
.cg-notif-filter.is-active {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
}

/* Inbox list */
.cg-notif-inbox-list {
  display: flex;
  flex-direction: column;
}
.cg-notif-inbox-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 14px 14px 18px;
  border-bottom: 1px solid var(--c-border-soft);
  border-radius: 6px;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.15s;
}
.cg-notif-inbox-item:last-child { border-bottom: 0; }
.cg-notif-inbox-item:hover { background: var(--c-page-bg); }

/* Unread state — left blue rail + bolder title */
.cg-notif-inbox-item.is-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--c-blue);
  border-radius: 0 3px 3px 0;
}
.cg-notif-inbox-item.is-unread .cg-notif-item-title {
  color: var(--c-text);
  font-weight: 800;
}
.cg-notif-inbox-item.is-unread .cg-notif-item-title::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--c-blue);
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

/* Type-coloured icon bubble */
.cg-notif-item-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: #EFF6FF;
  color: var(--c-blue);
}
.cg-notif-item-icon--orders   { background: #EFF6FF;  color: var(--c-blue); }
.cg-notif-item-icon--vendors  { background: #FEF3C7;  color: #92400E; }
.cg-notif-item-icon--promos   { background: #FEF3C7;  color: #92400E; }
.cg-notif-item-icon--system   { background: #F3E8FF;  color: #7C3AED; }
.cg-notif-item-icon--success  { background: #ECFDF5;  color: var(--c-trust); }

.cg-notif-item-body {
  flex: 1;
  min-width: 0;
}
.cg-notif-item-title {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.35;
}
.cg-notif-item-text {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.45;
}
.cg-notif-item-text strong { color: var(--c-text); font-weight: 700; }
.cg-notif-item-meta {
  margin: 0;
  font-size: 11.5px;
  color: var(--c-text-soft);
  font-weight: 600;
}

/* ---------- Preferences ---------- */
.cg-notif-prefs-head {
  margin-bottom: 18px;
}
.cg-notif-prefs-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--c-text-muted);
}

.cg-notif-prefs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
}
.cg-notif-prefs-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-soft);
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
}
.cg-notif-prefs-table thead th.cg-notif-prefs-channel {
  text-align: center;
  width: 90px;
}
.cg-notif-prefs-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--c-border-soft);
  vertical-align: middle;
}
.cg-notif-prefs-table tbody tr:last-child td { border-bottom: 0; }
.cg-notif-prefs-table td.cg-notif-prefs-cat strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 2px;
}
.cg-notif-prefs-table td.cg-notif-prefs-cat span {
  display: block;
  font-size: 12.5px;
  color: var(--c-text-muted);
  line-height: 1.4;
}
.cg-notif-prefs-table td.cg-notif-prefs-channel {
  text-align: center;
  width: 90px;
}
.cg-notif-prefs-na {
  color: var(--c-text-soft);
  font-size: 16px;
  font-weight: 700;
}

/* Toggle switch (sliding pill) */
.cg-toggle {
  display: inline-block;
  position: relative;
  width: 42px;
  height: 24px;
  cursor: pointer;
  vertical-align: middle;
}
.cg-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cg-toggle-slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 999px;
  transition: background 0.18s;
}
.cg-toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform 0.18s;
}
.cg-toggle input:checked + .cg-toggle-slider {
  background: var(--c-blue);
}
.cg-toggle input:checked + .cg-toggle-slider::before {
  transform: translateX(18px);
}
.cg-toggle input:focus-visible + .cg-toggle-slider {
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.22);
}

/* No molestar */
.cg-notif-dnd {
  background: var(--c-page-bg);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.cg-notif-dnd-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text);
}
.cg-notif-dnd-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--c-blue);
  margin: 0;
}
.cg-notif-dnd-times {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding-left: 26px;
}
.cg-notif-dnd-times label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-muted);
}
.cg-notif-dnd-times input[type="time"] {
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--c-text);
}

.cg-notif-prefs-footer {
  display: flex;
  justify-content: flex-end;
}
.cg-notif-prefs-footer .cg-btn-primary {
  background: var(--c-promo);
  color: var(--c-promo-text);
  border: 0;
  border-radius: 4px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.15s;
}
.cg-notif-prefs-footer .cg-btn-primary:hover {
  filter: brightness(0.96);
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .cg-notif-inbox-section,
  .cg-notif-prefs-section { padding: 18px 14px; }
  .cg-notif-inbox-item { padding: 12px 10px 12px 14px; gap: 10px; }
  .cg-notif-item-icon { width: 34px; height: 34px; font-size: 16px; }
  .cg-notif-prefs-table thead { display: none; }
  .cg-notif-prefs-table,
  .cg-notif-prefs-table tbody,
  .cg-notif-prefs-table tr,
  .cg-notif-prefs-table td { display: block; width: 100%; }
  .cg-notif-prefs-table tbody tr {
    border-bottom: 1px solid var(--c-border-soft);
    padding: 12px 0;
  }
  .cg-notif-prefs-table tbody tr:last-child { border-bottom: 0; }
  .cg-notif-prefs-table tbody td { border-bottom: 0; padding: 6px 0; }
  .cg-notif-prefs-table td.cg-notif-prefs-channel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-right: 18px;
  }
  .cg-notif-prefs-table td.cg-notif-prefs-channel::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--c-text-soft);
  }
}
