/* =========================================================================
   dashboard.css
   TVDTHEME â€” My Account Dashboard (SaaS 2026 style)
   Pure CSS, no framework, no CDN. Light + Dark (prefers-color-scheme).
   ========================================================================= */

:root {
  --tvd-bg: #f5f6fb;
  --tvd-surface: #ffffff;
  --tvd-surface-2: #fbfbfe;
  --tvd-primary: #4f46e5;
  --tvd-primary-2: #7c3aed;
  --tvd-primary-dark: #4338ca;
  --tvd-accent: #06b6d4;
  --tvd-text: #1b1e28;
  --tvd-text-muted: #6b7280;
  --tvd-text-faint: #9aa1b1;
  --tvd-border: #e7e8f1;
  --tvd-border-strong: #d8dae8;
  --tvd-success: #10b981;
  --tvd-success-bg: #e9fbf4;
  --tvd-danger: #ef4444;
  --tvd-danger-bg: #fdecec;
  --tvd-warning: #f59e0b;
  --tvd-warning-bg: #fef6e7;
  --tvd-info: #3b82f6;
  --tvd-info-bg: #eaf2fe;

  --tvd-radius-lg: 22px;
  --tvd-radius-md: 16px;
  --tvd-radius-sm: 10px;

  --tvd-shadow-sm: 0 2px 8px rgba(27, 30, 40, 0.06);
  --tvd-shadow-md:
    0 10px 30px -12px rgba(27, 30, 40, 0.14), 0 2px 10px rgba(27, 30, 40, 0.05);
  --tvd-shadow-lg: 0 24px 48px -20px rgba(27, 30, 40, 0.22);

  --tvd-gradient-brand: linear-gradient(
    135deg,
    var(--tvd-primary) 0%,
    var(--tvd-primary-2) 100%
  );
  --tvd-gradient-accent: linear-gradient(
    135deg,
    var(--tvd-accent) 0%,
    var(--tvd-primary) 100%
  );

  --tvd-font-body:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --tvd-font-display:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --tvd-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tvd-sticky-offset: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tvd-bg: #0e1015;
    --tvd-surface: #161922;
    --tvd-surface-2: #1c202b;
    --tvd-text: #e8e9f2;
    --tvd-text-muted: #9aa1b3;
    --tvd-text-faint: #6e7484;
    --tvd-border: #262b37;
    --tvd-border-strong: #323848;
    --tvd-success-bg: rgba(16, 185, 129, 0.12);
    --tvd-danger-bg: rgba(239, 68, 68, 0.12);
    --tvd-warning-bg: rgba(245, 158, 11, 0.12);
    --tvd-info-bg: rgba(59, 130, 246, 0.12);

    --tvd-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
    --tvd-shadow-md:
      0 14px 34px -14px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
    --tvd-shadow-lg: 0 26px 54px -18px rgba(0, 0, 0, 0.6);
  }
}

/* -------------------------------------------------------------------------
   Reset scope (kept local to the dashboard to avoid touching Flatsome)
   ------------------------------------------------------------------------- */
.tvd-dashboard,
.tvd-dashboard *,
.tvd-dashboard *::before,
.tvd-dashboard *::after {
  box-sizing: border-box;
}

.tvd-dashboard {
  background: var(--tvd-bg);
  font-family: var(--tvd-font-body);
  color: var(--tvd-text);
  padding: clamp(16px, 3vw, 40px) 0 clamp(32px, 5vw, 64px);
  width: 100%;
}

/* Let the dashboard breathe full width; Flatsome's .container class
   is preserved in markup for compatibility, but no longer clamps us. */
.tvd-dashboard__container {
  max-width: min(1600px, 96vw);
  width: 100%;
  margin: 0 auto;
  padding-left: clamp(12px, 2vw, 28px);
  padding-right: clamp(12px, 2vw, 28px);
}

/* -------------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------------- */
.tvd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--tvd-text-muted);
  margin-bottom: 20px;
  animation: tvd-fade-down 0.5s var(--tvd-ease) both;
}

