/* Modernized Commish "Administer Users" pages. The "Users With Team" (index.rhtml) and "Users Without Team"
   (without_team.rhtml) pages render the exact same _users_table_header/_users_table_body/_users_table_footer
   and _lineup_lockout_msg partials, so both are scoped under the shared .modernCommishUsersPage wrapper class
   (same shared-partial consolidation pattern used for the nav buttons and league email pages). The New/Edit
   User form (new.rhtml/edit.rhtml -> _form.rhtml, _user_info, _failed_emails, _trophy_adjustment, plus the
   reused /user_profile/_user_settings, _email_notifications, _mailing_address partials -- all sharing the same
   generic .row/.card-header/.card/.form-control markup used throughout the app) is scoped under its own
   .modernCommishUserFormPage wrapper.

   Functional/inline styles left untouched: user_row_style() sets inline style="..." directly on <tr> for
   lineup-lockout (red bg), commish (red text), and never-logged-in (italic) -- inline styles win over any CSS
   here so they keep working. The JS-driven .highlightRow (current user, added via highlightCurrentUserRows())
   is explicitly restored below since it would otherwise lose to the goldRow/grayRow/whiteRow rules, the same
   fix applied on the Administer Seasons page. */

/* ---------- Users With/Without Team list (index.rhtml / without_team.rhtml) ---------- */

.modernCommishUsersPage #pageTitle {
  margin-bottom: 16px;
}

.modernCommishUsersPage .alert-danger {
  background: #fdecea;
  border: none;
  border-left: 4px solid #c30900;
  border-radius: 6px;
  color: #7a1a10;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 800px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.modernCommishUsersPage .alert-warning {
  background: #fff8e8;
  border: none;
  border-left: 4px solid #e8a83c;
  border-radius: 6px;
  color: #6b4d10;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 800px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.modernCommishUsersPage .alert-warning ol {
  margin: 6px 0;
  padding-left: 22px;
}

.modernCommishUsersPage .alert-info {
  background: #eaf2fc;
  border: none;
  border-left: 4px solid #1c5bc4;
  border-radius: 6px;
  color: #1c3f66;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 800px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.modernCommishUsersPage .hideUserSettingsToggle {
  margin-top: -6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.modernCommishUsersPage .hideUserSettingsToggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

.modernCommishUsersPage table.hideUserSettingsCols .userSettingsCol {
  display: none;
}

.modernCommishUsersPage .adminTable.users {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e6f2;
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}

.modernCommishUsersPage #usersWithTeamTable,
.modernCommishUsersPage #usersWithoutTeamTable,
.modernCommishUsersPage #usersWithCcEmailTable,
.modernCommishUsersPage #usersWithPendingResetTable {
  width: auto;
  margin: 0;
  border-collapse: collapse;
  white-space: nowrap;
}

.modernCommishUsersPage thead tr#header {
  background-color: #0b1a67;
}

.modernCommishUsersPage thead tr#header td {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 5px 5px;
  border: 1px solid #24358c;
}

.modernCommishUsersPage thead tr#header td a.sortheader {
  color: #fff;
}

.modernCommishUsersPage thead tr#header td a.sortheader:hover {
  color: #dde3f2;
}

.modernCommishUsersPage tbody td {
  border: 1px solid #e2e6f2;
  padding: 2px 4px;
  font-size: 11px;
}

.modernCommishUsersPage tbody tr.goldRow td,
.modernCommishUsersPage tbody tr.grayRow td {
  background-color: #f4f6fb;
}

.modernCommishUsersPage tbody tr.whiteRow td {
  background-color: #fff;
}

.modernCommishUsersPage tbody tr.highlightRow td {
  background-color: #d0a9f5;
}

.modernCommishUsersPage tbody tr:hover td {
  background-color: #eef1fa;
}

.modernCommishUsersPage td.centerText {
  text-align: center;
}

.modernCommishUsersPage .actionLink a {
  color: #0b1a67;
  font-weight: 600;
  text-decoration: none;
}

.modernCommishUsersPage .actionLink a:hover {
  text-decoration: underline;
}

.modernCommishUsersPage .deleteAction a {
  color: #c30900;
}

.modernCommishUsersPage .resetPasswordAction a {
  color: #0b6726;
}

.modernCommishUsersPage .disabledActionLink {
  color: #b7bdca;
  font-weight: 600;
}

.modernCommishUsersPage tfoot td {
  background: #fff;
  border: none;
  padding: 10px 8px;
  font-size: 12px;
  color: #6b7280;
  white-space: normal;
  line-height: 1.6;
}

