/* Client Hours — client portal (frontend, theme-agnostic) */

.ch-portal {
	max-width: 860px;
	margin: 24px auto;
	padding: 0 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1d2327;
}

.ch-portal-login {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	padding: 40px;
	max-width: 460px;
	text-align: center;
	box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.ch-portal-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.ch-portal-sub { color: #50575e; margin: 0 0 20px; }

.ch-portal-form { display: flex; flex-direction: column; gap: 10px; }
.ch-portal-form input {
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	font-size: 15px;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: center;
}
.ch-portal-form input:focus {
	border-color: #148336;
	outline: 2px solid #50b5ea;
}
.ch-portal-btn {
	background: #f0f0f1;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
}
.ch-portal-btn:hover { background: #e5e5e6; }
.ch-portal-btn.ch-portal-primary {
	background: #148336;
	border-color: #148336;
	color: #fff;
}
.ch-portal-btn.ch-portal-primary:hover { background: #137831; }
.ch-portal-msg { color: #d63638; font-size: 13px; min-height: 18px; }

/* Logged-in view */
.ch-portal-logged { background: #fff; border: 1px solid #dcdcde; border-radius: 10px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }

.ch-portal-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	border-bottom: 1px solid #f0f0f1;
	padding-bottom: 14px;
	margin-bottom: 18px;
}
.ch-portal-logged .ch-portal-title { margin-bottom: 2px; }
.ch-portal-logged .ch-portal-sub { margin: 0; }

.ch-portal-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ch-p-card {
	flex: 1 1 220px;
	background: #f6f7f7;
	border: 1px solid #e5e5e6;
	border-radius: 8px;
	padding: 16px 20px;
	text-align: center;
}
.ch-p-big { display: block; font-size: 30px; font-weight: 700; color: #1d2327; }
.ch-p-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #646970; margin: 2px 0 10px; }
.ch-p-bar { height: 10px; background: #e0e0e1; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.ch-p-bar span { display: block; height: 100%; background: #148336; border-radius: 6px; }
.ch-p-bar.warn span { background: #dba617; }
.ch-p-bar.low span { background: #d63638; }
.ch-p-sub { font-size: 12px; color: #646970; }

.ch-p-week { margin-bottom: 22px; }
.ch-p-week-label { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #646970; margin: 0 0 8px; }
.ch-p-table { width: 100%; border-collapse: collapse; }
.ch-p-table th, .ch-p-table td {
	border-bottom: 1px solid #f0f0f1;
	padding: 8px 10px;
	text-align: left;
	font-size: 13px;
}
.ch-p-table th { color: #646970; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ch-p-table .num { text-align: right; white-space: nowrap; }
.ch-p-desc { max-width: 420px; }
.ch-p-badge {
	display: inline-block;
	background: #edfaef;
	color: #00a32a;
	border: 1px solid #a7e0b2;
	border-radius: 10px;
	padding: 1px 9px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}
.ch-p-badge.muted { background: #f0f0f1; color: #646970; border-color: #d6d6d7; }
.ch-p-empty { color: #646970; }

.ch-p-project { border:1px solid #dcdcde; border-radius:8px; padding:14px; margin:10px 0; }
.ch-p-project p { margin:6px 0 0; }
.ch-p-table { display:block; overflow-x:auto; }

.ch-portal button[data-ch-logout] { background:#34754a; border-color:#34754a; color:#fff; font-weight:600; }
.ch-portal button[data-ch-logout]:hover { background:#245936; border-color:#245936; color:#fff; }
.ch-portal button[data-ch-logout]:focus-visible { outline:3px solid #9ac7a6; outline-offset:3px; }
.ch-p-project .ch-budget { border:0; padding:12px 0 0; margin-bottom:0; }

.ch-portal button[data-ch-logout] { white-space:nowrap; flex-shrink:0; }
@media (max-width:600px) {
 .ch-p-table,.ch-p-table tbody { display:block; width:100%; }
 .ch-p-table thead { display:none; }
 .ch-p-table tbody tr { display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; padding:18px 0; border-bottom:1px solid #e5ebe7; }
 .ch-p-table tbody td { display:block; border:0; padding:0; text-align:left; min-width:0; }
 .ch-p-table tbody td:nth-child(2),.ch-p-table tbody td:last-child { grid-column:1/-1; }
 .ch-p-table td::before { content:attr(data-label); display:block; font-size:10px; color:#617268; text-transform:uppercase; letter-spacing:.04em; margin-bottom:3px; }
 .ch-p-table .ch-p-desc { white-space:normal; overflow-wrap:anywhere; }
}

.ch-portal-btn.ch-portal-primary:focus-visible { outline: 3px solid #137831; outline-offset: 3px; }

.ch-p-rate { margin: 8px 0 14px; color: #34754a; font-weight: 600; font-size: 14px; }
