:root {
  /* Dark theme (default) */
  --bg: #070707;
  --card: #1f1f24;
  --text: #f6e9c6;
  --muted: #c2b177;
  --accent: #d6a316;
  --success: #22c55e;
  --border: #3a3a44;
  --input: #13131b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  overscroll-behavior-y: none;
  overscroll-behavior-x: auto;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Pixelify Sans", sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.has-modern-nav .header-inner .nav-actions,
.has-modern-nav .user-name-stack {
  display: none !important;
}

.primary-nav-shell {
  width: min(1760px, calc(100vw - 24px));
  margin: 18px auto 6px;
  position: sticky;
  top: 18px;
  z-index: 80;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 14px 22px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0);
  border: 1px solid rgba(148, 163, 184, 0);
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.primary-nav-page-label {
  margin-left: 16px;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  flex: 0 0 auto;
  white-space: nowrap;
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #f8fafc;
  margin-right: 8px;
}

.primary-nav-logo img {
  height: 44px;
  width: auto;
  max-width: 140px;
  border-radius: 8px;
  border: none;
  box-shadow: none;
  object-fit: contain;
}

.primary-nav-wrapper {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.primary-nav-icon-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 6px;
}

.primary-nav-icon-links .icon-link {
  width: 46px;
  height: 46px;
}

.icon-link.admin-only {
  display: none;
}

.admin-role .icon-link.admin-only {
  display: inline-flex;
}

/* Big Boss should not see admin-only icons */
.big-boss-role .icon-link.admin-only {
  display: none;
}

.notification-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.calendar-shell .notification-menu {
  width: auto;
  min-width: 320px;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(12, 10, 6, 0.95);
  border: 1px solid rgba(214, 163, 22, 0.4);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.48);
  z-index: 120;
  display: none;
  overflow: hidden;
}

.notification-menu.open {
  display: inline-block;
  animation: fadeDown 0.15s ease;
}

.notification-empty {
  text-align: center;
  padding: 10px 4px;
}

.notification-list {
  display: grid;
  gap: 10px;
  max-height: 420px; /* ~5 items with spacing */
  overflow-y: auto;
  padding-right: 4px; /* keep scrollbar from overlapping content */
}

.notification-item {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 163, 22, 0.15);
  position: relative;
}

.notification-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(214, 163, 22, 0.6);
  background: rgba(12, 10, 6, 0.75);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border 0.15s ease;
}

.notification-item:hover .notification-dismiss,
.notification-dismiss:focus-visible {
  display: inline-flex;
}

.notification-dismiss:hover,
.notification-dismiss:focus-visible {
  background: rgba(214, 163, 22, 0.18);
  border-color: rgba(214, 163, 22, 0.9);
  transform: translateY(-1px);
}

.notification-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(214, 163, 22, 0.35);
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.notification-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(214, 163, 22, 0.4);
  background: rgba(12, 10, 6, 0.8);
  color: #e2e8f0;
  cursor: pointer;
}

.notification-btn.approve {
  border-color: rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.notification-btn.deny {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecdd3;
}

.mini-cal {
  display: grid;
  gap: 10px;
}

.mini-cal-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.mini-cal-month {
  font-weight: 700;
  font-size: 1rem;
}

.mini-cal-year {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.mini-cal-weekdays,
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.mini-cal-weekdays span {
  color: #94a3b8;
  font-size: 0.8rem;
}

.mini-cal-day,
.mini-cal-pad {
  min-height: 32px;
}

.mini-cal-day {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 10, 6, 0.75);
  color: #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.mini-cal-day:hover,
.mini-cal-day:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.65);
  background: rgba(214, 163, 22, 0.12);
}

.mini-cal-day.today {
  border-color: rgba(214, 163, 22, 0.85);
  background: rgba(214, 163, 22, 0.18);
  color: #fff7d6;
}

.mini-cal-nav {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 10, 6, 0.8);
  color: #e2e8f0;
  border-radius: 8px;
  width: 36px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.mini-cal-nav:hover,
.mini-cal-nav:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.65);
  background: rgba(214, 163, 22, 0.16);
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.has-modern-nav .dashboard-page header {
  display: none;
}

.primary-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0803;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-nav-office-btn {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  white-space: nowrap;
}

.primary-nav-secondary-btn {
  background: rgba(12, 10, 6, 0.65);
  color: var(--text);
  border: 1px solid rgba(214, 163, 22, 0.35);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  white-space: nowrap;
}

.primary-nav-secondary-btn:hover,
.primary-nav-secondary-btn:focus-visible {
  border-color: rgba(246, 224, 94, 0.9);
  background: rgba(214, 163, 22, 0.2);
  color: #fff8dc;
}

.primary-nav-cta:hover,
.primary-nav-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(214, 163, 22, 0.4);
}

