* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
       background: #ffffff; color: #000000; font-size: 16.5px; }
a { color: #0b5c59; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; gap: 2rem; background: #12333f;
          padding: 0 1.5rem; height: 56px;
          position: sticky; top: 0; z-index: 50; }
.menu-btn { display: none; }
.nav-user { display: none; }
.brand a { color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .5px; }
.brand span { color: #6fd0c5; font-weight: 400; }
.topbar nav { display: flex; gap: .25rem; }
.topbar nav a { color: #c8d6dc; padding: .45rem .9rem; border-radius: 6px; }
.topbar nav a:hover { background: #1c4654; text-decoration: none; color: #fff; }
.topbar nav a.on { background: #0e6e6b; color: #fff; }
.userchip { margin-left: auto; color: #c8d6dc; font-size: .9rem; white-space: nowrap; }
.userchip a { color: #6fd0c5; }

/* "Admin" dropdown at the right end of the nav */
.nav-drop { position: relative; margin-left: auto; }
.nav-drop summary { list-style: none; cursor: pointer; color: #c8d6dc;
                    padding: .45rem .9rem; border-radius: 6px; white-space: nowrap; }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary:hover { background: #1c4654; color: #fff; }
.nav-drop summary.on, .nav-drop[open] summary { background: #0e6e6b; color: #fff; }
.nav-drop .menu { position: absolute; right: 0; top: calc(100% + 6px);
                  background: #12333f; border: 1px solid #2b4a56; border-radius: 8px;
                  padding: .3rem; min-width: 170px; display: flex;
                  flex-direction: column; gap: .15rem; z-index: 60;
                  box-shadow: 0 8px 22px rgba(0,0,0,.3); }

main { max-width: 1560px; margin: 0 auto; padding: 1.5rem; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }
.flash { background: #e2f4ef; border: 1px solid #9ed9c8; color: #0c5c46;
         padding: .55rem .9rem; border-radius: 8px; margin-bottom: 1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
         gap: .9rem; margin-bottom: 1.5rem; }
.card { background: #fff; border: 1px solid #c9c9c9; border-radius: 10px; padding: .9rem 1rem; }
.card .num { font-size: 1.6rem; font-weight: 700; color: #000; }
.card .lbl { color: #444; font-size: .85rem; margin-top: .15rem; }

table { width: 100%; border-collapse: collapse; background: #fff;
        border: 1px solid #c9c9c9; border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid #ddd;
         vertical-align: top; }
th { background: #f2f2f2; font-size: .8rem; text-transform: uppercase;
     letter-spacing: .04em; color: #222; white-space: nowrap; }
th a { color: #222; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafcfd; }
.table-wrap { overflow-x: auto; }
/* Editable list tables (newsletters, blogging): tighter cells and stacked
   row buttons so everything fits without a horizontal scrollbar. */
.compact th, .compact td { padding: .4rem .45rem; }
.compact .rowactions { display: grid; gap: .25rem; min-width: 74px; white-space: nowrap; }
.compact .rowactions form { display: block; margin: 0; }
.compact .rowactions button, .compact .rowactions .btn {
  width: 100%; text-align: center; padding: .22rem .3rem; font-size: .78rem; }
.compact input[type="date"] { width: 8.6em; font-size: .85rem; }
.compact input[type="text"], .compact input[type="number"] { font-size: .85rem; }
.compact select { font-size: .85rem; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 99px;
         font-size: .74rem; font-weight: 600; white-space: nowrap; }
/* A status dropdown that looks like the badge until you click it. */
.inline-status { display: inline; margin: 0; }
select.badge { border: 0; cursor: pointer; padding-right: 1.3rem; appearance: none;
               -webkit-appearance: none; font: inherit; font-size: .74rem; font-weight: 600;
               background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%23555'/%3E%3C/svg%3E");
               background-repeat: no-repeat; background-position: right .45rem center; }
select.badge:focus { outline: 2px solid #23538f; outline-offset: 1px; }
.badge.active   { background-color: #dff3ec; color: #0c6e4f; }
.badge.inactive { background-color: #eceff1; color: #5b6b75; }
.badge.prospect { background-color: #e7effc; color: #23538f; }
.badge.paused   { background-color: #fdf3d7; color: #8a6410; }
.badge.canceled { background-color: #fbe4e1; color: #a2332a; }
.badge.setup    { background-color: #e7effc; color: #23538f; }
.badge.new_client             { background-color: #e7effc; color: #23538f; }
.badge.in_process             { background-color: #fdf3d7; color: #8a6410; }
.badge.waiting_on_client      { background-color: #eee9fb; color: #5c3fa8; }
.badge.cancelation_in_process { background-color: #fdeadd; color: #9c4a10; }
.badge.note-general           { background-color: #eceff1; color: #333; }
.badge.note-sales             { background-color: #dff3ec; color: #0c6e4f; }
.badge.note-update            { background-color: #e7effc; color: #23538f; }
.badge.monthly  { background-color: #eee9fb; color: #5c3fa8; }
.badge.adhoc    { background-color: #eceff1; color: #5b6b75; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center; }
input[type=text], input[type=date], input[type=month], input[type=number],
input[type=password], select, textarea {
  padding: .45rem .6rem; border: 1px solid #999; border-radius: 7px;
  font: inherit; background: #fff; color: #000; }
textarea { width: 100%; min-height: 80px; }
button, .btn { background: #0e6e6b; color: #fff; border: none; border-radius: 7px;
       padding: .48rem .95rem; font: inherit; font-weight: 600; cursor: pointer;
       display: inline-block; }
button:hover, .btn:hover { background: #0a5a58; text-decoration: none; color: #fff; }
button.ghost, .btn.ghost { background: #fff; color: #0e6e6b; border: 1px solid #b7ccca; }
button.ghost:hover, .btn.ghost:hover { background: #eef7f6; }
button.danger { background: #fff; color: #a2332a; border: 1px solid #e3b6b1; }
button.danger:hover { background: #fbeeec; }
button.small, .btn.small { padding: .25rem .6rem; font-size: .8rem; }

.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: .8rem 1rem; background: #fff; border: 1px solid #c9c9c9;
            border-radius: 10px; padding: 1.1rem; }
.formgrid label, .field label { display: block; font-size: .8rem; font-weight: 600;
        color: #222; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .03em; }
.formgrid input, .formgrid select { width: 100%; }
.formgrid .full { grid-column: 1 / -1; }
.actions { margin-top: 1rem; display: flex; gap: .6rem; }

.panel { background: #fff; border: 1px solid #c9c9c9; border-radius: 10px; padding: 1rem 1.1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
/* Client profile, top block: agreements & notes | programs | services */
.profile-top { display: grid; grid-template-columns: 1.35fr .9fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
.profile-top h2 { font-size: 1.05rem; }
.profile-top .subhead { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
                        color: #444; margin: .8rem 0 .25rem; }
.profile-top .subhead:first-of-type { margin-top: .2rem; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: .2rem 0; border-bottom: 1px solid #eee; }
ul.checklist { list-style: none; margin: 0; padding: 0; }
ul.checklist li { display: flex; align-items: center; gap: .5rem; padding: .18rem 0; }
ul.checklist input[type="checkbox"] { accent-color: #0e6e6b; width: 1.05rem; height: 1.05rem; margin: 0; }
.agreement { padding: .35rem 0; border-bottom: 1px solid #eee; }
.inline-edit summary { list-style: none; font-size: .85rem; }
.notes-list { margin-top: .6rem; }
.add-note summary::-webkit-details-marker { display: none; }
.add-note summary { list-style: none; }
.note { padding: .4rem 0; border-top: 1px solid #eee; }
.grid-offices th, .grid-offices td { min-width: 7.5rem; }
.grid-offices .sticky-col { position: sticky; left: 0; background: #fff; min-width: 14rem; text-align: left;
                            box-shadow: 2px 0 0 #e3e3e3; }
.grid-offices th.sticky-col { background: #f2f2f2; z-index: 2; }
.office-summary li { padding: .15rem 0; }
.service-header { margin-bottom: 1rem; }
.service-header textarea { font-size: .95rem; }
.note-history li { padding: .1rem 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; }
.stat { display: inline-block; padding: .35rem .7rem; border: 1px solid #c9c9c9; border-radius: 8px;
        background: #fff; color: #222; text-decoration: none; font-size: .88rem; }
.stat b { font-size: 1.05rem; margin-right: .2rem; }
.stat.warn { border-color: #e0a3a0; background: #fdf1f0; }
.stat.on { border-color: #0e6e6b; background: #eef7f6; }
.roster, .websites { table-layout: auto; }
.roster td, .websites td { vertical-align: top; }
.roster input[type=text], .roster input[type=number], .roster select, .roster textarea,
.websites input[type=text], .websites textarea {
  width: 100% !important; min-width: 4.5em; max-width: 100%; box-sizing: border-box; }
.roster input[type=number], .websites input[type=number] { min-width: 3.5em; }
.roster th, .websites th { white-space: normal; }
.roster .rowactions, .websites .rowactions, .compact .rowactions.pin {
  position: sticky; right: 0; background: #fff; box-shadow: -3px 0 0 #eee; z-index: 1; }
.roster .rowactions { display: flex; gap: .3rem; white-space: nowrap; }
.roster .rowactions form { display: inline; }
.roster .rowactions button { width: auto; }
.roster textarea { min-height: 2.6em; }
.chk-ok  { background: #e6f5ee; color: #0c6e4f; }
.chk-bad { background: #fbe4e1; color: #a2332a; font-weight: 600; }
.chk-na  { color: #888; }
.chk-select { font-size: .82rem; padding: .1rem .2rem; background: transparent; border: 1px solid #cfd6d8; border-radius: 6px; }
.services-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.services-layout .rowactions { display: flex; gap: .3rem; white-space: nowrap; }
.services-layout .rowactions form { display: inline; }
.services-layout .rowactions .btn, .services-layout .rowactions button { width: auto; }
@media (max-width: 900px) { .services-layout { grid-template-columns: 1fr; } }
.offices-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; }
.office-card { padding: .8rem .9rem; }
@media (max-width: 900px) { .offices-layout { grid-template-columns: 1fr; } }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: 0 0 .8rem; }
dl.kv dt { color: #444; font-size: .9rem; } dl.kv dd { margin: 0; }
dl.form-kv { gap: .5rem .8rem; align-items: center; } dl.form-kv dt { text-align: right; }
dl.form-kv input[type=text], dl.form-kv select { width: 100%; max-width: 26em; }
@media (max-width: 1100px) { .profile-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .profile-top { grid-template-columns: 1fr; } }
.muted { color: #444; font-size: .9rem; }
.inline-form { display: inline; }
.row-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.done-title { text-decoration: line-through; color: #666; }
.pagehead { display: flex; justify-content: space-between; align-items: center;
            flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.pagehead h1 { margin: 0; }
.sort-arrow { font-size: .7rem; }
.login-box { max-width: 360px; margin: 8vh auto; }

/* ------------------------------------------------------------ profile */

.profile-head { display: flex; align-items: center; gap: 1.2rem;
                flex-wrap: wrap; margin-bottom: 1.2rem; }
.profile-photo { width: 96px; height: 96px; border-radius: 50%;
                 object-fit: cover; flex: 0 0 auto; }
.profile-initials { display: inline-flex; align-items: center; justify-content: center;
                    background: #0f4c4c; color: #fff; font-weight: 700; font-size: 2rem; }
.team-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.team-chips label { display: inline-flex; align-items: center; gap: .45rem;
                    border: 1px solid #b7ccca; border-radius: 999px;
                    padding: .5rem .95rem; cursor: pointer; background: #fff;
                    font-weight: 600; font-size: .95rem; color: #0b3d3b;
                    text-transform: none; letter-spacing: 0; margin: 0; }
.team-chips label:hover { background: #eef7f6; }
.team-chips label:has(input:checked) { background: #0e6e6b; border-color: #0e6e6b; color: #fff; }
.team-chips input { accent-color: #0e6e6b; margin: 0; width: 1.05rem; height: 1.05rem; }

/* ------------------------------------------------------------- mobile */

@media (max-width: 860px) {
  /* Top bar collapses into a hamburger menu */
  .topbar { flex-wrap: wrap; height: auto; min-height: 56px;
            padding: .55rem 1rem; gap: .8rem; }
  .userchip { display: none; }
  .menu-btn { display: block; margin-left: auto; background: none;
              border: 1px solid #3d5d68; color: #fff; border-radius: 8px;
              padding: .4rem .8rem; font: inherit; font-size: 1rem; }
  .menu-btn:hover { background: #1c4654; }
  .topbar nav { display: none; width: 100%; flex-direction: column;
                gap: .15rem; padding: .25rem 0 .5rem; }
  .topbar nav.open { display: flex; }
  .topbar nav a { display: block; padding: .8rem .9rem; font-size: 1.08rem; }
  .nav-user { display: block; border-top: 1px solid #2b4a56;
              margin-top: .45rem; padding-top: .45rem; }
  .nav-user a { color: #6fd0c5; }
  /* In the hamburger menu the Admin dropdown expands in place */
  .nav-drop { margin-left: 0; }
  .nav-drop summary { display: block; padding: .8rem .9rem; font-size: 1.08rem; }
  .nav-drop .menu { position: static; border: 0; box-shadow: none;
                    padding: 0 0 0 1.1rem; min-width: 0; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  main { padding: 1rem .8rem; }
  h1 { font-size: 1.25rem; }

  /* Data tables scroll sideways inside themselves instead of
     stretching the whole page */
  table { display: block; overflow-x: auto; }

  /* Inputs and dropdowns stop overflowing their fixed pixel widths */
  .field { min-width: 0; }
  .field input:not([type=checkbox]), .field select,
  .row-form input[type=text], .row-form select,
  .filters input[type=text], .filters select {
    max-width: 100%; width: 100% !important; }
  .filters input[type=text] { flex: 1 1 100%; }
  .row-form .field { flex: 1 1 100%; }
  .row-form button, .filters button { flex: 0 0 auto; }

  .pagehead { flex-direction: column; align-items: stretch; }
  .pagehead h1 { font-size: 1.35rem !important; }
  .pagehead > div, .pagehead form { display: flex; flex-wrap: wrap; gap: .5rem; }

  .cards { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; }
  .card { padding: .7rem .8rem; }
  .card .num { font-size: 1.3rem; }

  /* On a phone a wide table scrolls as one piece; a pinned action
     column would sit over the cells being scrolled. */
  .roster .rowactions, .websites .rowactions, .compact .rowactions.pin {
    position: static; box-shadow: none; }
  .roster input[type=text], .roster select, .roster textarea,
  .websites input[type=text], .websites textarea { min-width: 7em; }

  /* Comfortable tap targets */
  button, .btn { padding: .55rem 1rem; }
  button.small, .btn.small { padding: .35rem .7rem; }
}

/* Background saves */
#savebar { position: sticky; bottom: 0; z-index: 40; display: flex; gap: .8rem; align-items: center;
           background: #123c46; color: #fff; padding: .6rem 1.2rem; box-shadow: 0 -2px 8px rgba(0,0,0,.15); }
#savebar button { background: #fff; color: #123c46; }
#savebar .muted { color: #cfe3e6; }
.saved-tag { font-size: .75rem; margin-left: .3rem; white-space: nowrap; }
/* Note priority */
.note-important .note-text, .note.note-important > div:last-child { font-weight: 700; }
.note-critical .note-text, .note.note-critical > div:last-child { font-weight: 700; color: #a2332a; }
.note.note-critical { border-left: 4px solid #a2332a; padding-left: .5rem; }
.note.note-important { border-left: 4px solid #e8a13c; padding-left: .5rem; }
.note-edit summary::-webkit-details-marker { display: none; }

form.remove-row { display:flex; gap:.25rem; align-items:center; }
form.remove-row select { font-size:.8em; max-width:9rem; }

/* Social media sheet: fixed columns so the table is always exactly the
   screen width; long URLs and notes wrap instead of pushing columns out. */
.social-table { table-layout: fixed; font-size: .92rem; }
.social-table th, .social-table td { padding: .4rem .45rem; overflow-wrap: anywhere; vertical-align: top; }
.social-table td a.btn.small, .social-table .rowactions .btn { white-space: nowrap; }
.social-table .rowactions { display: grid; gap: .25rem; }
.social-table .rowactions .btn, .social-table .rowactions summary { padding: .15rem .4rem; font-size: .8rem; text-align: center; }
.remove-menu summary { list-style: none; cursor: pointer; display: inline-block; }
.remove-menu summary::-webkit-details-marker { display: none; }
/* The reason menu opens in place under the button, so it is never clipped
   by a scrolling table or pushed off the right edge. */
.remove-menu form.remove-row { margin-top: .3rem; background: #fff; border: 1px solid #ccc;
  border-radius: 6px; padding: .4rem; display: grid; gap: .3rem; }
.remove-menu form.remove-row select { font-size: .85em; max-width: none; }
#savebar[hidden] { display: none; }
@media (max-width: 900px) { .social-table { table-layout: auto; min-width: 1100px; } }
.social-table td.dt { font-size: .85em; padding-left: .35rem; padding-right: .35rem; }
.social-table .chip { display: inline-block; white-space: nowrap; margin-right: .35rem; }
.social-table input[type=text], .social-table select, .social-table textarea { width: 100%; box-sizing: border-box;
  font-size: .8rem; padding: .15rem .3rem; }
.social-table textarea { resize: vertical; }
.social-table .row-form input[type=text] { width: auto; }
.social-table .note-history li { margin: 0 0 .15rem; }
.social-table textarea { min-height: 0; line-height: 1.25; }
.sheet-notes summary { list-style: none; }
.sheet-notes summary::-webkit-details-marker { display: none; }
.sheet-notes[open] summary > span:first-child { display: none; }
/* Section headings on the social sheet (GEM 1, GoCareLocal, MODEL 2...) */
.social-table tr.group-row td { background: #0f8b8d; color: #fff; border-top: 3px solid #0a6466; padding-top: .55rem; padding-bottom: .55rem; }
.social-table tr.group-row strong { font-size: 1.05rem; letter-spacing: .02em; }
.social-table tr.group-row .muted, .social-table tr.group-row a:not(.btn) { color: #e3f6f6; }
.social-table tr.group-row .btn.ghost { background: #fff; color: #0f8b8d; border-color: #fff; }
.notes-table tr.note-critical td { background: #fff1f0; }
.notes-table tr.note-important td { font-weight: 600; }
.notes-table tr.note-critical td:nth-child(3) { color: #a2332a; font-weight: 600; }
.notes-table details[open] summary { margin-bottom: .2rem; }
.notes-table textarea { font-size: .9rem; }
.notes-table .inline-form, .notes-table details[style] { display: inline-block; vertical-align: top; margin-right: .3rem; }
/* Offices, change log and contacts sit in the profile's top-left column */
.profile-col .offices-layout { grid-template-columns: 1fr; gap: .6rem; margin-bottom: .8rem; }
.profile-col .office-grid { grid-template-columns: 1fr; }
.profile-col #office-notes { margin-top: 0; }
.profile-col .contact-list li { padding: .35rem 0; border-top: 1px solid #eee; }
.profile-col .contact-list li:first-child { border-top: 0; }
.profile-col .formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .6rem; }
.profile-col .formgrid .full { grid-column: 1 / -1; }
.profile-col .formgrid input[type=text] { width: 100%; box-sizing: border-box; }
.profile-col details summary::-webkit-details-marker { display: none; }
/* Dashboard status boards */
.status-boards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.status-boards .board { border-top: 4px solid #0f8b8d; }
.status-boards .board-new_client { border-top-color: #2e7d32; }
.status-boards .board-in_process { border-top-color: #0f8b8d; }
.status-boards .board-cancelation_in_process { border-top-color: #e8a13c; }
.status-boards .board-canceled { border-top-color: #a2332a; }
.status-boards .plain li { padding: .3rem 0; border-top: 1px solid #eee; }
.status-boards .plain li:first-child { border-top: 0; }
@media (max-width: 1100px) { .status-boards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .status-boards { grid-template-columns: 1fr; } }
/* GoCarePro Mastermind marking */
.badge.mastermind { background: #5b21b6; color: #fff; font-weight: 800; letter-spacing: .05em; }
.flash.mm-banner { background: #f3ecff; border-color: #c4b0f0; color: #3b1a80; font-size: 1.02rem; }
.mastermind-table input[type=text] { font-size: .85rem; }
/* Dashboard link board: labelled groups instead of one long row of buttons */
.linkboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: .8rem; }
.linkgroup h3 { margin: 0 0 .35rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #444; }
.linkgroup h3 .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.linkgroup ul.plain li { padding: .2rem 0; border-top: 1px solid #eee; }
.linkgroup ul.plain li:first-child { border-top: 0; }
.linkgroup ul.plain a { font-weight: 600; }
@media (max-width: 1000px) { .linkboard { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .linkboard { grid-template-columns: 1fr; } }
/* Mastermind list: fixed columns that always fit the page */
.mastermind-table { table-layout: fixed; font-size: .92rem; }
.mastermind-table th, .mastermind-table td { overflow-wrap: anywhere; vertical-align: top; padding: .4rem .45rem; }
.mastermind-table input[type=text], .mastermind-table textarea, .mastermind-table select { width: 100%; box-sizing: border-box; font-size: .8rem; padding: .15rem .3rem; }
.mastermind-table textarea { min-height: 0; }
.mastermind-table .rowactions { display: grid; gap: .25rem; }
.mastermind-table .rowactions .btn, .mastermind-table .rowactions button, .mastermind-table .rowactions summary { padding: .15rem .4rem; font-size: .8rem; text-align: center; white-space: nowrap; }
@media (max-width: 900px) { .mastermind-table { table-layout: auto; min-width: 1000px; } }
/* Site / login buttons under a client name on the sheets: their own line,
   wrapping as needed, never on top of the text around them. */
.site-links { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; font-size: .8em; line-height: 1.2; clear: both; }
.site-links .btn.small { padding: .12rem .45rem; font-size: .95em; line-height: 1.2; white-space: nowrap; display: inline-block; }
.save-toast { position: fixed; right: 1rem; bottom: 4.5rem; z-index: 60; max-width: 26rem; background: #123c46; color: #fff;
  padding: .6rem .9rem; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.2); font-size: .9rem; transition: opacity .6s; }
/* Client files */
.file-drop { border: 2px dashed #cfd8d8; border-radius: 8px; padding: .5rem .7rem; }
.file-drop.drag { border-color: #0f8b8d; background: #eefafa; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .7rem; }
.file-card { display: flex; gap: .6rem; border: 1px solid #e3e3e3; border-radius: 8px; padding: .5rem; font-size: .88rem; }
.file-thumb { flex: 0 0 5.5rem; height: 5.5rem; display: flex; align-items: center; justify-content: center; background: #f4f6f6; border-radius: 6px; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-ext { font-weight: 800; color: #0f4c4c; letter-spacing: .05em; }
.file-meta { min-width: 0; overflow-wrap: anywhere; }
/* Checklists and check-ins */
.progress { height: 6px; background: #e3e3e3; border-radius: 4px; margin: .2rem 0 .3rem; max-width: 14rem; }
.progress > div { height: 6px; background: #0f8b8d; border-radius: 4px; }
.overdue { color: #a2332a; font-weight: 700; }
.due-soon { color: #9a6200; font-weight: 600; }
.badge.onboarding { background: #e1f2ef; color: #0c6e4f; }
.badge.offboarding { background: #fde8e6; color: #a2332a; }
/* Login fields on the blogging sheet */
.cred-box { margin-top: .35rem; font-size: .82em; display: grid; gap: .2rem; max-width: 15rem; }
.cred-box input { width: 100%; box-sizing: border-box; font-size: .95em; padding: .15rem .3rem; }
.cred-label { color: #555; font-weight: 600; font-size: .9em; }
.cred-pw { display: flex; gap: .2rem; }
.cred-pw button { padding: .1rem .35rem; font-size: .85em; }
.cred-box details summary::-webkit-details-marker { display: none; }

/* Guide Program roster */
.guides-roster td:first-child { min-width: 10em; }
.guides-roster .col-program { min-width: 9.5em; }
.guides-roster .col-guide { min-width: 10.5em; }
.guides-roster .col-guide select { width: 100%; }
.guides-roster .col-program select { width: 100%; }
.guides-roster input[type=date] { min-width: 8.5em; }
.guides-roster .col-notes { min-width: 14em; }
.guides-roster .col-prev { min-width: 11em; max-width: 16em; font-size: .85em; }
.prev-guides summary { cursor: pointer; list-style: none; }
.prev-guides summary::-webkit-details-marker { display: none; }
.prev-guides .prev-names span { display: block; line-height: 1.3; }
.prev-guides .prev-edit { font-size: .85em; text-decoration: underline; }
.prev-guides[open] .prev-edit { display: none; }
.prev-guides label { display: flex; gap: .35rem; align-items: flex-start; margin: .2rem 0; font-weight: normal; }
.prev-guides label input { width: auto; margin-top: .15rem; }
.guides-roster .col-notes textarea { width: 100%; font-size: .85em; }
.guides-roster .was { font-size: .75em; margin-top: .15rem; }
.guide-topics li { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.guide-topics input[type=text] { max-width: 30em; }

/* Tabs across the top of a page with two views (Guide Program) */
.page-tabs { display: flex; gap: .25rem; border-bottom: 2px solid #d5dde3; margin: .2rem 0 1rem; flex-wrap: wrap; }
.page-tabs a { padding: .5rem 1rem; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0;
  color: #375a6b; text-decoration: none; font-weight: 600; margin-bottom: -2px; }
.page-tabs a:hover { background: #eef4f6; }
.page-tabs a.on { background: #fff; border-color: #d5dde3; border-bottom: 2px solid #fff; color: #10303f; }
.guides-roster .about-guide { display: block; font-size: .75em; margin-top: .15rem; }
.topic-add { display: grid; gap: .6rem; max-width: 46em; }
.topics-table .col-title { min-width: 11em; width: 14%; }
.topics-table .col-title textarea { font-weight: 600; }
.topics-table .col-desc { min-width: 20em; width: 34%; }
.topics-table .col-notes { min-width: 11em; width: 18%; }
.topics-table .col-for { min-width: 8em; width: 11%; }
.topics-table .col-for select { width: 100%; }
.topics-table .col-who { font-size: .85em; min-width: 6.5em; }
.topics-table .col-who a { display: block; }
.topics-table textarea { width: 100%; font-size: .9em; }
.topics-table tr.retired td { opacity: .65; }

/* Sheet sections as tabs (Social Media) */
.sheet-tabs { gap: .3rem; border-bottom-color: #0f8b8d; }
.sheet-tabs button { background: #eef6f6; color: #0a6466; border: 1px solid #b9dcdc; border-bottom: none;
  border-radius: 6px 6px 0 0; padding: .45rem .8rem; font-weight: 600; font-size: .9rem; width: auto; margin-bottom: -2px; cursor: pointer; }
.sheet-tabs button:hover { background: #d9eeee; }
.sheet-tabs button.on { background: #0f8b8d; color: #fff; border-color: #0f8b8d; }
.sheet-tabs .tab-count { font-weight: 400; font-size: .8em; opacity: .8; margin-left: .2rem; }
.prev-guides .prev-cat { font-weight: 700; font-size: .78em; text-transform: uppercase; letter-spacing: .04em;
  color: #5b3a1e; margin: .45rem 0 .1rem; border-bottom: 1px solid #c9b29b; }
/* Guide topics: a dark brown divider above each category */
.topics-table tr.topic-cat td { background: #5b3a1e; color: #fff; font-weight: 700; font-size: 1.02rem;
  letter-spacing: .03em; padding: .5rem .7rem; border-top: 3px solid #3d2612; }
.topics-table tr.topic-cat td span { font-weight: 400; font-size: .8em; opacity: .85; margin-left: .4rem; }
.topics-table label.mini { display: block; font-size: .72em; color: #5c6b73; margin-top: .3rem; font-weight: 600; }
.topics-table label.mini input { display: block; width: 100%; font-size: 1.15em; font-weight: 400; margin-top: .1rem; }
.topic-jump a { margin-right: .9rem; white-space: nowrap; }

/* Ask the Expert roster */
.faq-roster .col-pm { width: 4.2em; text-align: center; }
.faq-roster .col-pm input { width: 3.6em; min-width: 0; }
.faq-roster input[type=date] { min-width: 8.5em; }
.faq-roster .col-months { min-width: 17em; }
.faq-roster .col-status { min-width: 8.5em; width: 10em; }
.faq-roster .col-status select { width: auto; min-width: 7.5em; }
.faq-roster .col-notes { min-width: 15em; }
.faq-roster .col-notes textarea { width: 100%; font-size: .85em; }
.faq-roster .stamp, .faq-roster .was { font-size: .75em; margin-top: .15rem; }
.faq-roster tr.inactive td { background: #f6f3ef; }
.faq-roster tr.inactive td > a strong { color: #7a6a5a; }
.month-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; max-width: 17em; }
.month-tiles .mt { display: block; text-align: center; font-size: .74rem; padding: .18rem 0; border: 1px solid #c8d3d9;
  border-radius: 4px; background: #fff; color: #44545c; cursor: pointer; user-select: none; font-weight: 600; margin: 0; }
.month-tiles span.mt { cursor: default; }
.month-tiles .mt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.month-tiles .mt.on { background: #0f8b8d; border-color: #0f8b8d; color: #fff; }
.month-tiles label.mt:hover { border-color: #0f8b8d; }
.month-tiles label.mt:focus-within { outline: 2px solid #0a6466; outline-offset: 1px; }
.month-count { font-size: .75em; margin-top: .2rem; }
.month-history summary { cursor: pointer; font-size: .78em; margin-top: .2rem; }
.social-table .sort-head th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.social-table .sort-head th[data-sort]:hover { color: #0a6466; text-decoration: underline; }
.social-table .sort-head th[data-sort]::after { content: attr(data-arrow); }
.social-table .sort-head th[data-sort]:not(.sorted)::after { content: " \2195"; opacity: .35; font-size: .85em; }
.social-table .sort-head th.sorted { color: #0a6466; }

/* Client profile: Content programs cards */
.content-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; margin-bottom: .8rem; }
.content-card h3 { margin: 0 0 .5rem; font-size: 1rem; display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.content-card h3 a { font-size: .78rem; font-weight: 400; }
.content-card dl { display: grid; grid-template-columns: 8.5em 1fr; gap: .3rem .6rem; margin: 0; font-size: .9rem; }
.content-card dt { color: #5c6b73; font-weight: 600; font-size: .85em; }
.content-card dd { margin: 0; }
.content-card .chip { display: inline-block; background: #eef4f6; border-radius: 10px; padding: .05rem .5rem; margin: 0 .25rem .2rem 0; font-size: .85em; }
.content-card .stamp { font-size: .78em; }
.content-card .sched span { display: inline-block; margin-right: .7rem; white-space: nowrap; }
.content-card .month-tiles { max-width: 16em; }
.guides-roster th.col-date { max-width: 7.5em; }
.flash.reset-waiting { background: #fff5e0; border-color: #e8b04a; }
.reset-requests { border-left: 4px solid #e8b04a; }

/* Newsletter sheet: numbers, thirds, queued, row colours */
.nl-num { width: 2.2em; text-align: right; color: #6b7a82; font-variant-numeric: tabular-nums; font-size: .85em; }
tr.third-break td { background: #eef2f4; color: #375a6b; font-size: .78em; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: .25rem .6rem; border-top: 2px dashed #9fb3bd; }
.badge.edition { background: #e6eef9; color: #234a85; }
.queued-cell.saved-ok { background: #dff3ec !important; }
.queued-cell.saved-bad { background: #fbe4e1 !important; }
tr.hl-purple > td { background: #efe3fb; }
tr.hl-yellow > td { background: #fff4c2; }
tr.hl-green > td { background: #e1f5e6; }
tr.hl-blue > td { background: #e0eefc; }
tr.hl-orange > td { background: #ffe7d1; }
tr.hl-gray > td { background: #eceff1; }
tr.hl-purple > td:first-child { box-shadow: inset 4px 0 0 #8a4fd1; }
tr.hl-yellow > td:first-child { box-shadow: inset 4px 0 0 #e0b400; }
tr.hl-green > td:first-child { box-shadow: inset 4px 0 0 #2e9d55; }
tr.hl-blue > td:first-child { box-shadow: inset 4px 0 0 #3378d1; }
tr.hl-orange > td:first-child { box-shadow: inset 4px 0 0 #e07b1a; }
tr.hl-gray > td:first-child { box-shadow: inset 4px 0 0 #8796a0; }
.hl-dot { display: inline-block; width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.25);
  padding: 0; margin: 0 .12rem 0 0; vertical-align: middle; cursor: pointer; font-size: .7rem; line-height: 1; color: #5c6b73; background: #fff; }
.hl-dot.hl-purple { background: #b98be8; } .hl-dot.hl-yellow { background: #f5d437; } .hl-dot.hl-green { background: #6cc48a; }
.hl-dot.hl-blue { background: #7cb1ee; } .hl-dot.hl-orange { background: #f2a25c; } .hl-dot.hl-gray { background: #b3bec5; }
.hl-pick { display: flex; flex-wrap: wrap; gap: 2px; margin-top: .25rem; max-width: 7.5rem; }
.hl-pick .hl-dot.on { outline: 2px solid #10303f; outline-offset: 1px; }
.hl-filter { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .8rem 0 0; }
.hl-filter button { width: auto; }
.hl-filter button.on { background: #10303f; color: #fff; border-color: #10303f; }
.hl-filter button.on .muted { color: #d8e3e8; }
.hl-filter .hl-dot { cursor: default; width: .8rem; height: .8rem; }
tr.row-flash > td { animation: rowflash 1.6s ease-out 1; }
@keyframes rowflash { from { box-shadow: inset 0 0 0 999px rgba(15,139,141,.18); } to { box-shadow: none; } }
.repair-note { border-left: 4px solid #0f8b8d; margin: .8rem 0 0; }
.rowactions .hl-pick { display: flex !important; flex-wrap: wrap; gap: 3px; max-width: 5.6rem; }
.rowactions .hl-pick .hl-dot { width: 1rem !important; height: 1rem !important; min-width: 0; flex: 0 0 1rem; padding: 0 !important;
  border-radius: 50% !important; margin: 0; }

/* SEO page and list check */
.seo-roster .col-site { min-width: 11em; }
.seo-roster .col-focus { min-width: 14em; }
.seo-roster .col-focus textarea, .seo-roster .col-notes textarea { width: 100%; font-size: .85em; }
.seo-roster .col-notes { min-width: 15em; }
.seo-preview td { vertical-align: top; }
.seo-preview label.pick { display: block; margin: .1rem 0; font-weight: normal; }
.seo-preview tr.needs td { background: #fff5e0; }
.seo-preview tr.check td { background: #f4f8fb; }
.seo-preview .note { font-size: .8em; margin-top: .15rem; }
.seo-roster .col-client { min-width: 13em; }
.seo-roster .col-link { min-width: 14em; }
.seo-roster .col-link input { width: 100%; }
.seo-roster .col-notes { min-width: 24em; }
.seo-roster select[name=assigned_to] { min-width: 7.5em; width: auto; }
.seo-roster .col-notes select[name=priority] { width: auto; min-width: 0; flex: 0 0 auto; }
.seo-roster td.col-notes form.row-form select[name=priority] { width: 6.8em !important; min-width: 0 !important; max-width: 6.8em; }
.seo-roster td.col-notes form.row-form input[name=body] { flex: 1 1 auto; min-width: 6em; }
.seo-roster td.col-notes form.row-form button { flex: 0 0 auto; width: auto; }
.seo-roster td.col-notes form.row-form input[name=body] { width: auto !important; }
.seo-roster td.col-assigned { min-width: 9em; }
.bulk-bar { align-items: center; gap: .5rem; margin: 0 0 .6rem; padding: .5rem .7rem; background: #eef6f6; border: 1px solid #c7e1e1; border-radius: 6px; }
.bulk-bar button { width: auto; }
.seo-roster .col-tick { width: 2em; text-align: center; }
.seo-roster .col-tick input { width: auto !important; min-width: 0 !important; }

/* Blogging: sortable headers and the State column */
.sort-head th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.sort-head th[data-sort]:hover { color: #0a6466; text-decoration: underline; }
.sort-head th[data-sort]::after { content: attr(data-arrow); }
.sort-head th[data-sort]:not(.sorted)::after { content: " \2195"; opacity: .35; font-size: .85em; }
.sort-head th.sorted { color: #0a6466; }
td.col-state input { width: 3.6em; text-transform: uppercase; }

/* Bold in notes */
.bold-btn { position: absolute; z-index: 50; width: 1.6rem !important; height: 1.4rem; padding: 0 !important; font-size: .85rem;
  line-height: 1; border-radius: 4px; background: #10303f; color: #fff; border: 1px solid #10303f; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.bold-btn:hover { background: #0f8b8d; border-color: #0f8b8d; }
.note-preview { font-size: .85em; white-space: pre-line; color: #33434b; background: #f7fafb; border-left: 3px solid #c7d6dd;
  padding: .2rem .45rem; margin-top: .2rem; border-radius: 0 4px 4px 0; }
.note-preview strong, .note-text strong, .note-history strong { font-weight: 700; color: #10303f; }

/* Newsletter notes: a box typed over freely, with the saved notes under it. */
.nl-notes { min-width: 260px; max-width: 420px; font-size: .85em; }
.nl-working { white-space: pre-wrap; overflow-wrap: anywhere; }
.nl-working strong, .nl-saved strong { font-weight: 700; color: #10303f; }
.nl-view { cursor: text; min-height: 2.2em; padding: .25rem .35rem; border: 1px dashed #c7d6dd;
           border-radius: 6px; background: #fbfdfd; }
.nl-view:hover, .nl-view:focus { border-color: #2a7f8f; background: #fff; outline: none; }
textarea.fluid-notes { width: 100%; min-height: 3.2em; box-sizing: border-box; font-size: 1em;
                       resize: vertical; overflow: hidden; line-height: 1.35; }
.nl-saved { margin-top: .35rem; padding: .25rem .35rem; border-left: 3px solid #8a6d3b;
            background: #fbf8f1; overflow-wrap: anywhere; }
.nl-saved > div { white-space: pre-wrap; }
.nl-saved-lbl { font-size: .75em; text-transform: uppercase; letter-spacing: .04em; color: #6b5427; font-weight: 600; }
.note-history .note-del { padding: 0 .3rem; font-size: .72rem; margin-left: .2rem; }
.hscroll { position: sticky; bottom: 0; z-index: 5; overflow-x: auto; overflow-y: hidden; height: 16px;
           background: rgba(242,242,242,.95); border-top: 1px solid #c9c9c9; }
.hscroll > div { height: 1px; }
.nl-dated summary { cursor: pointer; font-size: .85em; margin-bottom: .15rem; }
.bold-btn[hidden] { display: none !important; }
.profile-address { margin-bottom: .8rem; }
