/* Code Blac LMS – portal & shortcode styles. Inherits theme variables when present. */
.cb-portal, .cb-program-grid, .cb-tuition-table {
	--cbk: var(--cb-black, #0b0b0b);
	--cbg: var(--cb-grey, #6f6f6f);
	--cbl: var(--cb-line, #d9d9d6);
	--cbs: var(--cb-soft, #f2f2f0);
	--cbw: var(--cb-white, #ffffff);
}
.cb-portal { max-width: 1080px; margin: 0 auto; padding: 0 0 4rem; }
.cb-portal h1, .cb-portal h2, .cb-portal h3 { color: var(--cbk); }
.cb-portal h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.cb-portal h3 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
.cb-portal a { color: var(--cbk); }

.cb-portal-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--cbl); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.cb-portal-nav a { text-decoration: none; font-weight: 600; }
.cb-portal-nav a:hover { text-decoration: underline; }
.cb-portal-hello { margin-right: auto; color: var(--cbg); }

.cb-portal-hero { padding: 2.5rem 0 1.5rem; }
.cb-portal-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: .25rem 0 .75rem; }
.cb-portal-hero p { color: var(--cbg); max-width: 640px; }
.cb-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 700; color: var(--cbg); margin: 0; }
.cb-muted { color: var(--cbg); font-size: .9rem; }

.cb-notice { border: 1px solid var(--cbk); padding: .9rem 1.1rem; margin: 1rem 0; background: var(--cbs); }
.cb-notice-ok { background: var(--cbk); color: var(--cbw); }
.cb-notice-ok a { color: var(--cbw); }
.cb-notice-error { border-color: #8b1d1d; background: #fbeeee; color: #5c1212; }

/* Forms */
.cb-form { display: grid; gap: 1rem; max-width: 760px; }
.cb-form-narrow { max-width: 440px; }
.cb-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.cb-form label small { font-weight: 400; color: var(--cbg); }
.cb-form input[type=text], .cb-form input[type=email], .cb-form input[type=tel], .cb-form input[type=password],
.cb-form input[type=number], .cb-form input[type=date], .cb-form input[type=month], .cb-form input[type=file],
.cb-form select, .cb-form textarea, .cb-filter select, .cb-grade-form input, .cb-grade-form textarea {
	width: 100%; box-sizing: border-box; border: 1px solid var(--cbl); background: var(--cbw); padding: .7rem .8rem; font: inherit; font-weight: 400; color: var(--cbk); border-radius: 0;
}
.cb-form input:focus, .cb-form select:focus, .cb-form textarea:focus { outline: 2px solid var(--cbk); outline-offset: 0; border-color: var(--cbk); }
.cb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cb-span-2 { grid-column: 1 / -1; }
.cb-form .cb-check, .cb-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.cb-check input { margin-top: .25rem; }

.cb-button, .cb-form button[type=submit] {
	display: inline-block; background: var(--cbk); color: var(--cbw) !important; border: 1px solid var(--cbk); padding: .9rem 1.4rem;
	font: inherit; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; text-decoration: none; cursor: pointer; justify-self: start;
}
.cb-button:hover, .cb-form button[type=submit]:hover { background: var(--cbw); color: var(--cbk) !important; }
.cb-button-sm, .cb-form .cb-button-sm { padding: .6rem 1rem; font-size: .75rem; }
.cb-button-outline { background: transparent; color: var(--cbk) !important; }
.cb-button-outline:hover { background: var(--cbk); color: var(--cbw) !important; }
.cb-link-btn { background: none; border: 0; padding: 0; color: var(--cbg); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }

/* Dashboard */
.cb-enrollment { border-top: 2px solid var(--cbk); padding-top: 1rem; margin-top: 1.5rem; }
.cb-enrollment-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cb-enrollment-head h2 { margin: 0; }
.cb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.cb-tile { border: 1px solid var(--cbl); padding: 1.25rem; background: var(--cbw); }
.cb-tile p { margin: .2rem 0; }
.cb-tile-label { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 700; color: var(--cbg); }
.cb-tile-num { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.cb-tile-num small { font-size: .95rem; font-weight: 400; color: var(--cbg); }
.cb-progress { height: 8px; background: var(--cbs); border: 1px solid var(--cbl); margin: .6rem 0 .3rem; min-width: 80px; }
.cb-progress span { display: block; height: 100%; background: var(--cbk); }
.cb-badge { display: inline-block; padding: .2rem .55rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--cbk); }
.cb-badge-enrolled, .cb-badge-completed { background: var(--cbk); color: var(--cbw); }
.cb-badge-withdrawn { border-color: var(--cbl); color: var(--cbg); }
.cb-row-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.cb-row-head h2 { margin: 0; }
.cb-collapse { border: 1px solid var(--cbl); margin: 1rem 0; padding: .75rem 1rem; }
.cb-collapse summary { cursor: pointer; font-weight: 700; }

/* Tables */
.cb-table-wrap { overflow-x: auto; margin: .75rem 0; }
.cb-table, .cb-tuition-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cb-table th, .cb-table td, .cb-tuition-table th, .cb-tuition-table td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--cbl); vertical-align: top; }
.cb-table th, .cb-tuition-table th { text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; color: var(--cbg); border-bottom: 2px solid var(--cbk); }
.cb-tuition-table td:last-child, .cb-tuition-table th:last-child { text-align: right; }

.cb-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 1.5rem 0; }
.cb-card-form { border: 1px solid var(--cbl); padding: 1.25rem; background: var(--cbs); max-width: none; align-content: start; }
.cb-card-form h3 { margin-top: 0; }
.cb-dl { display: grid; grid-template-columns: 110px 1fr; gap: .4rem .75rem; margin: 0; font-size: .92rem; }
.cb-dl dt { color: var(--cbg); }
.cb-dl dd { margin: 0; }
.cb-filter { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.cb-filter select { width: auto; }
.cb-submission { border: 1px solid var(--cbl); padding: 1rem 1.25rem; margin: .75rem 0; }
.cb-submission-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cb-grade-form { display: grid; grid-template-columns: 180px 1fr auto; gap: .75rem; align-items: end; margin-top: .75rem; }
.cb-grade-form label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; }
.cb-grade-form label span { font-weight: 400; }
.cb-grade-box { margin: 1.5rem 0; max-width: 420px; }
.cb-prose { max-width: 720px; }

