/* My Account shared layout */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 0; min-height: calc(100vh - 56px); }
.account-sidebar { background: var(--surface); border-right: 1.5px solid var(--border-soft); padding: 24px 0; }
.account-sidebar__heading { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-muted); padding: 0 20px 8px; margin-top: 16px; }
.account-sidebar__heading:first-child { margin-top: 0; }
.account-sidebar__link { display: block; padding: 8px 20px; font-size: 14px; color: var(--ink-muted); text-decoration: none; border-left: 2px solid transparent; transition: color 0.1s, border-color 0.1s; }
.account-sidebar__link:hover { color: var(--ink); }
.account-sidebar__link.active { color: var(--ink); border-left-color: var(--accent); background: var(--bg); }
.account-main { padding: 32px 40px; }
/* Hidden while the session bootstrap check (EPIC-011-S02) is in flight, so
   account data never paints ahead of knowing the visitor is logged in. */
.account-main[aria-busy="true"] { visibility: hidden; }
.account-session-error { margin-bottom: 20px; }
.account-title { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.account-subtitle { font-size: 14px; color: var(--ink-muted); margin: 0 0 28px; }

/* Form primitives */
.account-form { max-width: 480px; }
.account-form .form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.account-form label { font-size: 12px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"],
.account-form select,
.account-form textarea { padding: 8px 12px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 5px; color: var(--ink); font-size: 14px; font-family: var(--font-body); }
.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus { outline: none; border-color: var(--accent); }

/* Table */
.account-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.account-table th { padding: 8px 12px; border-bottom: 1.5px solid var(--border); text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); }
.account-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); color: var(--ink); vertical-align: middle; }
.account-table tr:last-child td { border-bottom: none; }
.masked-key { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); letter-spacing: 0.5px; }

/* Status chips */
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.chip-owner { background: #2f81f720; color: var(--accent); border: 1px solid var(--accent); }
.chip-admin { background: #8957e520; color: #b083f0; border: 1px solid #8957e5; }
.chip-member { background: var(--surface); color: var(--ink-muted); border: 1px solid var(--border); }
.chip-active { background: #1a7f3720; color: #3fb950; border: 1px solid #238636; }
.chip-revoked { background: var(--surface); color: var(--ink-muted); border: 1px solid var(--border); text-decoration: line-through; }

/* Alert / flash */
.alert { padding: 10px 14px; border-radius: 5px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; }
.alert-success { background: #1a7f3720; color: #3fb950; border: 1px solid #238636; }
.alert-error { background: #da363320; color: #f85149; border: 1px solid #da3633; }
/* Shared across all account data panels (EPIC-014-S04) so a failed fetch's
   Retry button always sits at the alert's trailing edge, not wherever
   inline styling on a given page happened to push it. */
.alert-error .btn { margin-left: auto; flex-shrink: 0; }

/* Loading skeleton for account data panels (EPIC-014-S04). One visual
   language shared by the profile form, the billing tables, and the
   licensing tables/entitlements panel -- a shimmering bar standing in for
   a line of real content while its fetch is in flight. */
@keyframes acs-skeleton-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: var(--border-soft);
  animation: acs-skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-line + .skeleton-line { margin-top: 10px; }
td .skeleton-line { height: 12px; }

@media (max-width: 700px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { border-right: none; border-bottom: 1.5px solid var(--border-soft); padding: 12px 0; }
}
