/* Responsive layout for the plan cards.
   Selectors match your existing markup, so no HTML changes are needed.
   Optional: add class="plans-grid" / "plan-card" and swap the selectors below. */

/* Container: .flex.flex-wrap.justify-around */
.flex.flex-wrap.justify-around {
  display: grid;
  grid-template-columns: 1fr;            /* mobile: 1 column */
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem;
  box-sizing: border-box;
}

/* Card: direct children of the container */
.flex.flex-wrap.justify-around > .rounded-lg {
  width: 100%;                            /* override fixed w-60 */
  max-width: none;
  margin: 0;                              /* override mb-8 / mr-4, gap handles spacing */
  box-sizing: border-box;
  min-width: 0;                           /* prevent grid overflow from long text */
}

/* Card header: allow the title to wrap and keep buttons visible */
.flex.flex-wrap.justify-around > .rounded-lg > div:first-child {
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
}

.flex.flex-wrap.justify-around > .rounded-lg > div:first-child > div:first-child {
  flex: 1 1 auto;                         /* override basis-2/3 on small screens */
  overflow-wrap: anywhere;
}

.flex.flex-wrap.justify-around > .rounded-lg > div:first-child > .flex.justify-end {
  flex: 0 0 auto;
  gap: 0.5rem;
}

/* Card body and footer padding */
.flex.flex-wrap.justify-around > .rounded-lg > div:nth-child(2),
.flex.flex-wrap.justify-around > .rounded-lg > div:nth-child(3) {
  padding: 0 1rem 1rem;
}