.finance-landing {
  margin-top: 18px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.finance-landing-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
}
.finance-choice-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.finance-choice-button {
  width: 260px;
  height: 150px;
  padding: 14px 18px;
  border-radius: 10px;
  background: transparent;
  border: 2px solid rgba(12, 12, 14, 0.7);
  color: #f8fafc;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.finance-choice-button:hover,
.finance-choice-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.7);
}
.finance-choice-button[aria-disabled="true"] {
  opacity: 0.8;
}
.finance-choice-button.income {
  background: transparent;
  border-color: #22e27b;
  border-width: 3px;
  color: #5cff9d;
  box-shadow: 0 0 18px rgba(92, 255, 157, 0.45), inset 0 0 8px rgba(34, 226, 123, 0.3);
}
.finance-choice-button.income:hover,
.finance-choice-button.income:focus-visible {
  background: rgba(92, 255, 157, 0.16);
  border-color: #1bcf6e;
}
.finance-choice-button.expenses {
  background: transparent;
  border-color: #ff3b3b;
  border-width: 3px;
  color: #ff7b7b;
  box-shadow: 0 0 18px rgba(255, 59, 59, 0.45), inset 0 0 8px rgba(255, 59, 59, 0.3);
}
.finance-choice-button.expenses:hover,
.finance-choice-button.expenses:focus-visible {
  background: rgba(255, 59, 59, 0.16);
  border-color: #e63131;
}
.finance-choice-button.profit {
  background: linear-gradient(135deg, #f8e7a1 0%, #e8c766 28%, #c99823 52%, #8b6405 70%, #f7d45a 100%);
  color: #0b0803;
  border-color: #b8820f;
  box-shadow: 0 14px 32px rgba(139, 100, 5, 0.35);
}
.finance-choice-button.profit:hover,
.finance-choice-button.profit:focus-visible {
  background: linear-gradient(135deg, #ffeca5, #e1b72a);
  border-color: #c18f12;
}

.expenses-card {
  margin: 18px auto;
  max-width: 820px;
  width: min(100%, 820px);
}
.recent-expenses-card {
  margin: 12px auto;
  max-width: 820px;
  width: min(100%, 820px);
}
.expenses-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.expenses-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #e2e8f0;
}
.expenses-form input {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
}
.expenses-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.expenses-form .status {
  margin: 0;
}
.expense-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.expense-pill {
  background: transparent;
  border: 2px solid rgba(214, 163, 22, 0.6);
  color: #f8fafc;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 0 12px rgba(214, 163, 22, 0.25);
}
.expense-pill:hover,
.expense-pill:focus-visible {
  transform: translateY(-1px);
}
.expense-pill[data-category="Business"] { border-color: #ef4444; color: #f87171; box-shadow: 0 0 12px rgba(239, 68, 68, 0.35); }
.expense-pill[data-category="Business"]:hover,
.expense-pill[data-category="Business"]:focus-visible { background: rgba(239, 68, 68, 0.15); }
.expense-pill[data-category="Leads"] { border-color: #ec4899; color: #f472b6; box-shadow: 0 0 12px rgba(236, 72, 153, 0.35); }
.expense-pill[data-category="Leads"]:hover,
.expense-pill[data-category="Leads"]:focus-visible { background: rgba(236, 72, 153, 0.15); }
.expense-pill[data-category="Food"] { border-color: #f97316; color: #fb923c; box-shadow: 0 0 12px rgba(249, 115, 22, 0.35); }
.expense-pill[data-category="Food"]:hover,
.expense-pill[data-category="Food"]:focus-visible { background: rgba(249, 115, 22, 0.15); }
.expense-pill[data-category="Personal"] { border-color: #eab308; color: #facc15; box-shadow: 0 0 12px rgba(234, 179, 8, 0.35); }
.expense-pill[data-category="Personal"]:hover,
.expense-pill[data-category="Personal"]:focus-visible { background: rgba(234, 179, 8, 0.15); }
.expense-pill[data-category="Utilities"] { border-color: #22c55e; color: #4ade80; box-shadow: 0 0 12px rgba(34, 197, 94, 0.35); }
.expense-pill[data-category="Utilities"]:hover,
.expense-pill[data-category="Utilities"]:focus-visible { background: rgba(34, 197, 94, 0.15); }
.expense-pill[data-category="Rent"] { border-color: #3b82f6; color: #60a5fa; box-shadow: 0 0 12px rgba(59, 130, 246, 0.35); }
.expense-pill[data-category="Rent"]:hover,
.expense-pill[data-category="Rent"]:focus-visible { background: rgba(59, 130, 246, 0.15); }
.expense-pill[data-category="Other"] { border-color: #a855f7; color: #c084fc; box-shadow: 0 0 12px rgba(168, 85, 247, 0.35); }
.expense-pill[data-category="Other"]:hover,
.expense-pill[data-category="Other"]:focus-visible { background: rgba(168, 85, 247, 0.15); }
.expense-view-actions {
  margin: 18px auto 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.expense-page-header {
  margin: 6px auto 10px;
  text-align: center;
}
.expense-page-header h1 {
  margin: 4px 0 6px;
}
.expense-page-header p {
  margin: 0;
}
.expense-view-btn {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease;
  color: inherit;
  box-shadow: none;
}
.expense-view-btn:hover,
.expense-view-btn:focus-visible {
  transform: translateY(-1px);
}

.expense-breakdown-card {
  margin-top: 12px;
  max-width: 820px;
  width: min(100%, 820px);
  margin-left: auto;
  margin-right: auto;
}
.expense-bar {
  width: 100%;
  height: 28px;
  border-radius: 12px;
  background: rgba(18, 18, 22, 0.9);
  border: 1px solid rgba(214, 163, 22, 0.18);
  display: flex;
  overflow: hidden;
}
.expense-bar-segment {
  height: 100%;
}
.expense-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
}
.expense-bar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #e2e8f0;
}
.expense-bar-legend-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.expense-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.expense-modal[hidden] {
  display: none;
}
.expense-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}
.expense-modal-content {
  position: relative;
  max-width: 520px;
  width: min(520px, calc(100vw - 32px));
  max-height: 80vh;
  overflow: hidden;
}
.expense-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.expense-modal-list {
  max-height: 60vh;
  overflow-y: auto;
}
.expense-modal-list ul {
  margin: 0;
  padding-left: 16px;
  color: #e2e8f0;
}
.expense-modal-list li + li {
  margin-top: 4px;
}

.expense-card-header-tag {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(214, 163, 22, 0.16);
  color: #f8fafc;
  border: 1px solid rgba(214, 163, 22, 0.4);
  font-weight: 700;
  letter-spacing: 0.04em;
  align-self: center;
}

.primary-nav-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(214, 163, 22, 0.35);
  background: rgba(15, 12, 6, 0.75);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.primary-nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.primary-nav-toggle:hover,
.primary-nav-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(246, 224, 94, 0.9);
  background: rgba(214, 163, 22, 0.28);
}

.primary-nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  height: 100vh;
  width: min(360px, 90vw);
  background: rgba(0, 0, 0, 0.6);
  border-left: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: -26px 0 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1400;
}

.primary-nav-menu.open {
  transform: translateX(0);
}

.primary-nav-menu-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 28px;
  gap: 32px;
  overflow-y: auto;
}

.dashboard-widgets {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 18px;
  max-width: 480px;
  height: 100%;
}

.widget-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  overflow: hidden;
  width: 100%;
  background: #1f1f24;
  border: none;
  border-radius: 14px;
}

.calendar-card {
  min-height: 420px;
  height: 100%;
}

.reminders-card {
  min-height: 240px;
}

.widget-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.widget-heading h2 {
  margin: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.calendar-label-group .eyebrow {
  margin-bottom: 6px;
}

.calendar-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-month-label {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #f8fafc;
}

.calendar-year-label {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.65);
}

.calendar-arrow-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-arrow-stack button {
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: #f8fafc;
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.1s ease;
}

.calendar-arrow-stack button:hover,
.calendar-arrow-stack button:focus-visible {
  color: var(--accent);
  transform: translateY(-1px);
}

.widget-heading .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.65);
  margin: 0 0 4px;
}


