:root {

      --navy:        #143966;

      --navy-75:     rgba(20,57,102,0.75);

      --navy-10:     rgba(20,57,102,0.08);

      --teal:        #71d1db;

      --teal-pale:   rgba(113,209,219,0.12);

      --teal-mid:    rgba(113,209,219,0.35);

      --orange:      #e6803f;

      --orange-pale: rgba(230,128,63,0.10);

      --gray-50:     #f8f9fa;

      --gray-100:    #f1f3f5;

      --gray-200:    #e2e6ea;

      --gray-400:    #9aa3af;

      --gray-500:    #6c757d;

      --gray-700:    #495057;

      --gray-900:    #1a1f25;

      --white:       #ffffff;

      --shadow:      0 2px 8px rgba(20,57,102,0.08);

      --shadow-md:   0 4px 16px rgba(20,57,102,0.12);

      --radius:      10px;

      --font:        'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {

      font-family: var(--font);

      background: var(--gray-100);

      color: var(--gray-900);

      min-height: 100vh;

      -webkit-font-smoothing: antialiased;

    }

    /* ── LOGIN SCREEN ── */

    #login-screen {

      display: flex;

      align-items: center;

      justify-content: center;

      min-height: 100vh;

      background: var(--navy);

    }

    .login-card {

      background: var(--white);

      border-radius: 16px;

      padding: 48px 40px;

      width: 100%;

      max-width: 400px;

      box-shadow: 0 24px 64px rgba(0,0,0,0.35);

      text-align: center;

    }

    .wordmark {

      font-family: var(--font);

      font-size: 1.75rem;

      line-height: 1;

      margin-bottom: 4px;

      letter-spacing: -0.3px;

    }

    .wordmark .wm-cedar { font-weight: 800; color: var(--navy); }

    .wordmark .wm-foods { font-weight: 400; color: var(--teal); }

    .wordmark-nav .wm-cedar { color: var(--teal); }

    .wordmark-nav .wm-foods { color: var(--teal); opacity: 0.85; }

    .login-subtitle {

      color: var(--gray-400);

      font-size: 0.8125rem;

      letter-spacing: 0.3px;

      margin-bottom: 32px;

      text-transform: uppercase;

      font-weight: 700;

    }

    .login-card label {

      display: block;

      text-align: left;

      font-size: 0.8125rem;

      font-weight: 700;

      color: var(--navy);

      margin-bottom: 6px;

      letter-spacing: 0.3px;

      text-transform: uppercase;

    }

    .login-card input {

      width: 100%;

      padding: 11px 14px;

      border: 1.5px solid var(--gray-200);

      border-radius: 8px;

      font-size: 0.9375rem;

      font-family: var(--font);

      margin-bottom: 16px;

      outline: none;

      transition: border-color 0.2s;

      color: var(--gray-900);

    }

    .login-card input:focus { border-color: var(--teal); }

    .login-btn {

      width: 100%;

      padding: 12px;

      background: var(--navy);

      color: var(--white);

      border: none;

      border-radius: 8px;

      font-size: 0.9375rem;

      font-weight: 800;

      font-family: var(--font);

      cursor: pointer;

      transition: background 0.2s;

      margin-top: 4px;

      letter-spacing: 0.5px;

      text-transform: uppercase;

    }

    .login-btn:hover { background: #1c4d8a; }

    .login-error {

      color: #c0392b;

      font-size: 0.8125rem;

      margin-top: 10px;

      display: none;

    }

    .login-hint {

      margin-top: 20px;

      font-size: 0.75rem;

      color: var(--gray-500);

      background: var(--gray-50);

      padding: 10px 12px;

      border-radius: 6px;

      line-height: 1.6;

    }

    
    .topnav {

      background: var(--navy);

      color: var(--white);

      padding: 0 32px;

      display: flex;

      align-items: center;

      justify-content: space-between;

      height: 62px;

      position: sticky;

      top: 0;

      z-index: 100;

      box-shadow: 0 2px 12px rgba(0,0,0,0.2);

    }

    .topnav-brand { display: flex; align-items: center; gap: 10px; }

    .topnav-divider {

      width: 1px;

      height: 20px;

      background: rgba(113,209,219,0.35);

    }

    .topnav-portal-label {

      font-size: 0.75rem;

      font-weight: 700;

      text-transform: uppercase;

      letter-spacing: 1px;

      color: rgba(255,255,255,0.55);

    }

    .topnav-right { display: flex; align-items: center; gap: 16px; }

    .topnav-greeting {

      font-size: 0.875rem;

      color: rgba(255,255,255,0.75);

      font-weight: 600;

    }

    .topnav-signout {

      background: rgba(113,209,219,0.15);

      border: 1px solid rgba(113,209,219,0.35);

      color: var(--teal);

      padding: 6px 14px;

      border-radius: 6px;

      font-size: 0.8125rem;

      font-family: var(--font);

      font-weight: 700;

      cursor: pointer;

      transition: background 0.2s;

    }

    .topnav-signout:hover { background: rgba(113,209,219,0.25); }

    .tabbar {

      background: var(--white);

      border-bottom: 1px solid var(--gray-200);

      padding: 0 32px;

      display: flex;

      gap: 4px;

    }

    .tab-btn {

      padding: 15px 20px;

      font-size: 0.875rem;

      font-weight: 700;

      font-family: var(--font);

      color: var(--gray-500);

      border: none;

      background: none;

      cursor: pointer;

      border-bottom: 2px solid transparent;

      margin-bottom: -1px;

      transition: color 0.15s, border-color 0.15s;

      white-space: nowrap;

      letter-spacing: 0.2px;

    }

    .tab-btn:hover { color: var(--navy); }

    .tab-btn.active { color: var(--navy); border-bottom-color: var(--teal); }

    .content {

      max-width: 1100px;

      margin: 0 auto;

      padding: 32px 24px;

    }

    .section-heading {

      font-size: 1.25rem;

      font-weight: 800;

      color: var(--navy);

      margin-bottom: 20px;

      letter-spacing: -0.2px;

    }

    .panel { display: none; }

    .panel.active { display: block; }

    /* NEWS */

    .news-grid {

      display: grid;

      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));

      gap: 20px;

    }

    .news-card {

      background: var(--white);

      border-radius: var(--radius);

      padding: 24px;

      box-shadow: var(--shadow);

      border-left: 4px solid var(--teal);

      transition: transform 0.15s, box-shadow 0.15s;

    }

    .news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

    .news-tag {

      display: inline-block;

      font-size: 0.6875rem;

      font-weight: 800;

      letter-spacing: 0.8px;

      text-transform: uppercase;

      color: var(--navy);

      background: var(--teal-pale);

      padding: 3px 8px;

      border-radius: 4px;

      margin-bottom: 10px;

    }

    .news-card h3 { font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }

    .news-card p { font-size: 0.875rem; color: var(--gray-500); line-height: 1.65; }

    .news-date { font-size: 0.75rem; color: var(--gray-400); margin-top: 12px; font-weight: 600; }

    .news-card.accent-orange { border-left-color: var(--orange); }

    .news-card.accent-orange .news-tag { color: var(--orange); background: var(--orange-pale); }

    .news-card.accent-navy { border-left-color: var(--navy); }

    .news-card.accent-navy .news-tag { color: var(--white); background: var(--navy); }

    .notice-banner {

      background: var(--teal-pale);

      border: 1px solid var(--teal-mid);

      border-radius: var(--radius);

      padding: 14px 20px;

      display: flex;

      gap: 12px;

      align-items: flex-start;

      margin-bottom: 28px;

      font-size: 0.875rem;

      color: var(--navy);

      font-weight: 600;

    }

    /* PRIMARY CONTACTS */

    .contacts-section { margin-bottom: 36px; }

    .contacts-section-title {

      font-size: 0.75rem;

      font-weight: 800;

      text-transform: uppercase;

      letter-spacing: 1px;

      color: var(--gray-400);

      margin-bottom: 12px;

    }

    .contacts-table {

      width: 100%;

      border-collapse: collapse;

      background: var(--white);

      border-radius: var(--radius);

      box-shadow: var(--shadow);

      overflow: hidden;

    }

    .contacts-table thead tr { background: var(--navy); color: var(--white); }

    .contacts-table thead th {

      padding: 11px 18px;

      text-align: left;

      font-size: 0.75rem;

      font-weight: 800;

      letter-spacing: 0.6px;

      text-transform: uppercase;

    }

    .contacts-table tbody tr {

      border-bottom: 1px solid var(--gray-100);

      transition: background 0.12s;

    }

    .contacts-table tbody tr:last-child { border-bottom: none; }

    .contacts-table tbody tr:hover { background: var(--gray-50); }

    .contacts-table td {

      padding: 13px 18px;

      font-size: 0.875rem;

      color: var(--gray-700);

      vertical-align: middle;

    }

    .contacts-table td:first-child { font-weight: 700; color: var(--navy); }

    .contacts-table td a { color: #0d7a87; text-decoration: none; font-weight: 600; }

    .contacts-table td a:hover { text-decoration: underline; }

    .contacts-ext {

      display: inline-block;

      background: var(--teal-pale);

      color: var(--navy);

      border-radius: 4px;

      font-size: 0.75rem;

      font-weight: 700;

      padding: 2px 8px;

      margin-left: 6px;

      letter-spacing: 0.3px;

    }

    /* DIRECTORY */

    .dir-search {

      width: 100%;

      max-width: 420px;

      padding: 10px 16px;

      border: 1.5px solid var(--gray-200);

      border-radius: 8px;

      font-size: 0.9375rem;

      font-family: var(--font);

      outline: none;

      margin-bottom: 24px;

      transition: border-color 0.2s;

      color: var(--gray-900);

    }

    .dir-search:focus { border-color: var(--teal); }

    .dir-grid {

      display: grid;

      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));

      gap: 16px;

    }

    .dir-card {

      background: var(--white);

      border-radius: var(--radius);

      padding: 20px;

      box-shadow: var(--shadow);

      display: flex;

      gap: 16px;

      align-items: center;

      transition: box-shadow 0.15s;

    }

    .dir-card:hover { box-shadow: var(--shadow-md); }

    .dir-avatar {

      width: 48px;

      height: 48px;

      border-radius: 50%;

      display: flex;

      align-items: center;

      justify-content: center;

      font-weight: 800;

      font-size: 1rem;

      color: var(--white);

      flex-shrink: 0;

    }

    .dir-info h4 { font-size: 0.9375rem; font-weight: 800; color: var(--navy); margin-bottom: 2px; }

    .dir-role { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 4px; font-weight: 600; }

    .dir-info a { font-size: 0.8125rem; color: #0d7a87; text-decoration: none; font-weight: 600; }

    .dir-info a:hover { text-decoration: underline; }

    /* DOCUMENTS */

    .doc-section { margin-bottom: 32px; }

    .doc-section-title {

      font-size: 0.75rem;

      font-weight: 800;

      text-transform: uppercase;

      letter-spacing: 1px;

      color: var(--gray-400);

      margin-bottom: 12px;

    }

    .doc-list { display: flex; flex-direction: column; gap: 10px; }

    .doc-item {

      background: var(--white);

      border-radius: var(--radius);

      padding: 16px 20px;

      box-shadow: var(--shadow);

      display: flex;

      align-items: center;

      gap: 16px;

      cursor: pointer;

      transition: background 0.15s, box-shadow 0.15s;

    }

    .doc-item:hover { background: var(--gray-50); box-shadow: var(--shadow-md); }

    .doc-icon {

      width: 40px;

      height: 40px;

      border-radius: 8px;

      display: flex;

      align-items: center;

      justify-content: center;

      font-size: 1.125rem;

      flex-shrink: 0;

    }

    .doc-icon.navy   { background: var(--navy-10); }

    .doc-icon.teal   { background: var(--teal-pale); }

    .doc-icon.orange { background: var(--orange-pale); }

    .doc-meta { flex: 1; }

    .doc-meta h4 { font-size: 0.9375rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }

    .doc-meta p { font-size: 0.8125rem; color: var(--gray-500); }

    .doc-updated { font-size: 0.75rem; color: var(--gray-400); white-space: nowrap; font-weight: 600; }

    /* QUICK LINKS */

    .links-grid {

      display: grid;

      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));

      gap: 16px;

    }

    .link-card {

      background: var(--white);

      border-radius: var(--radius);

      padding: 28px 20px 24px;

      box-shadow: var(--shadow);

      text-align: center;

      cursor: pointer;

      transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;

      border: 1.5px solid var(--gray-200);

      border-left: 4px solid var(--teal);

      text-decoration: none;

      display: block;

      color: inherit;

    }

    .link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

    .links-group { margin-bottom: 32px; }

    .links-group-title {

      font-size: 0.75rem;

      font-weight: 800;

      text-transform: uppercase;

      letter-spacing: 1px;

      color: var(--gray-400);

      margin-bottom: 12px;

      padding-bottom: 8px;

      border-bottom: 2px solid var(--gray-200);

    }

    .link-icon {

      width: 48px;

      height: 48px;

      border-radius: 12px;

      background: var(--teal-pale);

      display: flex;

      align-items: center;

      justify-content: center;

      font-size: 1.375rem;

      margin: 0 auto 14px;

    }

    .link-card h4 { font-size: 0.9rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }

    .link-card p { font-size: 0.8125rem; color: var(--gray-500); line-height: 1.4; }

    /* RESTAURANT DIRECTORY */

    .rest-filter-bar {

      display: flex;

      gap: 8px;

      flex-wrap: wrap;

      margin-bottom: 24px;

      align-items: center;

    }

    .rest-filter-btn {

      padding: 7px 16px;

      border-radius: 20px;

      font-size: 0.8125rem;

      font-weight: 700;

      font-family: var(--font);

      cursor: pointer;

      border: 1.5px solid var(--gray-200);

      background: var(--white);

      color: var(--gray-500);

      transition: all 0.15s;

      letter-spacing: 0.2px;

    }

    .rest-filter-btn:hover { border-color: var(--teal); color: var(--navy); }

    .rest-filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

    .rest-search {

      width: 100%;

      max-width: 360px;

      padding: 10px 16px;

      border: 1.5px solid var(--gray-200);

      border-radius: 8px;

      font-size: 0.9375rem;

      font-family: var(--font);

      outline: none;

      color: var(--gray-900);

      transition: border-color 0.2s;

      margin-left: auto;

    }

    .rest-search:focus { border-color: var(--teal); }

    .rest-brand-group { margin-bottom: 36px; }

    .rest-brand-heading {

      font-size: 0.75rem;

      font-weight: 800;

      text-transform: uppercase;

      letter-spacing: 1px;

      color: var(--gray-400);

      margin-bottom: 12px;

      padding-bottom: 8px;

      border-bottom: 2px solid var(--gray-200);

    }

    .rest-grid {

      display: grid;

      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

      gap: 14px;

    }

    .rest-card {

      background: var(--white);

      border-radius: var(--radius);

      padding: 18px 20px;

      box-shadow: var(--shadow);

      border-left: 4px solid #F26522;

      transition: box-shadow 0.15s;

    }

    .rest-card.brand-jm { border-left-color: #C8102E; }

    .rest-card:hover { box-shadow: var(--shadow-md); }

    .rest-card-header {

      display: flex;

      align-items: flex-start;

      justify-content: space-between;

      margin-bottom: 10px;

      gap: 8px;

    }

    .rest-name { font-size: 0.9375rem; font-weight: 800; color: var(--navy); }

    .rest-franchise { font-size: 0.75rem; font-weight: 700; color: var(--gray-400); margin-top: 1px; }

    .rest-brand-badge {

      font-size: 0.6875rem;

      font-weight: 800;

      letter-spacing: 0.5px;

      text-transform: uppercase;

      padding: 3px 9px;

      border-radius: 4px;

      white-space: nowrap;

      flex-shrink: 0;

    }

    .rest-brand-badge.boj { background: rgba(242,101,34,0.12); color: #F26522; }

    .rest-brand-badge.jm  { background: rgba(200,16,46,0.10);  color: #C8102E; }

    .rest-detail {

      font-size: 0.8125rem;

      color: var(--gray-500);

      line-height: 1.6;

    }

    .rest-detail strong { color: var(--gray-700); font-weight: 700; }

    .rest-contact {

      margin-top: 10px;

      padding-top: 10px;

      border-top: 1px solid var(--gray-100);

      display: flex;

      flex-direction: column;

      gap: 3px;

    }

    .rest-contact a { font-size: 0.8125rem; color: #0d7a87; text-decoration: none; font-weight: 600; }

    .rest-contact a:hover { text-decoration: underline; }

    .rest-contact span { font-size: 0.8125rem; color: var(--gray-500); }

    .rest-empty {

      grid-column: 1/-1;

      text-align: center;

      padding: 48px 0;

      color: var(--gray-400);

      font-size: 0.9375rem;

    }

    /* DISTRICT SUMMARY TABLE */

    .district-summary { margin-bottom: 32px; }

    .district-summary-heading {

      font-size: 0.75rem;

      font-weight: 800;

      text-transform: uppercase;

      letter-spacing: 1px;

      color: var(--gray-400);

      margin-bottom: 12px;

    }

    .district-tables-wrap {

      display: grid;

      grid-template-columns: 1fr 1fr;

      gap: 20px;

    }

    .district-table-block { }

    .district-table-brand-label {

      font-size: 0.6875rem;

      font-weight: 800;

      letter-spacing: 0.8px;

      text-transform: uppercase;

      padding: 4px 10px;

      border-radius: 4px;

      display: inline-block;

      margin-bottom: 10px;

    }

    .district-table-brand-label.boj { background: rgba(242,101,34,0.12); color: #F26522; }

    .district-table-brand-label.jm  { background: rgba(200,16,46,0.10);  color: #C8102E; }

    .district-table {

      width: 100%;

      border-collapse: collapse;

      background: var(--white);

      border-radius: var(--radius);

      box-shadow: var(--shadow);

      overflow: hidden;

      font-size: 0.8125rem;

    }

    .district-table thead tr { background: var(--navy); color: var(--white); }

    .district-table thead th {

      padding: 10px 14px;

      text-align: left;

      font-size: 0.7rem;

      font-weight: 800;

      letter-spacing: 0.6px;

      text-transform: uppercase;

    }

    .district-table thead th:last-child { text-align: center; }

    .district-table tbody tr {

      border-bottom: 1px solid var(--gray-100);

      cursor: pointer;

      transition: background 0.12s;

    }

    .district-table tbody tr:last-child { border-bottom: none; }

    .district-table tbody tr:hover { background: var(--teal-pale); }

    .district-table tbody tr.district-active { background: var(--teal-pale); }

    .district-table td {

      padding: 10px 14px;

      color: var(--gray-700);

      vertical-align: middle;

    }

    .district-table td:first-child { font-weight: 800; color: var(--navy); }

    .district-count-badge {

      display: inline-flex;

      align-items: center;

      justify-content: center;

      background: var(--navy-10);

      color: var(--navy);

      font-weight: 800;

      font-size: 0.8125rem;

      border-radius: 20px;

      min-width: 28px;

      height: 24px;

      padding: 0 8px;

    }

    .district-states {

      color: var(--gray-500);

      font-size: 0.775rem;

      font-weight: 600;

    }

    .district-view-btn {

      font-size: 0.7rem;

      font-weight: 800;

      letter-spacing: 0.3px;

      text-transform: uppercase;

      color: var(--teal);

      background: none;

      border: none;

      cursor: pointer;

      padding: 4px 0;

      font-family: var(--font);

    }

    .district-clear-btn {

      display: none;

      margin-top: 10px;

      padding: 6px 16px;

      background: none;

      border: 1.5px solid var(--gray-200);

      border-radius: 20px;

      font-size: 0.8125rem;

      font-weight: 700;

      font-family: var(--font);

      color: var(--gray-500);

      cursor: pointer;

      transition: all 0.15s;

    }

    .district-clear-btn:hover { border-color: var(--navy); color: var(--navy); }

    .district-clear-btn.visible { display: inline-block; }

    @media (max-width: 700px) {

      .district-tables-wrap { grid-template-columns: 1fr; }

    }

    @media (max-width: 600px) {

      .topnav { padding: 0 16px; }

      .topnav-portal-label, .topnav-divider { display: none; }

      .tabbar { padding: 0 8px; overflow-x: auto; }

      .content { padding: 20px 16px; }

      .news-grid, .dir-grid, .links-grid, .rest-grid { grid-template-columns: 1fr; }

      .rest-search { max-width: 100%; margin-left: 0; }

    }

/* ── M365 SSO SIGN-IN (added for the PHP portal) ── */
.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.4px;
  text-decoration: none;
}
.sso-btn:hover { background: #1c4d8a; }
.sso-btn svg { flex-shrink: 0; }
.login-alert {
  background: rgba(192,57,43,0.07);
  border: 1px solid rgba(192,57,43,0.25);
  color: #a5281b;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: left;
  font-weight: 600;
}
.login-domain {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 18px;
  letter-spacing: 0.2px;
}
.is-hidden { display: none !important; }
.dir-empty, .doc-empty, .link-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--gray-400);
  font-size: 0.9375rem;
}
/* ── CONTENT ERROR PANEL ── */
.panel-error {
  background: rgba(230,128,63,0.06);
  border: 1px solid rgba(230,128,63,0.35);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--gray-700);
}
.panel-error strong { color: var(--navy); display: block; margin-bottom: 8px; font-size: 0.95rem; }
.panel-error p { margin-bottom: 8px; }
.panel-error-hint {
  background: var(--white);
  border-left: 3px solid var(--teal);
  padding: 10px 14px;
  border-radius: 6px;
}
.panel-error-foot { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 0 !important; }
.panel-error code {
  background: var(--gray-100);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}