.tvd-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tvd-text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s var(--tvd-ease);
}

.tvd-breadcrumb__icon {
  width: 14px;
  height: 14px;
}

.tvd-breadcrumb__link:hover {
  color: var(--tvd-primary);
}

.tvd-breadcrumb__sep {
  opacity: 0.5;
}

.tvd-breadcrumb__current {
  color: var(--tvd-text);
  font-weight: 700;
}

/* -------------------------------------------------------------------------
   Grid: sidebar + content, equal height
   ------------------------------------------------------------------------- */
.tvd-dashboard__grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(16px, 2vw, 28px);
  width: 100%;
  margin: 0;
}

/* Neutralise Flatsome's float/width grid behaviour inside our scope only */
.tvd-dashboard__grid > .tvd-sidebar,
.tvd-dashboard__grid > .tvd-content {
  width: 100%;
  float: none;
  max-width: none;
  padding: 0;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------------- */
.tvd-sidebar {
  position: relative;
}

.tvd-sidebar__toggle {
  display: none;
  width: 100%;
  align-items: center;
  gap: 12px;
  background: var(--tvd-surface);
  border: 1px solid var(--tvd-border);
  border-radius: var(--tvd-radius-md);
  box-shadow: var(--tvd-shadow-sm);
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--tvd-text);
  cursor: pointer;
  margin-bottom: 12px;
  font-family: inherit;
}

.tvd-sidebar__toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.tvd-sidebar__toggle-icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--tvd-text);
  transition:
    transform 0.25s var(--tvd-ease),
    opacity 0.2s var(--tvd-ease);
}

.tvd-sidebar__toggle[aria-expanded="true"]
  .tvd-sidebar__toggle-icon
  span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.tvd-sidebar__toggle[aria-expanded="true"]
  .tvd-sidebar__toggle-icon
  span:nth-child(2) {
  opacity: 0;
}

.tvd-sidebar__toggle[aria-expanded="true"]
  .tvd-sidebar__toggle-icon
  span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.tvd-sidebar__inner {
  position: sticky;
  top: var(--tvd-sticky-offset);
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--tvd-surface);
  border: 1px solid var(--tvd-border);
  border-radius: var(--tvd-radius-lg);
  box-shadow: var(--tvd-shadow-md);
  padding: 22px;
  height: fit-content;
  max-height: calc(100vh - (var(--tvd-sticky-offset) * 2));
  overflow-y: auto;
  scrollbar-width: thin;
  animation: tvd-fade-up 0.5s var(--tvd-ease) both;
}

.tvd-sidebar__inner::-webkit-scrollbar {
  width: 6px;
}

.tvd-sidebar__inner::-webkit-scrollbar-thumb {
  background: var(--tvd-border-strong);
  border-radius: 6px;
}

/* User profile block (wraps myaccount/account-user.php output) */
.tvd-sidebar__profile {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--tvd-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.tvd-sidebar__profile img,
.tvd-sidebar__profile .avatar {
  border-radius: 50%;
  width: 72px;
  height: 72px;
  object-fit: cover;
  box-shadow:
    0 0 0 4px var(--tvd-surface),
    0 0 0 6px var(--tvd-border);
}

.tvd-sidebar__profile p,
.tvd-sidebar__profile .woocommerce-MyAccount-content > p {
  margin: 0;
}

.tvd-sidebar__profile strong,
.tvd-sidebar__profile b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--tvd-text);
  letter-spacing: -0.01em;
}

.tvd-sidebar__profile a {
  color: var(--tvd-text-muted);
  font-size: 13px;
  text-decoration: none;
  word-break: break-word;
}

.tvd-sidebar__profile a:hover {
  color: var(--tvd-primary);
}

/* Navigation */
.tvd-sidebar__nav {
  display: block;
}

.tvd-nav.account-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tvd-nav.account-nav li {
  margin: 0;
  list-style: none;
}