.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-weekdays {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(226, 232, 240, 0.6);
  margin-bottom: 8px;
}

.calendar-grid {
  flex: 1;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
}

.calendar-day {
  height: 100%;
  border-radius: 12px;
  padding: 6px;
  background: rgba(12, 10, 6, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  transition: border 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.calendar-day.is-muted {
  opacity: 0.35;
}

.calendar-day.is-today {
  border-color: rgba(56, 189, 248, 0.8);
}

.calendar-day.has-event::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--event-dot-color, var(--accent));
  margin-left: auto;
}

.reminders-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.reminders-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.reminders-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.reminders-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.reminders-list li {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--reminder-color, rgba(255, 255, 255, 0.08));
  padding: 8px 12px;
  background: rgba(14, 12, 8, 0.5);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px transparent;
}

.reminders-list li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--reminder-color, var(--accent));
  display: inline-block;
}

.reminders-list li.is-live {
  border-color: var(--reminder-color, rgba(214, 163, 22, 0.95));
  box-shadow: 0 0 14px 0 var(--reminder-color, rgba(214, 163, 22, 0.45));
}

.reminders-list li strong {
  font-size: 0.95rem;
  flex: 1;
  margin-right: 12px;
}

.reminders-list li span {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.7);
  text-align: right;
  min-width: 110px;
}

.reminders-list li.is-active {
  border-color: var(--reminder-color, rgba(214, 163, 22, 0.85));
  box-shadow: 0 0 0 1px var(--reminder-color, rgba(214, 163, 22, 0.85));
}

.reminders-empty {
  margin-top: auto;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.6);
  text-align: center;
}

.mini-link {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.reminders-card h4 {
  margin: 0;
}

.day-event-modal[hidden] {
  opacity: 0;
  pointer-events: none;
}

.day-event-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.day-event-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.day-event-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.day-event-content {
  position: relative;
  margin: 0 auto;
  width: min(520px, 90vw);
  background: rgba(12, 10, 6, 0.92);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 24px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 1;
  top: 50%;
  opacity: 0;
  transform: translateY(-48%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.day-event-modal.is-open .day-event-content {
  opacity: 1;
  transform: translateY(-50%);
}

.day-event-heading-banner {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.8);
}

.day-event-content header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.day-event-date {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.85);
}

.day-event-close {
  border: none;
  background: rgba(12, 10, 6, 0.6);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.day-event-form {
  display: grid;
  gap: 12px;
}

.day-event-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.day-event-form input,
.day-event-form textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(12, 10, 6, 0.85);
  color: #f8fafc;
  padding: 10px 12px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.title-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.75rem;
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  padding: 4px 8px;
  border-radius: 999px;
}

.title-hint[hidden] {
  display: none;
}

.day-event-form button {
  justify-self: flex-start;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #0c0803;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
}

.color-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.color-field input[type="color"] {
  width: 38px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
}

.day-event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-event-list li {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  background: rgba(10, 8, 4, 0.5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  word-break: break-word;
  border-left: 6px solid var(--event-color, var(--accent));
}

.day-event-list li time {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.8);
}

.day-event-list li span {
  grid-column: 1 / span 2;
  word-break: break-word;
}

.primary-nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.primary-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(12, 10, 6, 0.55);
  font-weight: 600;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.primary-nav-link:hover,
.primary-nav-link:focus-visible {
  transform: translateX(4px);
  border-color: rgba(94, 234, 212, 0.65);
  background: rgba(20, 184, 166, 0.25);
}

.primary-nav-meta {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.6);
  margin: 0 0 8px;
}

.primary-nav-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  align-items: stretch;
}

.primary-nav-settings-toggle {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
}

.primary-nav-settings-chevron {
  font-size: 0.8rem;
  opacity: 0.7;
}

.primary-nav-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(4, 7, 18, 0.4);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom center;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.primary-nav-settings-panel[hidden] {
  display: none;
}

.primary-nav-settings-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.primary-nav-settings-link {
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(12, 10, 6, 0.45);
  color: #f8fafc;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-nav-settings-link:hover,
.primary-nav-settings-link:focus-visible {
  transform: translateX(3px);
  background: rgba(214, 163, 22, 0.3);
}

.primary-nav-settings-link.danger {
  background: rgba(248, 113, 113, 0.2);
  color: #ffe4e6;
}

.primary-nav-contact a,
.primary-nav-contact p {
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  margin: 4px 0;
  font-size: 0.9rem;
  display: block;
}

.primary-nav-contact .address {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.85rem;
}

.primary-nav-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.primary-nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 10, 6, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.primary-nav-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.primary-nav-profile-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.primary-nav-user-name {
  font-weight: 600;
}

.primary-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1300;
}

.primary-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer-open {
  overflow: hidden;
}

.page-fade-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 5000;
}

.page-fade-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Profile/account modals (available site-wide) */
.profile-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 24, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1600;
}

