@font-face {
  font-family: "Instrument Serif";
  src: url("../../fonts/instrument-serif-latin.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Manrope";
  src: url("../../fonts/manrope-latin-variable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 200 800;
}

:root {
  --night: #050505;
  --night-soft: #0a0a0a;
  --panel: #0d0d0d;
  --panel-light: #151515;
  --cream: #f2efe8;
  --muted: #98958e;
  --teal: #c7c4bc;
  --teal-dark: #79766f;
  --orange: #f5c142;
  --orange-dark: #b98b18;
  --gold: #f5c142;
  --line: rgba(242, 239, 232, 0.11);
  --line-strong: rgba(245, 193, 66, 0.42);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --account-gutter: clamp(1.1rem, 3vw, 3.5rem);
  --account-gap: clamp(0.9rem, 1.6vw, 1.5rem);
  color-scheme: dark;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--cream);
  background: var(--night);
}

html {
  background: var(--night);
}

body,
.admin-body {
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.93), rgba(5, 5, 5, 0.985)),
    url("../../images/chapters/hero-matter-fractured-4k-v1.webp") center top / cover fixed,
    #050505;
  color: var(--cream);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% 12%, rgba(245, 193, 66, 0.065), transparent 27%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.018), transparent 32% 72%, rgba(255, 255, 255, 0.012));
}

h1,
h2,
h3,
.invoice-amount,
.stat-card strong,
.admin-metrics strong,
.admin-billing-grid article > strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.eyebrow,
.app-kicker,
.admin-label {
  color: var(--orange);
  font-family: "Manrope", sans-serif;
  font-weight: 650;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  width: 30px;
  height: 1px;
  margin-right: 12px;
}

.brand-name {
  font-family: "Manrope", sans-serif;
  letter-spacing: 0.2em;
}

.brand-name small {
  color: var(--orange);
}

.brand-mark img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

/* Controls */
.button {
  position: relative;
  min-height: 50px;
  overflow: hidden;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 220ms ease, border-color 220ms ease, background-color 220ms ease, transform 220ms ease;
}

.button-primary {
  border-color: rgba(245, 193, 66, 0.68);
  background: transparent;
  color: var(--cream);
  box-shadow: none;
}

.button-primary:hover,
.button-primary:focus-visible {
  border-color: var(--orange);
  background: var(--orange);
  color: #080808;
}

.button-outline {
  border-color: rgba(242, 239, 232, 0.22);
  background: rgba(242, 239, 232, 0.015);
}

.button-outline:hover,
.button-outline:focus-visible {
  border-color: rgba(245, 193, 66, 0.62);
  background: rgba(245, 193, 66, 0.08);
}

.text-button {
  color: var(--cream);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-decoration-color: rgba(245, 193, 66, 0.5);
  text-underline-offset: 5px;
}

.button:focus-visible,
.text-button:focus-visible,
.nav-item:focus-visible,
.admin-nav button:focus-visible,
.quick-action:focus-visible,
.logout-button:focus-visible,
.admin-logout:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: 3px;
}

input,
textarea,
select,
.admin-login-card input,
.admin-client-modal input,
.admin-client-modal select,
.client-detail input,
.client-detail select,
.admin-search input,
.compact-select,
.request-status-select {
  min-height: 52px;
  border-color: rgba(242, 239, 232, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.025);
  color: var(--cream);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(242, 239, 232, 0.34);
}

input:focus,
textarea:focus,
select:focus,
.admin-login-card input:focus,
.admin-client-modal input:focus,
.admin-client-modal select:focus,
.client-detail input:focus,
.client-detail select:focus,
.admin-search input:focus,
.compact-select:focus,
.request-status-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

select option,
.admin-client-modal select option,
.client-detail select option,
.compact-select option,
.request-status-select option {
  background: #101010;
  color: var(--cream);
}

.client-detail-help {
  display: block;
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* Sign-in and password screens */
.login-view,
.admin-login {
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.72fr);
}

.login-art,
.admin-login-brand {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(100deg, rgba(4, 4, 4, 0.5), rgba(4, 4, 4, 0.15)),
    url("../../images/chapters/hero-matter-fractured-4k-v1.webp") center / cover,
    #050505;
}

.login-art::before,
.admin-login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 58% 50%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.82) 76%),
    linear-gradient(180deg, transparent 62%, rgba(245, 193, 66, 0.06));
}

.login-art::after {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 12rem 100%;
  opacity: 0.4;
}