.tvd-nav.account-nav li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 11px 42px;
  border-radius: var(--tvd-radius-sm);
  color: var(--tvd-text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition:
    background-color 0.2s var(--tvd-ease),
    color 0.2s var(--tvd-ease),
    transform 0.15s var(--tvd-ease);
}

.tvd-nav.account-nav li a::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.85;
}

.tvd-nav.account-nav li a:hover {
  background: var(--tvd-surface-2);
  color: var(--tvd-primary);
  transform: translateX(2px);
}

.tvd-nav.account-nav li.is-active a,
.tvd-nav.account-nav
  li.woocommerce-MyAccount-navigation-link--dashboard.is-active
  a {
  background: var(--tvd-gradient-brand);
  color: #fff;
  box-shadow: var(--tvd-shadow-sm);
}

/* Icons per WooCommerce endpoint (mask-image, theme-color aware) */
.woocommerce-MyAccount-navigation-link--dashboard > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--orders > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M15 3v4h4'/%3E%3Cpath d='M9 12h6M9 16h6M9 8h2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M15 3v4h4'/%3E%3Cpath d='M9 12h6M9 16h6M9 8h2'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--downloads > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M4 19h16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M4 19h16'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--edit-address > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 21s-7-6.2-7-11.4C5 5.4 8.1 3 12 3s7 2.4 7 6.6C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 21s-7-6.2-7-11.4C5 5.4 8.1 3 12 3s7 2.4 7 6.6C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.3'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--payment-methods > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath d='M2.5 9.5h19'/%3E%3Cpath d='M6 15h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath d='M2.5 9.5h19'/%3E%3Cpath d='M6 15h4'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--edit-account > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M5 20c1.2-4 4-6 7-6s5.8 2 7 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M5 20c1.2-4 4-6 7-6s5.8 2 7 6'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--customer-logout > a::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--customer-logout > a {
  color: var(--tvd-danger);
}

.woocommerce-MyAccount-navigation-link--customer-logout > a:hover {
  background: var(--tvd-danger-bg);
  color: var(--tvd-danger);
}

/* -------------------------------------------------------------------------
   Content column
   ------------------------------------------------------------------------- */
.tvd-content {
  display: flex;
  min-width: 0;
}

.tvd-content__card {
  width: 100%;
  background: var(--tvd-surface);
  border: 1px solid var(--tvd-border);
  border-radius: var(--tvd-radius-lg);
  box-shadow: var(--tvd-shadow-md);
  padding: clamp(20px, 3vw, 36px);
  animation: tvd-fade-up 0.55s 0.05s var(--tvd-ease) both;
}

.tvd-content--guest {
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

/* Dashboard welcome text / generic paragraphs */
.tvd-content__card .woocommerce-MyAccount-content > p:first-child {
  font-size: 17px;
  font-weight: 700;
  color: var(--tvd-text);
  margin-top: 0;
}

.tvd-content__card p {
  color: var(--tvd-text-muted);
  line-height: 1.7;
}

.tvd-content__card a {
  color: var(--tvd-primary);
  font-weight: 600;
  text-decoration: none;
}

.tvd-content__card a:hover {
  text-decoration: underline;
}

/* =========================================================================
   Ultra-Modern SaaS 2026 Dashboard Overhaul & Interactive Cards
   ========================================================================= */

/* Reveal Animation */
.tvd-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tvd-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Welcome Banner */
.tvd-dashboard-welcome {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.08) 0%,
    rgba(6, 182, 212, 0.08) 100%
  );
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--tvd-radius-lg, 22px);
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.tvd-dashboard-welcome::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.tvd-dashboard-welcome__content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.tvd-dashboard-welcome__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  border: 3px solid #ffffff;
}

.tvd-dashboard-welcome__text h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: var(--tvd-text, #1b1e28);
  letter-spacing: -0.02em;
}