.modernCommishUsersPage tfoot p {
  margin: 0;
}

.modernCommishUsersPage tfoot .note {
  display: block;
  margin-top: 8px;
}

/* ---------- New/Edit User form (_form.rhtml + shared /user_profile partials) ---------- */

.modernCommishUserFormPage #pageTitle {
  margin-bottom: 16px;
}

.modernCommishUserFormPage #errorExplanation {
  max-width: 525px;
  box-sizing: border-box;
  background: #fdecea;
  border: none;
  border-left: 4px solid #c30900;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 16px;
  color: #7a1a10;
}

.modernCommishUserFormPage #errorExplanation h2 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #7a1a10;
  background: none;
  padding: 0;
}

.modernCommishUserFormPage #errorExplanation ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.modernCommishUserFormPage .row {
  margin: 0;
}

.modernCommishUserFormPage .col-sm-10 {
  padding-left: 0;
  padding-right: 0;
  max-width: 525px;
}

/* .card-header is a sibling of .card in this markup (not nested inside it), so both need matching
   max-width/borders/radius to visually read as one card -- same layout quirk handled on several other pages. */
.modernCommishUserFormPage .card-header {
  max-width: 525px;
  box-sizing: border-box;
  background: #e8ecf7;
  border: 1px solid #e2e6f2;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 10px 18px;
  margin-top: 0;
}

.modernCommishUserFormPage .row + .row .card-header {
  margin-top: 20px;
}

.modernCommishUserFormPage .ptfgCardHeader {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #0b1a67;
}

.modernCommishUserFormPage .ptfgCardHeader.ptfgGreen {
  color: #0b6726 !important;
}

.modernCommishUserFormPage .card {
  max-width: 525px;
  box-sizing: border-box;
  border: 1px solid #e2e6f2;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(11, 26, 103, 0.06);
  margin-top: 0;
}

.modernCommishUserFormPage .card-block {
  padding: 18px 18px 8px;
}

.modernCommishUserFormPage .card-block .form-group:last-child {
  margin-bottom: 0;
}

.modernCommishUserFormPage .form-group label {
  color: #333;
}

.modernCommishUserFormPage .form-control {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd4e0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}

.modernCommishUserFormPage .form-control:focus {
  outline: none;
  border-color: #1c5bc4;
  box-shadow: 0 0 0 3px rgba(28, 91, 196, 0.15);
}

.modernCommishUserFormPage select.form-control {
  max-width: 220px;
}

.modernCommishUserFormPage .text-muted {
  color: #6b7280;
  display: block;
  margin-top: 6px;
}

.modernCommishUserFormPage .radio {
  margin-top: 6px;
}

.modernCommishUserFormPage .radio label {
  display: inline;
  margin: 0;
  font-weight: 400;
  color: #333;
}

.modernCommishUserFormPage .userFlagLabelRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.modernCommishUserFormPage .userFlagLabelRow label {
  margin: 0;
}

.modernCommishUserFormPage #userFlagImage {
  display: block;
  max-height: 20px;
}

.modernCommishUserFormPage .userInfoCheckboxRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.modernCommishUserFormPage .userInfoCheckboxRow label {
  margin: 0;
}

.modernCommishUserFormPage .ptfgCheckboxNote {
  margin-top: 0;
  margin-left: 24px;
  margin-bottom: 0;
}

.modernCommishUserFormPage .ptfgCheckboxNote .text-muted {
  margin-top: 0;
}

.modernCommishUserFormPage .ptfgCheckboxNote + label.form-control-label {
  display: block;
  margin-top: 16px;
}

.modernCommishUserFormPage .teamFormSubmitRow,
.modernCommishUserFormPage .btn.ptfgWhiteOnBlue {
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(11, 26, 103, 0.2);
}

.modernCommishUserFormPage .btn.ptfgWhiteOnBlue {
  margin-top: 20px;
}

/* Trophy Adjustments table (_trophy_adjustment.rhtml) */

.modernCommishUserFormPage .card-block table {
  border-collapse: collapse;
  margin-top: 4px;
}

.modernCommishUserFormPage .card-block table td {
  padding: 4px 6px;
  font-size: 13px;
  border: none;
}

.modernCommishUserFormPage .card-block table input.number {
  width: 40px;
  text-align: center;
  border: 1px solid #cfd4e0;
  border-radius: 6px;
  padding: 3px 4px;
  font-size: 13px;
}
