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

@font-face {
  font-family: 'Sora';
  src: url('fonts/sora-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #080808;
  --card: rgba(24, 24, 24, 0.82);
  --card-solid: #171717;
  --field: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f4f4;
  --muted: #a8a8a8;
  --accent: #ff6a13;
  --accent-strong: #d4530a;
  --accent-soft: #ffb277;
  --ok: #27d1ae;
  --danger: #ff7b7b;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(255, 106, 19, 0.2), transparent 62%),
    radial-gradient(800px 420px at 100% 12%, rgba(39, 209, 174, 0.13), transparent 62%), var(--bg);
  background-attachment: fixed;
}

h1,
h2,
h3 {
  font-family: 'Sora', system-ui, sans-serif;
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.05rem;
}

h3 {
  font-size: 0.95rem;
}

p {
  margin: 0;
}

a {
  color: var(--accent-soft);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.kicker {
  color: var(--accent-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.center {
  text-align: center;
}

.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.stack {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

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

.columns.wide-left {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
}

/* Sign-in screens */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.75rem 3.25rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 106, 19, 0.16), rgba(8, 8, 8, 0.2) 55%, rgba(39, 209, 174, 0.1));
}

.auth-brand img {
  display: block;
}

.auth-headline {
  margin-top: 0.7rem;
  max-width: 15em;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.auth-points {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #dcdcdc;
}

.auth-points .icon {
  color: var(--accent-soft);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 1.5rem;
}

.auth-form {
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 0.6rem;
}

.auth-footer {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.4rem;
  border-radius: 14px;
  color: var(--accent-soft);
  background: rgba(255, 106, 19, 0.13);
  border: 1px solid rgba(255, 106, 19, 0.3);
}

.auth-icon .icon {
  width: 22px;
  height: 22px;
}

.code-input {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: var(--field);
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--accent);
}

.check strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.check small {
  color: var(--muted);
}

/* Application shell */
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem 1rem 1rem;
  border-right: 1px solid var(--line);
  background: rgba(14, 14, 14, 0.75);
}

.brand {
  padding: 0 0.6rem;
}

.brand img {
  display: block;
}

.sidebar-role {
  padding: 0 0.6rem;
  margin: 0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: grid;
  gap: 0.2rem;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.7rem;
  border-radius: 11px;
  color: #d6d6d6;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav a.is-active {
  color: #fff;
  background: rgba(255, 106, 19, 0.16);
  box-shadow: inset 2px 0 0 var(--accent);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.75rem 0.5rem 0.25rem;
  border-top: 1px solid var(--line);
}

.sidebar-email {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.25rem 2rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.page-head .kicker {
  margin-bottom: 0.25rem;
}

.footer {
  padding: 1rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer a {
  display: inline-block;
  padding: 0.3rem 0.1rem;
}

/* Cards */
.card {
  padding: 1.35rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.card > h2 {
  margin-bottom: 0.2rem;
}

.count {
  margin-left: 0.25rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.75rem;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  text-align: center;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 0 0.2rem;
  color: var(--muted);
}

/* KPIs and client cards */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.kpi {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 0.1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.kpi .icon {
  grid-column: 2;
  grid-row: 1;
  color: var(--accent-soft);
}

.kpi strong {
  grid-column: 1;
  grid-row: 1;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.75rem;
  line-height: 1.1;
}

.kpi span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.85rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.filters select {
  width: auto;
}

.search {
  position: relative;
  flex: 1 1 260px;
  display: block;
}

.search .icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  margin-top: -9px;
  color: var(--muted);
}

.search input {
  padding-left: 2.5rem;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.9rem;
}

.client-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.client-card:hover {
  border-color: rgba(255, 106, 19, 0.55);
  transform: translateY(-2px);
}

.client-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.client-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.client-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.client-meta .icon {
  width: 14px;
  height: 14px;
}

.client-meta .push {
  margin-left: auto;
}

.row-main {
  display: grid;
  gap: 0.08rem;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  color: #fff;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.avatar.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.avatar.large {
  width: 60px;
  height: 60px;
  border-radius: 17px;
  font-size: 1.25rem;
}

.avatar-0 {
  background: linear-gradient(135deg, #e65c0f, #a63c06);
}

.avatar-1 {
  background: linear-gradient(135deg, #16927a, #0c6152);
}

.avatar-2 {
  background: linear-gradient(135deg, #7a58d6, #4c329b);
}

.avatar-3 {
  background: linear-gradient(135deg, #2f7fd1, #1b5393);
}

.avatar-4 {
  background: linear-gradient(135deg, #c8497e, #8c2a55);
}

.avatar-5 {
  background: linear-gradient(135deg, #a98a2c, #6f5a17);
}

.pill {
  display: inline-block;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  color: var(--accent-soft);
  background: rgba(255, 106, 19, 0.14);
  border: 1px solid rgba(255, 106, 19, 0.32);
  font-size: 0.78rem;
  font-weight: 600;
}

progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  appearance: none;
}

progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
}

/* Client home */
.hero-card {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(255, 106, 19, 0.13), rgba(24, 24, 24, 0.85) 60%);
}

.project-title {
  margin-top: 0.15rem;
  font-size: 1.35rem;
}

.percent {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
}

.percent span {
  margin-left: 0.1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.stepper li {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--muted);
}

.step-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 700;
}

.step-dot .icon {
  width: 15px;
  height: 15px;
}

.step-label {
  font-size: 0.78rem;
}

.stepper .is-done .step-dot {
  color: #06251e;
  background: var(--ok);
  border-color: var(--ok);
}

.stepper .is-current {
  color: var(--text);
  font-weight: 700;
}

.stepper .is-current .step-dot {
  color: #fff;
  background: var(--accent-strong);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 106, 19, 0.2);
}

.message {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
}

.contact-card {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
}

.info {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.info:last-of-type {
  border-bottom: 0;
}

.profile-email {
  margin-top: 0.4rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Projects, links and document groups */
.project-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.project {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.project-edit > summary {
  display: inline-block;
  color: var(--accent-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.project-lines {
  display: grid;
  gap: 0.55rem;
}

.project-line {
  display: grid;
  gap: 0.25rem;
}

.project-line .split {
  gap: 0.5rem;
}

.project-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.hero-stack {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-stack .hero-card {
  margin-bottom: 0;
}

.link-list {
  display: grid;
  gap: 0.2rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.link-list li:last-child {
  border-bottom: 0;
}

.link-list .icon {
  color: var(--accent-soft);
}

.card-shared {
  border-color: rgba(39, 209, 174, 0.3);
}

.card-internal {
  border-color: rgba(255, 106, 19, 0.3);
}

.section-note {
  margin-top: 0.15rem;
}

/* Team preview of the client space */
.preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px dashed rgba(110, 231, 200, 0.55);
  border-radius: var(--radius);
  background: rgba(110, 231, 200, 0.07);
}

.preview-bar .auth-icon {
  margin: 0;
}

.preview-frame {
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.plain {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset[disabled] .btn,
fieldset[disabled] input,
fieldset[disabled] textarea {
  cursor: not-allowed;
  opacity: 0.55;
}

.head-action {
  align-self: center;
  margin-left: auto;
}

/* Client branding */
.theme-orange {
  --theme-a: #ff6a13;
  --theme-b: #ffb277;
  --theme-glow: rgba(255, 106, 19, 0.2);
}

.theme-ocean {
  --theme-a: #2f8fe0;
  --theme-b: #8cc8ff;
  --theme-glow: rgba(47, 143, 224, 0.22);
}

.theme-foret {
  --theme-a: #2fae6f;
  --theme-b: #8fe0b5;
  --theme-glow: rgba(47, 174, 111, 0.2);
}

.theme-baie {
  --theme-a: #d24b86;
  --theme-b: #f5a3c6;
  --theme-glow: rgba(210, 75, 134, 0.22);
}

.theme-ardoise {
  --theme-a: #8a96a8;
  --theme-b: #c9d1dc;
  --theme-glow: rgba(138, 150, 168, 0.2);
}

.theme-aurore {
  --theme-a: #8f5cf0;
  --theme-b: #c8adff;
  --theme-glow: rgba(143, 92, 240, 0.22);
}

.brand-hero,
.brand-mini {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 210px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 18%, var(--theme-glow), transparent 55%),
    linear-gradient(135deg, var(--theme-glow), #121212 70%);
}

.brand-mini {
  min-height: 120px;
  margin: 0.4rem 0 1rem;
}

.brand-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-hero.has-image::after,
.brand-mini.has-image::after {
  position: absolute;
  inset: 0;
  content: '';
  background:
    linear-gradient(0deg, rgba(8, 8, 8, 0.75), transparent 60%),
    linear-gradient(90deg, rgba(8, 8, 8, 0.92), rgba(8, 8, 8, 0.72) 45%, rgba(8, 8, 8, 0.3));
}

.brand-hero.has-image {
  min-height: 260px;
}

.brand-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.5rem 1.6rem;
}

.brand-mini .brand-hero-inner {
  padding: 1rem 1.1rem;
}

.brand-hero-text h1 {
  margin: 0.1rem 0 0.2rem;
}

.brand-hero-text p:last-child {
  margin: 0;
  color: #e6e6e6;
}

.brand-hero .kicker,
.brand-mini .kicker {
  color: var(--theme-b);
}

.brand-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 84px;
  height: 84px;
  padding: 10px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand-mini .brand-logo {
  width: 52px;
  height: 52px;
  padding: 6px;
  border-radius: 14px;
}

.brand-logo img,
.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.avatar.logo-tile {
  padding: 4px;
  background: #fff;
}

.hero-card[class*='theme-'] {
  border-top: 3px solid var(--theme-a);
  background: linear-gradient(135deg, var(--theme-glow), rgba(24, 24, 24, 0.85) 60%);
}

.hero-card[class*='theme-'] .kicker {
  color: var(--theme-b);
}

.hero-card[class*='theme-'] .message {
  border-left-color: var(--theme-a);
}

.hero-card[class*='theme-'] .stepper .is-current .step-dot {
  background: var(--theme-a);
  border-color: var(--theme-b);
  box-shadow: 0 0 0 4px var(--theme-glow);
}

.hero-card[class*='theme-'] progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--theme-a), var(--theme-b));
}

.hero-card[class*='theme-'] progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--theme-a), var(--theme-b));
}

.project-cover {
  display: block;
  width: calc(100% + 2.7rem);
  height: 130px;
  margin: -1.35rem -1.35rem 0;
  object-fit: cover;
  border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0;
}

.hero-card.is-page .project-cover {
  height: 240px;
}

.cover-admin {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.cover-thumb {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 12px;
}

.sidebar-client {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0 1rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.choice .swatch,
.inline-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.choice .swatch {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--theme-a), var(--theme-b));
}

.swatch input,
.inline-check input {
  width: auto;
}

@media (max-width: 640px) {
  .brand-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
  }

  .brand-logo {
    width: 64px;
    height: 64px;
  }

  .project-cover,
  .hero-card.is-page .project-cover {
    height: 120px;
  }
}

@media (max-width: 980px) {
  .sidebar-client {
    display: none;
  }
}

/* Offers */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.offer h2 {
  margin: 0.4rem 0 0;
}

.offer .auth-icon {
  margin: 0;
}

.offer-price {
  margin: 0;
  color: var(--accent-soft);
  font-weight: 700;
}

.offer-ask {
  margin-top: auto;
}

.request-card {
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
}

.tag {
  padding: 0.1rem 0.6rem;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 106, 19, 0.4);
  border-radius: 999px;
  color: var(--accent-soft);
}

.tag-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0 1.6rem;
}

.choice .tag-pick {
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* Folders and bulk actions */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.bulk-bar select {
  width: auto;
  min-width: 190px;
  flex: 1 1 190px;
}

.folder {
  margin-top: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.folder > summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  list-style: none;
}

.folder > summary::-webkit-details-marker {
  display: none;
}

.folder > summary svg {
  width: 18px;
  height: 18px;
  color: var(--accent-soft);
}

.folder[open] > summary {
  border-bottom: 1px solid var(--line);
}

.folder-body {
  padding: 0 0.85rem 0.75rem;
}

.folder-tools {
  margin-top: 0.6rem;
}

.folder-tools > summary {
  font-size: 0.82rem;
  opacity: 0.7;
  cursor: pointer;
}

.folder-tools[open] {
  display: grid;
  gap: 0.6rem;
}

.pick {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

/* Client tabs */
.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.1rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab {
  display: grid;
  flex: none;
  gap: 0.1rem;
  max-width: 240px;
  padding: 0.55rem 0.95rem 0.6rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: 10px 10px 0 0;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tab.is-active {
  background: rgba(255, 106, 19, 0.1);
  border-bottom-color: var(--accent-strong);
}

.tab-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tab-sub {
  font-size: 0.76rem;
  opacity: 0.62;
  white-space: nowrap;
}

.tab-add {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-soft);
}

.tab-add svg {
  width: 16px;
  height: 16px;
}

.tab .nav-badge {
  margin-left: 0;
}

.scope-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  opacity: 0.85;
}

.scope-note svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.narrow {
  max-width: 520px;
}

.small-percent {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.project-form {
  margin-top: 0.9rem;
}

.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.doc-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1rem 0 0.2rem;
  font-size: 0.9rem;
}

.doc-group svg {
  width: 16px;
  height: 16px;
}

.doc-group.is-shared {
  color: #6ee7c8;
}

.doc-group.is-internal-group {
  color: var(--accent-soft);
}

.doc-empty {
  margin: 0.35rem 0 0;
}

.doc-rows li {
  flex-wrap: wrap;
}

.manage > summary {
  color: var(--accent-soft);
  font-size: 0.86rem;
  cursor: pointer;
}

.manage[open] {
  flex: 1 0 100%;
}

.manage-panel {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.6rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.inline-form label {
  flex: 1 1 200px;
}

.choice {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice legend {
  margin-bottom: 0.35rem;
  padding: 0;
}

.choice label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.choice input {
  width: auto;
}

/* To-do items */
.nav a span {
  white-space: nowrap;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.card-action {
  border-color: rgba(255, 106, 19, 0.28);
}

.card-late {
  border-color: rgba(255, 107, 107, 0.45);
}

.action-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 106, 19, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 106, 19, 0.1);
}

.action-banner .auth-icon {
  margin: 0;
}

.todo-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.todo-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.todo-item .form {
  margin-top: 0.4rem;
}

.actions.start {
  justify-content: flex-start;
}

.todo-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.todo-list li:last-child .todo-row {
  border-bottom: 0;
}

.todo-row:hover strong {
  color: var(--accent-soft);
}

/* Lists */
.rows,
.members,
.timeline {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.rows li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.rows li:last-child,
.members li:last-child {
  border-bottom: 0;
}

.file-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.kind-pdf {
  color: #ffb4b4;
  background: rgba(255, 90, 90, 0.15);
}

.kind-img {
  color: #c9b6ff;
  background: rgba(130, 100, 255, 0.17);
}

.kind-doc {
  color: #a9d0ff;
  background: rgba(70, 140, 255, 0.16);
}

.kind-xls {
  color: #8fe9d3;
  background: rgba(39, 209, 174, 0.15);
}

.kind-ppt {
  color: #ffc79d;
  background: rgba(255, 140, 60, 0.16);
}

.kind-zip {
  color: #e8d48f;
  background: rgba(210, 175, 60, 0.15);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  justify-self: start;
  width: fit-content;
  white-space: nowrap;
  padding: 0.08rem 0.55rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.72rem;
}

.badge.is-client,
.badge.status-active {
  color: var(--ok);
}

.badge.is-internal,
.badge.status-invited {
  color: var(--accent-soft);
}

.badge.status-disabled {
  color: var(--danger);
}

.members li {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.members .link {
  font-size: 0.82rem;
}

.member-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.timeline {
  position: relative;
  padding-left: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  padding: 0.45rem 0;
  overflow-wrap: anywhere;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.85rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline strong {
  font-size: 0.9rem;
}

.back {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  text-decoration: none;
}

.client-head {
  align-items: center;
  justify-content: flex-start;
}

.client-head-status {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  width: 210px;
  flex: none;
}

/* Journal */
.table-wrap {
  overflow-x: auto;
}

.journal {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.journal th {
  padding: 0 0.7rem 0.6rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.journal td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.nowrap {
  white-space: nowrap;
}

.tone {
  white-space: nowrap;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.07);
}

.tone-ok {
  color: var(--ok);
  background: rgba(39, 209, 174, 0.12);
}

.tone-warn {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
}

/* Forms and buttons */
.form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.65rem 0.8rem;
}

select option {
  color: #111;
}

input[type='file'] {
  padding: 0.5rem;
}

input[type='file']::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.internal > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-soft);
}

.internal .icon {
  width: 14px;
  height: 14px;
}

.internal textarea {
  border-color: rgba(255, 106, 19, 0.35);
  background: rgba(255, 106, 19, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  justify-self: start;
  width: fit-content;
  padding: 0.62rem 1.15rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent-strong);
  border: 1px solid var(--accent-strong);
  border-radius: 11px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.btn.wide {
  width: 100%;
  justify-self: stretch;
}

.btn.compact {
  padding: 0.42rem 0.75rem;
  font-size: 0.85rem;
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.link {
  padding: 0.3rem 0.1rem;
  font: inherit;
  color: var(--accent-soft);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid;
  border-radius: 11px;
}

.is-error.notice {
  color: #ffd0d0;
  border-color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
}

.is-success.notice {
  color: #c4f5e9;
  border-color: var(--ok);
  background: rgba(39, 209, 174, 0.12);
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.confirm summary {
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
}

.add-panel {
  position: relative;
}

.popover {
  position: absolute;
  right: 0;
  z-index: 5;
  width: 320px;
  margin-top: 0.5rem;
  background: var(--card-solid);
}

.add-inline {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.add-inline > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.danger-zone {
  border-color: rgba(255, 107, 107, 0.3);
}

.danger-zone > summary {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.9rem;
}

.danger-zone > p {
  margin-top: 0.6rem;
}

@media (max-width: 980px) {
  .columns,
  .columns.wide-left {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 820px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .auth-brand {
    padding: 1.5rem;
    gap: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-points {
    display: none;
  }

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

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.7rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0;
  }

  .sidebar-role {
    display: none;
  }

  .nav {
    order: 3;
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .nav a.is-active {
    box-shadow: none;
  }

  .sidebar-user {
    margin: 0 0 0 auto;
    padding: 0;
    border-top: 0;
  }

  .sidebar-email {
    display: none;
  }

  .page {
    padding: 1.4rem 1rem;
  }

  .client-head {
    flex-wrap: wrap;
  }

  .client-head-status {
    width: 100%;
    justify-items: start;
  }
}

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

  .stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 0.8rem;
  }

  .rows li {
    flex-wrap: wrap;
  }

  .rows .actions,
  .rows .btn.compact {
    width: 100%;
    justify-content: flex-start;
  }

  .popover {
    position: static;
    width: 100%;
  }
}