.profile-modal[hidden] {
  display: none !important;
}

.profile-modal-dialog {
  background: rgba(17, 25, 40, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 20px;
  width: min(420px, 92vw);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.profile-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-modal-close {
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.profile-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-modal-body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 500;
}

.profile-modal-body input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(12, 10, 6, 0.7);
  color: #f8fafc;
  font-size: 1rem;
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .primary-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dashboard-page {
  position: relative;
  min-height: 100vh;
  background-color: #050505;
  color: #f8fafc;
}

.dashboard-page.finance-page {
  background-color: #050505;
}

.dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 0;
}

.dashboard-page.finance-page::before {
  display: none;
}

.dashboard-page header,
.dashboard-page main,
.dashboard-page footer {
  position: relative;
  z-index: 1;
}
.dashboard-page header {
  z-index: 50;
}

.dashboard-page header {
  width: min(1260px, calc(100vw - 64px));
  margin: 22px auto 38px;
  padding: 26px 32px;
  border-radius: 32px;
  background: rgba(10, 8, 4, 0.9);
  border: 1px solid rgba(214, 163, 22, 0.3);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  display: none !important;
}

.dashboard-page header::before,
.dashboard-page header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dashboard-page header::before {
  background: none;
  mix-blend-mode: normal;
}

.dashboard-page header::after {
  background: none;
}

.dashboard-page main {
  padding: 28px 20px;
  width: min(1760px, calc(100vw - 20px));
}

.finance-page main {
  width: min(1540px, calc(100vw - 20px));
}

.finance-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-header {
  background: rgba(12, 10, 6, 0.85);
  border: 1px solid rgba(214, 163, 22, 0.28);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: minmax(0, 2fr) auto;
  gap: 18px;
  align-items: center;
}

.finance-header h1 {
  margin: 4px 0 6px;
}

.finance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.finance-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.finance-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-col.skinny {
  min-width: 320px;
}

.finance-topline {
  background: rgba(12, 10, 6, 0.8);
  border: 1px solid rgba(214, 163, 22, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finance-topline-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.finance-kpi {
  border: 1px solid rgba(214, 163, 22, 0.25);
  border-radius: 16px;
  padding: 14px;
  background: radial-gradient(circle at 10% 20%, rgba(246, 224, 94, 0.12), rgba(214, 163, 22, 0.05)),
    rgba(12, 10, 6, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.finance-kpi.primary {
  background: rgba(12, 10, 6, 0.78);
  border-color: rgba(214, 163, 22, 0.5);
}

.finance-kpi h2,
.finance-kpi h3 {
  margin: 6px 0;
}

.finance-production {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(12, 10, 6, 0.65);
  border: 1px dashed rgba(214, 163, 22, 0.45);
}

.finance-production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
}

.finance-breakdown {
  background: rgba(10, 20, 41, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.finance-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.finance-chart-area {
  background: radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.08), transparent 35%),
    rgba(6, 12, 24, 0.55);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.finance-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 0.9rem;
  justify-content: center;
}

.finance-bar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(12, 10, 6, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.finance-bar-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.finance-table-card {
  background: rgba(8, 12, 28, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  overflow: hidden;
}

.finance-table-head,
.finance-table-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.finance-table-head {
  background: rgba(23, 37, 84, 0.6);
  padding: 12px 14px;
  color: #e2e8f0;
  font-weight: 700;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.finance-table-rows {
  display: flex;
  flex-direction: column;
}

.finance-table-row {
  padding: 12px 14px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(12, 10, 6, 0.35);
  align-items: center;
}

.finance-table-row:last-child {
  border-bottom: none;
}

.finance-table-row span:last-child {
  text-align: right;
}

.finance-quick {
  background: rgba(12, 10, 6, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.finance-quick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.finance-quick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.finance-quick-row input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(5, 10, 20, 0.65);
  color: #e2e8f0;
}

.finance-quick-tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.finance-chip {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 12px;
  background: rgba(12, 10, 6, 0.5);
  color: #e2e8f0;
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s ease, border-color 0.2s ease, background 0.2s ease;
}

.finance-chip.tiny {
  padding: 6px 10px;
  font-size: 0.85rem;
  pointer-events: none;
}

.finance-chip.hint {
  border-style: dashed;
  color: #cbd5e1;
}

.finance-chip:hover,
.finance-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.6);
}

.finance-chip.income { border-color: rgba(34, 197, 94, 0.55); color: #86efac; }
.finance-chip.expense { border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }

.finance-mini-stack {
  display: grid;
  gap: 10px;
  background: rgba(10, 8, 4, 0.82);
  border: 1px solid rgba(214, 163, 22, 0.26);
  border-radius: 16px;
  padding: 14px;
}

.finance-mini-card {
  border: 1px solid rgba(214, 163, 22, 0.22);
  border-radius: 12px;
  padding: 12px;
  background: rgba(12, 10, 6, 0.55);
}

.finance-mini-card h4 {
  margin: 6px 0;
  font-size: 1.2rem;
}

.finance-hint {
  background: rgba(8, 7, 4, 0.9);
  border: 1px dashed rgba(214, 163, 22, 0.4);
}

.finance-hint ul {
  padding-left: 18px;
  margin: 10px 0 0;
  color: #cbd5e1;
  display: grid;
  gap: 6px;
}

@media (max-width: 1100px) {
  .finance-grid {
    grid-template-columns: 1fr;
  }

  .finance-header {
    grid-template-columns: 1fr;
  }
}

.dashboard-hero-card {
  padding: 28px 26px;
  background: rgba(12, 10, 6, 0.8);
  border: 1px solid rgba(214, 163, 22, 0.24);
  min-height: 440px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 2fr);
  gap: 18px;
  align-items: stretch;
  grid-auto-flow: dense;
}

.dashboard-layout + #recent-section {
  margin-top: 18px;
}

.dashboard-main-stack {
  display: grid;
  gap: 16px;
}

.dashboard-hero-card {
  grid-column: 2;
  grid-row: 1;
}

.dashboard-side-stack {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
  grid-column: 1;
  grid-row: 1;
}

.dashboard-layout.single-column {
  grid-template-columns: 1fr;
}

.hero-calendar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-right: 140px; /* leave space for pinned avatar */
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.hero-profile-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 18px;
  border: none;
  background: transparent;
  box-shadow: none;
  position: absolute;
  top: 6px;
  right: 18px;
  z-index: 2;
}

.level-label {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fcd34d;
  font-size: 0.9rem;
}

.avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.2s ease;
}

.hero-profile-card img {
  width: 104px;
  height: 104px;
  border-radius: 999px;
  object-fit: cover;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  z-index: 2;
}

.avatar-arc {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  z-index: 1;
}

.avatar-arc circle {
  fill: none;
  stroke-linecap: round;
}

.avatar-arc-bg {
  stroke: rgba(59, 130, 246, 0.2);
  stroke-width: 12;
}

.avatar-arc-fg {
  stroke: #3b82f6;
  stroke-width: 12;
  stroke-dasharray: 377 377; /* 2πr for r=60 */
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 0.25s ease, stroke 0.25s ease;
}

.hero-avatar-hint {
  color: #e5e7eb;
  font-size: 0.8rem;
  max-width: 160px;
  text-align: center;
  display: block;
  margin-top: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.level-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) var(--card);
  border: 1px solid rgba(214, 163, 22, 0.28);
  border-radius: 14px;
  padding: 18px 12px 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  justify-items: stretch;
  gap: 12px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.boss-level-card {
  grid-template-rows: auto 1fr;
}

.boss-level-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 0;
  list-style: none;
  margin: 0;
}

.boss-level-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 163, 22, 0.2);
}