.tvd-dashboard-welcome__text p {
  margin: 0;
  font-size: 15px;
  color: var(--tvd-text-muted, #6b7280);
}

/* Stat Summary Cards */
.tvd-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.tvd-stat-card {
  background: var(--tvd-surface, #ffffff);
  border: 1px solid var(--tvd-border, #e7e8f1);
  border-radius: var(--tvd-radius-md, 16px);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--tvd-shadow-sm, 0 2px 8px rgba(27, 30, 40, 0.04));
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.tvd-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tvd-shadow-md, 0 10px 30px -12px rgba(27, 30, 40, 0.12));
  border-color: var(--tvd-primary, #4f46e5);
}

.tvd-stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tvd-stat-card__icon svg {
  width: 24px;
  height: 24px;
}

.tvd-stat-card__icon--blue {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.tvd-stat-card__icon--emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.tvd-stat-card__icon--purple {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.tvd-stat-card__number {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--tvd-text, #1b1e28);
  line-height: 1.2;
}

.tvd-stat-card__label {
  font-size: 13px;
  color: var(--tvd-text-muted, #6b7280);
  font-weight: 600;
}

/* Dashboard Action Cards Grid */
ul.dashboard-links.tvd-dashboard-grid,
.woocommerce-MyAccount-content ul.dashboard-links.tvd-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

li.tvd-dashboard-card {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tvd-dashboard-card__link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 24px;
  background: var(--tvd-surface, #ffffff);
  border: 1px solid var(--tvd-border, #e7e8f1);
  border-radius: var(--tvd-radius-lg, 20px);
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--tvd-shadow-sm, 0 2px 8px rgba(27, 30, 40, 0.05));
  position: relative;
  overflow: hidden;
}

.tvd-dashboard-card__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--tvd-radius-lg, 20px);
  padding: 1px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), transparent 70%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tvd-dashboard-card__link:hover {
  transform: translateY(-5px);
  box-shadow: var(--tvd-shadow-md, 0 14px 34px -14px rgba(27, 30, 40, 0.15));
  border-color: transparent;
}

.tvd-dashboard-card__link:hover::before {
  opacity: 1;
}

.tvd-dashboard-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tvd-dashboard-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.1) 0%,
    rgba(124, 58, 237, 0.1) 100%
  );
  color: var(--tvd-primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
}

.tvd-dashboard-card__icon svg {
  width: 26px;
  height: 26px;
}

.tvd-dashboard-card__link:hover .tvd-dashboard-card__icon {
  background: var(--tvd-primary, #4f46e5);
  color: #ffffff;
  transform: scale(1.08) rotate(-3deg);
}

.tvd-dashboard-card__arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tvd-bg, #f5f6fb);
  color: var(--tvd-text-muted, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tvd-dashboard-card__arrow svg {
  width: 16px;
  height: 16px;
}

.tvd-dashboard-card__link:hover .tvd-dashboard-card__arrow {
  background: var(--tvd-primary, #4f46e5);
  color: #ffffff;
  transform: translateX(4px);
}

.tvd-dashboard-card__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--tvd-text, #1b1e28);
  letter-spacing: -0.01em;
}

.tvd-dashboard-card__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--tvd-text-muted, #6b7280);
}

/* Logout Card Custom Styling */
.tvd-dashboard-card.woocommerce-MyAccount-navigation-link--customer-logout
  .tvd-dashboard-card__icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tvd-dashboard-card.woocommerce-MyAccount-navigation-link--customer-logout
  .tvd-dashboard-card__link:hover
  .tvd-dashboard-card__icon {
  background: #ef4444;
  color: #ffffff;
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .tvd-dashboard-welcome {
    background: linear-gradient(
      135deg,
      rgba(79, 70, 229, 0.18) 0%,
      rgba(6, 182, 212, 0.12) 100%
    );
    border-color: rgba(79, 70, 229, 0.25);
  }
  .tvd-dashboard-welcome__avatar img {
    border-color: #161922;
  }
  .tvd-dashboard-card__arrow {
    background: #1c202b;
  }
}

/* Responsive Mobile Rules */
@media (max-width: 768px) {
  .tvd-dashboard-welcome__content {
    flex-direction: column;
    text-align: center;
  }
  .tvd-dashboard-stats {
    grid-template-columns: 1fr;
  }
  ul.dashboard-links.tvd-dashboard-grid,
  .woocommerce-MyAccount-content ul.dashboard-links.tvd-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Headings inside account content act as section titles */
.tvd-content__card h1,
.tvd-content__card h2,
.tvd-content__card h3 {
  font-family: var(--tvd-font-display);
  letter-spacing: -0.01em;
  color: var(--tvd-text);
}

.tvd-content__card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 0;
}

/* -------------------------------------------------------------------------
   Widgets / stat cards (for dashboard endpoint extras, shortcodes, etc.)
   ------------------------------------------------------------------------- */
.tvd-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.tvd-widget {
  background: var(--tvd-surface-2);
  border: 1px solid var(--tvd-border);
  border-radius: var(--tvd-radius-md);
  padding: 18px;
  transition:
    transform 0.25s var(--tvd-ease),
    box-shadow 0.25s var(--tvd-ease);
}

.tvd-widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--tvd-shadow-sm);
}

.tvd-widget__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tvd-text-faint);
  font-weight: 700;
}

