/* Correctifs de présentation v2.1.1. */
/* Le bouton et le statut gardent deux zones distinctes. */
.folder-item .folder-main {
  min-height: 98px;
  padding-right: 96px;
}

/* Affichage ponctuel du code d'activation manuel. */
#employeeInvitationModeRow small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

#manualCodeDialog {
  padding: 27px;
}

.manual-code-person {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  margin: 15px 0;
  background: var(--sky);
  border-radius: 11px;
}

.manual-code-person small {
  color: var(--muted);
}

.manual-code-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
}

.manual-code-copy input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
}

.manual-code-warning {
  color: #9a5b0b;
  background: #fff4df;
  border: 1px solid #efd19c;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.45;
}

#finishManualCode {
  width: 100%;
}

@media (max-width: 600px) {
  .manual-code-copy {
    grid-template-columns: 1fr;
  }

  .manual-code-copy .primary {
    width: 100%;
  }
}

.folder-item .folder-settings {
  top: 50px;
  bottom: auto;
  right: 11px;
  width: 36px;
  height: 36px;
  color: var(--blue, #2774e6);
  border-color: var(--blue, #2774e6);
  background: rgba(39, 116, 230, 0.10);
  font-size: 20px;
}

.folder-item .folder-settings:hover {
  color: var(--blue, #2774e6);
  background: rgba(39, 116, 230, 0.20);
}

.folder-item .folder-settings:focus-visible {
  outline: 2px solid var(--blue, #2774e6);
  outline-offset: 2px;
}

/* Correctifs intégrés. À charger après les styles existants. */
/* Sur ordinateur, le pied de page descend au bas de la zone centrale. */
@media (min-width: 851px) {
  .app-shell > main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .app-shell > main > .view.active {
    flex: 1 0 auto;
  }

  .app-shell > main > .privacy-footer {
    flex-shrink: 0;
    margin-top: 24px;
    margin-bottom: 30px;
  }
}

/* Choix explicite de la source des photos sur mobile. */
.photo-source-picker {
  display: block;
  margin-top: 12px;
  color: #596273;
  font-size: 13px;
}

.photo-source-picker > strong {
  display: block;
  margin-bottom: 8px;
}

.photo-source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.photo-source-button {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid var(--blue, #2774e6);
  border-radius: 11px;
  background: rgba(39, 116, 230, .10);
  color: var(--blue, #2774e6);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.photo-source-button:focus-within {
  outline: 2px solid var(--blue, #2774e6);
  outline-offset: 2px;
}

.photo-source-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.expense-source-picker {
  margin: 13px 0;
}

#expenseReceiptName {
  display: block;
  margin-top: 8px;
  color: var(--muted, #778196);
  overflow-wrap: anywhere;
}

[data-theme="dark"] .photo-source-picker {
  color: #c0c8d4;
}

[data-theme="dark"] .photo-source-button {
  border-color: #69aaf4;
  background: rgba(54, 130, 220, .16);
  color: #a9d1ff;
}

@media (max-width: 420px) {
  .photo-source-actions {
    grid-template-columns: 1fr;
  }
}

.form-card > .work-date-field {
  display: block;
  margin: 0 0 19px;
  padding: 13px 14px;
  border: 1px solid rgba(39, 116, 230, .28);
  border-radius: 12px;
  background: rgba(39, 116, 230, .07);
  color: var(--ink, #172033);
  font-weight: 800;
}

.work-date-field input {
  max-width: 280px;
  background: var(--white, #fff);
}

[data-theme="dark"] .form-card > .work-date-field {
  border-color: rgba(105, 170, 244, .4);
  background: rgba(54, 130, 220, .13);
  color: #eef4fb;
}

@media (max-width: 600px) {
  .work-date-field input {
    max-width: none;
  }
}

.meal-rule-card {
  cursor: default;
  user-select: none;
}

.meal-rule-card.meal-rule-pending {
  border-color: #d79a25;
  background: rgba(215, 154, 37, .12);
}

.meal-rule-card.meal-rule-pending .check,
.meal-state.pending {
  color: #d79a25;
}

.meal-rule-card.meal-rule-none {
  opacity: .72;
}

.meal-state {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(39, 116, 230, .10);
  color: var(--blue, #2774e6);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.meal-state.refused,
.meal-state.none {
  background: rgba(119, 129, 150, .12);
  color: var(--muted, #778196);
}

.meal-state.pending {
  background: rgba(215, 154, 37, .12);
}

.meal-decision.approve-meal {
  border-color: #2f9d63;
  color: #2f9d63;
}

.meal-decision.refuse-meal {
  border-color: #bf5960;
  color: #bf5960;
}

[data-theme="dark"] .meal-rule-card.meal-rule-pending,
[data-theme="dark"] .meal-state.pending {
  background: rgba(232, 174, 63, .16);
}
