/* Design tokens — Google Cloud Console visual language (see
   Romil Ziniapps/product-assess-ui/prompts/design-system.md), adopted
   app-wide per explicit instruction, superseding this file's earlier
   teal/amber/Fraunces identity (discussion.md #4/#13). */
:root {
  --color-primary: #1a73e8;
  --color-primary-hover: #1765cc;
  --color-primary-light: #e8f0fe;
  --color-accent: #1a73e8;
  --color-danger: #d93025;
  --color-success: #1e8e3e;
  --color-warning: #f9ab00;
  --color-text: #202124;
  --color-text-body: #3c4043;
  --color-text-secondary: #5f6368;
  --color-border: #dadce0;
  --color-bg: #f8f9fa;
  --color-surface: #fff;
  --radius-card: 8px;
  --radius-button: 4px;
  --font-display: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-body);
  background: var(--color-bg);
}

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

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* So an in-page anchor jump (e.g. sidebar submenu links into
   hr-employees.html) doesn't land the heading underneath the sticky navbar. */
h2[id], label[id] {
  scroll-margin-top: 64px;
}

/* 1-5 star rating on the manager's customizable appraisal categories
   (js/page/appraisal-view.js). Editable version: five radio inputs in
   reverse DOM order (5..1) + row-reverse below, so the plain CSS ~ sibling
   selector can light up a star and everything to its visual left on hover
   or once checked — no JS needed for the fill effect. */