.tvd-widget__value {
  font-size: 26px;
  font-weight: 800;
  color: var(--tvd-text);
  margin-top: 6px;
}

/* -------------------------------------------------------------------------
   Buttons (covers WooCommerce .button, input[type=submit], etc.)
   ------------------------------------------------------------------------- */
.tvd-content__card .button,
.tvd-content__card button:not(.tvd-sidebar__toggle),
.tvd-content__card input[type="submit"],
.tvd-dashboard .woocommerce-Button,
.tvd-content__card .wc-forward {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--tvd-gradient-brand);
  border: none;
  border-radius: var(--tvd-radius-sm);
  padding: 12px 22px;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.18s var(--tvd-ease),
    box-shadow 0.18s var(--tvd-ease),
    filter 0.18s var(--tvd-ease);
  box-shadow: var(--tvd-shadow-sm);
}

.tvd-content__card .button:hover,
.tvd-content__card button:not(.tvd-sidebar__toggle):hover,
.tvd-content__card input[type="submit"]:hover,
.tvd-content__card .wc-forward:hover {
  transform: translateY(-2px);
  box-shadow: var(--tvd-shadow-md);
  filter: brightness(1.04);
}

.tvd-content__card .button:active,
.tvd-content__card button:not(.tvd-sidebar__toggle):active,
.tvd-content__card input[type="submit"]:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.tvd-content__card .button.disabled,
.tvd-content__card .button:disabled,
.tvd-content__card button:disabled,
.tvd-content__card input[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tvd-content__card .button.tvd-is-loading,
.tvd-content__card button.tvd-is-loading {
  color: transparent;
  pointer-events: none;
}

.tvd-content__card .button.tvd-is-loading::after,
.tvd-content__card button.tvd-is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: tvd-spin 0.7s linear infinite;
}

/* Secondary / outline button variant, used for "cancel" style links */
.tvd-content__card .button.tvd-btn--ghost {
  background: transparent;
  color: var(--tvd-primary);
  border: 1.5px solid var(--tvd-border-strong);
  box-shadow: none;
}

.tvd-content__card .button.tvd-btn--ghost:hover {
  background: var(--tvd-surface-2);
}

/* -------------------------------------------------------------------------
   Alerts / notices (WooCommerce message, error, info)
   ------------------------------------------------------------------------- */
.tvd-dashboard .woocommerce-message,
.tvd-dashboard .woocommerce-error,
.tvd-dashboard .woocommerce-info,
.tvd-dashboard .woocommerce-notice {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--tvd-radius-md);
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  animation: tvd-fade-down 0.4s var(--tvd-ease) both;
}

.tvd-dashboard .woocommerce-message {
  background: var(--tvd-success-bg);
  color: var(--tvd-success);
  border-color: rgba(16, 185, 129, 0.25);
}

