body[data-path="login"] .navbar,
body[data-path="login"] header.navbar {
  display: none !important;
}

body[data-path="login"] .ff-app-connect {
  margin-top: 16px;
}

body[data-path="login"] .ff-app-connect-button {
  border: 1px solid #1b7f5a;
  color: #1b7f5a;
  font-weight: 600;
}

body[data-path="login"] .ff-app-connect-button:hover,
body[data-path="login"] .ff-app-connect-button:focus {
  background: #1b7f5a;
  color: #ffffff;
}

body[data-path="login"] .ff-app-connect-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1040;
}

body[data-path="login"] .ff-app-connect-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body[data-path="login"] .ff-app-connect-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 24px 20px;
  width: min(640px, 92vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1050;
}

body[data-path="login"] .ff-app-connect-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

body[data-path="login"] .ff-app-connect-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #606060;
  cursor: pointer;
}

body[data-path="login"] .ff-app-connect-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
}

body[data-path="login"] .ff-app-connect-qr {
  text-align: center;
}

body[data-path="login"] .ff-app-connect-qr img {
  width: 180px;
  height: 180px;
}

body[data-path="login"] .ff-app-connect-url {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  word-break: break-all;
}

body[data-path="login"] .ff-app-connect-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #1a1a1a;
}

body[data-path="login"] .ff-app-connect-copy p {
  margin: 0 0 8px;
  color: #4b5563;
}

body[data-path="login"] .ff-app-connect-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

body[data-path="login"] .ff-app-connect-links a {
  color: #1b7f5a;
  font-weight: 600;
  text-decoration: none;
}

body[data-path="login"] .ff-app-connect-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  body[data-path="login"] .ff-app-connect-body {
    grid-template-columns: 1fr;
    text-align: center;
  }

  body[data-path="login"] .ff-app-connect-links {
    justify-content: center;
  }
}

.ff-web-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 20px;
  padding: 10px 0 18px;
  border-bottom: 1px solid rgba(23, 51, 40, 0.08);
  color: inherit;
  text-decoration: none;
}

.ff-web-sidebar-brand:hover,
.ff-web-sidebar-brand:focus {
  color: inherit;
  text-decoration: none;
}

.ff-web-sidebar-brand-mark {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 16px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #eff6f1 0%, #dfece4 100%);
  border: 1px solid #d7e4dc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.ff-web-sidebar-brand-mark img {
  width: 100%;
  max-width: 100%;
  max-height: 72px;
  height: auto;
  object-fit: contain;
  display: block;
}

.ff-web-sidebar-toggle {
  display: none;
}

.ff-web-sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .sidebar-column {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px) !important;
    max-width: min(82vw, 320px);
    flex: none;
    padding: 0;
    margin: 0;
    background: #ffffff;
    z-index: 1060;
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.22s ease;
    box-shadow: none;
  }

  .sidebar-column .web-sidebar {
    position: static;
    top: auto;
    height: 100%;
    overflow-y: auto;
    padding: 16px 16px 24px;
    background: #ffffff;
  }

  .main-column {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .ff-web-sidebar-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 0px) + 12px);
    left: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    appearance: none;
    border: 1px solid #d7e4dc;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(23, 51, 40, 0.12);
    z-index: 1055;
  }

  .ff-web-sidebar-toggle-line {
    display: block;
    width: 18px;
    height: 2.5px;
    border-radius: 999px;
    background: #173328;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .ff-web-sidebar-toggle:hover,
  .ff-web-sidebar-toggle:focus {
    background: #ffffff;
    border-color: #c7d9cf;
    outline: none;
  }

  .ff-web-sidebar-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(27, 127, 90, 0.16), 0 12px 32px rgba(23, 51, 40, 0.12);
  }

  .ff-web-sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(23, 51, 40, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1050;
  }

  body.ff-web-sidebar-open {
    overflow: hidden;
  }

  body.ff-web-sidebar-open .sidebar-column {
    transform: translateX(0);
    box-shadow: 18px 0 44px rgba(23, 51, 40, 0.18);
  }

  body.ff-web-sidebar-open .ff-web-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.ff-web-sidebar-open .ff-web-sidebar-toggle-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  body.ff-web-sidebar-open .ff-web-sidebar-toggle-line:nth-child(2) {
    opacity: 0;
  }

  body.ff-web-sidebar-open .ff-web-sidebar-toggle-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

