/* Client Hub Central: shared styles for the agency view and the client portal. */
.chc {
	--chc-brand: #1f7a4d;
	--chc-ink: #1d2733;
	--chc-muted: #6a7480;
	--chc-line: #e3e7ec;
	--chc-bg: #f4f6f8;
	--chc-card: #ffffff;
	--chc-good: #1f8a4c;
	--chc-warn: #b26a00;
	--chc-bad: #c23b32;
	color: var(--chc-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
.chc *, .chc *::before, .chc *::after { box-sizing: inherit; }
.chc h1 { font-size: 28px; margin: 0 0 4px; line-height: 1.2; }
.chc h2 { font-size: 19px; margin: 0 0 12px; line-height: 1.3; }
.chc h3 { font-size: 16px; margin: 20px 0 10px; }
.chc a { color: var(--chc-brand); }

/* Layout */
.chc-body { margin: 0; background: var(--chc-bg, #f4f6f8); }
.chc-portal { min-height: 100vh; background: var(--chc-bg); }
.chc-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 60px; }
.chc-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin: 6px 0 20px; }
.chc-sub { color: var(--chc-muted); margin: 4px 0 0; font-size: 14px; }
.chc-muted { color: var(--chc-muted); font-size: 13px; }
.chc-small { font-size: 13px; max-width: 320px; }
.chc-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 20px; }
.chc-grid2 > .chc-card { margin-bottom: 0; }
.chc-card { background: var(--chc-card); border: 1px solid var(--chc-line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.chc-scroll { overflow-x: auto; padding: 0; }
.chc-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }

/* Top bar */
.chc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--chc-brand); color: #fff; }
.chc-brand { font-weight: 700; font-size: 18px; }
.chc-brand span { font-weight: 400; opacity: .85; margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.4); }
.chc-who { font-size: 14px; }
.chc-who a { color: #fff; margin-left: 12px; text-decoration: underline; }

/* Tiles */
.chc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.chc-tiles-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.chc-tiles-3 { grid-template-columns: repeat(3, 1fr); }
.chc-tight { margin-bottom: 8px; }
.chc-tile { background: var(--chc-card); border: 1px solid var(--chc-line); border-radius: 14px; padding: 16px 18px; border-top: 4px solid var(--chc-brand); }
.chc-tight .chc-tile { border-top-width: 1px; padding: 12px; text-align: center; background: var(--chc-bg); }
.chc-tile.good { border-top-color: var(--chc-good); }
.chc-tile.warn { border-top-color: var(--chc-warn); }
.chc-tile.bad { border-top-color: var(--chc-bad); }
.chc-num { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chc-lbl { font-weight: 600; margin-top: 4px; }
.chc-help { color: var(--chc-muted); font-size: 13px; margin-top: 2px; }

/* Buttons */
.chc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid #cfd6de; background: #fff; color: var(--chc-ink); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.chc-btn:hover { background: #f1f4f7; color: var(--chc-ink); }
.chc-btn.chc-primary { background: var(--chc-brand); border-color: var(--chc-brand); color: #fff; }
.chc-btn.chc-primary:hover { filter: brightness(.93); color: #fff; }
.chc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.chc-link, .chc-link-btn { background: none; border: 0; padding: 0; color: var(--chc-brand); font-size: 14px; cursor: pointer; text-decoration: underline; }
.chc-link-btn.bad { color: var(--chc-bad); }
.chc-actions { white-space: nowrap; margin-top: 6px; font-size: 13px; }
.chc-actions > * { display: inline-block; margin-right: 12px; }
.chc-actions form { display: inline; }

/* Messages and pills */
.chc-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.chc-msg.is-ok { background: #ecf7f0; border-color: #b9e0c7; color: #155c33; }
.chc-msg.is-error { background: #fcefee; border-color: #f0c2bf; color: #8f241d; }
.chc-msg.is-warn { background: #fff7e6; border-color: #f2d49b; color: #7a4a00; }
.chc-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f4; color: var(--chc-ink); }
.chc-pill.good { background: #e3f4ea; color: #155c33; }
.chc-pill.warn { background: #fff1d6; color: #7a4a00; }
.chc-pill.bad { background: #fbe3e1; color: #8f241d; }
.chc-good { color: var(--chc-good); font-weight: 600; }
.chc-bad { color: var(--chc-bad); font-weight: 600; }
.chc-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #b8c0c8; margin-right: 8px; flex: 0 0 11px; }
.chc-dot.up { background: var(--chc-good); }
.chc-dot.down { background: var(--chc-bad); }

/* Lists */
.chc-list { margin: 0; padding: 0; list-style: none; }
.chc-list li { padding: 8px 0; border-bottom: 1px solid var(--chc-line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chc-todo { margin: 0; padding-left: 22px; }
.chc-todo li { padding: 6px 0; }
.chc-team { list-style: none; margin: 0 0 14px; padding: 0; }
.chc-team li { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--chc-line); }
.chc-team li > div { flex: 1; }

/* Sites */
.chc-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.chc-site { border: 1px solid var(--chc-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chc-site-top { display: flex; align-items: flex-start; gap: 4px; }
.chc-site-top .chc-dot { margin-top: 7px; }
.chc-site-name { font-weight: 700; font-size: 16px; }
.chc-site-stats { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.chc-site-actions { display: flex; gap: 10px; margin-top: auto; }
.chc-site-actions form { flex: 1; }
.chc-site-actions .chc-btn { width: 100%; }
.chc-site-actions > a.chc-btn { width: auto; }

/* GoHighLevel buttons */
.chc-ghl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.chc-ghl-btn { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--chc-line); border-radius: 12px; text-decoration: none; color: var(--chc-ink) !important; font-weight: 600; background: var(--chc-bg); }
.chc-ghl-btn:hover { border-color: var(--chc-brand); }
.chc-ghl-btn small { font-weight: 400; color: var(--chc-muted); }
.chc-ghl-btn.is-main { background: var(--chc-brand); color: #fff !important; border-color: var(--chc-brand); }
.chc-ghl-btn.is-main small { color: rgba(255,255,255,.85); }

/* Forms */
.chc-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.chc-form input[type=text], .chc-form input[type=email], .chc-form input[type=password], .chc-form input[type=url], .chc-form select, .chc-form textarea { display: block; width: 100%; max-width: 520px; margin-top: 6px; padding: 10px 12px; border: 1px solid #cfd6de; border-radius: 10px; font: inherit; font-weight: 400; background: #fff; }
.chc-form input[type=checkbox] { margin-right: 6px; }
.chc-form small { display: block; font-weight: 400; color: var(--chc-muted); margin-top: 4px; }
.chc-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.chc-inline label { margin: 0; flex: 1 1 180px; }
.chc-inline input, .chc-inline select { max-width: none !important; }

/* Tables */
.chc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chc-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--chc-muted); padding: 12px; border-bottom: 1px solid var(--chc-line); white-space: nowrap; }
.chc-table td { padding: 12px; border-bottom: 1px solid var(--chc-line); vertical-align: top; }
.chc-table tr:last-child td { border-bottom: 0; }

/* Agency view */
.chc-admin { padding: 16px 0; }
.chc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--chc-line); }
.chc-tabs a { padding: 10px 16px; text-decoration: none; color: var(--chc-muted); font-weight: 600; border-bottom: 3px solid transparent; }
.chc-tabs a.is-on { color: var(--chc-ink); border-bottom-color: var(--chc-brand); }
.chc-tabs .chc-tab-link { margin-left: auto; color: var(--chc-brand); }
.chc-split { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.chc-nav { list-style: none; margin: 0; padding: 0; }
.chc-nav a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--chc-ink); }
.chc-nav a.is-on { background: var(--chc-bg); font-weight: 700; }

/* Login */
.chc-login { max-width: 420px; margin: 0 auto; padding: 80px 16px; }
.chc-login .chc-card { padding: 28px; }
.chc-login label { display: block; font-weight: 600; font-size: 14px; }
.chc-login input[type=text], .chc-login input[type=password] { width: 100%; padding: 11px 12px; border: 1px solid #cfd6de; border-radius: 10px; font-size: 16px; margin-top: 6px; }
.chc-login input[type=submit] { width: 100%; min-height: 46px; background: var(--chc-brand); color: #fff; border: 0; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }
.chc-login .login-remember label { font-weight: 400; }
.chc-lost { font-size: 14px; margin: 12px 0 0; }

@media (max-width: 782px) {
	.chc-split { grid-template-columns: 1fr; }
	.chc-tiles-3 { grid-template-columns: repeat(3, 1fr); }
	.chc-num { font-size: 26px; }
	.chc-brand span { display: none; }
	.chc h1 { font-size: 23px; }
}


/* Portal on its own subdomain. */
.chc-wrap > .chc { margin-bottom: 0; }
.chc-wrap .chc-login { padding-top: 40px; }
.chc-login .chc-card form p { margin: 0 0 14px; }

/* My websites switcher */
.chc-who { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.chc-who a { margin-left: 0; }
.chp-switch { position: relative; }
.chp-switch summary { list-style: none; cursor: pointer; padding: 7px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; font-weight: 600; }
.chp-switch summary::-webkit-details-marker { display: none; }
.chp-switch summary::after { content: " \25BE"; }
.chp-switch-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; background: #fff; color: var(--chc-ink); border: 1px solid var(--chc-line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; z-index: 50; }
.chp-switch-menu a, .chp-switch-menu .is-here { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; color: var(--chc-ink) !important; text-decoration: none !important; font-weight: 600; }
.chp-switch-menu a:hover { background: var(--chc-bg); }
.chp-switch-menu small { font-weight: 400; color: var(--chc-muted); }
.chp-switch-menu .is-here { color: var(--chc-muted) !important; }
