:root {
  color-scheme: dark;
  --ink: #eef2ff;
  --muted: rgba(255, 255, 255, 0.6);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --accent: #5b8cff;
  --accent-dark: #4a6bff;
  --accent-soft: #8b5cf6;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(4, 8, 22, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #0b1020;
  min-height: 100vh;
  font-size: 14px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.login-shell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  border-radius: 28px;
  overflow: hidden;
  background: #1c2c3a;
  box-shadow: 0 30px 80px rgba(13, 24, 36, 0.35);
  max-width: 980px;
  width: 100%;
}

.login-visual {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 55%),
  linear-gradient(135deg, #f7d6c2 0%, #f6b5ad 40%, #b6c5da 100%);
  color: #1b1f28;
  padding: 44px;
  position: relative;
  min-height: 420px;
}

.login-visual::after,
.login-visual::before {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.7;
}

.login-visual::before {
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.45);
  top: -60px;
  right: -40px;
}

.login-visual::after {
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.25);
  bottom: -40px;
  left: -20px;
}

.login-visual-inner {
  position: relative;
  z-index: 1;
}

.login-visual h1 {
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  margin-bottom: 12px;
}

.login-visual p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 320px;
  color: rgba(27, 31, 40, 0.8);
}

.login-visual-image {
  width: 100%;
  max-width: 360px;
  margin-top: 28px;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(16, 20, 30, 0.25);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.login-visual-footer {
  margin-top: 28px;
  font-size: 0.85rem;
  color: rgba(27, 31, 40, 0.7);
}

.login-form {
  padding: 44px;
  background: #1c2c3a;
  color: #f3f4f8;
}

.login-form h2 {
  color: #fff;
}

.login-form .admin-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.login-form .panel-sub,
.login-form .field,
.login-form .field span,
.login-form .admin-note {
  color: rgba(243, 244, 248, 0.7);
}

.login-form .field span {
  color: #f3f4f8;
}

.login-form input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f9fafc;
}

.login-form input:focus {
  border-color: #5ac2b6;
  box-shadow: 0 0 0 3px rgba(90, 194, 182, 0.25);
}

.login-form .primary {
  background: #38b7a9;
  box-shadow: 0 12px 20px rgba(56, 183, 169, 0.3);
}

.login-form .primary:hover {
  background: #1fa496;
}

.login-form .ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #f3f4f8;
}

.login-form .oauth-button {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  color: #1b1f28;
}

.login-form .ghost:hover {
  border-color: #5ac2b6;
  color: #e8fffb;
}

.login-form .admin-error {
  color: #ffb4a6;
}

.login-form .oauth-button:hover {
  border-color: #4285f4;
  color: #1a3d7c;
  background: #fff;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

h1,
h2 {
  font-family: "Cormorant Garamond", "Baskerville", "Palatino Linotype", serif;
  margin: 0 0 12px;
  font-weight: 600;
  color: #4a3f3b;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.85rem, 2.6vw, 2.4rem);
}

p {
  margin: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.75fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 42px;
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.45fr);
}

.dashboard-tools {
  display: grid;
  align-content: start;
  gap: 12px;
  justify-items: start;
}

.login-page .hero {
  grid-template-columns: 1fr;
}

.hero-text {
  padding: 24px 8px 0 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 18px;
}

.lede {
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
}

.hero-card {
  background: linear-gradient(140deg, rgba(60, 92, 180, 0.85) 0%, rgba(19, 26, 54, 0.95) 100%);
  border-radius: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -30% 40% auto -20%;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0.8;
}

.hero-card-inner {
  position: relative;
  z-index: 1;
}

