/* Admin shell data grids: invoice action buttons, the subscriptions row-actions menu, the invoice payment column, tablet overflow, the Yotta
  availability table and the open row menus. One of the shell stylesheets; they load in the shell's order, which keeps the cascade. */

/* ========================================
   IT4Y_BILLING_BTN_2026_06_07 — Stripe-grade invoice action buttons.
   Icon-led action chips for the admin Invoices "Actions" column.
   CSP-safe (class-based, served via the shell stylesheets), theme-aware via CSS vars.
   Presentation only — all handlers unchanged.
   ======================================== */
.ivb-group{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.ivb{display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:28px;padding:0 10px;box-sizing:border-box;
  font-size:12.5px;font-weight:600;line-height:1;white-space:nowrap;letter-spacing:.1px;
  border-radius:7px;border:1px solid var(--border);cursor:pointer;
  background:var(--bg-2);color:var(--text-dim);
  transition:background .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease,transform .05s ease;
  -webkit-appearance:none;appearance:none;}
.ivb:hover{background:var(--row-hover);border-color:var(--muted);color:var(--text);}
.ivb:active{transform:translateY(.5px);}
.ivb:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);}
.ivb svg{width:14px;height:14px;flex:0 0 auto;display:block;}
.ivb-ico{padding:0 7px;}
.ivb--paid{color:#15803d;background:#ecfdf3;border-color:#a7f0c0;}
.ivb--paid:hover{color:#0f6a32;background:#d7f8e4;border-color:#15803d;}
.ivb--void{color:#b91c1c;background:#fef2f2;border-color:#fbcaca;}
.ivb--void:hover{color:#991b1b;background:#fde0e0;border-color:#b91c1c;}
.ivb--danger{color:#b91c1c;background:#fef2f2;border-color:#fbcaca;}
.ivb--danger:hover{color:#fff;background:#dc2626;border-color:#dc2626;}
.ivb--send{color:#1d4ed8;background:#eff6ff;border-color:#bcd6fb;}
.ivb--send:hover{color:#1e40af;background:#dceafe;border-color:#2563eb;}
.ivb--edit,.ivb--history{color:var(--text-dim);background:var(--bg-2);border-color:var(--border);}
.ivb--edit:hover,.ivb--history:hover{color:var(--text);background:var(--row-hover);border-color:var(--muted);}
.ivb--print{color:#fff;background:var(--accent-fill);border-color:var(--accent);font-weight:700;padding:0 12px;box-shadow:var(--shadow-sm);}
.ivb--print:hover{background:#1d4ed8;border-color:#1d4ed8;color:#fff;box-shadow:var(--shadow-md);}
.ivb--print:focus-visible{box-shadow:0 0 0 3px var(--accent-soft);}
html[data-theme="dark"] .ivb--paid{color:#4ade80;background:rgba(34,197,94,.14);border-color:rgba(34,197,94,.34);}
html[data-theme="dark"] .ivb--paid:hover{color:#86efac;background:rgba(34,197,94,.24);border-color:#4ade80;}
html[data-theme="dark"] .ivb--void,html[data-theme="dark"] .ivb--danger{color:#f87171;background:rgba(239,68,68,.14);border-color:rgba(239,68,68,.34);}
html[data-theme="dark"] .ivb--void:hover{color:#fca5a5;background:rgba(239,68,68,.24);border-color:#f87171;}
html[data-theme="dark"] .ivb--danger:hover{color:#fff;background:#dc2626;border-color:#dc2626;}
html[data-theme="dark"] .ivb--send{color:#60a5fa;background:rgba(59,130,246,.16);border-color:rgba(59,130,246,.36);}
html[data-theme="dark"] .ivb--send:hover{color:#93c5fd;background:rgba(59,130,246,.26);border-color:#60a5fa;}
html[data-theme="dark"] .ivb--print{background:var(--accent);border-color:var(--accent);color:#06121f;}
html[data-theme="dark"] .ivb--print:hover{background:#5fb0ff;border-color:#5fb0ff;color:#06121f;}


/* IT4Y_ADMIN_SUBS_ACTIONS_MENU_2026_06_12 — the subscriptions row-actions button and its menu.  The list itself
   is styled by admin-subscriptions.css.  Base values follow the stylesheet's dark-first convention; light
   overrides ride html:not([data-theme="dark"]). */
.st-menu-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:30px;padding:0;border-radius:8px;
  border:1px solid var(--border);background:transparent;color:var(--muted);cursor:pointer}
.st-menu-btn:hover{background:var(--row-hover,rgba(100,116,139,.12));color:var(--text)}
.st-menu-btn svg{width:17px;height:17px}
.asub-pop{position:fixed;z-index:9300;min-width:236px;background:#0f172a;border:1px solid #1e293b;border-radius:10px;
  box-shadow:0 12px 32px rgba(0,0,0,.55);padding:6px;display:flex;flex-direction:column;gap:2px;max-inline-size:calc(100vw - 16px);
  max-block-size:calc(100vh - 16px);max-block-size:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain}
.asub-pop .sp-item{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:7px;padding:9px 12px;font-size:13px;
  cursor:pointer;white-space:nowrap;font-family:inherit}
.asub-pop .sp-primary{color:#93c5fd;font-weight:600}
.asub-pop .sp-secondary{color:#cbd5e1}
.asub-pop .sp-danger{color:#f87171}
.asub-pop .sp-item:hover{background:#1e293b}
.asub-pop .sp-danger:hover{background:rgba(248,113,113,.12)}
html:not([data-theme="dark"]) .asub-pop{background:#fff;border-color:#e2e8f0;box-shadow:0 12px 32px rgba(15,23,42,.18)}
html:not([data-theme="dark"]) .asub-pop .sp-primary{color:#1d4ed8}
html:not([data-theme="dark"]) .asub-pop .sp-secondary{color:#334155}
html:not([data-theme="dark"]) .asub-pop .sp-danger{color:#dc2626}
html:not([data-theme="dark"]) .asub-pop .sp-item:hover{background:#f1f5f9}
html:not([data-theme="dark"]) .asub-pop .sp-danger:hover{background:#fef2f2}

/* IT4Y_INVOICE_PAYMENT_COLUMN_2026_06_12 — invoices grid PAYMENT STATUS pastel badges (rounded-full,
   border slate-200/.5).  Light pastels per spec; dark-theme overrides. */
.pay-badge{display:inline-block;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:1.4;letter-spacing:.01em;
  border:1px solid transparent;white-space:nowrap}
.pay-badge.pay-paid{background:#dcfce7;color:#15803d}
.pay-badge.pay-unpaid{background:#f1f5f9;color:#475569}
.pay-badge.pay-refunded{background:#fef3c7;color:#b45309}
html[data-theme="dark"] .pay-badge.pay-paid{background:#14331a;color:#b3f5c4}
html[data-theme="dark"] .pay-badge.pay-unpaid{background:#26303f;color:#cbd5e1}
html[data-theme="dark"] .pay-badge.pay-refunded{background:#3a2e10;color:#fcd34d}


/* ════════════════════════════════════════
   IT4Y_NOTIF_MOBILE_2026_06_22 — mobile-responsive notifications dropdown.
   The base .notif-bell-panel is position:absolute; right:0; width:380px, anchored
   to the bell. On mobile the bell sits mid-header, so right:0 pins the panel's
   right edge to the bell and it extends LEFT off the viewport (measured left:-120px
   on a 389px screen) → clipped/squished. On <=760px make it a fixed, viewport-
   anchored, near-full-width sheet just below the fixed .app-header (≈106px) so all
   notification text, dates and badges are fully visible and it never overlaps the
   sidebar toggle. Appended last to win the cascade. ═══════════════════════════ */
@media (max-width:760px){
  .notif-bell-panel{
    position: fixed !important;
    top: 112px !important;            /* clear the fixed .app-header (~106px) */
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 124px) !important;
  }
}

/* IT4Y_ADMIN_AUDIT_SUBSGRID_TABLET_2026_07_02 — wide .dgrid data tables overflowed the page in the 769-1100px tablet band (no rule existed).
  Contain with horizontal scroll; scoped so desktop(>1100) and mobile(<=768 card-stack) are untouched. */
@media (min-width:769px) and (max-width:1100px){
  .app-main table.dgrid{ display:block; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
}

/* IT4Y_YOTTA_MOBILE_2026_07_02 — Yotta Availability tab mobile-responsive.
   Desktop >768px: identical rendering — .yotta-root/.yotta-tbl-wrap/.yotta-tbl re-apply the
   exact values moved out of inline data-sty by the paired FE patch (padding:20px; wrapper
   bg/border/radius/overflow-x:auto; table min-width:760px). Mobile <=768px: the 8-column
   table becomes labeled stacked cards (td::before = attr(data-label), same pattern as
   IT4Y_SUBS_MOBILE_LABELS) so every column, indicator and control stays visible with no
   page-level horizontal overflow. display rules are !important to beat generic mobile
   table rules from the SPA adopted stylesheets. */
.yotta-root{ padding:20px; }
.yotta-tbl-wrap{ background:#fff; border:1px solid #e2e8f0; border-radius:8px; overflow-x:auto; }
.yotta-tbl{ min-width:760px; }
@media (max-width: 768px){
  .yotta-root{ padding:10px 0; }
  .yotta-tbl-wrap{ background:transparent; border:none; border-radius:0; overflow:visible; }
  .yotta-tbl{ min-width:0; }
  .yotta-tbl, .yotta-tbl tbody, .yotta-tbl tr, .yotta-tbl td{ display:block !important; width:100% !important; box-sizing:border-box; }
  .yotta-tbl thead, #yotta-avail-root .yotta-tbl thead{ display:none !important; }
    /* id-scoped twin outranks any future !important generic thead rule in the SPA adopted sheets */
  .yotta-tbl tr{ background:#fff; border:1px solid #e2e8f0 !important; border-radius:10px; padding:10px 12px; margin-bottom:10px; }
  .yotta-tbl td{ display:flex !important; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:7px 0 !important;
    border-bottom:1px solid #f1f5f9 !important; text-align:left !important; }
  .yotta-tbl td:last-child{ border-bottom:none !important; }
  .yotta-tbl td::before{ content:attr(data-label); color:#64748b; font-size:10px; text-transform:uppercase; letter-spacing:.5px; font-weight:700;
    flex:0 0 auto; }
  .yotta-tbl td:first-child, .yotta-tbl td:nth-child(2){ display:inline-flex !important; width:auto !important; border-bottom:none !important;
    padding:0 8px 6px 0 !important; }
  .yotta-tbl td:first-child::before, .yotta-tbl td:nth-child(2)::before{ content:none !important; }
    /* !important: the generic td[data-label]::before rule in the SPA adopted sheets ties on specificity and comes later in cascade order */
  .yotta-tbl td:nth-child(2){ font-size:15px; }
  .yotta-tbl tr td[colspan]{ display:block !important; padding:14px 4px !important; border:none !important; }
    /* (0,2,2) outranks the :first-child header rule regardless of order */
  #yotta-probe-btn{ width:100% !important; }
}

/* Row menus (admin-shell-row-menu.js): an open list is fixed at its trigger, outside every overflow container, so a
   table never clips it and never grows its own scrollbar.  Until the shell has placed it, it is fixed and hidden. */
.adm-row-menu[open]>:not(summary):not(.adm-row-menu__floating){position:fixed;visibility:hidden}
.adm-row-menu[open]>.adm-row-menu__floating{position:fixed;inset:auto;z-index:1050;margin:0;max-inline-size:calc(100vw - 16px);
  max-block-size:calc(100vh - 16px);max-block-size:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain}