/* Program cards (shortcode) */
.cb-program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--cbl); border: 1px solid var(--cbl); margin: 2rem 0; }
.cb-program-card { background: var(--cbw); padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; transition: background .2s, color .2s; }
.cb-program-card:hover { background: var(--cbk); color: var(--cbw); }
.cb-program-card:hover a, .cb-program-card:hover h3, .cb-program-card:hover dt { color: var(--cbw); }
.cb-program-card h3 { margin: 0; font-size: 1.45rem; }
.cb-program-num { font-size: .75rem; letter-spacing: .16em; color: var(--cbg); margin: 0; }
.cb-program-summary { margin: 0; flex: 1; font-size: .95rem; }
.cb-program-facts { margin: 0; display: grid; gap: .35rem; border-top: 1px solid currentColor; padding-top: .75rem; font-size: .9rem; }
.cb-program-facts div { display: flex; justify-content: space-between; }
.cb-program-facts dt { color: var(--cbg); }
.cb-program-facts dd { margin: 0; font-weight: 700; }
.cb-arrow-link { font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; text-decoration: none; color: inherit; }
.cb-program-details { display: grid; gap: 0; margin-top: 2.5rem; }
.cb-program-detail { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; padding: 1.75rem 0; border-top: 1px solid var(--cbl, #d9d9d6); }
.cb-program-detail-head h3 { margin: 0 0 .25rem; }
.cb-program-detail-head p { margin: 0; color: var(--cbg, #6f6f6f); font-size: .9rem; }
.cb-program-detail-body p:first-child { margin-top: 0; }

@media (max-width: 760px) {
	.cb-form-grid, .cb-two-col { grid-template-columns: 1fr; }
	.cb-grade-form { grid-template-columns: 1fr; }
	.cb-program-detail { grid-template-columns: 1fr; gap: .5rem; }
	.cb-tuition-table thead { display: none; }
	.cb-tuition-table tr { display: block; border-bottom: 2px solid var(--cbk); padding: .5rem 0; }
	.cb-tuition-table td { display: flex; justify-content: space-between; border: 0; padding: .3rem 0; }
	.cb-tuition-table td::before { content: attr(data-label); color: var(--cbg); }
	.cb-tuition-table td:last-child { text-align: left; }
}

/* ---------- v1.1: app layout with sidebar ---------- */
.cb-app { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; max-width: none; padding: 2rem 0 4rem; align-items: start; }
.cb-side { background: var(--cbk); color: var(--cbw); padding: 1.75rem 1.25rem; position: sticky; top: 90px; min-height: 70vh; display: flex; flex-direction: column; gap: 1.25rem; }
.cb-side-brand { display: flex; flex-direction: column; line-height: 1.1; padding-bottom: 1.25rem; border-bottom: 1px solid #2a2a2a; }
.cb-side-mark { font-family: var(--cb-display, Georgia, serif); font-weight: 700; font-size: 1.35rem; letter-spacing: .06em; }
.cb-side-sub { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #bdbdbd; margin-top: .4rem; }
.cb-side-label { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #8a8a8a; margin: 0; font-weight: 700; }
.cb-side-nav { display: grid; gap: .25rem; }
.cb-side-nav a { color: #d9d9d6 !important; text-decoration: none; padding: .65rem .8rem; font-size: .9rem; font-weight: 500; border-left: 2px solid transparent; }
.cb-side-nav a:hover { background: #1a1a1a; color: var(--cbw) !important; }
.cb-side-nav a.is-active { background: #1f1f1f; color: var(--cbw) !important; border-left-color: var(--cbw); font-weight: 700; }
.cb-side-user { margin-top: auto; display: grid; gap: .2rem; font-size: .82rem; padding-top: 1.25rem; border-top: 1px solid #2a2a2a; }
.cb-side-user span { color: #bdbdbd; word-break: break-all; }
.cb-side-out { margin-top: .6rem; justify-self: start; border: 1px solid #5a5a5a; color: var(--cbw) !important; text-decoration: none; padding: .45rem .9rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.cb-side-out:hover { background: var(--cbw); color: var(--cbk) !important; }
.cb-app-main { padding: 0 0 0 2.25rem; min-width: 0; }
.cb-app-head { padding: .25rem 0 1.25rem; }
.cb-app-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.05; margin: .3rem 0 .5rem; }
.cb-tiles-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.cb-panel { border: 1px solid var(--cbl); background: var(--cbw); padding: 1.4rem 1.5rem; margin: 1.25rem 0; }
.cb-panel h2 { margin: 0 0 .75rem; font-size: 1.35rem; }
.cb-two-col .cb-panel { margin: 0; }
.cb-row-head-tight { margin-top: 0; margin-bottom: .75rem; }
.cb-row-head-tight a { font-weight: 700; font-size: .85rem; }

.cb-state { display: inline-block; padding: .2rem .6rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--cbl); background: var(--cbs); }
.cb-state-paid { background: var(--cbk); color: var(--cbw); border-color: var(--cbk); }
.cb-state-past_due { background: #fbeeee; color: #8b1d1d; border-color: #8b1d1d; }
.cb-state-partial { border-color: var(--cbk); }
.cb-state-waived { color: var(--cbg); text-decoration: line-through; }
.cb-badge-pending_fee { border-style: dashed; }
.cb-type { display: inline-block; min-width: 1.4em; text-align: center; font-size: .7rem; font-weight: 700; border: 1px solid var(--cbk); padding: 0 .3rem; }
tr.cb-void td { color: var(--cbg); text-decoration: line-through; }
tr.cb-void td:last-child { text-decoration: none; }
.cb-inline-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.cb-inline-form input[type=text] { border: 1px solid var(--cbl); padding: .3rem .45rem; font: inherit; font-size: .8rem; width: 110px; }
.cb-course-grade { display: grid; grid-template-columns: 80px 130px 1fr auto; gap: .4rem; align-items: center; margin: 0; }
.cb-course-grade input, .cb-course-grade select { border: 1px solid var(--cbl); padding: .45rem .5rem; font: inherit; font-size: .85rem; width: 100%; box-sizing: border-box; background: var(--cbw); }
.cb-inline-hours { display: grid; grid-template-columns: 150px 1.4fr 90px 1fr auto; gap: .6rem; align-items: end; max-width: none; margin-bottom: 1rem; }
.cb-form-grid-4 { grid-template-columns: repeat(4, 1fr); }
.cb-wide-form { margin: 1.25rem 0; }
.cb-filter input[type=search] { flex: 1 1 220px; border: 1px solid var(--cbl); padding: .7rem .8rem; font: inherit; }
.cb-upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.cb-upcoming li { display: grid; grid-template-columns: 64px 1fr; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--cbl); align-items: center; }
.cb-upcoming small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; color: var(--cbg); font-weight: 700; }
.cb-up-date { font-family: var(--cb-display, Georgia, serif); font-weight: 700; font-size: 1.05rem; }

@media (max-width: 900px) {
	.cb-app { grid-template-columns: 1fr; padding-top: 1rem; }
	.cb-side { position: static; min-height: 0; }
	.cb-side-nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
	.cb-app-main { padding: 1.5rem 0 0; }
	.cb-inline-hours, .cb-course-grade, .cb-form-grid-4 { grid-template-columns: 1fr; }
}