.boss-level-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.boss-level-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.boss-level-meta {
  display: grid;
  gap: 4px;
  text-align: right;
}

.boss-level-meta .level {
  font-weight: 800;
  color: #3b82f6;
}

.boss-sales-chip {
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 0;
  border: none;
  background: none;
}

body.big-boss-role #level-card {
  display: none !important;
}

.level-card::after,
.level-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 6px;
  border-radius: 999px;
  top: 12px;
  pointer-events: none;
}

.level-card::after {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.level-card::before {
  width: var(--level-progress, 0%);
  background: linear-gradient(90deg, #22c55e, #d6a316, #f97316);
  box-shadow: 0 10px 28px rgba(250, 204, 21, 0.25);
  transition: width 0.25s ease;
}

.level-card.is-pending {
  border-color: rgba(234, 179, 8, 0.55);
  box-shadow: 0 18px 30px rgba(234, 179, 8, 0.12);
}

.level-card.is-complete {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 18px 34px rgba(34, 197, 94, 0.14);
}

.level-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}

.level-card-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.level-card #level-status-text {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214, 163, 22, 0.35);
  background: rgba(12, 10, 6, 0.7);
  color: #facc15;
}

.level-task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.level-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(214, 163, 22, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.26);
}

.level-task.task-disabled {
  opacity: 0.55;
}

.level-task input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid rgba(214, 163, 22, 0.6);
  background: var(--input);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.18s ease;
}
.level-task input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(250, 204, 21, 0.45);
  outline-offset: 2px;
}
.level-task input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #facc15, #d97706);
  border-color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(252, 211, 77, 0.18);
}
.level-task.task-disabled input[type="checkbox"] {
  pointer-events: none;
  box-shadow: none;
}

.level-task span {
  font-weight: 650;
  letter-spacing: 0.01em;
}

.level-task.task-completed {
  opacity: 0.65;
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
}

#level-submit-btn {
  justify-self: flex-start;
  align-self: end;
  padding: 9px 14px;
  font-size: 0.85rem;
  border-radius: 10px;
  min-width: 0;
}

.hero-profile-card img:hover,
.hero-profile-card img:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(214, 163, 22, 0.28);
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#hero-title {
  font-family: "Academy Engraved LET", "Bodoni 72 Smallcaps", "Times New Roman", Times, serif;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-left: 0;
}

.hero-foot-notes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.calendar-inline {
  min-height: 100%;
}

.calendar-reminders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.reminders-inline {
  min-height: 100%;
}

@media (min-width: 1200px) {
  .hero-calendar-grid {
    grid-template-columns: 1fr;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(214, 163, 22, 0.12);
  color: var(--text);
  font-size: 0.85rem;
  border: 1px solid rgba(214, 163, 22, 0.35);
}

.pill.subtle {
  background: rgba(214, 163, 22, 0.08);
  border-color: rgba(214, 163, 22, 0.2);
  color: #e8d8a3;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(214, 163, 22, 0.18);
  border: 1px solid rgba(214, 163, 22, 0.55);
  color: #fff2c9;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(214, 163, 22, 0.35);
  color: var(--text);
  background: rgba(12, 10, 6, 0.55);
  transition: transform 0.15s ease, border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.cta-button.cta-sm {
  padding: 4px 7px;
  font-size: 0.74rem;
  border-radius: 7px;
}

.icon-link,
.finance-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  gap: 0;
  outline: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.big-boss-only { display: none !important; }
body.big-boss-role .big-boss-only,
body.admin-role .big-boss-only { display: inline-flex !important; }

.icon-link img,
.finance-icon-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-link:hover,
.icon-link:focus-visible,
.finance-icon-link:hover,
.finance-icon-link:focus-visible {
  transform: translateY(-2px);
  border: none;
  box-shadow: none;
  background: transparent;
  filter: drop-shadow(0 6px 14px rgba(214, 163, 22, 0.4));
  background: transparent;
}

.cta-button.primary {
  background: var(--accent);
  color: #0c0803;
  border: none;
  box-shadow: 0 10px 26px rgba(214, 163, 22, 0.35);
}

.cta-button.ghost {
  background: rgba(214, 163, 22, 0.1);
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.6);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.cta-button.primary:hover,
.cta-button.primary:focus-visible {
  box-shadow: 0 16px 30px rgba(214, 163, 22, 0.45);
}

.btn-24kbutton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8e7a1 0%, #e8c766 28%, #c99823 52%, #8b6405 70%, #f7d45a 100%);
  color: #0b0803 !important;
  border: 1px solid rgba(139, 100, 5, 0.45);
  box-shadow: 0 14px 32px rgba(139, 100, 5, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.9s ease;
  background-size: 200% 200%;
}

.btn-24kbutton::after {
  content: "";
  position: absolute;
  inset: -20% -40%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0) 70%);
  transform: translateX(-120%);
  transition: transform 0.9s ease;
  pointer-events: none;
}

