/*
  The companies list on the admin portal and the company profile drawer
  (class.company_profile_drawer.php): the cards, the mark, the profile card, the number
  tiles, the settings_row groups (global.css), the login bars. px throughout — a rem is 10px
  on this site.
*/

.cpd_list,
.company_profile_container,
.company_add_admin_container
{
  --cpd_ink: #1f2a2b;
  --cpd_muted: #6b7c7d;
  --cpd_faint: #9fb3b4;
  --cpd_line: #d3e2e3;
  --cpd_brand: #0f7777;
  --cpd_brand_deep: #0b6060;
  --cpd_brand_wash: #e2efef;
  --cpd_brand_edge: #9fd3d8;
  color: var(--cpd_ink);
}
.cpd_list *, .company_profile_container *, .company_add_admin_container * { box-sizing: border-box; }
.cpd_faint { color: var(--cpd_faint); font-style: italic; }

/* ---- the mark ---- */

.cpd_mark
{
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cpd_brand);
  color: white;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cpd_mark_3 { font-size: 14px; letter-spacing: 0.2px; }
.cpd_mark_4 { font-size: 12px; letter-spacing: 0; }
.cpd_mark_big { width: 60px; height: 60px; border-radius: 14px; font-size: 22px; }
.cpd_mark_big.cpd_mark_3 { font-size: 18px; }
.cpd_mark_big.cpd_mark_4 { font-size: 15px; }

/* ---- pills, tags ---- */

