.ffl-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

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

.ffl-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
}

.ffl-nav {
  margin-top: 6px;
  display: flex;
  gap: 12px;
}

.ffl-nav-link {
  font-size: 14px;
  text-decoration: none;
  color: #2f3a2f;
}

.ffl-nav-link.is-active {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ffl-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ffl-user {
  font-size: 14px;
  color: #2f3a2f;
}

.ffl-logout {
  font-size: 14px;
  color: #9b7b2f;
  text-decoration: none;
}

.ffl-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 16px;
}

.ffl-stat-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.ffl-stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #1f2a1f;
}

.ffl-stat-label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.ffl-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f6f6f6;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0;
}

.ffl-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ffl-filters select,
.ffl-filters input[type="search"] {
  height: 38px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font-size: 14px;
}

.ffl-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ffl-wrapper .ffl-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #b88a34;
  border-radius: 10px;
  padding: 0 14px;
  background: #b88a34;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 40ms ease;
}

.ffl-wrapper .ffl-btn:hover {
  background: #a77b2f;
  border-color: #a77b2f;
}

.ffl-wrapper .ffl-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.ffl-wrapper .ffl-btn:focus-visible {
  outline: 3px solid rgba(184, 138, 52, 0.28);
  outline-offset: 2px;
}

.ffl-wrapper .ffl-btn-primary {
  background: #9b7229;
  border-color: #9b7229;
}

.ffl-link {
  font-size: 14px;
  color: #2f3a2f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ffl-table-wrapper {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  overflow: hidden;
}

.ffl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ffl-table thead th {
  background: #fafafa;
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid #e6e6e6;
  color: #2f3a2f;
}

.ffl-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.ffl-select-cell {
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center;
  vertical-align: middle;
}

.ffl-table tr:last-child td {
  border-bottom: none;
}

.ffl-table .is-right {
  text-align: right;
  white-space: nowrap;
}

.ffl-wrapper .ffl-action-btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #b88a34;
  background: #b88a34;
  color: #fff;
  padding: 0 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 40ms ease;
}

.ffl-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Make roster actions slightly more compact */
.ffl-actions-cell .ffl-action-btn {
  height: 30px;
  padding: 0 9px;
  font-size: 12.5px;
}

.ffl-wrapper .ffl-action-btn:hover {
  background: #a77b2f;
  border-color: #a77b2f;
}

.ffl-wrapper .ffl-action-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.ffl-wrapper .ffl-action-btn:focus-visible {
  outline: 3px solid rgba(184, 138, 52, 0.28);
  outline-offset: 2px;
}

.ffl-wrapper .ffl-btn.ffl-modal-cancel,
.ffl-wrapper .ffl-action-btn.ffl-modal-cancel {
  background: #fff;
  color: #2f3a2f;
  border-color: #d9d9d9;
  box-shadow: none;
}

.ffl-wrapper .ffl-btn.ffl-modal-cancel:hover,
.ffl-wrapper .ffl-action-btn.ffl-modal-cancel:hover {
  background: #f6f6f6;
  border-color: #cfcfcf;
}

.ffl-action-btn.is-danger {
  border-color: #e3c6c6;
  background: #fdecec;
  color: #7a1f1f;
}

.ffl-actions-cell .ffl-muted {
  font-size: 12px;
}

.ffl-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #d9d9d9;
  background: #fff;
}

.ffl-badge.is-active {
  border-color: #bcd8bc;
  background: #eaf7ea;
  color: #245b24;
}

.ffl-badge.is-inactive {
  border-color: #e3c6c6;
  background: #fdecec;
  color: #7a1f1f;
}

.ffl-no-results,
.ffl-muted {
  color: #6b6b6b;
}

/* Modal */
.ffl-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

/* Lock background scroll when modal open */
body.ffl-modal-open {
  overflow: hidden;
}

.ffl-modal-content {
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}

.ffl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.ffl-modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.ffl-modal-close {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #6b6b6b;
}

.ffl-modal-body {
  padding: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.ffl-modal-footer {
  padding: 14px 16px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 520px) {
  .ffl-modal {
    padding: 12px;
  }
  .ffl-modal-content {
    max-height: calc(100vh - 24px);
  }
  .ffl-modal-body {
    padding: 12px;
  }
}

.ffl-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ffl-form-group {
  margin-bottom: 12px;
}

.ffl-form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #2f3a2f;
}

.ffl-form-group input,
.ffl-form-group select,
.ffl-form-group textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
}

.ffl-help {
  margin: 6px 0 0;
  font-size: 12px;
  color: #6b6b6b;
}

/* Login */
.ffl-login-wrapper {
  max-width: 440px;
  margin: 60px auto;
  padding: 0 16px;
}

.ffl-login-box {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.ffl-login-logo h1 {
  margin: 0;
  font-size: 24px;
}

.ffl-login-error {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecec;
  border: 1px solid #e3c6c6;
  color: #7a1f1f;
  font-size: 13px;
}

.ffl-remember {
  margin-top: 2px;
}

.ffl-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.ffl-remember-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.ffl-remember-label span {
  font-size: 14px;
  color: #2f3a2f;
}

.ffl-login-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #b88a34;
  background: #b88a34;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.ffl-access-denied {
  max-width: 560px;
  margin: 60px auto;
  padding: 0 16px;
  text-align: center;
}

.ffl-access-denied h2 {
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .ffl-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ffl-form-row {
    grid-template-columns: 1fr;
  }
}