/* Small phones: slightly smaller text */
@media (max-width: 479px) {
  .flex.flex-wrap.justify-around > .rounded-lg .text-2xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  .flex.flex-wrap.justify-around {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .flex.flex-wrap.justify-around {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 2rem;
  }

  .flex.flex-wrap.justify-around > .rounded-lg > div:first-child,
  .flex.flex-wrap.justify-around > .rounded-lg > div:nth-child(2),
  .flex.flex-wrap.justify-around > .rounded-lg > div:nth-child(3) {
    padding-inline: 1.5rem;
  }
}

/* Alternative: no grid, auto-fit (use instead of the breakpoints above)
.flex.flex-wrap.justify-around {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
*/
/* Colorful theme for the plan cards.
   Load AFTER plans-responsive.css. Works with your existing markup. */

.flex.flex-wrap.justify-around > .rounded-lg {
  --accent: #0d9488;          /* Basic: teal */
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-grad: linear-gradient(135deg, #14b8a6, #0ea5e9);

  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--accent-soft);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -12px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Pro: violet */
.flex.flex-wrap.justify-around > .rounded-lg:nth-child(2) {
  --accent: #7c3aed;
  --accent-dark: #6d28d9;
  --accent-soft: #ede9fe;
  --accent-grad: linear-gradient(135deg, #8b5cf6, #ec4899);
}

/* Premium: amber to rose */
.flex.flex-wrap.justify-around > .rounded-lg:nth-child(3) {
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: #ffedd5;
  --accent-grad: linear-gradient(135deg, #f59e0b, #e11d48);
}

.flex.flex-wrap.justify-around > .rounded-lg:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -12px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Header: gradient band with white title */
.flex.flex-wrap.justify-around > .rounded-lg > div:first-child {
  background: var(--accent-grad);
  color: #ffffff;
  align-items: center;
  padding: 1.25rem 1.25rem;
}

.flex.flex-wrap.justify-around > .rounded-lg > div:first-child > div:first-child {
  color: #ffffff;
  font-weight: 700;
}

/* Icon buttons: frosted glass on the gradient */
.flex.flex-wrap.justify-around > .rounded-lg button {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.flex.flex-wrap.justify-around > .rounded-lg button:hover {
  background: #ffffff;
  color: var(--accent-dark);
  transform: scale(1.06);
}

.flex.flex-wrap.justify-around > .rounded-lg button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Body */
.flex.flex-wrap.justify-around > .rounded-lg > div:nth-child(2) {
  padding-top: 1.25rem;
}

/* Price */
.flex.flex-wrap.justify-around > .rounded-lg h2 {
  color: var(--accent-dark);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

/* "Details" heading with a short accent underline */
.flex.flex-wrap.justify-around > .rounded-lg h1 {
  color: #1e293b;
  font-size: 1.1rem;
  padding-bottom: 0.6rem;
  position: relative;
}

.flex.flex-wrap.justify-around > .rounded-lg h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2.5rem;
  height: 3px;
  border-radius: 999px;
  background: var(--accent-grad);
  transform: translateX(-50%);
}

/* Description in a soft tinted panel */
.flex.flex-wrap.justify-around > .rounded-lg .text-muted-foreground {
  background: var(--accent-soft);
  color: #334155;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  line-height: 1.5;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .flex.flex-wrap.justify-around > .rounded-lg,
  .flex.flex-wrap.justify-around > .rounded-lg button {
    transition: none;
  }
  .flex.flex-wrap.justify-around > .rounded-lg:hover {
    transform: none;
  }
}

/* Member card theme, same style as the plan cards.
   Works with your existing markup. Matches: .text-card-foreground.shadow-sm.w-full
   Optional: add class="member-card" and swap the selector. */

.text-card-foreground.shadow-sm.w-full {
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-grad: linear-gradient(135deg, #14b8a6, #0ea5e9);

  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0.9rem 1rem 0.9rem 1.35rem;   /* extra left room for the accent stripe */
  margin-bottom: 0.85rem;
  background: #ffffff;
  border: 1px solid var(--accent-soft);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -14px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Color stripe on the left edge */
.text-card-foreground.shadow-sm.w-full::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent-grad);
}

.text-card-foreground.shadow-sm.w-full:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Top row: avatar + name on the left, member ID on the right */
.text-card-foreground.shadow-sm.w-full > div:first-child {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.text-card-foreground.shadow-sm.w-full > div:first-child > div:first-child {
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

/* Avatar with a gradient ring */
.text-card-foreground.shadow-sm.w-full img {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  padding: 3px;
  background: var(--accent-grad);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* Name and phone */
.text-card-foreground.shadow-sm.w-full p.text-gray-900 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.text-card-foreground.shadow-sm.w-full p.text-gray-500 {
  color: #64748b;
}

.text-card-foreground.shadow-sm.w-full img + div p.text-gray-500 {
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

/* Member ID chip */
.text-card-foreground.shadow-sm.w-full > div:first-child > p {
  padding: 0.25rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Bottom row: plan and expiry */
.text-card-foreground.shadow-sm.w-full > div:last-child {
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Plan name as gradient pill */
.text-card-foreground.shadow-sm.w-full > div:last-child > p:first-child {
  padding: 0.25rem 0.75rem;
  background: var(--accent-grad);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Expiry pill: colors follow your existing status classes */
.text-card-foreground.shadow-sm.w-full > div:last-child > p:last-child {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.text-card-foreground.shadow-sm.w-full .text-yellow-500 {
  background: #fef3c7;
  color: #b45309;
}

.text-card-foreground.shadow-sm.w-full .text-green-500,
.text-card-foreground.shadow-sm.w-full .text-green-600 {
  background: #dcfce7;
  color: #15803d;
}

.text-card-foreground.shadow-sm.w-full .text-red-500,
.text-card-foreground.shadow-sm.w-full .text-red-600 {
  background: #fee2e2;
  color: #b91c1c;
}

/* Small phones */
@media (max-width: 400px) {
  .text-card-foreground.shadow-sm.w-full {
    padding: 0.8rem 0.8rem 0.8rem 1.15rem;
  }
  .text-card-foreground.shadow-sm.w-full img {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-card-foreground.shadow-sm.w-full {
    transition: none;
  }
  .text-card-foreground.shadow-sm.w-full:hover {
    transform: none;
  }
}

/* Receipts table: same style as the plan and member cards.
   Works with your existing markup. Matches: table.w-full.caption-bottom
   Desktop: styled table. Phones (under 720px): each row becomes a card. */

table.w-full.caption-bottom {
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-grad: linear-gradient(135deg, #14b8a6, #0ea5e9);

  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -14px color-mix(in srgb, var(--accent) 45%, transparent);
  color: #334155;
}

/* Header: gradient band with white text */
table.w-full.caption-bottom thead th {
  height: auto;
  padding: 0.9rem 1rem;
  background: var(--accent-grad);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

table.w-full.caption-bottom thead th:first-child {
  border-top-left-radius: 1rem;
}
table.w-full.caption-bottom thead th:last-child {
  border-top-right-radius: 1rem;
}

table.w-full.caption-bottom thead tr {
  border: 0;
}

/* Body cells */
table.w-full.caption-bottom tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--accent-soft);
  vertical-align: middle;
}

table.w-full.caption-bottom tbody tr:last-child td {
  border-bottom: 0;
}
table.w-full.caption-bottom tbody tr:last-child td:first-child {
  border-bottom-left-radius: 1rem;
}
table.w-full.caption-bottom tbody tr:last-child td:last-child {
  border-bottom-right-radius: 1rem;
}

/* Row hover and soft zebra stripes */
table.w-full.caption-bottom tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent-soft) 35%, #ffffff);
}
table.w-full.caption-bottom tbody tr:hover td {
  background: var(--accent-soft);
}

/* Amount */
table.w-full.caption-bottom tbody td:first-child {
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 600;
}

/* Payment mode as a pill */
table.w-full.caption-bottom tbody td:nth-child(3) {
  text-transform: capitalize;
}
table.w-full.caption-bottom tbody td:nth-child(3)::first-line {
  font-weight: 700;
}

/* Action buttons: tinted icon buttons, filled on hover */
table.w-full.caption-bottom tbody button {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

table.w-full.caption-bottom tbody button svg {
  width: 1rem;
  height: 1rem;
}

/* Edit: teal */
table.w-full.caption-bottom tbody button:nth-child(1) {
  background: #ccfbf1;
  color: #0f766e;
}
table.w-full.caption-bottom tbody button:nth-child(1):hover {
  background: #0d9488;
  color: #ffffff;
}

/* Print: violet */
table.w-full.caption-bottom tbody button:nth-child(2) {
  background: #ede9fe;
  color: #6d28d9;
}
table.w-full.caption-bottom tbody button:nth-child(2):hover {
  background: #7c3aed;
  color: #ffffff;
}

/* Delete: red */
table.w-full.caption-bottom tbody button:nth-child(3) {
  background: #fee2e2;
  color: #b91c1c;
}
table.w-full.caption-bottom tbody button:nth-child(3):hover {
  background: #dc2626;
  color: #ffffff;
}

table.w-full.caption-bottom tbody button:hover {
  transform: scale(1.08);
}

table.w-full.caption-bottom tbody button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tablet: tighter spacing so five columns still fit */
@media (max-width: 1023px) {
  table.w-full.caption-bottom thead th,
  table.w-full.caption-bottom tbody td {
    padding: 0.7rem 0.6rem;
  }
  table.w-full.caption-bottom thead th:first-child {
    width: auto;
  }
}

/* Phones: each row becomes a card with labels */
@media (max-width: 719px) {
  table.w-full.caption-bottom,
  table.w-full.caption-bottom tbody,
  table.w-full.caption-bottom tbody tr,
  table.w-full.caption-bottom tbody td {
    display: block;
  }

  table.w-full.caption-bottom {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  /* Hide header visually, keep it for screen readers */
  table.w-full.caption-bottom thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table.w-full.caption-bottom tbody tr {
    position: relative;
    margin-bottom: 0.85rem;
    padding: 0.4rem 1rem 0.4rem 1.35rem;
    background: #ffffff;
    border: 1px solid var(--accent-soft);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -14px color-mix(in srgb, var(--accent) 45%, transparent);
  }

  /* Left color stripe, as on the member card */
  table.w-full.caption-bottom tbody tr::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--accent-grad);
  }

  table.w-full.caption-bottom tbody tr:nth-child(even) td,
  table.w-full.caption-bottom tbody tr:hover td {
    background: transparent;
  }

  table.w-full.caption-bottom tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 0;
    text-align: right;
  }

  table.w-full.caption-bottom tbody td::before {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
  }

  table.w-full.caption-bottom tbody td:nth-child(1)::before { content: "Receipt amount"; }
  table.w-full.caption-bottom tbody td:nth-child(2)::before { content: "Received date"; }
  table.w-full.caption-bottom tbody td:nth-child(3)::before { content: "Payment mode"; }
  table.w-full.caption-bottom tbody td:nth-child(4)::before { content: "Received by"; }

  /* Actions row: no label, buttons aligned right */
  table.w-full.caption-bottom tbody td:last-child {
    display: block;
    border-bottom: 0;
    padding-bottom: 0.5rem;
  }
  table.w-full.caption-bottom tbody td:last-child > div {
    justify-content: flex-end;
  }

  /* Reset desktop rounding on cells */
  table.w-full.caption-bottom tbody tr:last-child td:first-child,
  table.w-full.caption-bottom tbody tr:last-child td:last-child {
    border-radius: 0;
  }
  table.w-full.caption-bottom tbody tr:last-child td:last-child {
    border-bottom: 0;
  }
  table.w-full.caption-bottom tbody tr:last-child td:not(:last-child) {
    border-bottom: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  table.w-full.caption-bottom tbody button {
    transition: none;
  }
  table.w-full.caption-bottom tbody button:hover {
    transform: none;
  }
}

/* Side navbar: same style as the plan, member and table components.
   Selectors use your data-sidebar attributes, so no HTML changes are needed.
   Each top-level menu gets its own color; sub-items inherit it. */

/* ---------- Shell ---------- */
[data-sidebar="sidebar"] {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  border-right: 1px solid #ccc;
}

[data-sidebar="content"] {
  scrollbar-width: thin;
  scrollbar-color: #f5f5f5 transparent;
}

[data-sidebar="group"] {
  padding: 0.75rem;
}

/* ---------- Profile card ---------- */
[data-sidebar="group-content"] > div.flex.items-center {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 12px 24px -14px rgba(13, 148, 136, 0.7);
  cursor: pointer;
}

[data-sidebar="group-content"] > div.flex.items-center img {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid #ffffff;
  object-fit: cover;
  box-shadow: 0 4px 10px -3px rgba(0, 0, 0, 0.3);
}

[data-sidebar="group-content"] > div.flex.items-center h2 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

/* ---------- Per-menu color variables (top-level items only) ---------- */
[data-sidebar="group-content"] > [data-sidebar="menu"] {
  gap: 0.25rem;
}

[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(1) { /* Home */
  --c: #0d9488; --c-soft: #ccfbf1; --c-grad: linear-gradient(135deg, #14b8a6, #0ea5e9);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(2) { /* Plans */
  --c: #7c3aed; --c-soft: #ede9fe; --c-grad: linear-gradient(135deg, #8b5cf6, #ec4899);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(3) { /* Members */
  --c: #0284c7; --c-soft: #e0f2fe; --c-grad: linear-gradient(135deg, #0ea5e9, #6366f1);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(4) { /* Organization */
  --c: #d97706; --c-soft: #fef3c7; --c-grad: linear-gradient(135deg, #f59e0b, #ea580c);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(5) { /* Templates */
  --c: #db2777; --c-soft: #fce7f3; --c-grad: linear-gradient(135deg, #ec4899, #f43f5e);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(6) { /* Receipts */
  --c: #16a34a; --c-soft: #dcfce7; --c-grad: linear-gradient(135deg, #22c55e, #0d9488);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(7) { /* Ledger */
  --c: #4f46e5; --c-soft: #e0e7ff; --c-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
}
[data-sidebar="group-content"] > [data-sidebar="menu"] > :nth-child(8) { /* Logout */
  --c: #dc2626; --c-soft: #fee2e2; --c-grad: linear-gradient(135deg, #ef4444, #f97316);
}

/* ---------- Menu buttons and links ---------- */
[data-sidebar="sidebar"] [data-sidebar="menu-button"] {
  height: auto;
  min-height: 2.6rem;
  padding: 0.35rem 0.6rem;
  gap: 0.7rem;
  border-radius: 0.8rem;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

/* Icon bubble */
[data-sidebar="sidebar"] [data-sidebar="menu-button"] > svg:first-child {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 2rem;
  height: 2rem;
  padding: 0.45rem;
  background: var(--c-soft);
  color: var(--c);
  border-radius: 0.65rem;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Hover */
[data-sidebar="sidebar"] [data-sidebar="menu-button"]:hover {
  background: var(--c-soft);
  color: var(--c);
  transform: translateX(2px);
}

[data-sidebar="sidebar"] [data-sidebar="menu-button"]:hover > svg:first-child {
  background: var(--c-grad);
  color: #ffffff;
}

/* Expanded group header */
[data-sidebar="sidebar"] [data-sidebar="menu-button"][data-state="open"] {
  color: var(--c);
  font-weight: 700;
}

/* Active page */
[data-sidebar="sidebar"] [data-sidebar="menu-button"][data-active="true"] {
  background: var(--c-grad);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 20px -12px var(--c);
}

[data-sidebar="sidebar"] [data-sidebar="menu-button"][data-active="true"] > svg:first-child {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Chevron */
[data-sidebar="sidebar"] [data-sidebar="menu-button"] .lucide-chevron-down {
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
}

[data-sidebar="sidebar"] [data-sidebar="menu-button"][data-state="open"] .lucide-chevron-down {
  color: var(--c);
}

/* Keyboard focus */
[data-sidebar="sidebar"] [data-sidebar="menu-button"]:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

/* ---------- Sub menus ---------- */
[data-sidebar="menu"] [data-sidebar="menu"] {
  margin-left: 1.5rem;
  margin-top: 0.15rem;
  margin-bottom: 0.25rem;
  padding-left: 0.6rem;
  gap: 0.15rem;
  border-left: 2px solid color-mix(in srgb, var(--c) 30%, transparent);
}

[data-sidebar="menu"] [data-sidebar="menu"] [data-sidebar="menu-button"] {
  min-height: 2.25rem;
  font-size: 0.85rem;
}

[data-sidebar="menu"] [data-sidebar="menu-button"] [data-sidebar="menu"] > svg:first-child,
[data-sidebar="menu"] [data-sidebar="menu"] [data-sidebar="menu-button"] > svg:first-child {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.4rem;
  border-radius: 0.55rem;
}

/* ---------- Logout ---------- */
[data-sidebar="group-content"] > [data-sidebar="menu"] > li:last-child {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #cbd5e1;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-sidebar="sidebar"] [data-sidebar="menu-button"],
  [data-sidebar="sidebar"] [data-sidebar="menu-button"] > svg:first-child {
    transition: none;
  }
  [data-sidebar="sidebar"] [data-sidebar="menu-button"]:hover {
    transform: none;
  }
}

.overflow-auto {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Expiring member card: same style as the other components.
   Works with your existing markup. Matches: div.bg-white.rounded-xl.shadow.p-4
   Optional: add class="expiring-card" and swap the selector. */

div.bg-white.rounded-xl.shadow.p-4 {
  --accent: #ea580c;                       /* orange, fits the "Expiring Soon" status */
  --accent-dark: #c2410c;
  --accent-soft: #ffedd5;
  --accent-grad: linear-gradient(135deg, #f59e0b, #e11d48);

  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.1rem 1rem 1.5rem;        /* extra left room for the stripe */
  background: #ffffff;
  border: 1px solid var(--accent-soft);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -14px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Color stripe on the left edge */
div.bg-white.rounded-xl.shadow.p-4::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent-grad);
}

div.bg-white.rounded-xl.shadow.p-4:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Left block: avatar + details */
div.bg-white.rounded-xl.shadow.p-4 > div:first-child {
  gap: 1rem;
  min-width: 0;
}

/* Avatar with a gradient ring */
div.bg-white.rounded-xl.shadow.p-4 img {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  padding: 3px;
  background: var(--accent-grad);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* Name */
div.bg-white.rounded-xl.shadow.p-4 p.font-semibold {
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Phone */
div.bg-white.rounded-xl.shadow.p-4 p.text-gray-500 {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

/* Plan name as gradient pill */
div.bg-white.rounded-xl.shadow.p-4 p.text-gray-600 {
  display: inline-block;
  width: fit-content;
  margin-top: 0.4rem;
  padding: 0.2rem 0.75rem;
  background: var(--accent-grad);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Status pill with a dot */
div.bg-white.rounded-xl.shadow.p-4 > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

div.bg-white.rounded-xl.shadow.p-4 > span::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

/* Status colors follow your existing classes */
div.bg-white.rounded-xl.shadow.p-4 > span.text-orange-500 {
  background: #ffedd5;
  color: #c2410c;
}
div.bg-white.rounded-xl.shadow.p-4 > span.text-red-500 {
  background: #fee2e2;
  color: #b91c1c;
}
div.bg-white.rounded-xl.shadow.p-4 > span.text-green-500 {
  background: #dcfce7;
  color: #15803d;
}
div.bg-white.rounded-xl.shadow.p-4 > span.text-yellow-500 {
  background: #fef3c7;
  color: #b45309;
}

/* Small phones: status drops to its own row */
@media (max-width: 479px) {
  div.bg-white.rounded-xl.shadow.p-4 {
    padding: 0.85rem 0.9rem 0.85rem 1.3rem;
  }
  div.bg-white.rounded-xl.shadow.p-4 img {
    width: 3rem;
    height: 3rem;
  }
  div.bg-white.rounded-xl.shadow.p-4 > span {
    flex: 1 0 100%;
    justify-content: center;
    margin-top: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  div.bg-white.rounded-xl.shadow.p-4 {
    transition: none;
  }
  div.bg-white.rounded-xl.shadow.p-4:hover {
    transform: none;
  }
}

/* Modal dialog: same style as the other components.
   Works with your existing markup. Matches: div[role="dialog"]
   The centering transform and open/close animations are left untouched. */

/* ---------- Backdrop (optional; the overlay is a separate element) ---------- */
div.fixed.inset-0.z-50[data-state] {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

/* ---------- Dialog shell ---------- */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) {
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-grad: linear-gradient(135deg, #14b8a6, #0ea5e9);

  gap: 0;
  width: calc(100% - 2rem);
  max-width: 26.5rem;
  max-height: 90vh;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--accent-soft);
  border-radius: 1.25rem;
  box-shadow: 0 30px 60px -20px rgba(13, 148, 136, 0.45), 0 10px 25px -15px rgba(15, 23, 42, 0.4);
  scrollbar-width: thin;
  scrollbar-color: #99f6e4 transparent;
}

/* ---------- Header: gradient band ---------- */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:first-child {
  padding: 1.4rem 3.5rem 1.3rem 1.5rem;     /* right room for the close button */
  background: var(--accent-grad);
  color: #ffffff;
  gap: 0.35rem;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:first-child h2 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:first-child p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ---------- Close button ---------- */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > button[type="button"]:last-child {
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #ffffff;
  opacity: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > button[type="button"]:last-child:hover {
  background: #ffffff;
  color: var(--accent-dark);
  transform: rotate(90deg);
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > button[type="button"]:last-child:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------- Form ---------- */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form {
  padding: 1.1rem 1.5rem 0;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form > div.py-2 {
  padding: 0.4rem 0;
}

/* Hide the empty spacing left by the hidden id input */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form > div.space-y-2:has(input[type="hidden"]) {
  display: none;
}

/* Fields */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) input:not([type="hidden"]),
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) textarea {
  height: 2.9rem;
  padding: 0.6rem 0.9rem;
  background: #f8fafc;
  border: 1.5px solid var(--accent-soft);
  border-radius: 0.8rem;
  color: #1e293b;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) textarea {
  height: auto;
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.5;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) input::placeholder,
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) textarea::placeholder {
  color: #94a3b8;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) input:not([type="hidden"]):hover,
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, #ffffff);
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) input:not([type="hidden"]):focus-visible,
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) textarea:focus-visible {
  background: #ffffff;
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Invalid state, if your form sets aria-invalid="true" */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) input[aria-invalid="true"],
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) textarea[aria-invalid="true"] {
  border-color: #ef4444;
  background: #fef2f2;
}

/* ---------- Save button ---------- */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form button[type="submit"] {
  width: 100%;
  height: 2.9rem;
  margin-top: 0.9rem;
  background: var(--accent-grad);
  border: 0;
  border-radius: 0.8rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 22px -12px var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form button[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 16px 26px -12px var(--accent);
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form button[type="submit"]:active {
  transform: translateY(0);
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form button[type="submit"]:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}

/* ---------- Footer: Cancel ---------- */
div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:nth-child(3) {
  padding: 0.75rem 1.5rem 1.5rem;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:nth-child(3) button {
  width: 100%;
  height: 2.75rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.8rem;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:nth-child(3) button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:nth-child(3) button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Small phones ---------- */
@media (max-width: 399px) {
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) {
    width: calc(100% - 1rem);
    border-radius: 1rem;
  }
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:first-child {
    padding: 1.2rem 3.25rem 1.1rem 1.15rem;
  }
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form {
    padding: 1rem 1.15rem 0;
  }
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > div:nth-child(3) {
    padding: 0.7rem 1.15rem 1.25rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) {
    animation: none;
  }
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) *,
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > button {
    transition: none;
  }
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) > button[type="button"]:last-child:hover,
  div[role="dialog"][data-state]:not([data-sidebar="sidebar"]) form button[type="submit"]:hover {
    transform: none;
  }
}

/* PrimeReact DataTable: same style as the other components.
   Works with your existing markup. Matches: table.p-datatable-table
   Desktop: styled table with sort and filter controls.
   Phones (under 720px): each row becomes a card. */

table.p-datatable-table {
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-grad: linear-gradient(135deg, #14b8a6, #0ea5e9);

  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -14px color-mix(in srgb, var(--accent) 45%, transparent);
  color: #334155;
  font-size: 0.9rem;
}

/* ---------- Header ---------- */
table.p-datatable-table > thead.p-datatable-thead > tr > th {
  padding: 0.9rem 1rem;
  background: var(--accent-grad);
  border: 0;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  transition: filter 0.15s ease;
}

table.p-datatable-table > thead.p-datatable-thead > tr > th:first-child {
  border-top-left-radius: 1rem;
}
table.p-datatable-table > thead.p-datatable-thead > tr > th:last-child {
  border-top-right-radius: 1rem;
}

table.p-datatable-table > thead.p-datatable-thead > tr > th .p-column-header-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sortable columns */
table.p-datatable-table th.p-sortable-column {
  cursor: pointer;
}
table.p-datatable-table th.p-sortable-column:hover {
  filter: brightness(1.08);
}
table.p-datatable-table th.p-sortable-column:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -4px;
}

/* Sort icon */
table.p-datatable-table .p-sortable-column-icon {
  width: 0.8rem;
  height: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}
table.p-datatable-table th[aria-sort="ascending"] .p-sortable-column-icon,
table.p-datatable-table th[aria-sort="descending"] .p-sortable-column-icon {
  color: #ffffff;
}
/* Underline the sorted column */
table.p-datatable-table th[aria-sort="ascending"],
table.p-datatable-table th[aria-sort="descending"] {
  box-shadow: inset 0 -3px 0 #ffffff;
}

/* Filter button: frosted circle */
table.p-datatable-table .p-column-filter-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
table.p-datatable-table .p-column-filter-menu-button:hover {
  background: #ffffff;
  color: var(--accent-dark);
}
table.p-datatable-table .p-column-filter-menu-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ---------- Body ---------- */
table.p-datatable-table > tbody.p-datatable-tbody > tr > td {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--accent-soft);
  vertical-align: middle;
}

table.p-datatable-table > tbody.p-datatable-tbody > tr:nth-child(even) > td {
  background: color-mix(in srgb, var(--accent-soft) 35%, #ffffff);
}
table.p-datatable-table > tbody.p-datatable-tbody > tr:hover > td {
  background: var(--accent-soft);
}

table.p-datatable-table > tbody.p-datatable-tbody > tr:last-child > td {
  border-bottom: 0;
}
table.p-datatable-table > tbody.p-datatable-tbody > tr:last-child > td:first-child {
  border-bottom-left-radius: 1rem;
}
table.p-datatable-table > tbody.p-datatable-tbody > tr:last-child > td:last-child {
  border-bottom-right-radius: 1rem;
}

/* Name */
table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(1) {
  color: #1e293b;
  font-weight: 700;
}

/* Email */
table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(2) {
  color: #64748b;
  overflow-wrap: anywhere;
}

/* Gender */
table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(3) {
  text-transform: capitalize;
}

/* Plan expiry: date + status pill */
table.p-datatable-table > tbody.p-datatable-tbody > tr > td .flex.flex-col {
  align-items: flex-start;
  gap: 0.3rem;
}

table.p-datatable-table > tbody.p-datatable-tbody > tr > td .flex.flex-col > span:first-child {
  color: #1e293b;
  font-weight: 600;
}

table.p-datatable-table > tbody.p-datatable-tbody > tr > td .flex.flex-col > span.text-xs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

table.p-datatable-table > tbody.p-datatable-tbody > tr > td .flex.flex-col > span.text-xs::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

/* Status colors follow your existing classes */
table.p-datatable-table td span.text-red-600,
table.p-datatable-table td span.text-red-500 {
  background: #fee2e2;
  color: #b91c1c;
}
table.p-datatable-table td span.text-orange-500,
table.p-datatable-table td span.text-orange-600 {
  background: #ffedd5;
  color: #c2410c;
}
table.p-datatable-table td span.text-yellow-500,
table.p-datatable-table td span.text-yellow-600 {
  background: #fef3c7;
  color: #b45309;
}
table.p-datatable-table td span.text-green-500,
table.p-datatable-table td span.text-green-600 {
  background: #dcfce7;
  color: #15803d;
}

/* ---------- Action buttons ---------- */
table.p-datatable-table td .flex.gap-2 {
  align-items: center;
  gap: 0.5rem;
}

/* Keep the toast region from adding an empty gap between buttons */
table.p-datatable-table td .flex.gap-2 > [role="region"] {
  position: absolute;
  width: 0;
  height: 0;
}

table.p-datatable-table td .flex.gap-2 button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

table.p-datatable-table td .flex.gap-2 button svg {
  width: 1rem;
  height: 1rem;
}

table.p-datatable-table td .flex.gap-2 button:hover {
  transform: scale(1.08);
}

table.p-datatable-table td .flex.gap-2 button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* View: violet */
table.p-datatable-table td .flex.gap-2 form button {
  background: #ede9fe;
  color: #6d28d9;
}
table.p-datatable-table td .flex.gap-2 form button:hover {
  background: #7c3aed;
  color: #ffffff;
}

/* Edit: teal */
table.p-datatable-table td .flex.gap-2 > button.border {
  background: #ccfbf1;
  color: #0f766e;
}
table.p-datatable-table td .flex.gap-2 > button.border:hover {
  background: #0d9488;
  color: #ffffff;
}

/* Delete: red */
table.p-datatable-table td .flex.gap-2 > button.text-red-500 {
  background: #fee2e2;
  color: #b91c1c;
}
table.p-datatable-table td .flex.gap-2 > button.text-red-500:hover {
  background: #dc2626;
  color: #ffffff;
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  table.p-datatable-table > thead.p-datatable-thead > tr > th,
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td {
    padding: 0.7rem 0.6rem;
  }
}

/* ---------- Phones: rows become cards ---------- */
@media (max-width: 719px) {
  table.p-datatable-table,
  table.p-datatable-table > tbody.p-datatable-tbody,
  table.p-datatable-table > tbody.p-datatable-tbody > tr,
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td {
    display: block;
  }

  table.p-datatable-table {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  /* Header hidden visually (sort and filter controls are not available in this view) */
  table.p-datatable-table > thead.p-datatable-thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table.p-datatable-table > tbody.p-datatable-tbody > tr {
    position: relative;
    margin-bottom: 0.85rem;
    padding: 0.4rem 1rem 0.4rem 1.35rem;
    background: #ffffff;
    border: 1px solid var(--accent-soft);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -14px color-mix(in srgb, var(--accent) 45%, transparent);
  }

  /* Left color stripe */
  table.p-datatable-table > tbody.p-datatable-tbody > tr::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--accent-grad);
  }

  table.p-datatable-table > tbody.p-datatable-tbody > tr > td,
  table.p-datatable-table > tbody.p-datatable-tbody > tr:nth-child(even) > td,
  table.p-datatable-table > tbody.p-datatable-tbody > tr:hover > td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
    background: transparent;
    border-bottom: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 0;
    text-align: right;
  }

  table.p-datatable-table > tbody.p-datatable-tbody > tr > td::before {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
  }

  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(1)::before { content: "Name"; }
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(2)::before { content: "Email"; }
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(3)::before { content: "Gender"; }
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(4)::before { content: "Plan expiry"; }
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:nth-child(5)::before { content: "Created at"; }

  table.p-datatable-table > tbody.p-datatable-tbody > tr > td .flex.flex-col {
    align-items: flex-end;
  }

  /* Actions row: no label, buttons aligned right */
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:last-child {
    display: block;
    border-bottom: 0;
    padding-bottom: 0.5rem;
  }
  table.p-datatable-table > tbody.p-datatable-tbody > tr > td:last-child .flex.gap-2 {
    justify-content: flex-end;
  }

  /* Reset desktop rounding on cells */
  table.p-datatable-table > tbody.p-datatable-tbody > tr:last-child > td:first-child,
  table.p-datatable-table > tbody.p-datatable-tbody > tr:last-child > td:last-child {
    border-radius: 0;
  }
  table.p-datatable-table > tbody.p-datatable-tbody > tr:last-child > td:not(:last-child) {
    border-bottom: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  table.p-datatable-table th,
  table.p-datatable-table .p-column-filter-menu-button,
  table.p-datatable-table td .flex.gap-2 button {
    transition: none;
  }
  table.p-datatable-table td .flex.gap-2 button:hover {
    transform: none;
  }
}

.bg-blue-900 {
    background: #2563eb var(--tw-gradient-to-position) !important;
}
.to-green-500 {background:linear-gradient(135deg, #14b8a6, #0ea5e9);}
.to-orange-500 {background:linear-gradient(135deg, #8b5cf6, #ec4899);}
.to-red-500 {background:linear-gradient(135deg, #f59e0b, #e11d48);}
.to-blue-600 {background:linear-gradient(135deg, #ec4899, #f43f5e);} 