.hero-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.hero-value {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  font-family: "Cormorant Garamond", "Baskerville", serif;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

.hero-meta {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.hero-meta div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
}

.meta-label {
  color: rgba(255, 255, 255, 0.65);
}

.meta-value {
  font-weight: 600;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 28px;
  margin-bottom: 28px;
}

.panel {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 45%),
  var(--surface);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 16px 40px rgba(7, 9, 25, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-head {
  margin-bottom: 20px;
}

.panel-sub {
  color: var(--muted);
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.5;
}

.action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.action-bar button {
  border-radius: 14px;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.dashboard-body {
  min-height: 100vh;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 100vh;
  gap: 0;
}

.dash-sidebar {
  background: rgba(12, 16, 34, 0.9);
  padding: 24px 12px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.dash-logo img {
  width: 24px;
  height: 24px;
}

.dash-nav {
  display: grid;
  gap: 14px;
}

.dash-nav-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 10px 6px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dash-nav-item:hover,
.dash-nav-item.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.dash-nav-item img {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.dash-user {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.dash-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.dash-avatar img {
  width: 22px;
  height: 22px;
}

.dash-user-name {
  font-size: 0.75rem;
  font-weight: 600;
}

.dash-user-sub {
  font-size: 0.65rem;
  color: var(--muted);
}

.dash-main {
  padding: 32px 32px 48px;
}

.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.dash-topbar h1 {
  margin: 4px 0 0;
  font-size: 1.5rem;
}

.dash-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-top-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.dash-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-search img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.dash-search input {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.85rem;
  min-width: 160px;
}

.dash-search input:focus {
  outline: none;
}

.dash-top-icons {
  display: flex;
  gap: 12px;
}

.dash-top-icons img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.dash-summary-head img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.dash-select {
  display: grid;
  gap: 6px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
}

.dash-select select {
  min-width: 140px;
}

.dash-auth {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
  gap: 22px;
  grid-template-areas:
    "highlight limits summary"
    "categories limits activity"
    "cards reimburse activity"
    "alert reimburse links";
}

.dash-highlight {
  grid-area: highlight;
}

.dash-categories {
  grid-area: categories;
}

.dash-limits {
  grid-area: limits;
}

.dash-summary {
  grid-area: summary;
}

.dash-activity {
  grid-area: activity;
}

.dash-reimburse {
  grid-area: reimburse;
}

.dash-links {
  grid-area: links;
}

.dashboard-cards {
  grid-area: cards;
}

.dashboard-alert {
  grid-area: alert;
}

.dash-panel {
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(13, 18, 40, 0.35);
  backdrop-filter: blur(16px);
}

.dash-panel {
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(13, 18, 40, 0.35);
  backdrop-filter: blur(16px);
}

.dash-panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.dash-panel-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.dash-highlight {
  display: grid;
  gap: 16px;
}

.dash-ring {
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 8px 0;
  background: rgba(12, 16, 34, 0.5);
  border: 1px solid rgba(79, 125, 255, 0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dash-ring-visual {
  position: absolute;
  inset: 0;
  opacity: 1;
}

.dash-ring-value {
  font-size: 1.4rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.dash-ring-sub {
  font-size: 0.75rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.dash-ring-change {
  font-size: 0.75rem;
  color: #72f1b2;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.dash-mini-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dash-mini-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.dash-mini-value {
  font-weight: 600;
}

.dash-mini-cards img {
  width: 18px;
  height: 18px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.dash-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dash-limit {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.dash-limit div {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
}

.dash-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dash-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4bd9ff 0%, #72f1b2 100%);
}

.dash-reimburse {
  display: grid;
  gap: 16px;
}

.dash-reimburse-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.dash-status-grid div {
  display: grid;
  gap: 6px;
}

.dash-categories .dash-activity-list div span:last-child {
  font-weight: 600;
}

.dash-limits .dash-limit + .dash-limit {
  margin-top: 8px;
}

.dash-panel-title {
  font-size: 1rem;
}

.dash-panel-sub {
  font-size: 0.8rem;
}

.dash-summary {
  display: grid;
  gap: 16px;
}

.dash-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-summary-year {
  font-size: 0.8rem;
  color: var(--muted);
}

.dash-summary-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.dash-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dash-activity {
  display: grid;
  gap: 16px;
}

.dash-activity-list {
  display: grid;
  gap: 12px;
}

.dash-activity-list div {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  align-items: center;
  gap: 10px;
}

.dash-activity-list div span:nth-child(2) {
  flex: 1;
}

.dash-meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.dash-links {
  display: grid;
  gap: 10px;
}

.dash-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.dash-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dash-activity-list img {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.dash-status-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 6px;
}

.dash-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border-radius: 18px;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.dash-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 125, 255, 0.45);
  box-shadow: 0 18px 32px rgba(15, 20, 40, 0.38);
}

.dash-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.dash-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.dash-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.dash-badge {
  align-self: start;
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 126, 102, 0.2);
  color: #ff9b84;
  border: 1px solid rgba(255, 126, 102, 0.5);
}

.page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.page-top h1,
.topbar h1 {
  color: #ffffff;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.page-top .lede,
.page-top .panel-sub,
.page-top .eyebrow {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.page-status .panel-sub {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.page-top.actions-top {
  align-items: flex-start;
}

.actions-top .page-top-main {
  max-width: 680px;
}

.actions-top .page-top-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 54px;
}

.page-actions.right {
  margin-top: 34px;
}

.actions-top .page-actions.right {
  width: 100%;
  align-items: center;
}

.actions-top .page-status {
  margin-top: 18px;
}

.page-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-top-row.align-top {
  align-items: flex-start;
}

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

.lede-row .lede {
  margin: 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.page-actions.right {
  width: 100%;
  justify-content: flex-end;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-start;
  margin-top: 4px;
}

.page-actions-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
}

.synthese-actions {
  align-items: center;
  margin: 8px 0 16px;
}

.page-actions-break {
  flex-basis: 100%;
  height: 0;
}

.page-status {
  margin: 0 0 12px;
}

.page-status.with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-access {
  position: fixed;
  top: 56px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  z-index: 1000;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.profile-access img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

.dashboard-page .dashboard-header .header-right > .profile-access {
  position: static;
  top: auto;
  right: auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin: 0;
  z-index: auto;
  display: grid;
  place-items: center;
  background: rgba(16, 20, 30, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-page .dashboard-header .header-right > .profile-access img {
  width: 20px;
  height: 20px;
  opacity: 1;
  filter: brightness(0) invert(1);
}

.dashboard-page .dashboard-header .header-right > .profile-access svg {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.dashboard-page .dashboard-header .header-right > .profile-access .profile-access-glyph {
  font-size: 18px;
  line-height: 1;
  color: #ffffff;
  display: inline-block;
  transform: translateY(1px);
}

.date-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
  color: var(--ink);
}

.print-hidden {
  display: inline-flex;
}

.admin-panel {
  margin-bottom: 28px;
}

.analytics-panel {
  margin-bottom: 24px;
}

.analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.analytics-filter {
  min-width: 180px;
}

.analytics-table {
  margin-top: 18px;
}

/* Analytics readability boost */
#analytics-panel .summary-card {
  padding: 18px;
  gap: 8px;
}

#analytics-panel .summary-card .label {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2d2623;
}

#analytics-panel .summary-card .value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  color: #181311;
}

#analytics-panel .analytics-filter span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2a2320;
}

#analytics-panel .analytics-filter select {
  font-size: 1rem;
  font-weight: 700;
  color: #1f1a18;
}

#analytics-panel .analytics-table table th {
  font-size: 1rem;
  font-weight: 800;
  color: #1e1917;
}

#analytics-panel .analytics-table table td {
  font-size: 1rem;
  font-weight: 700;
  color: #28211e;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.oauth-actions {
  margin-top: 12px;
}

.oauth-button {
  border-color: rgba(27, 31, 40, 0.25);
  background: #fff;
}

.oauth-button:hover {
  border-color: #4285f4;
  color: #1a3d7c;
}

.admin-error {
  color: #a9443a;
  font-weight: 600;
}

.admin-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-area {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}

.page-top .admin-area,
.dashboard-tools .admin-area {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.income-main {
  grid-column: 1;
  grid-row: 1;
}

.income-layout .form-actions {
  grid-column: 1;
  grid-row: 2;
}

.income-layout .income-card-wrap {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  transform: translateY(24px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.income-fields {
  grid-template-areas:
    "ir-imp transport"
    "ir-non net"
    "ir-total ij"
    "pvt invalidity"
    "siaci siaci";
}

.income-table .hdv-col {
  text-align: center;
}

.income-field.ir-imp {
  grid-area: ir-imp;
}

.income-field.ir-non {
  grid-area: ir-non;
}

.income-field.ir-total {
  grid-area: ir-total;
}

.income-field.transport {
  grid-area: transport;
}

.income-field.net {
  grid-area: net;
}

.income-field.ij {
  grid-area: ij;
}

.income-field.invalidity {
  grid-area: invalidity;
}

.income-field.pvt {
  grid-area: pvt;
}

.income-field.siaci {
  grid-area: siaci;
}

.income-card {
  background: #3b5449;
  border: 1px solid rgba(59, 84, 73, 0.9);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.income-card-icon {
  width: 180px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 0 16px;
  filter: none;
  position: static;
  transform: none;
}

.modal-card .primary,
.modal-card .ghost,
.modal-card button.primary,
.modal-card button.ghost {
  background: #3b5449;
  border-color: rgba(59, 84, 73, 0.9);
  color: #f6efe4 !important;
  box-shadow: 0 10px 18px rgba(59, 84, 73, 0.28);
}

.modal-card .primary:hover,
.modal-card .ghost:hover,
.modal-card button.primary:hover,
.modal-card button.ghost:hover {
  background: #31473f;
  border-color: rgba(59, 84, 73, 1);
  color: #f6efe4 !important;
  box-shadow: 0 12px 22px rgba(59, 84, 73, 0.32);
}

.income-card h3,
.income-card .field span,
.income-card label {
  color: #f6efe4;
}

.income-card input {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #f6efe4;
  font-size: 1rem;
  font-weight: 600;
}

.income-proof .file-preview,
.income-proofs-list {
  margin-top: 8px;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 8px !important;
}

.income-proof-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  flex: 0 0 auto;
  padding: 6px 10px;
  position: relative;
  border-radius: 12px;
  border: 1px dashed rgba(120, 108, 105, 0.25);
  background: rgba(246, 242, 242, 0.7);
  font-size: 0.85rem;
  color: var(--ink);
}

.income-proof-item span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.income-proof-actions-inline {
  display: inline-flex;
  gap: 8px;
}

.income-proof-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.income-proof-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f6efe4;
  background: #2b2f3a;
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


.modal-card .income-card h3,
.modal-card .income-card .field span,
.modal-card .income-card label {
  color: #f6efe4 !important;
}

.modal-card .income-card input {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #f6efe4 !important;
  text-align: center;
}

.modal-card input[name="hikasoCa"] {
  text-align: center !important;
}

.modal-card .income-card input::placeholder {
  color: rgba(246, 239, 228, 0.75);
}

.income-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .income-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .income-layout .form-actions,
  .income-layout .income-card,
  .income-layout .income-card-wrap {
    grid-column: 1;
  }

  .income-layout .income-card-wrap {
    grid-row: 3;
    align-self: start;
  }
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.field span {
  font-weight: 600;
  color: var(--ink);
}

.field.full {
  grid-column: 1 / -1;
}

.proof-field {
  grid-column: 2;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-field span {
  margin-bottom: 0;
}

.okvol-fieldset {
  padding: 12px;
  border: 1px solid rgba(27, 31, 40, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.okvol-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: center;
}

.okvol-options .field {
  margin: 0;
}

.okvol-options .okvol-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.okvol-days-input {
  display: none;
  width: 96px;
  min-width: 96px;
}

.okvol-days-input.is-visible {
  display: block;
}

.okvol-indemnity-label {
  color: #14532d;
  font-weight: 700;
}

.okvol-indemnity-field {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.okvol-indemnity-field input[name="okVolIndemnityDisplay"] {
  width: 120px;
  min-width: 120px;
}

.other-field {
  grid-column: 2;
}

.other-fees {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.other-fee-list {
  display: grid;
  gap: 12px;
}

.other-fee-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(27, 31, 40, 0.2);
  background: rgba(255, 255, 255, 0.55);
}

.other-fee-row .proof-field {
  grid-column: 2;
}

.other-fee-row .remove-other {
  grid-column: 2;
  justify-self: end;
}

.add-other {
  width: fit-content;
}

[data-out-detail],
[data-return-detail],
.other-fees,
.sncf-details {
  opacity: 0;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease-out, transform 0.35s ease-out, max-height 0.35s ease-out;
}

[data-out-detail].is-visible,
[data-return-detail].is-visible,
.other-fees.is-visible,
.sncf-details.is-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 320px;
  pointer-events: auto;
}

.other-fees.is-visible {
  max-height: 520px;
}

.sncf-details {
  grid-column: 1 / -1;
}

.sncf-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(27, 31, 40, 0.15);
  background: rgba(255, 255, 255, 0.65);
}

.sncf-period {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sncf-card .proof-field {
  grid-column: 2;
}

.main-grid.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.profile-card {
  height: fit-content;
}

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

.profile-header .panel-sub {
  margin: 6px 0 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #f1e7e5;
  background: #f7f2f1;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(120, 94, 90, 0.18);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.planning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.calendar-panel {
  background: #f5f7fb;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
  min-height: 680px;
}

.calendar-status {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

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

.calendar-toolbar-left,
.calendar-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-search {
  min-width: 220px;
  background: #ffffff;
  border: 1px solid rgba(29, 34, 48, 0.14);
  color: #1d2230;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 500;
}

.calendar-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.calendar-selects select {
  background: #ffffff;
  border: 1px solid rgba(29, 34, 48, 0.14);
  color: #1d2230;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 600;
}

.calendar-toolbar .primary img {
  width: 18px;
  height: 18px;
  filter: brightness(10);
}

.calendar-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d2230;
}

.calendar-panel .ghost {
  background: #ffffff;
  border-color: rgba(29, 34, 48, 0.12);
  color: #1d2230;
}

.calendar-panel .ghost:hover {
  border-color: rgba(91, 140, 255, 0.4);
  color: #1d2230;
}

.calendar-panel .primary {
  border-radius: 12px;
  gap: 8px;
}

.calendar-panel .primary {
  background: #6fb57c;
  box-shadow: 0 12px 24px rgba(79, 163, 106, 0.3);
}

.calendar-panel .primary:hover {
  background: #5aa76a;
}

/* Force readable page subtitles across non-dashboard pages */
.page-top .eyebrow {
  font-size: 1.02rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  color: #ffffff !important;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.65) !important;
  display: inline-block;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 4px 10px;
}

.page-top .lede,
.page-top .panel-sub,
.panel-head .panel-sub,
.deduction-head .panel-sub {
  font-size: 1.32rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: #ffffff !important;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.65) !important;
  display: inline-block;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 8px 12px;
}

.immos-page .page-top .eyebrow,
.deductions-page .page-top .eyebrow,
.analytics-page .page-top .eyebrow,
.backups-page .page-top .eyebrow {
  font-size: 1.04rem !important;
  font-weight: 900 !important;
  color: #fff !important;
}

.immos-page .page-top .lede,
.deductions-page .page-top .lede,
.analytics-page .page-top .lede,
.backups-page .page-top .lede,
.immos-page .page-status .panel-sub,
.deductions-page .page-status .panel-sub,
.analytics-page .page-status .panel-sub,
.backups-page .page-status .panel-sub {
  font-size: 1.34rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
}

/* Dashboard refresh (cockpit + rose gradient) */
.dashboard-page {
  min-height: 100vh;
  color: #f6f2f5;
  background: #1b0f16;
  position: relative;
}

.dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/backgrounds/app-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.05) brightness(0.9);
  z-index: -3;
}

.dashboard-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(14, 9, 13, 0.55);
  backdrop-filter: blur(2px);
  z-index: -2;
}

.dashboard-frame {
  width: min(1500px, 100%);
  margin: 0 auto;
  grid-template-columns: 260px 1fr;
  background: transparent;
}

.dashboard-content {
  padding: 28px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(16, 20, 30, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  min-width: 300px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.search-field input {
  background: transparent;
  border: none;
  color: inherit;
  outline: none;
  font-size: 15px;
  font-weight: 600;
  caret-color: #ffffff;
  width: 100%;
}

.search-field input::placeholder {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.search-field svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff6b6b;
  font-size: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
}

.notif-wrap {
  position: relative;
}

.notif-wrap .icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.notif-wrap .icon-button.is-open {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.56);
}

.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 260px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(16, 18, 28, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 8px;
  z-index: 40;
}

.notif-item {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
}

.notif-item:hover,
.notif-item:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 6px;
}

.notif-item-dot.is-danger {
  background: #ef4444;
}

.notif-item-dot.is-warn {
  background: #f59e0b;
}

.notif-item-dot.is-info {
  background: #60a5fa;
}

.notif-item-main {
  min-width: 0;
}

.notif-item-title {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  color: #ffffff;
}

.notif-item-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.78);
}

.notif-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
}

.header-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  object-fit: cover;
}

.glass-card {
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(18, 8, 18, 0.35);
  backdrop-filter: blur(6px);
  color: #2a1c24;
}

.dashboard-page .glass-card {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.82);
}

.glass-card h2,
.glass-card p,
.glass-card span,
.glass-card strong {
  color: inherit;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  min-height: 110px;
}

.kpi-card p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
}

.kpi-value {
  font-size: 28px;
  font-weight: 600;
  margin-top: 6px;
}

.kpi-sub {
  font-size: 12px;
  opacity: 0.75;
}

#next-deadline-label {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  opacity: 1;
  color: #2a1c24 !important;
  text-shadow: none;
}

#next-deadline-date {
  line-height: 1.12;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.kpi-icon-green {
  background: linear-gradient(145deg, #89d1a1, #4aa475);
}

.kpi-icon-red {
  background: linear-gradient(145deg, #ff9a9e, #f2696e);
}

.kpi-icon-purple {
  background: linear-gradient(145deg, #b39bff, #7e6bff);
}

.kpi-icon-rose {
  background: linear-gradient(145deg, #f2a0b9, #cf5a7d);
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
}

.kpi-delta {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 600;
}

.kpi-delta.positive {
  color: #2f6a4f;
  text-shadow: none;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}

.bottom-row {
  align-items: stretch;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
}

.bottom-row .glass-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.bottom-row .donut-shell {
  flex: 1;
  align-items: center;
}

.bottom-row .activity-list {
  margin-top: 8px;
}

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

.card-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

.card-sub {
  font-size: 13px;
  opacity: 0.9;
}

.segmented {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  gap: 6px;
}

.segmented button {
  background: transparent;
  border: none;
  color: #2a1c24;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.segmented .is-active {
  background: rgba(255, 255, 255, 0.75);
}

.chart-shell {
  display: grid;
  gap: 10px;
}

.chart-svg {
  width: 100%;
  height: auto;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.7;
  text-align: center;
}

.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  opacity: 0.8;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
}

.legend-dot.bar {
  background: #d86a8d;
}

.legend-dot.line {
  background: #7ec98f;
}

.legend-dot.orange {
  background: #f2b36c;
}

.legend-dot.purple {
  background: #a78bfa;
}

.legend-dot.green {
  background: #7bcf8a;
}

.deadline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.deadline-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
  font-size: 14px;
  display: flex !important;
}

.deadline-check strong {
  font-weight: 600;
}

.deadline-check span {
  white-space: nowrap;
}

.deadline-check.is-hidden {
  display: none;
}

.income-transport-check {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
}

.income-transport-check strong {
  font-weight: 600;
}

.income-transport-expected {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.income-transport-expected-main {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.income-transport-expected-calc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.25;
}

.income-transport-badge.is-bad {
  color: #ffffff !important;
}

.income-okvol-badge.is-bad {
  color: #ffffff !important;
}

.income-okvol-badge.is-ok {
  background: #14532d;
  border-color: #14532d;
  color: #ffffff;
}

.income-okvol-validate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.income-okvol-validate input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.deadline-check-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.deadline-check-list + .deadline-list {
  margin-top: 16px;
}

.deadline-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 15, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-panel {
  width: min(820px, 92vw);
  max-height: 70vh;
  margin: 90px auto 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 60px rgba(14, 10, 14, 0.35);
  padding: 18px 20px;
  overflow: hidden;
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search-close {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.search-results {
  display: grid;
  gap: 16px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 6px;
}

.search-group-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 6px;
}

.search-result {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  color: #2a1c24;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.9);
}

.search-type {
  font-weight: 600;
  color: #8c3b59;
}

.search-label {
  font-weight: 600;
}

.search-meta {
  font-size: 12px;
  opacity: 0.7;
}

.search-empty {
  font-size: 14px;
  font-weight: 700;
  color: #2a1e28;
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(80, 56, 72, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
}

.deadline-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  width: 100%;
}

.deadline-empty {
  font-size: 13px;
  opacity: 0.7;
}

.deadline-list strong {
  margin-left: auto;
  font-weight: 600;
  min-width: 72px;
  text-align: right;
}

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

.dot-red {
  background: #ff6b6b;
}

.dot-orange {
  background: #f2b36c;
}

.dot-green {
  background: #7bcf8a;
}

.activity-list {
  display: grid;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
}

.activity-item > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.activity-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.activity-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
  display: block;
  margin: 0 auto;
}

.activity-icon.warning {
  background: rgba(255, 255, 255, 0.15);
  color: #ff7d7d;
}

.activity-item strong {
  display: block;
  font-size: 16px;
  color: #2a1c24;
  line-height: 1.2;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.activity-item span {
  font-size: 14px;
  opacity: 1;
  display: block;
  line-height: 1.2;
  white-space: nowrap;
  margin-top: 2px;
  overflow: visible;
}

.activity-amount {
  margin-left: auto;
  font-weight: 600;
}

.activity-meta {
  margin-left: auto;
  font-size: 13px;
  opacity: 0.9;
  display: none;
}

.activity-foot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 12px;
}

.ghost-button {
  border: 1px solid rgba(120, 90, 105, 0.35);
  background: rgba(255, 255, 255, 0.35);
  color: #3b2a32;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.donut-shell {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 20px;
  align-items: center;
}

.donut-chart {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(
          #f07aa0 0 42%,
          #f2b36c 42% 62%,
          #a78bfa 62% 79%,
          #7bcf8a 79% 100%
  );
  position: relative;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: rgba(17, 10, 15, 0.55);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  text-align: center;
}

.donut-center strong {
  font-size: 20px;
  display: block;
  color: #fff;
}

.donut-center span {
  font-size: 12px;
  opacity: 0.8;
  color: #fff;
}

.donut-chart .donut-segment-label {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 12px;
  font-weight: 900;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  white-space: nowrap;
}

.donut-chart[data-revenue-donut] .donut-center span {
  display: none;
}

.donut-chart[data-revenue-donut] .donut-center {
  transform: none;
}

.donut-legend {
  display: grid;
  gap: 10px;
  font-size: 15px;
  min-width: 0;
}

.donut-legend > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #2a1c24;
  min-width: 0;
}

.donut-legend > div[hidden] {
  display: none !important;
}

.donut-legend span {
  font-size: 15px;
  font-weight: 800;
  margin-left: 0;
  color: #2a1c24;
  white-space: nowrap;
}

.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;
}

.sidebar-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 8, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 30;
}

.sidebar-trigger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-trigger span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

@media (max-width: 1200px) {
  .dashboard-frame {
    grid-template-columns: 220px 1fr;
  }

  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }

  .bottom-row .glass-card {
    min-height: auto;
  }

  .donut-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-content {
    padding: 24px;
  }

  .dashboard-frame {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 40;
    width: 260px;
  }

  .sidebar-trigger {
    display: flex;
  }

  .sidebar-toggle:checked ~ .dashboard-frame .dashboard-sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle:checked ~ .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .header-right {
    flex: 1;
    justify-content: flex-end;
  }

  .search-field {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 640px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .search-field {
    display: none;
  }

  .dashboard-content {
    padding: 20px 16px 32px;
  }
}

.dashboard-page :focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
  color: #9d8e8a;
  border-radius: 12px;
  text-align: center;
  line-height: 0;
}