.login-statement h1,
.admin-login-brand h1 {
  max-width: 850px;
  font-size: clamp(4.1rem, 7.2vw, 8.4rem);
  line-height: 0.87;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.login-statement h1 span,
.admin-login-brand h1 span {
  color: var(--cream);
}

.login-statement > p:last-child,
.admin-login-brand > p:last-child {
  color: rgba(242, 239, 232, 0.68);
}

.login-shape {
  display: none;
}

.login-panel,
.admin-login-panel {
  position: relative;
  min-height: 100svh;
  border-left: 0;
  background: rgba(6, 6, 6, 0.96);
}

.login-panel::before,
.admin-login-panel::before {
  content: "";
  position: absolute;
  inset: 7% 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 193, 66, 0.7), transparent);
}

.login-card,
.admin-login-card {
  position: relative;
  width: min(100%, 450px);
}

.login-card h2,
.admin-login-card h2 {
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  line-height: 0.95;
}

.login-submit,
.admin-login-card .button {
  margin-top: 28px;
}

.demo-note,
.admin-login-card > small {
  color: rgba(242, 239, 232, 0.42);
}

/* Client workspace */
.app-shell,
.admin-shell {
  min-height: 100svh;
  background: transparent;
}

.sidebar,
.admin-sidebar {
  width: 270px;
  padding: 30px 22px 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.985)),
    url("../../images/chapters/hero-matter-fractured-4k-v1.webp") 22% center / auto 100%,
    #050505;
  backdrop-filter: blur(18px);
}

.sidebar::after,
.admin-sidebar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent 72%);
  opacity: 0.8;
}

.side-nav,
.admin-nav {
  gap: 2px;
}

.nav-item,
.admin-nav button {
  min-height: 52px;
  border: 0;
  border-bottom: 1px solid rgba(242, 239, 232, 0.07);
  border-radius: 0;
  background: transparent;
  color: rgba(242, 239, 232, 0.62);
  font-size: 0.76rem;
}

.nav-symbol,
.admin-nav button > span {
  color: rgba(245, 193, 66, 0.75);
  font-family: "Instrument Serif", serif;
  font-size: 0.84rem;
}

.nav-item:hover,
.nav-item.active,
.admin-nav button:hover,
.admin-nav button.active {
  border-color: rgba(242, 239, 232, 0.12);
  background: linear-gradient(90deg, rgba(245, 193, 66, 0.09), transparent 78%);
  color: var(--cream);
}

.nav-item.active,
.admin-nav button.active {
  box-shadow: inset 2px 0 0 var(--orange);
}

.nav-badge,
.admin-nav button > b {
  border: 1px solid rgba(245, 193, 66, 0.3);
  border-radius: 999px;
  background: rgba(245, 193, 66, 0.08);
  color: var(--orange);
}

.sidebar-project,
.admin-user {
  border-top-color: var(--line);
}

.sidebar-project {
  border-left-color: var(--orange);
  background: rgba(255, 255, 255, 0.025);
}

.logout-button,
.admin-logout {
  color: rgba(242, 239, 232, 0.5);
}

.logout-button:hover,
.admin-logout:hover {
  color: var(--orange);
}

.main-content,
.admin-main {
  min-height: 100svh;
  margin-left: 270px;
  padding-inline: var(--account-gutter);
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.82), rgba(5, 5, 5, 0.96)),
    radial-gradient(circle at 96% 2%, rgba(245, 193, 66, 0.045), transparent 25%);
}

.app-header,
.admin-header {
  min-height: 122px;
  border-bottom-color: var(--line);
}

.app-header h1,
.admin-header h1 {
  font-size: clamp(2.2rem, 3vw, 3.7rem);
  line-height: 0.92;
}

.avatar,
.admin-avatar,
.client-initials {
  border: 1px solid rgba(245, 193, 66, 0.4);
  background: rgba(245, 193, 66, 0.09);
  color: var(--orange);
}

.app-view,
.admin-view {
  padding-top: clamp(1.7rem, 3vw, 3rem);
}

.status-band {
  padding: clamp(1.6rem, 3vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(245, 193, 66, 0.055), transparent 48%),
    rgba(255, 255, 255, 0.018);
  box-shadow: none;
}

.status-band h2 {
  font-size: clamp(2.6rem, 5vw, 5rem);
}

.site-summary {
  border-left-color: var(--line);
}

.site-state i {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(245, 193, 66, 0.12);
}

.quick-actions {
  gap: 0;
  margin: 20px 0;
  border-block: 1px solid var(--line);
}

.quick-action {
  min-height: 100px;
  padding: 20px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quick-action:last-child {
  border-right: 0;
}

.quick-action:hover {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(245, 193, 66, 0.075), transparent);
}