.star-rating {
  position: relative;
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 2px;
}
.star-rating-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.star-rating-star {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-border);
  cursor: pointer;
}
.star-rating-input:checked ~ .star-rating-star,
.star-rating:hover .star-rating-star:hover,
.star-rating:hover .star-rating-star:hover ~ .star-rating-star {
  color: var(--color-warning);
}
.star-rating-input:focus-visible + .star-rating-star {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Read-only star display for a saved score (e.g. the summary of a finalized
   review) — same glyphs, no interaction. */
.star-rating-readonly {
  display: inline-flex;
  gap: 2px;
  font-size: 1.1rem;
  color: var(--color-warning);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  font-weight: 500;
}

h1 {
  font-size: 20px;
  font-weight: 500;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  /* Clips flush-edge content (e.g. a table wrapped directly in a .card, no
     padding) to the card's rounded corners — otherwise the table's square
     corners visibly poke past the border-radius. */
  overflow: hidden;
}

.btn {
  border-radius: var(--radius-button);
  font-weight: 500;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-outline-primary, .btn-outline-secondary, .btn-link {
  color: var(--color-primary);
}

.btn-outline-primary:hover, .btn-outline-secondary:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-icon-only {
  padding: 4px 8px;
  line-height: 1;
}

/* Forms — focus ring matches product-assess-ui's design-system.md rule. */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, .25);
}
.form-control:disabled,
.form-control[readonly] {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

/* Every <select> in the app is a plain .form-select (directory wizard's
   nine steps, list filters, hr-employees, appraisal ratings) — one rule
   here reaches all of them. Bootstrap's default ships a hardcoded
   near-black chevron and no hover state; this recolors the chevron to
   match the rest of the app's icon tone and gives selects the same
   border-radius token and hover/disabled treatment .form-control has. */
.form-select {
  border-radius: var(--radius-button);
  border-color: var(--color-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235f6368' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
  transition: border-color 0.15s ease;
}
.form-select:hover:not(:disabled) {
  border-color: var(--color-text-secondary);
}
.form-select:disabled {
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}
/* Placeholder-style options ("Select…", "No manager assigned", "Not
   stated") read as muted until a real choice is made — same idea as an
   <input>'s ::placeholder, applied the one way <option> supports it. */
.form-select option[value=""] {
  color: var(--color-text-secondary);
}
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

/* Table header — light background + small uppercase labels, applied once
   here rather than per-page since every table in the app follows it. */
.table > thead {
  background: var(--color-bg);
}
.table > thead th {
  border-bottom-width: 1px;
  border-bottom-color: var(--color-border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.table > tbody td {
  font-size: 13px;
}
.table > tbody tr:hover {
  background-color: var(--color-bg);
}

/* StatusBadge colors — see js/status-badge.js. A small dot plus the label
   (never color alone, per 08-frontend-design.md's accessibility rule) so a
   table full of statuses is scannable at a glance without reading text. */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex: none;
}
.status-badge--pending { background: #fef7e0; color: var(--color-warning); }
.status-badge--approved { background: #e6f4ea; color: var(--color-success); }
.status-badge--rejected { background: #fce8e6; color: var(--color-danger); }
.status-badge--neutral { background: #f1f3f4; color: var(--color-text-secondary); }

/* Shell — adapted from Bootstrap's official Dashboard example
   (getbootstrap.com/docs/5.0/examples/dashboard/): top navbar +
   light, bordered sidebar that collapses into an offcanvas below md.
   See components/header.html, components/sidebar.html, js/loader.js. */

.navbar {
  background-color: var(--color-surface);
  position: relative;
}

/* Absolutely centered on the navbar's full width, independent of how wide
   the brand (left) and bell/avatar (right) groups happen to be. */
.navbar-org-name {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.navbar-org-name .org-key {
  font-family: var(--font-mono);
  color: var(--color-text);
}

.breadcrumb-bar {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 12px;
}
.breadcrumb-bar .breadcrumb {
  font-size: inherit;
}

.navbar-brand {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.5px;
  color: var(--color-primary) !important;
}

/* Above header.sticky-top's own z-index (1020) and everything in the page
   body, so the menu never renders behind sticky sidebar/card content. */
#header-user-menu + .dropdown-menu,
#notification-bell-btn + .dropdown-menu {
  z-index: 1030;
}

/* Red dot only — no unread count shown, per 08-frontend-design.md's
   accessibility note the dot alone isn't the only signal: the button keeps
   an sr-only label and unread rows in the list carry their own marker
   (see .notification-item--unread) so the state isn't color-only. */
.notification-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--color-danger);
  border: 2px solid var(--color-surface);
}

.notification-dropdown {
  width: 320px;
  max-width: calc(100vw - 2rem);
  max-height: 360px;
  overflow-y: auto;
  padding-bottom: 0.25rem;
}
.notification-item {
  display: block;
  padding: 0.5rem 1rem;
  white-space: normal;
  color: inherit;
  text-decoration: none;
}
.notification-item:hover {
  background: var(--color-bg);
}
.notification-item--unread {
  background: var(--color-primary-light);
}
.notification-item--unread .notification-item-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-danger);
  margin-right: 0.4rem;
}
.notification-item-title {
  font-weight: 600;
  font-size: 0.9rem;
}
.notification-item-message {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0.15rem 0;
}
.notification-item-time {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}
.notification-empty {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.user-avatar-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar-btn:hover {
  background: var(--color-border);
}
.user-avatar-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
}

/* Breadcrumb — navbar is now a light surface, so it reverts to the
   default dark-on-light Bootstrap breadcrumb styling; secondary text tone
   matches the rest of the topbar. */
.navbar .breadcrumb-item, .navbar .breadcrumb-item a {
  color: var(--color-text-secondary);
}
.navbar .breadcrumb-item a:hover {
  color: var(--color-text);
}
.navbar .breadcrumb-item.active {
  color: var(--color-text);
}
.navbar .breadcrumb-item + .breadcrumb-item::before {
  color: var(--color-border);
}

/* md+ only — below md the offcanvas is fixed/hidden and this would render
 * as an empty full-height colored box (an earlier bug here).
 *
 * Two separate heights, on purpose: min-height on the outer .sidebar is a
 * *floor* — on a short page, .row would otherwise only be as tall as its
 * content, and .sidebar's background would stop partway down the viewport
 * instead of reaching the bottom. On a long page, flex's default
 * align-items: stretch still lets .sidebar grow past that floor to match
 * .main's full height, so the background reaches the bottom of the actual
 * page too, not just one viewport. .offcanvas-md's fixed height is
 * unrelated — it just bounds+scrolls the nav *list* (overflow-y-auto in
 * components/sidebar.html) to one viewport, so a long expanded nav doesn't
 * grow past the visible sticky area. */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 48px;
    min-height: calc(100vh - 48px);
  }
  .sidebar .offcanvas-md {
    height: calc(100vh - 48px);
  }
}

.sidebar .nav-link {
  font-size: 14px;
  color: var(--color-text);
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: background-color 0.1s, border-color 0.1s;
}

.sidebar .nav-link .bi {
  margin-right: 0.35rem;
  color: var(--color-text-secondary);
}

.sidebar .nav-link:hover {
  background: var(--color-bg);
}

/* Left accent rail + light-blue pill, matching product-assess-ui's active
   sidebar-link treatment exactly. */
.sidebar .nav-link.active {
  background: var(--color-primary-light);
  border-left-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 500;
}

.sidebar .nav-link.active .bi {
  color: var(--color-primary);
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--color-text-secondary);
}