.icon-button img {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icon-button svg path,
.icon-button svg circle,
.icon-button svg rect,
.icon-button svg line,
.icon-button svg polyline,
.icon-button svg polygon {
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}

.icon-button.is-view {
  color: #5b8cff;
  background: rgba(91, 140, 255, 0.12);
}

.icon-button.is-edit {
  color: #3b8f7a;
  background: rgba(59, 143, 122, 0.12);
}

.icon-button.is-print {
  color: #c77b3e;
  background: rgba(199, 123, 62, 0.12);
}

.icon-button.is-delete {
  color: #d05555;
  background: rgba(208, 85, 85, 0.12);
}

.icon-button.is-download {
  color: #4a6bff;
  background: rgba(74, 107, 255, 0.12);
}

.icon-button.is-restore {
  color: #4b9a6a;
  background: rgba(75, 154, 106, 0.12);
}

.icon-rotate {
  transform: rotate(180deg);
}

.view-select {
  gap: 8px;
}

.view-select img {
  width: 16px;
  height: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.calendar-day {
  min-height: 110px;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 10px;
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  color: #1d2230;
  background: #ffffff;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day.calendar-head {
  min-height: auto;
  background: #f0f3f9;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  color: #6c7280;
}

.calendar-day.is-muted {
  color: #9aa0ad;
  background: #fbfbfd;
}

.calendar-day.is-striped {
  background-image: repeating-linear-gradient(
          135deg,
          rgba(99, 102, 241, 0.08),
          rgba(99, 102, 241, 0.08) 6px,
          transparent 6px,
          transparent 12px
  );
}

.day-number {
  font-weight: 600;
  font-size: 0.85rem;
}

.calendar-event {
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eef1f8;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.event-details {
  display: grid;
  gap: 10px;
  margin: 12px 0 8px;
}

.event-details .label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.event-modal {
  background: #ffffff;
  border-radius: 18px;
  color: var(--ink);
}

.event-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.event-row .value {
  color: var(--ink);
  font-size: 0.95rem;
}

.event-description {
  white-space: pre-line;
  background: #f6f2f2;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(200, 190, 190, 0.6);
}

.event-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.event-link:hover {
  color: var(--accent);
}

.calendar-event::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b8cff;
}

.calendar-event.event-green {
  background: rgba(34, 197, 94, 0.15);
  color: #1e3a2b;
}

.calendar-event.event-green::before {
  background: #22c55e;
}

.calendar-event.event-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #1e3a5f;
}

.calendar-event.event-blue::before {
  background: #3b82f6;
}

.calendar-event.event-purple {
  background: rgba(99, 102, 241, 0.15);
  color: #312e81;
}

.calendar-event.event-purple::before {
  background: #6366f1;
}

.calendar-event.event-violet {
  background: rgba(168, 85, 247, 0.16);
  color: #3b1e5a;
}

.calendar-event.event-violet::before {
  background: #a855f7;
}

.calendar-empty {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  color: #556070;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  font-size: 0.9rem;
}

.profile-card-full {
  grid-column: 1 / -1;
}

.backup-summary {
  margin-bottom: 20px;
}

.backup-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.backup-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.section-head h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.backup-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.toggle-field input {
  width: 18px;
  height: 18px;
}

.status-chip {
  background: #f2eceb;
  color: #7d6c69;
  border: 1px solid rgba(180, 165, 160, 0.6);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-chip.is-error {
  background: #f6e5e2;
  color: #9b544c;
  border-color: rgba(170, 92, 82, 0.35);
}

.backup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.backup-item {
  display: grid;
  gap: 4px;
}

.backup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.actions-col,
.actions-cell {
  text-align: center;
  width: 140px;
}

@media (max-width: 980px) {
  .main-grid.profile-grid {
    grid-template-columns: 1fr;
  }

  .backup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .sidebar {
    position: static;
    height: auto;
  }
}

.range-field {
  grid-column: 1 / -1;
  position: relative;
}

.range-display {
  cursor: pointer;
}

.range-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 100%);
  background: #fff7e6;
  border: 1px solid rgba(27, 31, 40, 0.2);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 6;
}