.action-number,
.quick-action b {
  color: var(--orange);
}

.panel,
.invoice-card,
.stat-card,
.request-card,
.drop-zone {
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.022);
  box-shadow: none;
}

.panel::before,
.invoice-card::before,
.stat-card::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0 auto auto 0;
  width: 42px;
  height: 1px;
  background: var(--orange);
}

.panel,
.invoice-card,
.stat-card {
  position: relative;
}

.activity-item,
.file-row,
.request-card {
  border-color: rgba(242, 239, 232, 0.08);
}

.activity-dot.teal,
.activity-dot.orange,
.activity-dot.cream {
  background: var(--orange);
}

.status {
  border-color: rgba(242, 239, 232, 0.16);
  border-radius: 999px;
  background: transparent;
  color: rgba(242, 239, 232, 0.72);
}

.status-review,
.status-done,
.status-pending {
  border-color: rgba(245, 193, 66, 0.35);
  background: rgba(245, 193, 66, 0.06);
  color: var(--orange);
}

.invoice-amount,
.stat-card strong {
  color: var(--cream);
}

.drop-zone {
  background:
    linear-gradient(135deg, rgba(245, 193, 66, 0.04), transparent 50%),
    rgba(255, 255, 255, 0.016);
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--orange);
  background: rgba(245, 193, 66, 0.055);
}

.drop-zone:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

.drop-zone.has-files {
  border-style: solid;
  border-color: rgba(245, 193, 66, 0.82);
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 193, 66, 0.075), transparent 48%),
    rgba(255, 255, 255, 0.018);
}

.drop-zone-idle,
.drop-zone-loaded {
  display: grid;
  place-items: center;
  gap: 8px;
}

.drop-zone-idle[hidden],
.drop-zone-loaded[hidden] {
  display: none;
}

.drop-loaded-symbol {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 7px;
  border: 1px solid rgba(245, 193, 66, 0.72);
  border-radius: 50%;
  color: var(--orange);
  font-size: 1.3rem;
  font-weight: 800;
}

.drop-zone-file-names {
  max-width: min(760px, 88vw);
  overflow: hidden;
  color: rgba(242, 239, 232, 0.68);
  font-size: 0.76rem;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-form {
  display: grid;
  gap: 16px;
}

.file-upload-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 58px);
  align-items: end;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid rgba(242, 239, 232, 0.12);
  background:
    linear-gradient(135deg, rgba(245, 193, 66, 0.025), transparent 58%),
    rgba(255, 255, 255, 0.016);
}

.file-instructions-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 700;
}

.file-instructions-field label span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-instructions-field textarea {
  min-height: 112px;
  line-height: 1.55;
}

.file-instructions-field > small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.5;
}

.file-upload-actions {
  display: grid;
  min-width: min(100%, 250px);
  gap: 14px;
  justify-items: stretch;
}

.file-upload-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: right;
}

.file-upload-actions .button {
  min-width: 230px;
}

.file-upload-actions .button:disabled {
  cursor: not-allowed;
}

.file-upload-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid rgba(245, 193, 66, 0.42);
  border-left: 3px solid var(--orange);
  background: rgba(245, 193, 66, 0.065);
}

.file-upload-status[hidden] {
  display: none;
}

.file-upload-status-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(245, 193, 66, 0.58);
  border-radius: 50%;
  color: var(--orange);
  font-weight: 800;
}

.file-upload-status strong {
  display: block;
  color: var(--cream);
  font-size: 0.84rem;
}

.file-upload-status p {
  margin: 5px 0 0;
  color: rgba(242, 239, 232, 0.68);
  font-size: 0.74rem;
  line-height: 1.55;
}

.file-upload-status .file-upload-status-instructions {
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 1px solid rgba(245, 193, 66, 0.52);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(242, 239, 232, 0.84);
  font-style: italic;
  white-space: pre-wrap;
}

.file-upload-status.is-error {
  border-color: rgba(215, 95, 72, 0.46);
  border-left-color: #d75f48;
  background: rgba(215, 95, 72, 0.075);
}

.file-upload-status.is-error .file-upload-status-icon {
  border-color: rgba(215, 95, 72, 0.56);
  color: #e98570;
}