/* Collapsible "Manager"/"HR Admin" section headings, and the nested
   "Employees" submenu toggle — Bootstrap's collapse JS toggles .collapsed on
   the trigger itself, so the chevron direction is driven off that rather
   than a separate open/closed class. */
.sidebar-heading button {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.sidebar [data-bs-toggle="collapse"] .bi-chevron-down {
  transition: transform 0.2s;
}
.sidebar [data-bs-toggle="collapse"].collapsed .bi-chevron-down {
  transform: rotate(-90deg);
}

[hidden] {
  display: none !important;
}

/* Hides the page until auth-guard.js resolves the session (see js/auth-guard.js). */
html[data-auth-pending] body {
  visibility: hidden;
}

/* ============================================================
   Standard App Modal — mirrors product-assess-ui's .app-modal
   (create/edit/delete popups across the app; see prompts/design-system.md
   "Modals").
   ============================================================ */
.app-modal .modal-content {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
}
.app-modal .modal-header {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 20px;
}
.app-modal .modal-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.app-modal .modal-body { padding: 20px; }
.app-modal .modal-footer {
  border-top: 1px solid var(--color-border);
  padding: 12px 20px;
  gap: 8px;
}

/* Step wizard modal: a fixed height instead of growing/shrinking per step
   (step 1 has 3 fields, step 6 has a dozen) — .modal-dialog-scrollable
   already makes .modal-body overflow-y:auto, this just pins the dialog so
   that scroll (not resize) is what absorbs a long step. */
#dir-modal .modal-dialog { height: 85vh; }
#dir-modal .modal-content { height: 100%; }

/* ============================================================
   Stepper — the step indicator for multi-step forms (directory.html's
   add/edit wizard). Bootstrap 5 has no stepper component, so this is the
   one place it's defined. Numbered circles, a connector line between
   them, and three states: upcoming (default), .is-current, .is-done.
   ============================================================ */
.stepper {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  /* Narrow screens: the row scrolls rather than squashing five labels
     into unreadable columns. */
  overflow-x: auto;
}
.stepper-item {
  flex: 1 1 0;
  min-width: 92px;
  text-align: center;
  position: relative;
  padding-top: 34px;
}
/* Connector, drawn leftwards from each circle except the first. Sits at
   the circle's vertical centre (padding-top 34px - half of 26px). */
.stepper-item + .stepper-item::before {
  content: "";
  position: absolute;
  top: 21px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--color-border);
}
.stepper-item.is-done::before,
.stepper-item.is-current::before {
  background: var(--color-primary);
}
.stepper-marker {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  z-index: 1;
}
.stepper-item.is-current .stepper-marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.stepper-item.is-done .stepper-marker {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.stepper-label {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 0 4px;
}
.stepper-item.is-current .stepper-label {
  color: var(--color-text);
  font-weight: 500;
}
/* Reachable steps are buttons; upcoming ones are rendered as plain text,
   so there's no disabled-button focus trap to tab through. */
.stepper-item button {
  background: none;
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
}
.stepper-item button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-button);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn-danger:hover,
.btn-danger:focus {
  background: #b7271f;
  border-color: #b7271f;
  color: #fff;
}