.ff-portal-auth-page {
  min-height: calc(100vh - 120px);
  padding: 48px 20px;
  background:
    radial-gradient(circle at top left, rgba(27, 127, 90, 0.14), transparent 36%),
    linear-gradient(135deg, #f4efe5 0%, #fbf8f2 48%, #eef6f1 100%);
}

.ff-portal-auth-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 430px);
  gap: 32px;
  align-items: stretch;
}

.ff-portal-auth-brand {
  padding: 44px;
  border-radius: 28px;
  background: linear-gradient(145deg, #14392f 0%, #1d5a46 55%, #2f8264 100%);
  color: #f6f2e8;
  box-shadow: 0 28px 80px rgba(20, 57, 47, 0.18);
  position: relative;
  overflow: hidden;
}

.ff-portal-auth-brand::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(246, 242, 232, 0.08);
  right: -80px;
  bottom: -110px;
}

.ff-portal-auth-brand-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  margin-bottom: 24px;
}

.ff-portal-auth-brand-mark img {
  max-width: 58px;
  max-height: 58px;
}

.ff-portal-auth-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d9ecdf;
}

.ff-portal-auth-brand h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 0.95;
  color: #fffaf0;
}

.ff-portal-auth-tagline {
  max-width: 560px;
  margin: 0 0 28px;
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255, 250, 240, 0.92);
}

.ff-portal-auth-points {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ff-portal-auth-points p {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf7f1;
}

.ff-portal-auth-card {
  padding: 34px 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 64px rgba(24, 40, 33, 0.12);
  border: 1px solid rgba(24, 40, 33, 0.08);
  align-self: center;
}

.ff-portal-auth-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
  color: #173328;
}

.ff-portal-auth-form {
  margin-top: 22px;
}

.ff-portal-auth-form label {
  font-weight: 600;
  color: #224537;
}

.ff-portal-auth-form .form-control {
  height: 48px;
  border-radius: 14px;
  border: 1px solid #d5ded8;
  box-shadow: none;
}

.ff-portal-auth-form .form-control:focus {
  border-color: #1b7f5a;
  box-shadow: 0 0 0 3px rgba(27, 127, 90, 0.12);
}

.ff-portal-auth-actions {
  margin-top: 18px;
}

.ff-portal-auth-card .btn-primary {
  height: 48px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #1b7f5a 0%, #145640 100%);
  font-weight: 700;
}

.ff-portal-auth-card .btn-primary:hover,
.ff-portal-auth-card .btn-primary:focus {
  background: linear-gradient(135deg, #16694b 0%, #114734 100%);
}

.ff-portal-auth-links {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.ff-portal-auth-links a {
  color: #1b7f5a;
  font-weight: 600;
  text-decoration: none;
}

.ff-portal-auth-links a:hover,
.ff-portal-auth-links a:focus {
  text-decoration: underline;
}

.ff-portal-auth-status {
  min-height: 20px;
  margin-top: 14px;
}

@media (max-width: 960px) {
  .ff-portal-auth-shell {
    grid-template-columns: 1fr;
  }

  .ff-portal-auth-brand,
  .ff-portal-auth-card {
    padding: 28px 24px;
  }
}

.ff-portal-team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ff-portal-team-member {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: #f3f7f4;
  border: 1px solid #dbe7e0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ff-portal-team-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d9e7df;
  border: 1px solid rgba(29, 90, 70, 0.12);
}

.ff-portal-team-avatar--fallback {
  color: #1d5a46;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.ff-portal-team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #173328;
}

.ff-portal-comment-list {
  display: grid;
  gap: 16px;
}

.ff-portal-comment {
  padding-bottom: 16px;
  border-bottom: 1px solid #e6eee9;
}

.ff-portal-comment:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ff-portal-attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.ff-portal-attachment-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ff-portal-attachment-card:hover,
.ff-portal-attachment-card:focus {
  color: inherit;
  text-decoration: none;
}

.ff-portal-attachment-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ecf4ef 0%, #dfece4 100%);
  border: 1px solid #d7e4dc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ff-portal-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ff-portal-attachment-ext {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1d5a46;
}

.ff-portal-attachment-meta {
  padding: 10px 2px 0;
}

.ff-portal-attachment-name {
  font-weight: 600;
  color: #173328;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-portal-attachment-kind {
  margin-top: 2px;
}

.ff-portal-account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d9e7df;
  border: 1px solid rgba(29, 90, 70, 0.12);
}

.ff-portal-account-avatar--fallback {
  color: #1d5a46;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
}

.ff-portal-richtext > *:last-child {
  margin-bottom: 0;
}