.range-popover.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

input {
  border: 1px solid rgba(27, 31, 40, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: var(--surface-strong);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="date"] {
  cursor: pointer;
}

select {
  border: 1px solid rgba(27, 31, 40, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: var(--surface-strong);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.month-picker {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
  align-items: center;
  background: #fff7e6;
  border: 1px solid rgba(29, 34, 48, 0.18);
  border-radius: 14px;
  padding: 2px;
  color: #1d2230;
}

.month-picker select {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1d2230;
}

.month-picker select + select {
  border-left: 1px solid rgba(29, 34, 48, 0.12);
}

.month-picker select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(91, 140, 255, 0.6);
}

.panel-head.inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.panel-head.inline .panel-title {
  display: grid;
  gap: 6px;
}

.panel-head.inline .panel-title.income-title {
  grid-template-columns: auto minmax(180px, 220px);
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
}

.income-title-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.income-title-main h2 {
  white-space: nowrap;
}

.hdv-field {
  margin: 0;
  align-self: center;
  margin-top: 14px;
  justify-items: center;
  text-align: center;
  margin-left: 90px;
}

.hdv-field input {
  min-width: 180px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  font-weight: 700;
}

.hdv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(59, 84, 73, 0.15);
  color: #3b5449;
  border: 1px solid rgba(59, 84, 73, 0.35);
  margin: 0 auto;
}

.panel-head.inline .panel-title h2 {
  margin: 0;
}

.panel-head.inline .panel-sub {
  margin: 0;
}

.af-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff7e6;
  border: 1px solid rgba(29, 34, 48, 0.18);
  margin-top: 0;
}