.btn-24kbutton:hover,
.btn-24kbutton:focus-visible {
  background-position: 100% 50%;
  box-shadow: 0 18px 36px rgba(139, 100, 5, 0.5);
  transform: translateY(-1px);
}

.btn-24kbutton:hover::before,
.btn-24kbutton:focus-visible::before {
  opacity: 1;
}

.btn-24kbutton:hover::after,
.btn-24kbutton:focus-visible::after {
  transform: translateX(140%);
}

/* Ensure 24k style wins when combined with CTA base */
.cta-button.btn-24kbutton,
.cta-button.primary.btn-24kbutton {
  background: linear-gradient(135deg, #f8e7a1 0%, #e8c766 28%, #c99823 52%, #8b6405 70%, #f7d45a 100%);
  color: #0b0803 !important;
  border: 1px solid rgba(139, 100, 5, 0.45);
  box-shadow: 0 14px 32px rgba(139, 100, 5, 0.35);
}


.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.stat-card {
  background: #111114;
  border: none;
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-card-value span {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--success);
}

.stat-card-value small {
  display: block;
  color: rgba(203, 213, 225, 0.9);
  margin-top: 2px;
}

.stat-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-card-value-col {
  display: grid;
  gap: 6px;
  align-content: start;
}

.stat-card-goal {
  color: #cbd5e1;
  font-size: 0.9rem;
}

/* Goal modal */
.goal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.goal-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 130;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.goal-modal-content {
  background: #0e0f14;
  border: 1px solid rgba(214, 163, 22, 0.35);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  padding: 18px 18px 14px;
  width: min(360px, 92vw);
  display: grid;
  gap: 12px;
}

.goal-modal:not([hidden]) {
  opacity: 0;
}

.goal-modal-overlay:not([hidden]) {
  opacity: 0;
}

.goal-modal.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.goal-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.levels-modal-content {
  width: min(720px, 95vw);
}

.levels-editor {
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}

.level-editor-row {
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.level-editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.level-editor-header input[type="number"] {
  width: 100px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: #111219;
  color: #e2e8f0;
}

.level-editor-header .remove-level {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(226, 232, 240, 0.2);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.level-editor-tasks {
  display: grid;
  gap: 6px;
}

.task-list {
  display: grid;
  gap: 6px;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.task-row .task-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: #111219;
  color: #e2e8f0;
}

.task-row .remove-task {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
}

.level-editor-tasks .add-task {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
}

.levels-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.goal-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.goal-modal-head h3 {
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.goal-close {
  background: transparent;
  border: none;
  color: #e2e8f0;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.goal-field {
  display: grid;
  gap: 6px;
}

.goal-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.25);
  background: #111219;
  color: #e2e8f0;
  font-size: 1rem;
}

.goal-field input:focus-visible {
  outline: 2px solid rgba(34, 197, 94, 0.6);
}

.goal-actions {
  display: flex;
  justify-content: flex-end;
}

.notif-detail-body {
  display: grid;
  gap: 6px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.stat-meter {
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: auto auto;
  gap: 6px;
  align-items: center;
  justify-items: center;
  min-width: 110px;
}

.stat-meter-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.05), rgba(255,255,255,0));
}

.stat-meter-ring::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #0c0c0f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stat-meter-arc {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.stat-meter-arc circle {
  fill: none;
  stroke-linecap: round;
}

.stat-meter-arc .meter-bg {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 12;
}

.stat-meter-arc .meter-fg {
  stroke: #3b82f6;
  stroke-width: 12;
  stroke-dasharray: 327 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.25s ease, stroke 0.25s ease;
}

.stat-meter-core {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  display: grid;
  place-items: center;
  color: #22c55e;
  font-weight: 800;
  font-size: 0.9rem;
}

.stat-meter-goal {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.stat-meter-goal small {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.stat-card-caption {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.delta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Hide stat deltas in dashboard cards */
.stat-card .delta-pill {
  display: none !important;
}

.delta-pill.pos {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.delta-pill.neg {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.delta-pill.neutral {
  background: rgba(214, 163, 22, 0.12);
}

.dashboard-page .card {
  position: relative;
  background: #1f1f24;
  border: none;
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 26px 24px;
  overflow: hidden;
}

.dashboard-page .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.dashboard-page .card > * {
  position: relative;
  z-index: 1;
}

.dashboard-page .dashboard-hero-card {
  background: #25252b;
  border: none;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.5);
  padding: 28px 26px;
}

.dashboard-page footer {
  border-top: 1px solid rgba(214, 163, 22, 0.2);
  background: #1a1a1f;
  padding: 18px 26px;
  box-shadow: 0 -18px 38px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-radius: 18px 18px 0 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-title h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  letter-spacing: 0.01em;
}

.header-title p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
}
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav-actions a {
  color: #e0e7ff !important;
  text-decoration: none;
}
.nav-actions a:visited,
.nav-actions a:active,
.nav-actions a:focus {
  color: #e0e7ff !important;
}

.nav-actions .topbar-link,
.nav-actions .topbar-button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  color: #e0e7ff;
  background: rgba(12, 10, 6, 0.35);
  font-weight: 600;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.nav-actions .topbar-link:hover,
.nav-actions .topbar-link:focus-visible,
.nav-actions .topbar-button:hover,
.nav-actions .topbar-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.75);
  background: rgba(214, 163, 22, 0.25);
}

.uni3-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.uni3-button:hover,
.uni3-button:focus-visible {
  background-color: rgba(214, 163, 22, 0.22) !important;
  transform: translateY(-1px);
  color: #ffffff;
  text-decoration: none;
}

.user-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--input);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.user-avatar-link:hover,
.user-avatar-link:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.user-avatar-link img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.user-name-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1.2;
  min-width: 90px;
}
.user-name-stack span {
  display: block;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: #0b0803 !important;
  border: none;
  padding: 10px 20px;
  border-radius: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.5s ease;
}
.nav-btn:hover,
.nav-btn:focus-visible {
  background-color: #f2c341;
  color: #0b0803 !important;
}

