
:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0b0f1a;
  --muted: rgba(11, 15, 26, .62);


  --border: rgba(15, 23, 42, .12);
  --border-soft: rgba(15, 23, 42, .10);


  --shadow: 0 18px 55px rgba(15,23,42,.12);
  --shadow2: 0 22px 70px rgba(15,23,42,.12);


  --row-base: #ffffff;
  --row-alt:  #f3f5f8;


  --nav-h: 80px;
  --nav-gap: 14px;


  --navy: #0f2d55;
  --navy-head: #163a66;


  --sidebar-w: 260px;


  --pad: 16px;
  --pad-sm: 12px;
  --radius: 14px;


  --mobile-gutter: 10px;
}


/* =========================================================
   BASE
========================================================= */
body.appt-body,
body.appt-body *{
  box-sizing: border-box;
}


body.appt-body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}


.appt-body img,
.appt-body video,
.appt-body iframe{
  max-width: 100%;
  height: auto;
}


.appt-body *{ min-width: 0; }


/* =========================================================
   SPACE FOR NAVBAR/LOGO AREA
========================================================= */
body.appt-body .appt-shell{
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-h) + var(--nav-gap));
}


body.appt-body .appt-main{
  flex: 1;
  min-height: 0;
  padding-top: 0;
}


body.appt-body footer{ margin-top: 0 !important; }


.appt-body header,
.appt-body .topbar,
.appt-body .navbar,
.appt-body .nav-wrap{
  padding-top: 6px;
  padding-bottom: 6px;
}


/* =========================================================
   MAIN CONTENT + SIDEBAR INTERACTION
========================================================= */
.appt-body .main-content{
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important;
  padding: var(--pad);
  min-width: 0;
}


@media (min-width: 901px){
  .appt-body .main-content{
    padding: 22px 26px;
  }
  body.appt-body.sidebar-desktop .main-content{
    margin-left: var(--sidebar-w) !important;
  }
}


@media (max-width: 900px){
  .appt-body .main-content{
    margin-left: 0 !important;
    padding: 14px var(--mobile-gutter) !important;
  }
}


.appt-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  min-width: 0;
}


@media (max-width: 900px){
  body.appt-body.sidebar-open{ overflow: hidden; }
}


/* =========================================================
   CARD HEADER AREA (REGION CARD)
========================================================= */
.appt-card{
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 14px;
  margin-bottom: 28px;
  min-width: 0;
}


.appt-card-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}


.appt-text{
  width: 100%;
  padding-right: 96px;
  min-width: 0;
}


.appt-kicker{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(11,15,26,.55);
  margin-bottom: 6px;
}


.appt-title{
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  font-size: clamp(26px, 3.6vw, 40px);
}


.appt-desc{
  margin-top: 8px;
  max-width: 560px;
  line-height: 1.45;
  color: var(--muted);
  font-size: clamp(14px, 2.0vw, 18px);
  overflow-wrap: anywhere;
  word-break: break-word;
}


.appt-toggle{
  position: absolute;
  top: 22px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid #0b0f1a;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}


.appt-chev{
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #0b0f1a;
  transition: transform .25s ease;
}
.appt-toggle[aria-expanded="true"] .appt-chev{ transform: rotate(180deg); }


@media (max-width: 600px){
  .appt-card{ padding: 16px 14px 12px; }
  .appt-text{
    padding-right: 56px; /* avoid squeezing text too much on mobile */
  }
  .appt-toggle{
    top: 16px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}


/* =========================================================
   DROPDOWN AREA
========================================================= */
.appt-drop{
  overflow: hidden;
  max-height: 0;
  transition: max-height .26s ease;
  border-top: 1px solid var(--border-soft);
  margin-top: 12px;
  padding-top: 12px;
}


.appt-drop .dash-in{
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  box-shadow: var(--shadow2);
  overflow: hidden;
  min-width: 0;
}


/* =========================================================
   DASH TOP (TITLE + FILTER)
========================================================= */
.appt-drop .dash-top{
  padding: 16px;
  background: var(--navy);
}


.appt-drop .dash-top-row{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}


.appt-drop .dash-title{
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  min-width: 0;
  overflow-wrap: anywhere;
}


.appt-drop .dash-filter{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}


.appt-drop .dash-filter-label{
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.92);
}


.appt-drop .dash-filter-select{
  border-radius: 12px;
  padding: 10px 38px 10px 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.28);
  background: #fff;
  max-width: 100%;
}


@media (max-width: 680px){
  .appt-drop .dash-top-row{
    flex-direction: column;
    align-items: flex-start;
  }
  .appt-drop .dash-filter{ width: 100%; }
  .appt-drop .dash-filter-select{ width: 100%; }
}