.panel-head.inline .panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0;
}

.month-stack {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.ij-field {
  text-align: center;
  justify-items: center;
}

.ij-field span {
  font-weight: 700;
  color: #1f3b2a;
  text-align: center;
}

.ij-field input {
  text-align: center;
  font-weight: 700;
  color: #f5efe3 !important;
  background: #1f3b2a !important;
  border-color: rgba(31, 59, 42, 0.6);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(31, 59, 42, 0.25);
}

.deduction-head .panel-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.deduction-head h2 {
  margin: 0;
  line-height: 1;
}

.deduction-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  align-items: start;
  gap: 16px;
}

.deduction-head .panel-sub {
  margin-top: 8px;
}

.deduction-head .date-field {
  justify-self: end;
  justify-items: center;
  text-align: center;
}

.deduction-head .date-field span {
  text-align: center;
}

.deduction-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deduction-grid .file-field {
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  .deduction-grid .file-field {
    flex-wrap: wrap;
  }
}

.modal-card .income-card {
  background: #3b5449;
  border-color: rgba(59, 84, 73, 0.9);
}

.modal-card .income-card h3 {
  color: #1d2230;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

fieldset:disabled {
  opacity: 0.6;
}

.file-field {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-field input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px dashed rgba(27, 31, 40, 0.3);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.file-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.file-name {
  color: var(--muted);
  font-size: 0.85rem;
}

.income-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.file-preview {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  padding: 12px;
  background: rgba(10, 12, 28, 0.55);
}

.file-preview:empty {
  display: none;
}

.file-preview.dropzone {
  display: block;
  min-height: 56px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.file-preview.dropzone.is-dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
  background: rgba(91, 140, 255, 0.06);
  transform: translateY(-1px);
}

.file-preview.dropzone.is-dragover::before {
  content: "Deposez votre fichier ici";
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.file-preview img,
.file-preview iframe {
  width: 100%;
  border-radius: 12px;
  border: none;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 106, 74, 0.2);
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 106, 74, 0.2);
}

.form-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(79, 125, 255, 0.28);
}