/* ============================================================
   Responsive tiers — layered on top of Bootstrap's own grid
   breakpoints (576/768/992/1200/1400, still driving col-md-*,
   offcanvas-md, d-md-none throughout the shell/pages). These
   rules tune type scale, spacing, and table/header density
   within the app's own requested tiers; see discussion.md.
   ============================================================ */

/* Mobile (small): 320–479px — smallest phones, tightest layout. */
@media (max-width: 479.98px) {
  body { font-size: 14px; }
  main { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
  .table { font-size: 0.75rem; }
  .table td, .table th { padding: 0.4rem; }
  #header-user-name { display: none; }
  #header-signout .btn-label { display: none; }
}

/* Mobile (large): 480–639px — standard phones. */
@media (min-width: 480px) and (max-width: 639.98px) {
  body { font-size: 15px; }
  .table { font-size: 0.8rem; }
  #header-user-name { display: none; }
}

/* Tablet: 640–1023px — iPads, small tablets. Note Bootstrap's own md/lg
   breakpoints (768/992) fall inside this band, so the sidebar's
   offcanvas-vs-persistent switch happens partway through this tier —
   that's existing Bootstrap grid behavior, not overridden here. */
@media (min-width: 640px) and (max-width: 1023.98px) {
  body { font-size: 16px; }
}

/* Laptop / Desktop: 1024–1439px. */
@media (min-width: 1024px) and (max-width: 1439.98px) {
  body { font-size: 16px; }
}

/* Large Desktop: 1440–1919px — a bit more breathing room. */
@media (min-width: 1440px) {
  body { font-size: 16px; }
  main { padding-left: 2rem !important; padding-right: 2rem !important; }
}

/* ============================================================
   Embedded pages (leave-view.html?embed=1) — loaded inside the
   #leave-detail-modal iframe (components/header.html), so the page's own
   header/sidebar/footer chrome would otherwise duplicate the modal's own
   frame. See js/api/leave-view.js.
   ============================================================ */
body.embed-mode #header-placeholder,
body.embed-mode .sidebar,
body.embed-mode #footer-placeholder {
  display: none;
}
body.embed-mode main {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 1rem !important;
}
body.embed-mode main > h1 {
  display: none;
}

.leave-detail-frame {
  width: 100%;
  height: 70vh;
  border: 0;
}

/* ============================================================
   Auth pages (login.html, signup.html, forgot-password.html) —
   Google Account sign-in card: centered, rounded, no page chrome.
   ============================================================ */
body.auth-page { background: var(--color-surface); }
.signin-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(60, 64, 67, .12), 0 4px 12px rgba(60, 64, 67, .08);
  padding: 32px;
}
.signin-brand {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.signin-title { font-size: 22px; font-weight: 500; color: var(--color-text); margin: 16px 0 4px; }
.signin-subtitle { font-size: 14px; color: var(--color-text-body); margin-bottom: 20px; }
.signin-card .form-control {
  border-radius: 8px;
  border-color: var(--color-border);
}
.signin-card .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.signin-card .form-floating > label { color: var(--color-text-secondary); }
.signin-card .form-floating { margin-bottom: 14px; }
.signin-card .form-floating.has-icon { position: relative; }
.signin-card .form-floating.has-icon .form-control,
.signin-card .form-floating.has-icon > label { padding-left: 40px; }
.signin-card .form-floating.has-icon .field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  z-index: 5;
  pointer-events: none;
}
.signin-password-wrap { position: relative; }
.signin-password-wrap .form-control { padding-right: 44px; }
.signin-password-wrap .signin-toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  padding: 6px 8px;
  z-index: 5;
}
.signin-forgot { text-align: center; margin-top: 12px; }
.signin-forgot a { font-size: 13px; }
/* Google's badge iframe mounts fixed to the viewport corner by default;
   js/utils.js relocates that same node in here once it loads, so it must be
   un-fixed to actually sit inline instead of floating over the page. */
