/* Certified Care Portal — front-end UI */
.ccp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Alerts ---------- */
.ccp-alert { border-radius: 14px; padding: .95rem 1.1rem; margin: 0 0 1.25rem; font-size: .95rem; font-weight: 600; border: 1px solid; }
.ccp-alert ul { margin: 0; padding-left: 1.1rem; }
.ccp-alert--success { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.ccp-alert--error { background: #fff4ed; border-color: #fed7aa; color: #9a3412; }
.ccp-alert--info { background: #eef7fb; border-color: #cbe7f1; color: #0b4f6b; }

/* ---------- Forms ---------- */
.ccp-form { display: grid; gap: 1.1rem; }
.ccp-form > .btn:not(.btn--block) { justify-self: start; }
.ccp-field { display: grid; align-content: start; gap: .4rem; margin: 0; border: 0; padding: 0; min-width: 0; }
.ccp-field label, .ccp-field legend { font-weight: 700; font-size: .9rem; color: var(--navy, #0b2540); padding: 0; margin-bottom: .1rem; }
.ccp-form input[type="text"], .ccp-form input[type="email"], .ccp-form input[type="tel"], .ccp-form input[type="password"],
.ccp-form input[type="date"], .ccp-form input[type="number"], .ccp-form input:not([type]), .ccp-form select, .ccp-form textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--ink, #142235);
	background: #fff; border: 1.5px solid var(--line, #e3e9ef); border-radius: 12px;
	padding: .8rem .95rem; transition: border-color .2s, box-shadow .2s; min-height: 50px;
	-webkit-appearance: none; appearance: none;
}
.ccp-form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6b7f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.ccp-form textarea { min-height: 110px; resize: vertical; }
.ccp-form input:focus, .ccp-form select:focus, .ccp-form textarea:focus { outline: none; border-color: var(--brand, #0e7c86); box-shadow: 0 0 0 4px rgba(14, 124, 134, .14); }
.ccp-form input:disabled { background: var(--soft, #f4f8fa); color: var(--muted, #5b6b7f); }
.ccp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.ccp-help { color: var(--muted, #5b6b7f); font-size: .84rem; margin: 0; }
.ccp-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ccp-row--between { justify-content: space-between; font-size: .92rem; }
.ccp-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; color: var(--muted, #5b6b7f); cursor: pointer; }
.ccp-check input { width: 18px; height: 18px; margin-top: .18rem; accent-color: var(--brand, #0e7c86); flex: none; }
.ccp-pass { position: relative; }
.ccp-pass input { padding-right: 4.5rem !important; }
.ccp-pass__toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: var(--brand-50, #e9f7f7); color: var(--brand, #0e7c86); border: 0; border-radius: 8px; padding: .4rem .65rem; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.ccp-meter { height: 5px; background: var(--line, #e3e9ef); border-radius: 99px; overflow: hidden; }
.ccp-meter span { display: block; height: 100%; width: 0; background: #ef4444; transition: width .25s, background .25s; }
.ccp-options { display: flex; flex-wrap: wrap; gap: .55rem; }
.ccp-option { position: relative; cursor: pointer; }
.ccp-option input { position: absolute; opacity: 0; pointer-events: none; }
.ccp-option span { display: inline-block; padding: .7rem 1rem; border: 1.5px solid var(--line, #e3e9ef); border-radius: 12px; font-weight: 600; font-size: .93rem; background: #fff; transition: all .15s; }
.ccp-option:hover span { border-color: var(--brand-100, #d2efef); }
.ccp-option input:checked + span { border-color: var(--brand, #0e7c86); background: var(--brand-50, #e9f7f7); color: var(--brand-600, #0b6870); box-shadow: 0 0 0 3px rgba(14, 124, 134, .1); }
.ccp-option input:focus-visible + span { outline: 3px solid var(--brand-400, #14a3a8); outline-offset: 2px; }
.ccp-options--slots .ccp-option span { min-width: 98px; text-align: center; }
.ccp-section-title { font-size: 1.05rem; margin: .8rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line, #e3e9ef); }
.ccp-title { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin: 0 0 .25rem; }
.ccp-sub { color: var(--muted, #5b6b7f); margin: 0 0 1.4rem; }

/* ---------- Auth (login/register) ---------- */
.ccp-auth { display: grid; grid-template-columns: .9fr 1.1fr; max-width: 1040px; margin: 0 auto; background: #fff; border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(11, 37, 64, .25); overflow: hidden; border: 1px solid var(--line, #e3e9ef); }
.ccp-auth__aside { position: relative; background: radial-gradient(500px 300px at 100% 0%, rgba(127, 214, 216, .35), transparent 60%), linear-gradient(150deg, var(--brand-600, #0b6870), var(--navy, #0b2540)); color: #d7e6ef; padding: clamp(2rem, 4vw, 3rem); display: flex; align-items: center; }
.ccp-auth__aside::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .06); }
.ccp-auth__aside h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 1.2rem 0 .6rem; }
.ccp-auth__aside p { color: #b9d0de; }
.ccp-auth__aside ul { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .9rem; }
.ccp-auth__aside li { display: flex; align-items: center; gap: .75rem; font-weight: 600; color: #fff; }
.ccp-auth__aside li .icon { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #7fd6d8; }
.ccp-auth__badge { display: inline-flex; align-items: center; gap: .45rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); padding: .4rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 700; color: #fff; }
.ccp-auth__form { padding: clamp(1.75rem, 4vw, 3rem); }

/* ---------- Portal ---------- */
.ccp-portal { display: grid; grid-template-columns: 270px 1fr; gap: 1.5rem; align-items: start; }
.ccp-side { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line, #e3e9ef); border-radius: 22px; padding: 1.25rem; box-shadow: 0 10px 30px -14px rgba(11, 37, 64, .18); }
.ccp-user { display: flex; gap: .8rem; align-items: center; padding: .4rem .3rem 1.1rem; border-bottom: 1px solid var(--line, #e3e9ef); margin-bottom: .8rem; min-width: 0; }
.ccp-user > div { min-width: 0; }
.ccp-user strong { display: block; color: var(--navy, #0b2540); line-height: 1.25; }
.ccp-user > div span { display: block; font-size: .82rem; color: var(--muted, #5b6b7f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccp-avatar { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-400, #14a3a8), var(--brand-600, #0b6870)); }
.ccp-nav { display: grid; gap: .2rem; }
.ccp-nav a { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; border-radius: 12px; color: var(--ink, #142235); font-weight: 600; font-size: .95rem; }
.ccp-nav a .icon { width: 19px; height: 19px; color: var(--muted, #5b6b7f); }
.ccp-nav a:hover { background: var(--soft, #f4f8fa); color: var(--brand, #0e7c86); }
.ccp-nav a.is-active { background: var(--brand-50, #e9f7f7); color: var(--brand-600, #0b6870); }
.ccp-nav a.is-active .icon { color: var(--brand, #0e7c86); }
.ccp-nav__logout { margin-top: .5rem; border-top: 1px solid var(--line, #e3e9ef); border-radius: 0 0 12px 12px !important; padding-top: 1rem !important; color: var(--danger, #c2410c) !important; }
.ccp-nav__logout .icon { color: var(--danger, #c2410c) !important; }
.ccp-main { min-width: 0; }
.ccp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.ccp-card { background: #fff; border: 1px solid var(--line, #e3e9ef); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.25rem; box-shadow: 0 1px 2px rgba(11, 37, 64, .05); }
.ccp-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.ccp-card__head h3 { font-size: 1.1rem; margin: 0; }
.ccp-card__head a { font-weight: 700; font-size: .9rem; }
.ccp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.ccp-stat { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--line, #e3e9ef); border-radius: 18px; padding: 1.1rem 1.2rem; }
.ccp-stat strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--navy, #0b2540); }
.ccp-stat span { font-size: .84rem; color: var(--muted, #5b6b7f); font-weight: 600; }
.ccp-stat__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50, #e9f7f7); color: var(--brand, #0e7c86); flex: none; }
.ccp-stat__icon .icon { width: 22px; height: 22px; }
.ccp-stat__icon--warm { background: #fff4e8; color: #e8893a; }
.ccp-stat__icon--navy { background: #e8eef5; color: var(--navy, #0b2540); }
.ccp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ccp-list li { display: flex; align-items: center; gap: 1rem; padding: .85rem; border: 1px solid var(--line, #e3e9ef); border-radius: 14px; }
.ccp-list__body { flex: 1; min-width: 0; }
.ccp-list__body strong { display: block; color: var(--navy, #0b2540); }
.ccp-list__body span { font-size: .86rem; color: var(--muted, #5b6b7f); }
.ccp-date { flex: none; width: 54px; text-align: center; border-radius: 12px; background: var(--brand-50, #e9f7f7); color: var(--brand-600, #0b6870); font-size: .75rem; font-weight: 700; text-transform: uppercase; padding: .35rem 0; line-height: 1.2; }
.ccp-date b { display: block; font-size: 1.35rem; color: var(--navy, #0b2540); }
.ccp-empty { text-align: center; padding: 1.5rem 1rem; color: var(--muted, #5b6b7f); }
.ccp-empty .icon { width: 40px; height: 40px; margin: 0 auto .5rem; color: var(--brand-100, #d2efef); }
.ccp-empty p { margin-bottom: .8rem; }
.ccp-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ccp-quick__item { display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid var(--line, #e3e9ef); border-radius: 18px; padding: 1.2rem; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.ccp-quick__item:hover { transform: translateY(-3px); box-shadow: 0 10px 30px -12px rgba(11, 37, 64, .2); border-color: var(--brand-100, #d2efef); color: inherit; }
.ccp-quick__item .icon { width: 26px; height: 26px; color: var(--brand, #0e7c86); margin-bottom: .5rem; }
.ccp-quick__item strong { color: var(--navy, #0b2540); }
.ccp-quick__item span { font-size: .86rem; color: var(--muted, #5b6b7f); }

/* ---------- Tables & badges ---------- */
.ccp-table-wrap { overflow-x: auto; }
.ccp-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ccp-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #5b6b7f); padding: .6rem .7rem; border-bottom: 1px solid var(--line, #e3e9ef); }
.ccp-table td { padding: .9rem .7rem; border-bottom: 1px solid var(--line, #e3e9ef); vertical-align: top; }
.ccp-table tr:last-child td { border-bottom: 0; }
.ccp-table small { color: var(--muted, #5b6b7f); }
.ccp-note { display: inline-block; margin-top: .3rem; background: var(--soft, #f4f8fa); padding: .2rem .5rem; border-radius: 6px; }
.ccp-link-btn { background: none; border: 0; color: var(--danger, #c2410c); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.ccp-link-btn:hover { text-decoration: underline; }
.ccp-badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: .28rem .65rem; border-radius: 999px; background: #eef2f6; color: #475569; white-space: nowrap; }
.ccp-badge--pending, .ccp-badge--new, .ccp-badge--review { background: #fff4e8; color: #9a4a0b; }
.ccp-badge--confirmed, .ccp-badge--scheduled, .ccp-badge--active, .ccp-badge--contacted { background: #dcfce7; color: #15803d; }
.ccp-badge--completed, .ccp-badge--closed { background: #e0f2fe; color: #0369a1; }
.ccp-badge--cancelled, .ccp-badge--declined, .ccp-badge--inactive { background: #fee2e2; color: #b91c1c; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.ccp-portal { grid-template-columns: 1fr; }
	.ccp-side { position: static; }
	.ccp-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
	.ccp-nav__logout { margin-top: 0; border-top: 0; padding-top: .75rem !important; border-radius: 12px !important; }
	.ccp-auth { grid-template-columns: 1fr; }
	.ccp-auth__aside ul { display: none; }
}
@media (max-width: 640px) {
	.ccp-grid-2, .ccp-stats, .ccp-quick { grid-template-columns: 1fr; }
	.ccp-table thead { display: none; }
	.ccp-table, .ccp-table tbody, .ccp-table tr, .ccp-table td { display: block; width: 100%; }
	.ccp-table tr { border: 1px solid var(--line, #e3e9ef); border-radius: 14px; padding: .4rem .8rem; margin-bottom: .7rem; }
	.ccp-table td { border: 0; padding: .45rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
	.ccp-table td::before { content: attr(data-label); font-weight: 700; color: var(--muted, #5b6b7f); font-size: .8rem; text-align: left; }
	.ccp-table td:not([data-label])::before { content: none; }
	.ccp-options--slots .ccp-option { flex: 1 1 calc(33% - .55rem); }
	.ccp-options--slots .ccp-option span { min-width: 0; width: 100%; }
}