.primary:hover {
  background: var(--accent-dark);
}

.ghost {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(180, 165, 160, 0.7);
  color: #4a3f3b;
}

.ghost:hover {
  border-color: var(--accent);
  color: #3f3531;
}

.ghost.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.summary-card .label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  color: #4a3f3b;
}

.summary-card .value {
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-card.emphasis {
  background: linear-gradient(135deg, rgba(79, 125, 255, 0.25) 0%, rgba(75, 217, 255, 0.2) 100%);
  border: 1px solid rgba(79, 125, 255, 0.35);
}

.bilan-section {
  display: grid;
  gap: 24px;
}

#bilan-annual-container,
#bilan-monthly-container {
  display: grid;
  gap: 26px;
}

#bilan-annual-container details {
  border-radius: 16px;
  border: 1px solid rgba(29, 34, 48, 0.12);
  background: rgba(248, 245, 240, 0.7);
  padding: 12px 16px;
}

#bilan-annual-container .bilan-year {
  border-left: 6px solid var(--year-color);
  background: color-mix(in srgb, var(--year-color) 12%, rgba(248, 245, 240, 0.7));
}

#bilan-annual-container details + details {
  margin-top: 16px;
}

.bilan-year-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 700;
  color: #3a2f2a;
  padding: 6px 4px 8px;
  list-style: none;
}

.bilan-year-toggle::-webkit-details-marker {
  display: none;
}

.bilan-month-block {
  padding: 0;
  overflow: hidden;
}

.bilan-month-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--month-color) 75%, #fff) 0%, #f6edf0 100%);
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
}

.bilan-month-toggle h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #3a2f2a;
}

.bilan-month-toggle::-webkit-details-marker {
  display: none;
}

.bilan-month-block > .sheet-columns,
.bilan-month-block > .sheet-section {
  padding: 0 24px 20px;
}

.bilan-month-year {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.bilan-month-year-grid {
  display: grid;
  gap: 16px;
}

.print-only .bilan-year-toggle {
  display: none;
}

.print-sheet {
  background: #fbf7f1;
  border: 1px solid rgba(29, 34, 48, 0.12);
  border-radius: 18px;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.sheet-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sheet-header h3 {
  font-size: 1.4rem;
  margin: 0;
  color: #2b2f3a;
}

.sheet-note {
  font-size: 0.85rem;
  color: #6f5f5a;
}

.annual-pdf {
  border: 1px dashed rgba(29, 34, 48, 0.2);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

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

.annual-pdf-embed {
  width: 100%;
  min-height: 280px;
  border: none;
  border-radius: 10px;
}

.sheet-section h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #2b2f3a;
}

.sheet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(29, 34, 48, 0.08);
}

.sheet-line:last-child {
  border-bottom: none;
}

.line-label {
  color: #4a3f3b;
  font-weight: 600;
}

.line-value {
  color: #2b2f3a;
  font-weight: 700;
}

.bilan-input {
  min-width: 140px;
  text-align: right;
}

.bilan-night-list div {
  padding: 4px 0;
}

.bilan-proof-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(29, 34, 48, 0.08);
}

.bilan-proof-item:last-child {
  border-bottom: none;
}

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

.bilan-proof-card {
  border: 1px solid rgba(29, 34, 48, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.bilan-proof-card .proof-popup {
  width: 100%;
  text-align: center;
}

.bilan-proof-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #3a2f2a;
}

.bilan-proof-preview img,
.bilan-proof-preview iframe {
  width: 100%;
  border: none;
  border-radius: 8px;
}

.bilan-proof-preview iframe {
  min-height: 220px;
}

.bilan-report-page {
  page-break-after: always;
}

.bilan-report-page:last-child {
  page-break-after: auto;
}

.bilan-report .print-sheet {
  margin: 0;
  page-break-inside: avoid;
}

.bilan-report-cover {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(29, 34, 48, 0.12);
  border-radius: 18px;
  background: #fbf7f1;
}

.bilan-report-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #7b6a63;
}

.bilan-report-lede {
  color: #5a4c46;
  max-width: 520px;
}

.bilan-report-meta {
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

.bilan-report-label {
  font-weight: 600;
  color: #3a2f2a;
}

.bilan-report-value {
  color: #6a5b55;
}

.bilan-proof-page .bilan-proof-preview-full {
  border: 1px solid rgba(29, 34, 48, 0.12);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.bilan-proof-preview-full img,
.bilan-proof-preview-full iframe {
  width: 100%;
  border: none;
  border-radius: 10px;
}

.bilan-proof-preview-full iframe {
  min-height: 760px;
}

.sheet-grid {
  display: grid;
  gap: 8px;
}

.sheet-total {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 125, 255, 0.18) 0%, rgba(75, 217, 255, 0.12) 100%);
  border: 1px solid rgba(79, 125, 255, 0.3);
  color: #23324a;
  font-weight: 700;
}

.sheet-placeholder {
  border: 1px dashed rgba(29, 34, 48, 0.2);
  border-radius: 12px;
  padding: 12px;
  color: #6f5f5a;
  background: rgba(255, 255, 255, 0.7);
}

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

.sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: #2b2f3a;
}

.sheet-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(29, 34, 48, 0.06);
}

.sheet-list li:last-child {
  border-bottom: none;
}

.sheet-meta {
  font-weight: 700;
  color: #2b2f3a;
}

.bilan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.bilan-table th,
.bilan-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(29, 34, 48, 0.08);
}

.bilan-table th {
  background: #f3ede5;
  color: #4a3f3b;
}

.bilan-date-col {
  min-width: 180px;
  white-space: nowrap;
}

.bilan-total td {
  font-weight: 700;
  color: #1d2230;
}

.pill.optional {
  background: rgba(125, 110, 104, 0.12);
  color: #5f4f4a;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
  text-transform: uppercase;
}

@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .page-actions,
  .page-status,
  .layout-toggle,
  .sidebar-logout {
    display: none !important;
  }
  .content,
  .page {
    padding: 0;
  }
  .panel {
    box-shadow: none;
    border: none;
    background: #fff;
    padding: 0;
  }
  .print-sheet {
    page-break-inside: avoid;
    border-color: #c9c2ba;
  }
  .annual-pdf-embed {
    min-height: 220px;
  }
}