/* Normalize shared buttons to the gold accent across legacy templates */
.uni-button {
  background-color: var(--accent) !important;
  color: #0b0803 !important;
}
.uni-button:hover,
.uni-button:focus-visible {
  background-color: #f2c341 !important;
  color: #0b0803 !important;
}
.uni-button.ghost {
  background-color: transparent !important;
  color: #f2c341 !important;
  border: 1px solid #f2c341 !important;
}
.uni-button.ghost:hover,
.uni-button.ghost:focus-visible {
  background-color: rgba(242, 195, 65, 0.1) !important;
}

.muted { color: var(--muted); }
.accent-revenue {
  color: #1faa59;
  font-weight: 600;
}

.chart-value {
  margin-top: 8px;
  font-weight: 600;
}

main {
  padding: 24px;
  margin: 0 auto;
  width: min(1200px, calc(100vw - 32px));
  display: grid;
  gap: 16px;
}

.team-management {
  width: min(1360px, calc(100vw - 32px));
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.team-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-summary-card .section-heading {
  margin-bottom: 6px;
}

.team-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.summary-pill {
  background: rgba(12, 10, 6, 0.6);
  border: 1px solid rgba(214, 163, 22, 0.22);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-pill strong {
  font-size: 1.4rem;
}

.team-quick-card .team-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.team-quick-card .quick-block {
  background: rgba(12, 10, 6, 0.5);
  border: 1px solid rgba(214, 163, 22, 0.18);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.autocomplete-field {
  position: relative;
}

@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .team-column.secondary {
    order: 2;
  }
}

.card {
  background: var(--card);
  padding: 16px;
  border: none;
  border-radius: 0;
}

/* Ensure dashboard widgets use solid gray backgrounds instead of transparent/gold */
.card.widget-card,
.widget-card {
  background: #2a2a30;
  border: none;
}

.row {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.row.grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.row.grid.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.row .wide {
  grid-column: span 2;
}

label {
  color: var(--muted);
  font-size: 12px;
}
input,
select,
textarea {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  padding: 10px;
  width: 100%;
  font-size: 14px;
}

textarea.notes-textarea,
textarea.details-textarea {
  border-radius: 15px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
input[disabled],
.readonly {
  color: var(--muted);
  opacity: 0.8;
  cursor: not-allowed;
}

.dashboard-page select {
  color: #111111;
  background-color: #f8fafc;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 10px 14px;
}

.dashboard-page select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(214, 163, 22, 0.32);
  border-color: rgba(214, 163, 22, 0.65);
}

.dashboard-page select option {
  color: #111111;
  background-color: #f8fafc;
}

.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--input);
}
.input-prefix .prefix {
  color: var(--muted);
  padding: 0 10px;
}
.input-prefix input {
  border: none;
  background: transparent;
  padding: 10px 10px 10px 0;
  border-radius: 100px;
}
.input-prefix input:focus {
  outline: none;
}

.form-hint {
  margin: -4px 0 12px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
button:hover { filter: brightness(1.05); }
.danger,
button.danger,
.submission-delete {
  background: #b91c1c;
}
.danger:hover,
button.danger:hover,
.submission-delete:hover {
  filter: brightness(0.9);
}
.theme-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-btn:hover { filter: brightness(1.15); }
.theme-btn img,
.theme-btn svg { width: 20px; height: 20px; display: block; }

.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card .grid-3 > div {
  min-height: 280px;
}
.leaderboard-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 24px;
}
.leaderboard-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.leaderboard-row h3 {
  margin: 0;
  font-size: 1.2rem;
}
.leaderboard-row table {
  width: 100%;
}

.card canvas {
  width: 100%;
  height: 260px !important;
  display: block;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.link-btn:hover { filter: brightness(1.15); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 22, 0.8);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 999;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  opacity: 1;
  visibility: visible;
}
.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.quick-submit-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: rgba(5, 8, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1200;
}

.quick-submit-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.quick-submit-veil {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.78);
}

.quick-window {
  width: min(720px, 100%);
  max-height: min(90vh, 1100px);
  overflow: auto;
  position: relative;
  z-index: 1;
}

.modal-shell-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.close-quick-btn {
  background: rgba(12, 10, 6, 0.6);
  border: 1px solid rgba(214, 163, 22, 0.45);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.close-quick-btn:hover,
.close-quick-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 163, 22, 0.8);
  background: rgba(214, 163, 22, 0.22);
}
.modal-content {
  width: min(900px, 100%);
  margin-top: 40px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal-table-wrapper {
  max-height: 65vh;
  overflow: auto;
  margin-top: 12px;
}

body.modal-open {
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}
.table th.num {
  text-align: right;
}
.table td.num { text-align: right; }
.table td.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table td.actions .uni2-button {
  margin: 0;
}

#recent-section {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}

#recent {
  width: 100%;
  flex: 1;
}