.file-description {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(242, 239, 232, 0.72);
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.file-description span {
  display: block;
  margin-bottom: 3px;
  color: var(--orange);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .file-upload-details {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .file-upload-actions {
    min-width: 0;
  }

  .file-upload-actions p {
    text-align: left;
  }

  .file-upload-actions .button {
    width: 100%;
    min-width: 0;
  }
}

.drop-symbol,
.file-type,
.payment-assurance > span {
  color: var(--orange);
}

.request-message-client,
.request-message-studio {
  border-radius: 0;
}

.request-message-client {
  border-left: 1px solid rgba(242, 239, 232, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.request-message-studio {
  border-left: 1px solid var(--orange);
  border-top: 1px solid rgba(245, 193, 66, 0.18);
  border-right: 1px solid rgba(245, 193, 66, 0.18);
  border-bottom: 1px solid rgba(245, 193, 66, 0.18);
  background: #050505;
  color: var(--orange);
}

.request-message-studio .request-message-meta strong,
.request-message-studio p {
  color: var(--orange);
}

.request-message-studio .request-message-meta time {
  color: rgba(245, 193, 66, 0.68);
  opacity: 1;
}

.maintenance-payment-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 58px);
  margin-bottom: var(--account-gap);
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(110deg, rgba(245, 193, 66, 0.08), transparent 58%),
    #070707;
}

.maintenance-payment-status {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 18px;
}

.maintenance-payment-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 1rem;
}

.maintenance-payment-panel h2 {
  margin: 7px 0 9px;
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
}

.maintenance-payment-panel p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
}

.maintenance-payment-details {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  text-align: right;
}

.maintenance-payment-details strong {
  color: var(--orange);
  font-size: 1rem;
}

.maintenance-payment-details span {
  color: var(--cream);
  font-size: 0.76rem;
}

.payment-nature {
  display: inline-block;
  margin-top: 24px;
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.payment-nature + h3 {
  margin-top: 9px;
}

.traffic-chart i {
  background: linear-gradient(180deg, var(--orange), rgba(245, 193, 66, 0.14));
}

.payment-assurance {
  border-left-color: var(--orange);
  background: rgba(245, 193, 66, 0.04);
}

/* Admin workspace: denser and more operational */
.admin-main {
  padding-bottom: 56px;
}

.admin-search-button {
  border-color: var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--cream);
}

.admin-search-button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.admin-metrics {
  gap: 0;
  border-block: 1px solid var(--line);
}

.admin-metrics article {
  min-height: 150px;
  padding: 22px 24px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-metrics article:last-child {
  border-right: 0;
}

.admin-metrics strong,
.admin-billing-grid article > strong {
  color: var(--cream);
  font-size: clamp(2.7rem, 4vw, 4.2rem);
}

.admin-panel,
.admin-request,
.admin-file-grid article,
.admin-file-client-group {
  border-color: var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.project-line,
.admin-attention-panel > button,
.admin-timeline > div,
.client-table th,
.client-table td,
.payment-table th,
.payment-table td {
  border-color: rgba(242, 239, 232, 0.08);
}

.project-line:hover,
.admin-attention-panel > button:hover,
.admin-request:hover,
.admin-file-grid article:hover,
.admin-file-client-summary:hover,
.admin-file-client-group[open] > .admin-file-client-summary {
  background: rgba(245, 193, 66, 0.045);
}

.teal-bg,
.orange-bg,
.gold-bg,
.attention-icon,
.client-initials {
  border: 1px solid rgba(245, 193, 66, 0.28);
  background: rgba(245, 193, 66, 0.08);
  color: var(--orange);
}

.admin-status {
  border-radius: 999px;
}

.admin-status.online,
.admin-status.preparation,
.admin-status.review {
  border-color: rgba(245, 193, 66, 0.3);
  background: rgba(245, 193, 66, 0.06);
  color: var(--orange);
}

.client-detail {
  position: sticky;
  top: 22px;
  align-self: start;
}

.client-table tbody tr:hover,
.payment-table tbody tr:hover {
  background: rgba(245, 193, 66, 0.035);
}

.button-danger {
  border-color: rgba(231, 99, 99, 0.42);
  border-radius: 0;
  background: transparent;
  color: #f0a2a2;
}

.admin-file-type {
  border-color: rgba(245, 193, 66, 0.36);
  border-radius: 0;
  color: var(--orange);
}

.admin-file-grid article > button {
  color: var(--cream);
  text-decoration-color: rgba(245, 193, 66, 0.5);
}

.admin-storage {
  border-color: rgba(245, 193, 66, 0.28);
  background: rgba(245, 193, 66, 0.05);
  color: var(--orange);
}

.admin-billing-grid {
  gap: 0;
  border-block: 1px solid var(--line);
}

.admin-billing-grid .admin-panel {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}

.admin-billing-grid .admin-panel:last-child {
  border-right: 0;
}

.admin-check input {
  accent-color: var(--orange);
}

/* Dialogs and feedback */
.modal {
  border-color: rgba(242, 239, 232, 0.18);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 9, 0.96), rgba(5, 5, 5, 0.99)),
    url("../../images/chapters/hero-matter-fractured-4k-v1.webp") center / cover;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(9px);
}