.table-panel {
  margin-top: 8px;
}

.table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.table-group td {
  background: rgba(28, 36, 66, 0.9);
  color: #f4f6ff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.table-group-year td {
  text-transform: uppercase;
  font-size: 0.78rem;
  box-shadow: inset 4px 0 0 var(--year-color);
  background-color: color-mix(in srgb, var(--year-color) 20%, rgba(28, 36, 66, 0.9));
}

.table-group-month td {
  background: color-mix(in srgb, var(--year-color) 12%, rgba(32, 42, 78, 0.75));
  box-shadow: inset 4px 0 0 var(--year-color);
}

.group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.group-toggle-month {
  padding-left: 18px;
}

.group-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: rgba(32, 38, 72, 0.6);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  text-align: center;
}

.cell-alert {
  background: rgba(255, 92, 92, 0.18);
  color: #ffd6d6;
}

.cell-alert a {
  color: inherit;
}

tr:last-child td {
  border-bottom: none;
}

tr.empty td {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 26, 0.55);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(860px, 94vw);
  background: #f6f1e9;
  border-radius: 24px;
  padding: 26px 26px 18px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow: auto;
}

.modal-card .panel-head h2,
.modal-card .panel-head .panel-sub,
.modal-card .field span,
.modal-card label,
.modal-card .file-name,
.modal-card .panel-sub,
.modal-card input,
.modal-card select,
.modal-card button,
.modal-card .ghost {
  color: #1d2230;
}

.modal-card input,
.modal-card select {
  background: #fbf7f1;
  border-color: rgba(29, 34, 48, 0.18);
  color: #1d2230;
}