.tvd-dashboard .woocommerce-error {
  background: var(--tvd-danger-bg);
  color: var(--tvd-danger);
  border-color: rgba(239, 68, 68, 0.25);
}

.tvd-dashboard .woocommerce-info {
  background: var(--tvd-info-bg);
  color: var(--tvd-info);
  border-color: rgba(59, 130, 246, 0.25);
}

.tvd-dashboard .woocommerce-message::before,
.tvd-dashboard .woocommerce-error::before,
.tvd-dashboard .woocommerce-info::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tvd-dashboard .woocommerce-message a,
.tvd-dashboard .woocommerce-error a,
.tvd-dashboard .woocommerce-info a {
  color: inherit;
  text-decoration: underline;
  margin-left: auto;
  font-weight: 700;
}

/* -------------------------------------------------------------------------
   Forms â€” input, select, textarea, checkbox, radio, upload, validation
   ------------------------------------------------------------------------- */
.tvd-content__card form .form-row {
  margin-bottom: 16px;
}

.tvd-content__card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--tvd-text);
  margin-bottom: 6px;
}

.tvd-content__card .required {
  color: var(--tvd-danger);
  text-decoration: none;
}

.tvd-content__card input[type="text"],
.tvd-content__card input[type="email"],
.tvd-content__card input[type="password"],
.tvd-content__card input[type="tel"],
.tvd-content__card input[type="number"],
.tvd-content__card input[type="search"],
.tvd-content__card input[type="date"],
.tvd-content__card select,
.tvd-content__card textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--tvd-text);
  background: var(--tvd-surface-2);
  border: 1.5px solid var(--tvd-border);
  border-radius: var(--tvd-radius-sm);
  padding: 12px 14px;
  transition:
    border-color 0.2s var(--tvd-ease),
    box-shadow 0.2s var(--tvd-ease),
    background-color 0.2s var(--tvd-ease);
}

.tvd-content__card select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.tvd-content__card textarea {
  min-height: 120px;
  resize: vertical;
}

.tvd-content__card input:focus,
.tvd-content__card select:focus,
.tvd-content__card textarea:focus {
  outline: none;
  border-color: var(--tvd-primary);
  background: var(--tvd-surface);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.tvd-content__card input.woocommerce-invalid,
.tvd-content__card .woocommerce-invalid input,
.tvd-content__card .woocommerce-invalid select {
  border-color: var(--tvd-danger);
  background: var(--tvd-danger-bg);
}

.tvd-content__card .woocommerce-invalid label {
  color: var(--tvd-danger);
}

/* Checkbox / radio */
.tvd-content__card input[type="checkbox"],
.tvd-content__card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--tvd-primary);
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
}

.tvd-content__card .form-row label.checkbox,
.tvd-content__card .form-row label.radio {
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* File upload (avatar / documents) */
.tvd-content__card input[type="file"] {
  display: block;
  width: 100%;
  font-size: 13px;
  color: var(--tvd-text-muted);
  background: var(--tvd-surface-2);
  border: 1.5px dashed var(--tvd-border-strong);
  border-radius: var(--tvd-radius-md);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s var(--tvd-ease),
    background-color 0.2s var(--tvd-ease);
}

.tvd-content__card input[type="file"]:hover {
  border-color: var(--tvd-primary);
  background: var(--tvd-info-bg);
}

/* -------------------------------------------------------------------------
   Tables â€” orders, downloads (zebra, hover, responsive scroll)
   ------------------------------------------------------------------------- */
.tvd-content__card .tvd-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--tvd-radius-md);
  border: 1px solid var(--tvd-border);
}

.tvd-content__card table.shop_table,
.tvd-content__card table.woocommerce-orders-table,
.tvd-content__card table.account-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 560px;
}

.tvd-content__card table.shop_table thead th,
.tvd-content__card table.woocommerce-orders-table thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tvd-text-faint);
  background: var(--tvd-surface-2);
  padding: 14px 16px;
  border-bottom: 1px solid var(--tvd-border);
  white-space: nowrap;
}