/* =========================================================
   TABLE WRAP (DESKTOP/TABLET)
========================================================= */
.dash-tablewrap,
.appt-drop .dash-tablewrap{
  padding: 10px 14px 14px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


/* Make sure no other stylesheet forces table/td weird behavior */
table.dash-table,
table.dash-table *{
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}


table.dash-table{
  width: 100%;
  min-width: 860px; /* looks like your desktop screenshot; prevents squish */
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  overflow: hidden;
  table-layout: fixed;
}


/* Column widths (Committee | Position | Name | Location) */
table.dash-table thead th:nth-child(1),
table.dash-table tbody td:nth-child(1){ width: 42%; }


table.dash-table thead th:nth-child(2),
table.dash-table tbody td:nth-child(2){ width: 16%; }


table.dash-table thead th:nth-child(3),
table.dash-table tbody td:nth-child(3){ width: 30%; }


table.dash-table thead th:nth-child(4),
table.dash-table tbody td:nth-child(4){
  width: 12%;
  white-space: nowrap;
  text-align: left;
}


table.dash-table thead th{
  padding: 14px;
  background: var(--navy-head);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}


table.dash-table tbody td{
  padding: 14px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  font-size: 14px;
  background: var(--row-base);
  vertical-align: middle;


  /* Desktop: keep it readable */
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}


table.dash-table tbody tr.zebra td{ background: var(--row-alt); }
table.dash-table tbody tr:hover td{ background: rgba(15,45,85,.07); }
table.dash-table tbody tr:last-child td{ border-bottom: none; }


/* =========================================================
   IMPORTANT: HARD STOP any global CSS that flexes <td>
========================================================= */
table.dash-table td{
  display: table-cell !important;
  align-items: initial !important;
  justify-content: initial !important;
}


/* =========================================================
   NAME CELL (keep table geometry; flex only inside)
========================================================= */
td.name-cell{
  display: table-cell !important;
  white-space: normal;
  overflow: hidden;
}


.name-wrap{
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}


td.name-cell,
td.name-cell *{
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}


@font-face{
  font-family: 'Brush Script MT';
  src: url('../fonts/BrushScriptStd.otf') format('opentype');
}


.officer-eagle{
  font-family: 'Brush Script MT', cursive;
  font-size: 15px;
  color: #1f4068;
  white-space: nowrap;
  display: inline-block;
}


.officer-name{
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: inline-block;
}


.location-text{
  font-size: 14px;
  font-weight: 600;
  color: rgba(11,15,26,.75);
  white-space: nowrap; /* looks like your desktop screenshot */
}


/* Tablet: slightly smaller min-width */
@media (max-width: 820px){
  .dash-tablewrap{ padding: 10px 10px 12px; }
  table.dash-table{ min-width: 780px; }
}


/* =========================================================
   MOBILE TABLE -> TRUE CARD MODE (NO letter stacking)
========================================================= */
@media (max-width: 600px){


  .appt-body .main-content,
  .appt-body .appt-wrap{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: var(--mobile-gutter) !important;
    padding-right: var(--mobile-gutter) !important;
  }


  .dash-tablewrap{
    padding: 0;
    overflow: visible;
  }


  /* switch table into block cards */
  table.dash-table{
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
    table-layout: auto !important;
  }


  table.dash-table,
  table.dash-table tbody,
  table.dash-table tr,
  table.dash-table td{
    display: block !important;
    width: 100% !important;
  }


  table.dash-table thead{ display: none !important; }


  table.dash-table tbody tr{
    margin: 10px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(15,23,42,.10);
    border: 1px solid rgba(15,23,42,.10);
    background: #fff;
  }


  /* prevent any break-all / narrow column artifacts */
  table.dash-table tbody td{
    padding: 12px !important;
    border-bottom: 1px solid rgba(15,23,42,.08) !important;
    background: transparent !important;


    /* THE FIX for your screenshot:
       force normal word breaking and full width */
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    hyphens: auto !important;
    max-width: 100% !important;
  }


  table.dash-table tbody td:last-child{ border-bottom: none !important; }


  table.dash-table tbody td::before{
    content: attr(data-label);
    display: block !important;
    margin-bottom: 6px;


    font-weight: 900;
    font-size: 12px;
    color: rgba(11,15,26,.60);
    text-transform: uppercase;
    letter-spacing: .06em;


    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }


  /* Name cell in card mode */
  td.name-cell{
    display: block !important;
    overflow: visible !important;
  }


  .name-wrap{
    align-items: baseline;
    gap: 8px;
  }


  /* Location should not be nowrap on mobile */
  .location-text{
    white-space: normal !important;
  }
}


/* =========================================================
   PUBLIC “STACKED OFFICER CARDS” (your extra selectors)
========================================================= */
:where(
  .appointed-wrap,
  .appointed-container,
  .appointed-list,
  .officer-list,
  .cards,
  .card-list,
  .results,
  .list-wrap,
  .region-wrap,
  .region-container,
  .region-content
){
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  min-width: 0;
}


@media (max-width: 600px){
  :where(
    .appointed-wrap,
    .appointed-container,
    .appointed-list,
    .officer-list,
    .cards,
    .card-list,
    .results,
    .list-wrap,
    .region-wrap,
    .region-container,
    .region-content
  ){
    max-width: 100% !important;
    padding-left: var(--mobile-gutter) !important;
    padding-right: var(--mobile-gutter) !important;
  }
}


:where(
  .appointed-card,
  .officer-card,
  .member-card,
  .list-card,
  .result-card,
  .card-item,
  .officer-box,
  .officer-item
){
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
}


:where(
  .appointed-card,
  .officer-card,
  .member-card,
  .list-card,
  .result-card,
  .card-item,
  .officer-box,
  .officer-item
) :where(h1,h2,h3,h4,h5,h6,p,span,div){
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}


:where(
  .appointed-card,
  .officer-card,
  .member-card,
  .list-card,
  .result-card,
  .card-item,
  .officer-box,
  .officer-item
) :where(hr, .divider, .line){
  max-width: 100%;
}


@media (max-width: 600px){
  :where(
    .appointed-card,
    .officer-card,
    .member-card,
    .list-card,
    .result-card,
    .card-item,
    .officer-box,
    .officer-item
  ) :where(h1,h2,h3){
    font-size: clamp(16px, 4.5vw, 20px);
    line-height: 1.2;
  }


  :where(
    .appointed-card,
    .officer-card,
    .member-card,
    .list-card,
    .result-card,
    .card-item,
    .officer-box,
    .officer-item
  ) :where(p,span,div){
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.35;
  }
}