.modal-close {
  border-radius: 0;
}

.notification-button {
  position: relative;
}

.notification-button .nav-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  padding: 2px 6px;
  font-size: 0.62rem;
}

.notification-modal {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
}

.notification-modal-content {
  padding: clamp(24px, 4vw, 42px);
}

.notification-list {
  display: grid;
  max-height: min(560px, 62vh);
  margin-top: 24px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  padding: 20px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
}

.notification-item:hover,
.notification-item:focus-visible {
  background: rgba(245, 193, 66, 0.045);
}

.notification-state {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border: 1px solid rgba(242, 239, 232, 0.3);
  border-radius: 50%;
}

.notification-item.is-unread .notification-state {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 16px rgba(245, 193, 66, 0.42);
}

.notification-item.is-important {
  box-shadow: inset 2px 0 0 var(--orange);
}

.notification-item strong,
.notification-item span,
.notification-item small {
  display: block;
}

.notification-item strong {
  margin-bottom: 6px;
  color: var(--cream);
  font-size: 0.9rem;
}

.notification-item span {
  color: rgba(242, 239, 232, 0.68);
  font-size: 0.76rem;
  line-height: 1.55;
}

.notification-item small,
.notification-empty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.66rem;
}

.notification-empty {
  padding: 24px 0;
}

.payment-mark {
  border-color: rgba(245, 193, 66, 0.5);
  background: rgba(245, 193, 66, 0.08);
  color: var(--orange);
}

.toast {
  border-color: rgba(245, 193, 66, 0.42);
  border-radius: 0;
  background: #111;
}

/* Responsive */
@media (max-width: 1180px) {
  .quick-actions {
    border: 1px solid var(--line);
  }

  .quick-action {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-action:last-child {
    border-bottom: 0;
  }

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

  .admin-metrics article:nth-child(2) {
    border-right: 0;
  }

  .admin-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 840px) {
  body,
  .admin-body {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 0.99)),
      url("../../images/chapters/hero-matter-fractured-2k-v1.webp") center top / auto 100% fixed,
      #050505;
  }

  .login-panel,
  .admin-login-panel {
    padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.86), rgba(5, 5, 5, 0.98)),
      url("../../images/chapters/hero-matter-fractured-2k-v1.webp") 42% center / auto 100% fixed,
      #050505;
  }

  .mobile-brand {
    margin-bottom: clamp(2.8rem, 10vh, 5rem);
  }

  .main-content,
  .admin-main {
    margin-left: 0;
    padding-inline: 18px;
  }

  .mobile-nav,
  .admin-mobile-nav {
    border-top-color: rgba(242, 239, 232, 0.12);
    background: rgba(5, 5, 5, 0.94);
  }

  .mobile-nav button span,
  .admin-mobile-nav button span {
    color: rgba(245, 193, 66, 0.72);
    font-family: "Instrument Serif", serif;
  }

  .mobile-nav button.active,
  .admin-mobile-nav button.active {
    box-shadow: inset 0 2px 0 var(--orange);
  }

  .status-band {
    padding: 24px 20px;
  }

  .site-summary {
    border-top-color: var(--line);
  }

  .client-detail {
    position: static;
  }

  .maintenance-payment-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .maintenance-payment-details {
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: left;
  }
}

@media (max-width: 560px) {
  .login-card h2,
  .admin-login-card h2 {
    font-size: 2.65rem;
  }

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

  .admin-metrics article,
  .admin-metrics article:nth-child(2) {
    min-height: 125px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-metrics article:last-child {
    border-bottom: 0;
  }

  .admin-billing-grid .admin-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-billing-grid .admin-panel:last-child {
    border-bottom: 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  .button:hover,
  .quick-action:hover,
  .admin-search-button:hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Grands écrans — empêcher l'espace client et l'administration de s'étirer
   au-delà du cadrage de référence obtenu sur un écran de 1536 px. */
@media (min-width: 1600px) {
  .main-content > .app-header,
  .main-content > .app-view,
  .admin-main > .admin-header,
  .admin-main > .admin-view {
    width: min(100%, 1160px);
    margin-inline: auto;
  }
}