.modal-card input:focus,
.modal-card select:focus {
  border-color: rgba(91, 140, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.modal-card .ghost {
  border-color: rgba(29, 34, 48, 0.25);
}

.modal-card .ghost:hover {
  border-color: rgba(91, 140, 255, 0.5);
  color: #0b1020;
}

.modal-card .form-actions {
  margin-top: 12px;
}

input[type="month"] {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

input[type="month"]::-webkit-calendar-picker-indicator {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.dashboard-alert {
  margin-top: 20px;
}

.dashboard-alert .panel-sub {
  font-size: 1rem;
}

.monthly-filter {
  min-width: 180px;
}

.footer {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.reveal {
  animation: rise 0.8s ease both;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-head {
    flex-direction: column;
  }

  .page-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions {
    justify-content: flex-start;
    text-align: left;
  }

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

  .dash-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    justify-items: start;
  }

  .dash-main {
    padding: 24px;
  }

  .dash-topbar {
    flex-direction: column;
  }

  .dash-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "highlight"
      "limits"
      "summary"
      "activity"
      "categories"
      "reimburse"
      "cards"
      "alert"
      "links";
  }

  .dash-top-icons,
  .dash-search {
    justify-self: start;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-visual,
  .login-form {
    padding: 32px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 32px 18px 52px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .table-head {
    flex-direction: column;
  }

  .modal-card {
    padding: 20px;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .print-hidden {
    display: none !important;
  }
}

/* Pixel-perfect dashboard frame */
.frame {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 88px 1fr;
  background: #0b1020;
}

.frame-body {
  background: #0b1020;
}

.sidebar {
  background: #0e1533;
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 24px 0;
  justify-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  display: grid;
  gap: 24px;
  justify-items: center;
  position: relative;
}

.nav-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  opacity: 0.6;
  position: relative;
}

button.nav-icon {
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-icon img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  display: block;
}

.nav-icon.is-active {
  background: rgba(91, 140, 255, 0.15);
  opacity: 1;
}

.nav-icon.is-active img {
  opacity: 1;
}

.nav-icon.logout img {
  filter: brightness(1.2) invert(1);
}

.nav-icon.logout {
  opacity: 1;
}

.nav-indicator {
  position: absolute;
  right: -18px;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: #5b8cff;
  box-shadow: 0 0 10px rgba(91, 140, 255, 0.6);
}

.nav-dot {
  position: absolute;
  right: -6px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b8cff;
}

.nav-icon.spacer {
  height: 32px;
  opacity: 0;
  pointer-events: none;
}

.content {
  padding: 0 80px;
}

.topbar {
  height: 72px;
  display: grid;
  grid-template-columns: 1fr 320px 120px;
  align-items: center;
  gap: 24px;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.card-title,
.summary-head,
.card-head,
.category-list {
  position: relative;
}

.card-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.card-link:hover {
  color: #fff;
  border-color: rgba(91, 140, 255, 0.6);
  box-shadow: 0 0 12px rgba(91, 140, 255, 0.35);
}

.card-head .card-link,
.summary-head .card-link,
.card-title .card-link {
  margin-left: auto;
}

.card-head,
.summary-head,
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-details {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  align-content: center;
}

.summary-detail {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.summary-detail img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.summary-detail img.icon-ca {
  width: 22px;
  height: 22px;
}

.summary-details strong {
  color: #fff;
  font-weight: 600;
}

.category-list .card-link {
  position: absolute;
  top: 12px;
  right: 16px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 8px 12px;
}

.topbar-search img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.topbar-search input {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 14px;
  width: 100%;
}

.topbar-search input:focus {
  outline: none;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

.topbar-actions img {
  width: 20px;
  height: 20px;
}

.main-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.main-left {
  grid-column: 1 / span 6;
  display: grid;
  gap: 24px;
}

.main-center {
  grid-column: 7 / span 3;
  display: grid;
  gap: 24px;
}

.main-right {
  grid-column: 10 / span 3;
  display: grid;
  gap: 16px;
}

.dashboard-card {
  cursor: grab;
  user-select: none;
}

.dashboard-card.is-dragging {
  opacity: 0.6;
  transform: scale(0.99);
}

.drag-indicator {
  height: 64px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  font-weight: 700;
  pointer-events: none;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  font-size: 1rem;
  resize: both;
  overflow: auto;
}

.main-card {
  width: 420px;
  height: 300px;
  display: grid;
  gap: 16px;
}


.card-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.progress-circle {
  display: grid;
  place-items: center;
  position: relative;
}

.progress-circle img {
  width: 180px;
  height: 180px;
}

.progress-text {
  position: absolute;
  text-align: center;
}

.progress-value {
  font-size: 24px;
  font-weight: 600;
}

.progress-sub {
  color: #22c55e;
  font-size: 14px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 200px);
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.stat-card img {
  width: 20px;
  height: 20px;
}

.stat-card span {
  font-size: 12px;
  color: var(--muted);
}

.stat-card strong {
  font-size: 14px;
  font-weight: 600;
}

.bottom-row {
  display: flex;
  gap: 24px;
}

.category-list {
  width: 260px;
  display: grid;
  gap: 12px;
}

.category-item {
  display: grid;
  grid-template-columns: 20px 1fr auto auto;
  gap: 10px;
  align-items: center;
  height: 48px;
  font-size: 14px;
}

.category-item img {
  width: 20px;
  height: 20px;
}

.category-item strong {
  font-size: 14px;
  font-weight: 600;
}

.mini-analytics {
  display: grid;
  gap: 16px;
}

.mini-card {
  width: 180px;
  height: 96px;
  display: grid;
  place-items: center;
  gap: 8px;
}

.mini-card img {
  width: 20px;
  height: 20px;
}

.limits-card h2,
.reimburse-card h2,
.summary-card h2,
.activity-card h2,
.cta-card h2 {
  font-size: 16px;
  margin: 0 0 12px;
}

.reimburse-card {
  padding: 12px 14px;
}

.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 12px;
}

.limit-row img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.reimburse-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.reimburse-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.reimburse-meta {
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.reimburse-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
  line-height: 1.1;
  white-space: nowrap;
}

.badge.is-ok {
  background: rgba(22, 101, 52, 0.34);
  color: #dcfce7;
  border-color: rgba(74, 222, 128, 0.48);
}

.badge.is-bad {
  background: #b91c1c;
  color: #fff;
  border-color: #ef4444;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge:empty {
  display: none;
}

.summary-value {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0;
}

.summary-value:empty {
  display: none;
}

.summary-sub {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-list div {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.activity-list img {
  width: 20px;
  height: 20px;
}

.cta-card button {
  width: 100%;
  margin-top: 8px;
}

/* Sidebar layout to match reference admin panel */
.admin-sidebar {
  width: 260px;
  padding: 24px 20px;
  gap: 18px;
  background: linear-gradient(180deg, #f2a6b5 0%, #e87aa0 55%, #c94a70 100%);
  border-right: none;
  height: 100vh;
  position: sticky;
  top: 0;
  color: #fff;
}

.sidebar-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  width: 100%;
  padding: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px;
  margin: 0;
  color: #fff;
}

.sidebar-user-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 1.08rem;
}

.sidebar-user-sub {
  font-size: 0.92rem;
  opacity: 0.8;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  position: relative;
  font-size: 1.08rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.nav-label {
  display: block;
  line-height: 1.2;
  flex: 1;
}

.nav-item .nav-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.nav-item .nav-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.admin-sidebar .sidebar-nav {
  justify-items: stretch;
}

.admin-sidebar .nav-item {
  width: 100%;
}

/* Dashboard activity card layout override (avoid grid stacking) */
.activity-list > .activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-list > .activity-item > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.activity-list > .activity-item .activity-meta {
  display: none;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.nav-item.is-active:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-item.is-active .nav-label {
  color: #fff;
  font-weight: 600;
}

.nav-item.is-active .nav-icon img {
  filter: brightness(0) invert(1);
}

.nav-item.is-active::after,
.nav-item.is-active::before {
  content: none;
}

.sidebar-logout {
  margin: 12px 16px 0;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.95rem;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

.logout-icon {
  font-size: 1rem;
}

.frame {
  grid-template-columns: 240px 1fr;
}

/* Theme override: soft admin panel (matches reference image) */
:root {
  color-scheme: light;
  --ink: #5a4d4a;
  --muted: #9d8e8a;
  --surface: #ffffff;
  --surface-strong: #f6f2f2;
  --accent: #e46b6b;
  --accent-dark: #d05555;
  --accent-soft: #f3a6a6;
  --line: rgba(120, 108, 105, 0.18);
  --shadow: 0 14px 28px rgba(150, 120, 120, 0.18);
}

body {
  background: url("assets/backgrounds/app-bg.png") center / cover no-repeat fixed;
  color: var(--ink);
  font-size: 13px;
}

.frame,
.frame-body {
  background: url("assets/backgrounds/app-bg.png") center / cover no-repeat fixed;
}

.sidebar {
  background: linear-gradient(180deg, #f7a5a1 0%, #e06b7c 100%);
  border-right: 1px solid rgba(230, 190, 190, 0.7);
}

.sidebar-avatar img {
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.nav-icon img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.nav-icon.is-active {
  background: rgba(255, 255, 255, 0.35);
}

.nav-indicator,
.nav-dot {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.content {
  padding: 4% 56px 0;
}

.topbar-search {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(150, 120, 120, 0.12);
}

.card,
.panel,
.dash-panel {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(220, 210, 205, 0.7);
  box-shadow: 0 18px 34px rgba(120, 94, 90, 0.2);
  backdrop-filter: blur(6px);
  border-radius: 22px;
}

.action-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 160px;
  padding: 18px 18px 20px;
  text-align: left;
  cursor: pointer;
}

.rotation-card {
  background-image:
          linear-gradient(120deg, rgba(40, 36, 34, 0.55), rgba(40, 36, 34, 0.35)),
          url("assets/backgrounds/rotation-card.png");
  background-size: cover;
  background-position: center;
}

.immo-card {
  background-image:
          linear-gradient(120deg, rgba(40, 36, 34, 0.45), rgba(40, 36, 34, 0.2)),
          url("assets/backgrounds/immo-card.png");
  background-size: cover;
  background-position: center;
}

.income-card {
  background-image:
          linear-gradient(120deg, rgba(40, 30, 24, 0.5), rgba(40, 30, 24, 0.25)),
          url("assets/backgrounds/income-card.png");
  background-size: cover;
  background-position: center;
}

.deduction-card {
  background-image:
          linear-gradient(120deg, rgba(40, 30, 24, 0.45), rgba(40, 30, 24, 0.2)),
          url("assets/backgrounds/deduction-card.png");
  background-size: cover;
  background-position: center;
}

.action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(18, 22, 30, 0.7);
  display: grid;
  place-items: center;
  align-self: start;
  justify-self: start;
}

.action-card-icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.action-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  text-align: center;
  align-self: end;
  justify-self: center;
  margin-top: auto;
}


.action-card-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.action-card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(30, 24, 22, 0.25);
}

.card-link {
  color: #9b8a87;
  border: 1px solid rgba(200, 190, 190, 0.7);
}

.card-link:hover {
  color: #5a4d4a;
  border-color: rgba(228, 107, 107, 0.6);
  box-shadow: 0 0 12px rgba(228, 107, 107, 0.35);
}

table {
  background: #ffffff;
}

th {
  background: #f6f2f2;
  color: var(--muted);
}

th.is-strong {
  font-weight: 700;
  color: var(--ink);
}

td.is-strong {
  font-weight: 700;
  color: var(--ink);
}

input,
select,
textarea {
  background: #f6f2f2;
  border-color: rgba(200, 190, 190, 0.8);
  color: var(--ink);
}

.primary {
  background: linear-gradient(180deg, #e68179 0%, #d8645f 100%);
  box-shadow:
          0 12px 24px rgba(216, 100, 95, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.primary:hover {
  background: linear-gradient(180deg, #dd746d 0%, #cc5954 100%);
  box-shadow:
          0 14px 28px rgba(208, 86, 82, 0.35),
          inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.ghost {
  border-color: rgba(200, 190, 190, 0.7);
}

.calendar-panel .primary {
  background: #6fb57c;
  box-shadow: 0 12px 24px rgba(79, 163, 106, 0.3);
}

.calendar-panel .primary:hover {
  background: #5aa76a;
}