.tvd-content__card table.shop_table tbody td,
.tvd-content__card table.woocommerce-orders-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--tvd-border);
  color: var(--tvd-text);
  vertical-align: middle;
}

.tvd-content__card table.shop_table tbody tr:nth-child(even),
.tvd-content__card table.woocommerce-orders-table tbody tr:nth-child(even) {
  background: var(--tvd-surface-2);
}

.tvd-content__card table.shop_table tbody tr:hover,
.tvd-content__card table.woocommerce-orders-table tbody tr:hover {
  background: var(--tvd-info-bg);
}

.tvd-content__card table.shop_table tbody tr:last-child td {
  border-bottom: none;
}

/* Order status pill */
.tvd-content__card .order-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--tvd-info-bg);
  color: var(--tvd-info);
}

.tvd-content__card .order-status.status-completed {
  background: var(--tvd-success-bg);
  color: var(--tvd-success);
}

.tvd-content__card .order-status.status-cancelled,
.tvd-content__card .order-status.status-failed {
  background: var(--tvd-danger-bg);
  color: var(--tvd-danger);
}

.tvd-content__card .order-status.status-on-hold,
.tvd-content__card .order-status.status-pending {
  background: var(--tvd-warning-bg);
  color: var(--tvd-warning);
}

/* -------------------------------------------------------------------------
   Addresses grid (edit-address / addresses endpoint)
   ------------------------------------------------------------------------- */
.tvd-content__card .u-columns.woocommerce-Addresses,
.tvd-content__card .woocommerce-Addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}

.tvd-content__card .woocommerce-Address {
  background: var(--tvd-surface-2);
  border: 1px solid var(--tvd-border);
  border-radius: var(--tvd-radius-md);
  padding: 20px;
  transition:
    box-shadow 0.2s var(--tvd-ease),
    transform 0.2s var(--tvd-ease);
}

.tvd-content__card .woocommerce-Address:hover {
  box-shadow: var(--tvd-shadow-sm);
  transform: translateY(-2px);
}

.tvd-content__card .woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tvd-content__card .woocommerce-Address-title h3 {
  margin: 0;
  font-size: 15px;
}

.tvd-content__card address {
  font-style: normal;
  color: var(--tvd-text-muted);
  line-height: 1.7;
}

/* -------------------------------------------------------------------------
   Footer note inside the dashboard card area (kept minimal/optional)
   ------------------------------------------------------------------------- */
.tvd-dashboard__footnote {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--tvd-text-faint);
}

/* -------------------------------------------------------------------------
   Animations
   ------------------------------------------------------------------------- */
@keyframes tvd-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes tvd-fade-down {
  from {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes tvd-spin {
  to {
    transform: rotate(360deg);
  }
}

.tvd-reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.6s var(--tvd-ease),
    transform 0.6s var(--tvd-ease);
  will-change: transform, opacity;
}

.tvd-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .tvd-dashboard *,
  .tvd-dashboard *::before,
  .tvd-dashboard *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   Responsive breakpoints
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .tvd-dashboard__grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .tvd-dashboard__grid {
    grid-template-columns: 1fr;
  }

  .tvd-sidebar__toggle {
    display: flex;
  }

  .tvd-sidebar__inner {
    position: static;
    max-height: none;
    display: none;
    animation: none;
  }

  .tvd-sidebar.is-open .tvd-sidebar__inner {
    display: flex;
    animation: tvd-fade-down 0.35s var(--tvd-ease) both;
  }

  .tvd-content__card {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .tvd-dashboard__container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tvd-content__card {
    border-radius: var(--tvd-radius-md);
    padding: 16px;
  }

  .tvd-sidebar__inner {
    border-radius: var(--tvd-radius-md);
    padding: 16px;
  }

  .tvd-widgets {
    grid-template-columns: 1fr 1fr;
  }

  .tvd-content__card table.shop_table,
  .tvd-content__card table.woocommerce-orders-table {
    min-width: 480px;
  }
}