.table-empty {
  margin-top: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  background: rgba(12, 10, 6, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.table-empty-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: #e2e8f0;
}

.table-empty-copy {
  margin: 0 0 12px;
  color: #cbd5e1;
}

.table-empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-picker-row {
  position: relative;
}

#user-select {
  background: var(--input);
  border: 1px solid var(--border);
  color: #e2e8f0;
  width: 100%;
  height: 44px;
  border-radius: 100px;
  padding: 10px 12px;
  appearance: none;
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-cell .user-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.has-notify {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dot {
  display: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dc2626;
  position: absolute;
  top: -4px;
  right: -6px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}

.member-indent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.member-indent::before {
  display: none;
}

.member-indent[data-prefix]::before {
  display: block;
  content: attr(data-prefix);
  position: absolute;
  left: -18px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.profile-simple {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.profile-info {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-simple h2 {
  margin: 0;
  font-size: 26px;
}
.profile-bio {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.profile-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.profile-photo img {
  width: 120px !important;
  height: 120px !important;
  max-width: 120px;
  max-height: 120px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--input);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.profile-photo img:hover,
.profile-photo img:focus-visible {
  transform: scale(1.03);
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.profile-photo small {
  text-align: center;
}
.profile-progress-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.profile-progress-card .chart-wrapper {
  position: relative;
  height: 280px;
}
.profile-progress-card canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.bio-actions {
  display: flex;
  justify-content: flex-start;
}
.bio-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bio-form textarea {
  resize: vertical;
  min-height: 120px;
  border-radius: 15px;
}
.bio-meta {
  display: flex;
  justify-content: flex-end;
}
.bio-buttons {
  display: flex;
  gap: 8px;
}

.status { margin-left: 10px; color: var(--muted); }
footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.section-heading h2 {
  margin: 0;
}
.section-heading small {
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.grid .full {
  grid-column: 1 / -1;
}
.align-end {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.metric {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.metric h4 {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.metric p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.metric small {
  color: var(--muted);
}

.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.milestone {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease;
}
.milestone.achieved {
  border-color: var(--success);
  background: rgba(0, 184, 148, 0.12);
}
.milestone-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.milestone-meta span {
  color: var(--muted);
  font-size: 12px;
}
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--input);
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 10px 0;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.3s ease;
}
.milestone.achieved .progress-fill {
  background: var(--success);
}
.milestone-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.chargeback-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.chargeback-group h3 {
  margin: 0 0 8px;
}
.chargeback-group ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.chargeback-group li {
  margin-bottom: 4px;
}

button.client-delete,
button.lead-delete {
  background: #b91c1c;
}

.client-form,
.lead-form {
  margin-bottom: 16px;
}

#lead-summary {
  color: var(--muted);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 1;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  cursor: pointer;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .hero-row {
    flex-direction: column;
  }
  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .stat-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-side-stack {
    order: -1;
    position: static;
    top: auto;
    grid-column: auto;
    grid-row: auto;
  }
  .dashboard-hero-card {
    grid-column: auto;
    grid-row: auto;
  }
}
.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.user-actions .action-btn {
  background: #30363f;
  border: 1px solid #3d444d;
  color: #d3dae3;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.user-actions .action-btn:hover:not(:disabled) {
  background: #3d444d;
  border-color: #4f5661;
}
.user-actions .action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.user-actions .action-btn.promote-btn {
  background: #f4c430;
  border-color: #f1b800;
  color: #1a1d23;
}
.user-actions .action-btn.promote-btn:hover:not(:disabled) {
  background: #ffd451;
  border-color: #f4c430;
  color: #13161b;
}
.user-actions .action-btn.demote-btn {
  background: #b92d2d;
  border-color: #a02525;
  color: #f7dede;
}
.user-actions .action-btn.demote-btn:hover:not(:disabled) {
  background: #d23a3a;
  border-color: #b92d2d;
  color: #fff5f5;
}
.billing-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: #2d333b;
  color: #c5d1e0;
}
.billing-pill--active,
.billing-pill--trialing {
  background: #1f4730;
  color: #6ff3bf;
}
.billing-pill--inactive,
.billing-pill--past_due,
.billing-pill--incomplete {
  background: #4a1f26;
  color: #ffb0b0;
}
.billing-pill--paused {
  background: #4a3a1f;
  color: #f6d58f;
}
.billing-pill + .muted {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  color: #8791a1;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(214, 163, 22, 0.16);
  color: #f7e5a3;
  border: 1px solid rgba(214, 163, 22, 0.35);
  margin-top: 6px;
  margin-right: 6px;
}
.badge-danger {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.5);
}
.subscription-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.subscription-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.subscription-card-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.subscription-card-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.subscription-card-heading {
  align-items: flex-start;
}
.subscription-card-leader {
  display: flex;
  align-items: center;
  gap: 12px;
}
.subscription-card-leader-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  justify-content: center;
}
.subscription-card-leader img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(12, 10, 6, 0.4);
}
.subscription-leader-email {
  font-size: 0.85rem;
  line-height: 1.2;
  word-break: break-word;
}
.subscription-card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}
.subscription-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.subscription-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.subscription-metric {
  flex: 1 1 160px;
  min-width: 160px;
  background: rgba(12, 10, 6, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.subscription-metric .metric-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.8);
}
.subscription-metric .metric-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f1f5f9;
}
.subscription-summary {
  margin: 0;
  color: #94a3b8;
}
.subscription-leader-name {
  margin: 0;
  font-size: 1.1rem;
  color: #f8fafc;
}
.subscription-agent-list {
  margin-top: 16px;
  background: rgba(12, 10, 6, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 12px 16px;
}
.subscription-agent-list summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
}
.subscription-agent-list[hidden] {
  display: none;
}
.subscription-agent-list ul {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #e2e8f0;
}
.subscription-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.subscription-card-actions .user-actions {
  justify-content: flex-start;
}
.subscription-card-actions .billing-blocked-note {
  color: #94a3b8;
  font-size: 0.75rem;
}
.empty-state {
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .subscription-card {
    width: 100%;
  }
}
.activity-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

#dashboard-fade-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease;
  pointer-events: none;
  z-index: 2400;
}

#dashboard-fade-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

#dashboard-fade-overlay.is-active.is-fading {
  opacity: 0;
}
.day-event-delete {
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