.recaptcha-badge-slot { display: flex; justify-content: center; margin-top: 12px; }
.recaptcha-badge-slot .grecaptcha-badge { position: static !important; box-shadow: none !important; }
.signin-actions { display: flex; align-items: center; margin-top: 20px; }
.signin-actions .btn-primary { border-radius: 20px; padding: 8px 24px; }
.signin-footer { margin-top: 20px; font-size: 14px; color: var(--color-text-secondary); text-align: center; }

/* Plain variant (login.html): bold centered title, labeled fields, no floating/icon inputs. */
.signin-card-plain .signin-title { text-align: center; font-weight: 700; margin: 0 0 8px; }
.signin-subtitle-plain { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 24px; }
.signin-card-plain .form-label { font-weight: 600; font-size: 14px; color: var(--color-text); }
.signin-card-plain .signin-actions .btn-primary { border-radius: 8px; padding: 10px 24px; }
.signin-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 14px; }

/* Profile page photo (profile.html). */
.profile-photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-avatar-wrap { width: 72px; height: 72px; flex: none; }
.profile-avatar, .profile-avatar-placeholder { width: 72px; height: 72px; border-radius: 50%; }
.profile-avatar { object-fit: cover; }
.profile-avatar-placeholder { font-size: 72px; line-height: 1; color: var(--color-text-secondary); }

/* Crop/zoom modal (Cropper.js) — round crop box so the preview matches the
   circular avatar it's being cropped for; the uploaded canvas stays a square,
   clipped to a circle on display like the avatar already is. */
.photo-crop-viewport { width: 100%; max-width: 360px; height: 360px; margin: 0 auto; background: var(--color-surface-subtle, #f0f0f0); }
.photo-crop-viewport img { display: block; max-width: 100%; }
.photo-crop-viewport .cropper-view-box,
.photo-crop-viewport .cropper-face { border-radius: 50%; }

/* ============================================================
   Loading overlay (js/utils.js showLoading/hideLoading) and API
   notifications/toasts (showApiNotification/showToast). See
   loading-overlay.md and api-response-handling.md.
   ============================================================ */
#loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .85);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
#loading-overlay.visible {
  display: flex;
}
.loading-message {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

#notification-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.app-notification {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.app-notification--success { border-left: 4px solid var(--color-success); }
.app-notification--error { border-left: 4px solid var(--color-danger); }
.app-notification--info { border-left: 4px solid var(--color-primary); }
.app-notification-message { flex: 1; }
.app-notification-close {
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

/* RBAC: a sidebar section the signed-in user cannot open (js/auth-guard.js). */
.sidebar-locked { opacity: 0.55; cursor: not-allowed; }

/* Billing plan cards (billing.html / js/api/billing.js) */
.plan-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 1.5rem; height: 100%; display: flex; flex-direction: column; }
.plan-card.is-current { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.plan-card .plan-name { font-size: 1.15rem; font-weight: 500; color: var(--color-text); margin: 0; }
.plan-card .plan-price { font-size: 2rem; font-weight: 700; color: var(--color-text); line-height: 1.1; }
.plan-card .plan-period { font-size: 0.8rem; color: var(--color-text-secondary); }
.plan-card .plan-divider { border-top: 1px solid var(--color-border); margin: 1rem 0; }
.plan-card .plan-features { list-style: none; padding: 0; margin: 0 0 1.5rem; flex-grow: 1; font-size: 0.875rem; font-weight: 500; color: var(--color-text-body); }
.plan-card .plan-features li { margin-bottom: 0.6rem; }
.plan-card .plan-features i { color: var(--color-success); margin-right: 0.5rem; }
.plan-card .plan-badge { background: var(--color-primary); color: #fff; font-size: 0.7rem; font-weight: 500; padding: 0.2rem 0.6rem; border-radius: 4px; }
.plan-card .plan-btn { width: 100%; border: 0; border-radius: var(--radius-button); padding: 0.6rem; font-weight: 500; background: var(--color-primary-light); color: var(--color-primary); }
.plan-card .plan-btn:hover:not(:disabled) { background: var(--color-primary); color: #fff; }
.plan-card .plan-btn:disabled { background: var(--color-bg); color: var(--color-text-secondary); }
