:root {
  --color-background: #f1f1f1;
  --color-surface: #ffffff;
  --color-surface-hover: #f7f7f7;
  --color-border: #e3e3e3;
  --color-border-strong: #c9c9c9;
  --color-text: #303030;
  --color-text-secondary: #616161;
  --color-text-tertiary: #8a8a8a;
  --color-primary: #303030;
  --color-primary-hover: #1f1f1f;
  --color-primary-foreground: #ffffff;
  --color-gold: #b8995e;
  --color-ink: #16120c;
  --radius: 8px;
  --shadow-soft: 0 1px 1px rgba(0, 0, 0, 0.04);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--color-background);
  color: var(--color-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

body.auth-required .app-shell,
body.auth-required .mobile-bottom-nav,
body.auth-required .modal-backdrop {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.auth-shell {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(22, 18, 12, 0.78), rgba(22, 18, 12, 0.92)),
    var(--color-ink);
  padding: 24px;
}

.auth-shell[hidden] {
  display: none;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid rgba(184, 153, 94, 0.42);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  padding: 22px;
}

.auth-logo {
  width: 100%;
  max-height: 96px;
  margin-bottom: 18px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  object-fit: contain;
}

.auth-copy {
  margin-bottom: 18px;
  color: var(--color-text-secondary);
}

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

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

.auth-account-button {
  min-height: 40px;
}

.auth-account-button.active {
  border-color: var(--color-primary);
  background: #ebebeb;
  color: var(--color-text);
}

.auth-submit {
  width: 100%;
  min-height: 42px;
}

.auth-reset {
  width: 100%;
  min-height: 40px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--color-text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--color-border);
  content: "";
}

.auth-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.auth-message[data-tone="error"] {
  color: #b42318;
}

.auth-message[data-tone="success"] {
  color: #067647;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 16px;
}

.brand-lockup {
  display: flex;
  min-height: 76px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 8px 10px;
}

.brand-lockup img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
}

.nav-link,
.mobile-bottom-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 6px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.nav-link {
  min-height: 36px;
  padding: 8px 10px;
}

.nav-link:hover,
.mobile-bottom-nav a:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.nav-link.active,
.mobile-bottom-nav a.active {
  background: #ebebeb;
  color: var(--color-text);
}

.nav-icon,
[data-lucide] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.mini-label {
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.leader-stack {
  display: flex;
  gap: 6px;
}

.leader-stack span,
.profile-button span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-hover);
  color: var(--color-text);
  font-size: 11px;
  font-weight: 700;
}

.main-shell {
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 60px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 24px;
  backdrop-filter: blur(16px);
}

.search-field,
.filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text-tertiary);
}

.search-field {
  width: min(560px, 48vw);
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
}

.search-field input,
.filter-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.date-chip,
.profile-button {
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.date-chip {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--color-text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.profile-button,
.user-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px 2px 3px;
  color: var(--color-text);
  cursor: pointer;
}

.profile-button span:last-child {
  font-weight: 600;
}

.user-switch {
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  padding: 0 8px;
}

.user-switch > span {
  color: var(--color-text-secondary);
}

.user-switch select {
  width: auto;
  min-height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--color-text);
  font-weight: 700;
  box-shadow: none;
}

.icon-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.icon-button:hover,
.button.secondary:hover,
.button.ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.icon-button.danger {
  color: #b42318;
}

.icon-button.danger:hover {
  border-color: #fecdca;
  background: #fff0ef;
  color: #912018;
}

.button {
  min-height: 36px;
  padding: 0 12px;
}