.cpd_pill
{
  flex: none;
  margin-left: 10px;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.cpd_pill_active  { background: #e3f6ec; color: #1f7a45; }
.cpd_pill_pending { background: #fff4dd; color: #a66b00; }
.cpd_pill_quiet   { background: #eef1f3; color: var(--cpd_muted); }
.cpd_tag
{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}
.cpd_tag_abbr  { background: var(--cpd_brand_wash); color: var(--cpd_brand_deep); border: 1px solid var(--cpd_brand_edge); letter-spacing: 0.6px; text-transform: uppercase; }
.cpd_tag_short { background: #f1f4f5; color: var(--cpd_muted); border: 1px solid var(--cpd_line); }
.cpd_tag_live  { background: #e3f6ec; color: #1f7a45; border: 1px solid #bfe7cf; }
.cpd_live_dot  { width: 6px; height: 6px; border-radius: 50%; background: #1f7a45; display: inline-block; }
.cpd_count
{
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 11px;
  background: var(--cpd_brand_wash);
  color: var(--cpd_brand);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0;
  vertical-align: middle;
}

/* ================================================================ the list */

.cpd_list_head
{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cpd_list_title h2 { font-size: 22px; font-weight: 800; color: var(--cpd_ink); }
.cpd_list_hint { color: var(--cpd_muted); font-size: 13.5px; margin-top: 3px; }
.cpd_add
{
  flex: none;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1.5px solid var(--cpd_brand);
  background: var(--cpd_brand);
  color: white;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cpd_add:hover, .cpd_add:focus { background: var(--cpd_brand_deep); border-color: var(--cpd_brand_deep); color: white; outline: none; }

.cpd_search_wrap { position: relative; margin-bottom: 16px; }
.cpd_search_wrap .bi
{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cpd_faint);
  font-size: 15px;
  pointer-events: none;
}
.cpd_search_wrap .cpd_search
{
  height: 44px;
  padding: 8px 14px 8px 40px;
  font-size: 15px;
  border: 1.5px solid var(--cpd_line);
  border-radius: 10px;
  box-shadow: none;
  background: white;
}
.cpd_search_wrap .cpd_search:focus { border-color: var(--cpd_brand); box-shadow: none; }

.cpd_grid
{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
@media (max-width: 520px)
{
  .cpd_grid { grid-template-columns: 1fr; gap: 8px; }
}
.cpd_card
{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  background: white;
  border: 1px solid var(--cpd_line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 61, 64, 0.06);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.cpd_card:hover { border-color: var(--cpd_brand_edge); box-shadow: 0 4px 14px rgba(11, 61, 64, 0.10); transform: translateY(-1px); }
.cpd_card:active { transform: none; background: #f7fbfb; }
.cpd_card.hide_me { display: none; }
.cpd_card_text { flex: 1; min-width: 0; }
.cpd_card_name
{
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cpd_card_sub { font-size: 13px; color: var(--cpd_muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpd_card_line { display: flex; align-items: center; margin-top: 7px; min-width: 0; }
.cpd_card_line .cpd_pill { margin-left: 8px; }
.cpd_card_plan { font-size: 12.5px; color: var(--cpd_ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpd_card_facts { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--cpd_faint); }
.cpd_card_chevron { flex: none; color: var(--cpd_faint); font-size: 15px; }
.cpd_card:hover .cpd_card_chevron { color: var(--cpd_brand); }
.cpd_empty, .cpd_no_match
{
  padding: 40px 16px;
  text-align: center;
  color: var(--cpd_faint);
  background: white;
  border: 1px dashed var(--cpd_line);
  border-radius: 12px;
}
.cpd_no_match.hide_me { display: none; }

/* ================================================================ the profile */

.cpd_body { padding: 18px 16px 30px; }

.cpd_profile
{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: white;
  border: 1px solid var(--cpd_line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 61, 64, 0.06);
}
.cpd_profile_text { flex: 1; min-width: 0; }
.cpd_profile_name { font-size: 18px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cpd_profile_line { font-size: 13.5px; color: var(--cpd_muted); margin-top: 2px; }
.cpd_profile_tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.cpd_tiles
{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 480px)
{
  .cpd_tiles { grid-template-columns: repeat(2, 1fr); }
}
.cpd_tile
{
  background: white;
  border: 1px solid var(--cpd_line);
  border-radius: 12px;
  padding: 12px 12px 10px;
  text-align: center;
}
.cpd_tile_icon
{
  width: 30px;
  height: 30px;
  margin: 0 auto 6px;
  border-radius: 8px;
  background: var(--cpd_brand_wash);
  color: var(--cpd_brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.cpd_tile_number { font-size: 22px; font-weight: 800; line-height: 1; }
.cpd_tile_label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--cpd_faint); margin-top: 4px; }

.cpd_title_row { display: flex; align-items: center; justify-content: space-between; }
.cpd_title_action
{
  border: 0;
  background: transparent;
  color: var(--cpd_brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cpd_title_action:hover { color: var(--cpd_brand_deep); text-decoration: underline; }
.cpd_row_action { flex: none; margin-left: 10px; color: var(--cpd_faint); font-size: 15px; padding: 6px; }
.cpd_row_action:hover { color: var(--cpd_brand); }
.company_profile_container .settings_row_sub { overflow-wrap: anywhere; }
.cpd_group_empty { padding: 16px 14px; color: var(--cpd_muted); font-size: 13.5px; line-height: 1.45; }

.cpd_card_box
{
  background: white;
  border: 1px solid var(--cpd_line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 61, 64, 0.06);
  padding: 14px 16px;
}
.cpd_bar_row + .cpd_bar_row { margin-top: 10px; }
.cpd_bar_head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.cpd_bar { height: 7px; background: var(--cpd_brand_wash); border-radius: 10px; overflow: hidden; }
.cpd_bar_fill { height: 7px; background: var(--cpd_brand); border-radius: 10px; }
.cpd_box_note { font-size: 12px; color: var(--cpd_faint); margin-top: 12px; }

.cpd_analytics_row { display: flex; gap: 8px; align-items: center; }
.cpd_analytics_row .role_selector
{
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1.5px solid var(--cpd_line);
  border-radius: 8px;
  box-shadow: none;
}
.cpd_run
{
  flex: none;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1.5px solid var(--cpd_brand);
  background: var(--cpd_brand);
  color: white;
  font-weight: 700;
}
.cpd_run:hover, .cpd_run:focus { background: var(--cpd_brand_deep); border-color: var(--cpd_brand_deep); color: white; outline: none; }
.display_analytics_container:not(:empty) { margin-top: 14px; }

/* ================================================================ add admin */

.cpa_body { padding: 18px 14px 28px; }
.cpa_search_wrap { position: relative; margin: 0 0 12px; }
.cpa_search_wrap .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cpd_faint); font-size: 15px; pointer-events: none; }
.cpa_search_wrap .cpa_search
{
  height: 46px;
  padding: 8px 14px 8px 40px;
  font-size: 16px;   /* 16px stops ios zooming the page on focus */
  border: 1.5px solid var(--cpd_line);
  border-radius: 10px;
  box-shadow: none;
  background: white;
}
.cpa_search_wrap .cpa_search:focus { border-color: var(--cpd_brand); box-shadow: none; }
.cpa_search_wrap.hide_me { display: none; }
.cpa_results .pd_result { width: 100%; text-align: left; font: inherit; color: var(--cpd_ink); outline: none; -webkit-tap-highlight-color: transparent; }
.cpa_results .cpa_pick { cursor: pointer; }
.cpa_results .cpa_pick:hover { border-color: var(--cpd_brand_edge); }
.cpa_results .cpa_pick .pd_card_check { opacity: 0.25; }
.cpa_results .cpa_pick:hover .pd_card_check { opacity: 1; }
.cpa_results .cpa_taken { cursor: default; opacity: 0.7; }
.cpa_results.hide_me, .cpa_none.hide_me, .cpa_new.hide_me, .cpa_picked.hide_me { display: none; }
.cpa_none
{
  margin: 0 0 4px;
  padding: 12px 14px;
  background: white;
  border: 1px dashed var(--cpd_line);
  border-radius: 10px;
  color: var(--cpd_muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.cpa_picked_row { position: relative; }
.cpa_unpick
{
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #f1f4f5;
  color: var(--cpd_muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.cpa_unpick:hover { background: var(--cpd_brand_wash); color: var(--cpd_brand); }
.cpa_fields { display: flex; flex-direction: column; gap: 8px; }
.cpa_fields .form-control, .company_add_admin_container .cpa_message
{
  padding: 8px 12px;
  font-size: 16px;
  color: var(--cpd_ink);
  background: white;
  border: 1.5px solid var(--cpd_line);
  border-radius: 8px;
  box-shadow: none;
}
.cpa_fields .form-control { height: 44px; }
.company_add_admin_container .cpa_message { height: auto; min-height: 84px; resize: vertical; }
.cpa_fields .form-control:focus, .company_add_admin_container .cpa_message:focus { border-color: var(--cpd_brand); box-shadow: none; }
.cpa_confirm_row { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 4px 2px; }
.cpa_confirm_row .cpa_confirm_box { flex: none; margin: 0; border-radius: 6px; }
.cpa_confirm_row .cpa_confirm_box .custom_checkbox_checker { top: 0; line-height: 1; }
.cpa_confirm_text { font-size: 14px; font-weight: 700; line-height: 1.3; cursor: pointer; }