.button.primary {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.button.primary:hover {
  background: var(--color-primary-hover);
}

.button.secondary,
.button.ghost {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.button.ghost {
  border-color: transparent;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mobile-menu-button {
  display: none;
}

.content {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.content > * + * {
  margin-top: 16px;
}

.app-view {
  display: none !important;
}

.app-view.active-view {
  display: block !important;
}

.page-heading.app-view.active-view {
  display: flex !important;
}

.metrics-grid.app-view.active-view {
  display: grid !important;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-heading > *,
.section-header > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--color-text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

h2 {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.heading-copy,
.section-header p,
.data-table span,
.agenda-list span,
.governance-grid p {
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.heading-copy,
.section-header p {
  margin-bottom: 0;
  max-width: 100%;
}

.heading-actions,
.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.metric-card,
.surface {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  display: grid;
  min-height: 108px;
  gap: 5px;
  padding: 14px;
}

.metric-label {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.metric-card strong {
  align-self: end;
  font-size: 28px;
  line-height: 1;
}

.metric-trend {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}

.metric-trend.warning {
  background: #fff7e6;
  color: #8a5a00;
}

.metric-trend.neutral {
  background: #f2f2f2;
  color: var(--color-text-secondary);
}

.metric-trend.danger {
  background: #fff0ef;
  color: #b42318;
}

.metric-trend.success {
  background: #ecfdf3;
  color: #027a48;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.work-grid > *,
.metrics-grid > *,
.documents-layout > *,
.governance-grid > * {
  min-width: 0;
}

.surface {
  padding: 16px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-header.compact {
  align-items: center;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 11px 12px;
  vertical-align: top;
}

.data-table th {
  background: #fafafa;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td:first-child {
  display: grid;
  gap: 3px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.warning {
  border-color: #fedf89;
  background: #fffaeb;
  color: #93370d;
}

.status-pill.info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.status-pill.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-pill.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.decisions-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 240px;
  gap: 10px;
  margin-bottom: 12px;
}

.decisions-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.decisions-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  text-align: left;
}

.decisions-table th,
.decisions-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 11px 12px;
  vertical-align: top;
}

.decisions-table th {
  background: #fafafa;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.decisions-table tbody tr:last-child td {
  border-bottom: 0;
}

.decision-title-cell {
  min-width: 260px;
}

.decision-title-cell strong {
  display: block;
}

.decision-title-cell span {
  display: block;
  margin-top: 3px;
  color: var(--color-text-secondary);
}

.decision-status-select {
  min-width: 168px;
}

.decision-detail-panel {
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fafafa;
  padding: 14px;
}

.decision-detail-description {
  color: var(--color-text-secondary);
}

.comment-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.comment-item {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  padding: 10px;
}

.comment-item header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.comment-item p {
  margin-bottom: 0;
}

.comment-field {
  margin-top: 10px;
}

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

.agenda-list li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px;
}

.agenda-list time {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.agenda-list div {
  display: grid;
  gap: 2px;
}

.theme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.theme-pills span {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fafafa;
  color: var(--color-text-secondary);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.documents-section {
  position: relative;
  scroll-margin-top: 76px;
}

.documents-section.drag-over::after {
  position: absolute;
  inset: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  content: "Deposer pour creer un dossier";
  font-weight: 700;
  pointer-events: none;
}

.documents-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.documents-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.documents-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
}

.documents-table th,
.documents-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 11px 12px;
  vertical-align: middle;
}

.documents-table th {
  background: #fafafa;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.documents-table tbody tr:last-child td {
  border-bottom: 0;
}

.folder-row:hover {
  background: var(--color-surface-hover);
}

.folder-name-cell {
  min-width: 220px;
}

.folder-name-button {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.folder-name-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-details-row[hidden] {
  display: none;
}

.folder-details-row td {
  background: #fafafa;
  padding: 0;
}

.folder-files {
  display: grid;
  gap: 0;
}

.folder-file {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px 120px auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 12px;
}

.folder-file:last-child {
  border-bottom: 0;
}

.folder-file-name {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.folder-file-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.decision-row-actions {
  justify-content: flex-start;
  white-space: nowrap;
}

.documents-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.25fr);
  gap: 16px;
}

.upload-panel,
.documents-list-panel {
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--color-text);
  font-weight: 600;
}

label > span {
  color: var(--color-text-secondary);
  font-weight: 600;
}

select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  outline: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
  min-height: 36px;
  padding: 0 10px;
}

select {
  min-height: 36px;
  padding: 0 10px;
}

textarea {
  min-height: 78px;
  resize: vertical;
  padding: 9px 10px;
}

select:focus,
textarea:focus,
input:focus {
  border-color: var(--color-border-strong);
  box-shadow: 0 0 0 3px rgba(48, 48, 48, 0.08);
}

.note-field {
  margin-top: 10px;
}

.drop-zone {
  display: grid;
  min-height: 160px;
  place-items: center;
  gap: 6px;
  margin-top: 12px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  background: #fafafa;
  color: var(--color-text-secondary);
  padding: 18px;
  text-align: center;
}

.drop-zone strong {
  color: var(--color-text);
}

.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: #f3f3f3;
}

.drop-icon {
  width: 28px;
  height: 28px;
  color: var(--color-gold);
}

.filters-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 190px;
  gap: 10px;
}

.filter-field {
  min-height: 36px;
  padding: 0 10px;
}

.documents-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.document-list {
  display: grid;
  gap: 8px;
}

.document-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 11px;
}

.document-item:hover {
  background: var(--color-surface-hover);
}

.document-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.document-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.document-title-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-badge {
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fafafa;
  padding: 2px 5px;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.document-meta span {
  border-radius: 999px;
  background: #f3f4f6;
  padding: 3px 7px;
}

.document-note {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.document-buttons {
  display: flex;
  gap: 6px;
}

.document-empty {
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  padding: 24px;
  color: var(--color-text-secondary);
  text-align: center;
}

.documents-table .document-empty {
  border: 0;
  border-radius: 0;
  padding: 32px 12px;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  padding: 18px;
}

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

.upload-modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  padding: 16px;
}

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

.modal-header p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
}

.upload-modal .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.governance-section {
  margin-bottom: 58px;
}

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

.governance-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px;
}

.governance-grid p {
  margin-bottom: 0;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

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

  .work-grid,
  .documents-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(300px, calc(100vw - 48px));
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .topbar {
    padding: 10px 14px;
  }

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

  .date-chip {
    display: none;
  }

  .content {
    padding: 18px 14px 86px;
  }

  .page-heading,
  .section-header {
    display: grid;
  }

  .page-heading.app-view.active-view {
    display: grid !important;
  }

  .heading-actions,
  .document-actions {
    justify-content: start;
  }

  .form-grid,
  .governance-grid {
    grid-template-columns: 1fr;
  }

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

  .documents-toolbar,
  .decisions-toolbar,
  .upload-modal .form-grid {
    grid-template-columns: 1fr;
  }

  .folder-file {
    grid-template-columns: 1fr;
  }

  .table-actions,
  .modal-actions {
    justify-content: flex-start;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 30;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    padding: 5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav a {
    flex-direction: column;
    min-width: 0;
    min-height: 46px;
    gap: 2px;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
    font-size: 12px;
  }

  .mobile-bottom-nav a span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .topbar-actions {
    display: none;
  }

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

  .button {
    width: 100%;
  }

  .document-item {
    grid-template-columns: 1fr;
  }

  .document-buttons {
    justify-content: flex-start;
  }
}
