/* =============================================================================
   APG Coaching — Frontend Styles
   ============================================================================= */

.apg-checkin-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

/* Top bar (member name + logout) */
.apg-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	font-size: 0.9rem;
}

.apg-topbar-name {
	font-weight: 600;
	color: #333;
}

.apg-logout-link {
	color: #888;
	text-decoration: none;
	font-size: 0.85rem;
}

.apg-logout-link:hover {
	color: #e74c3c;
	text-decoration: underline;
}

/* Header */
.apg-checkin-header {
	margin-bottom: 24px;
}

.apg-checkin-header h2 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 8px;
	color: #1a1a2e;
}

.apg-checkin-header p {
	color: #555;
	margin: 0;
}

/* Notices */
.apg-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.apg-notice a {
	font-weight: 600;
}

.apg-notice-info {
	background: #eaf4f7;
	border-left: 4px solid #76c1d4;
	color: #1a3a5c;
}

.apg-notice-warning {
	background: #fff8e1;
	border-left: 4px solid #ffc107;
	color: #f57f17;
}

/* Mensagem de feedback */
.apg-message {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 0.95rem;
	font-weight: 500;
}

.apg-message-success {
	background: #e8f5e9;
	border-left: 4px solid #4caf50;
	color: #1b5e20;
}

.apg-message-error {
	background: #ffebee;
	border-left: 4px solid #f44336;
	color: #b71c1c;
}

/* Formulario */
.apg-form {
	background: #ffffff;
	padding: 32px;
	border-radius: 12px;
	box-shadow: 0 2px 16px rgba( 0, 0, 0, 0.08 );
}

.apg-form-group {
	margin-bottom: 28px;
}

.apg-form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #222;
	font-size: 0.975rem;
}

.apg-form-group textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid #dde1e7;
	border-radius: 8px;
	font-size: 1rem;
	line-height: 1.65;
	color: #333;
	resize: vertical;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	font-family: inherit;
}

.apg-form-group textarea:focus {
	outline: none;
	border-color: #1a3a5c;
	box-shadow: 0 0 0 3px rgba( 74, 108, 247, 0.12 );
}

/* Ratings */
.apg-ratings {
	margin-bottom: 12px;
}

.apg-ratings h3 {
	font-size: 1.05rem;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px;
}

.apg-rating-group {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
}

.apg-rating-group label {
	font-weight: 600;
	color: #444;
	font-size: 0.92rem;
	min-width: 110px;
	flex-shrink: 0;
	margin: 0;
}

.apg-rating-scale {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
}

.apg-rating-btn {
	border: 2px solid #dde1e7;
	background: #f9fafb;
	cursor: pointer;
	color: #666;
	transition: all 0.18s ease;
	font-family: inherit;
}

/* Field description */
.apg-field-desc {
	font-size: 0.875rem;
	color: #777;
	margin: -4px 0 10px;
}

/* Required asterisk */
.apg-required {
	color: #e53e3e;
	margin-left: 2px;
}

/* Ratings header */
.apg-ratings-header {
	margin-bottom: 20px;
}

.apg-ratings-header h3 {
	font-size: 1.1rem;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 4px;
}

.apg-ratings-desc {
	font-size: 0.875rem;
	color: #777;
	margin: 0;
}

/* Form footer (submit + autosave status) */
.apg-form-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	padding-top: 8px;
}

/* Autosave status */
.apg-autosave-status {
	font-size: 0.8rem;
	color: #999;
	font-style: italic;
	min-width: 120px;
	text-align: right;
}

.apg-btn {
	display: inline-block;
	padding: 12px 30px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: background 0.2s, transform 0.1s;
	font-family: inherit;
	letter-spacing: 0.01em;
}

.apg-btn-primary {
	background: #1a3a5c;
	color: #ffffff;
}

.apg-btn-primary:hover {
	background: #0f2942;
}

.apg-btn-primary:active {
	transform: scale( 0.98 );
}

.apg-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* =============================================================================
   Month navigation
   ============================================================================= */

.apg-month-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}

.apg-month-label {
	font-size: 1.15rem;
	font-weight: 700;
	color: #1a1a2e;
}

.apg-nav-link {
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a3a5c;
	text-decoration: none;
}

.apg-nav-link:hover {
	text-decoration: underline;
}

.apg-nav-disabled {
	color: #ccc;
	cursor: default;
}

.apg-nav-disabled:hover {
	text-decoration: none;
}

/* =============================================================================
   Two-column layout: main + sidebar
   ============================================================================= */

.apg-checkin-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 32px;
	align-items: start;
}

/* =============================================================================
   Sidebar
   ============================================================================= */

.apg-checkin-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.apg-sidebar-section {
	background: #fff;
	border-radius: 10px;
	padding: 18px;
	box-shadow: 0 1px 8px rgba( 0, 0, 0, 0.07 );
}

.apg-sidebar-title {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #888;
	margin: 0 0 14px;
}

/* Member list */
.apg-sidebar-members {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.apg-sidebar-member {
	display: flex;
	align-items: center;
	gap: 10px;
}

.apg-sidebar-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72rem;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
	letter-spacing: 0.02em;
}

.apg-sidebar-name {
	font-size: 0.9rem;
	color: #333;
	text-decoration: none;
	line-height: 1.3;
}

a.apg-sidebar-name:hover {
	color: #1a3a5c;
	text-decoration: underline;
}

.apg-sidebar-pending {
	color: #bbb;
}

.apg-no-checkin .apg-sidebar-avatar {
	opacity: 0.45;
}

/* Active / currently viewing */
.apg-is-viewing .apg-sidebar-name {
	font-weight: 700;
	color: #1a3a5c;
}

/* Print links */
.apg-sidebar-print {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.apg-print-link {
	font-size: 0.88rem;
	color: #1a3a5c;
	text-decoration: none;
}

.apg-print-link:hover {
	text-decoration: underline;
}

/* =============================================================================
   Read-only view
   ============================================================================= */

.apg-view-byline {
	font-size: 0.95rem;
	color: #666;
	margin-bottom: 18px;
}

.apg-ratings-summary {
	background: #fff;
	border-radius: 10px;
	padding: 18px 20px;
	box-shadow: 0 1px 8px rgba( 0, 0, 0, 0.07 );
	margin-bottom: 20px;
}

.apg-ratings-summary-label {
	font-size: 0.82rem;
	color: #999;
	margin-bottom: 12px;
}

.apg-ratings-summary-row {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.apg-summary-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f5f7ff;
	border: 1.5px solid #dde3ff;
	border-radius: 8px;
	padding: 6px 14px;
}

.apg-summary-chip-label {
	font-size: 0.88rem;
	color: #555;
}

.apg-summary-chip-value {
	font-size: 1.1rem;
	font-weight: 700;
	color: #1a3a5c;
}

.apg-view-block {
	background: #fff;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 1px 8px rgba( 0, 0, 0, 0.07 );
}

.apg-view-label {
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #888;
	margin-bottom: 12px;
}

.apg-view-content {
	font-size: 1rem;
	line-height: 1.75;
	color: #333;
	white-space: pre-line;
}

/* =============================================================================
   Next meeting card
   ============================================================================= */

.apg-meeting-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	background: #f0f4ff;
	border: 1.5px solid #c5d0fa;
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 20px;
}

.apg-meeting-badge {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #fff;
	background: #1a3a5c;
	border-radius: 4px;
	padding: 3px 8px;
	white-space: nowrap;
	flex-shrink: 0;
	margin-top: 2px;
}

.apg-meeting-info {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.apg-meeting-details {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.apg-meeting-date {
	font-weight: 700;
	font-size: 0.975rem;
	color: #1a1a2e;
}

.apg-meeting-time {
	font-size: 0.88rem;
	color: #555;
	background: #fff;
	border: 1px solid #dde3ff;
	border-radius: 4px;
	padding: 2px 8px;
}

.apg-meeting-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	color: #444;
}

.apg-meeting-location-label {
	font-weight: 600;
	color: #666;
}

.apg-meeting-link {
	color: #1a3a5c;
	font-weight: 600;
	text-decoration: none;
}

.apg-meeting-link:hover {
	text-decoration: underline;
}

/* Responsive rules consolidated at the bottom of this file (search "RESPONSIVE") */

/* =============================================================================
   Announcements
   ============================================================================= */
.apg-announcements { display: flex; flex-direction: column; gap: 16px; }
.apg-announcements__empty { color: #777; font-style: italic; }
.apg-announcement {
	background: #fff;
	border: 1px solid #e3e6ef;
	border-left: 4px solid #1a3a5c;
	border-radius: 8px;
	padding: 18px 22px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.apg-announcement__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.apg-announcement__title { margin: 0; font-size: 1.15rem; color: #1f2937; }
.apg-announcement__date { font-size: 0.85rem; color: #6b7280; }
.apg-announcement__content { color: #374151; line-height: 1.55; }
.apg-announcement__content p:last-child { margin-bottom: 0; }
.apg-announcements--locked { color: #6b7280; font-style: italic; }

/* Topbar identity wrapper — separates name from group badge */
.apg-topbar-identity {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* Group badge — pill with two segments: "Group" label + group name */
.apg-group-badge {
	display: inline-flex;
	align-items: stretch;
	border-radius: 999px;
	overflow: hidden;
	font-size: 0.78rem;
	font-weight: 700;
	color: #fff;
	line-height: 1;
	letter-spacing: 0.3px;
	border: 2px solid #1a3a5c;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
	vertical-align: middle;
}
.apg-group-badge__label {
	padding: 5px 9px;
	background: rgba(0,0,0,0.22);
	text-transform: uppercase;
	font-size: 0.68rem;
	letter-spacing: 0.6px;
}
.apg-group-badge__name {
	padding: 5px 12px;
}

/* Meeting cards container — stack on mobile, side-by-side when there are 2 */
.apg-meeting-cards {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr;
	margin-bottom: 16px;
}
@media (min-width: 720px) {
	.apg-meeting-cards:has(.apg-meeting-card + .apg-meeting-card) {
		grid-template-columns: 1fr 1fr;
	}
}

/* =============================================================================
   3-point rating scale (Concerning / Acceptable / Excellent)
   ============================================================================= */
.apg-rating-scale--3 {
	display: flex;
	gap: 6px;
	flex: 1;
}
.apg-rating-scale--3 .apg-rating-btn {
	flex: 1;
	width: auto;
	height: auto;
	padding: 4px 6px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border-width: 2px;
	border-radius: 7px;
	font-weight: 600;
	line-height: 1;
	transition: all 0.15s;
}
.apg-rating-scale--3 .apg-rating-btn__num {
	font-size: 0.82rem;
	font-weight: 800;
	opacity: 0.6;
}
.apg-rating-scale--3 .apg-rating-btn__text {
	font-size: 0.72rem;
	letter-spacing: 0.1px;
}

/* Per-score colors (idle = subtle outline, active = filled) */
.apg-rating-btn--score-1 { color: #b91c1c; border-color: #fecaca; }
.apg-rating-btn--score-1:hover { background: #fef2f2; border-color: #ef4444; color: #b91c1c; }
.apg-rating-btn--score-1.active { background: #ef4444; border-color: #ef4444; color: #fff; }

.apg-rating-btn--score-2 { color: #b45309; border-color: #fde68a; }
.apg-rating-btn--score-2:hover { background: #fffbeb; border-color: #f59e0b; color: #b45309; }
.apg-rating-btn--score-2.active { background: #f59e0b; border-color: #f59e0b; color: #fff; }

.apg-rating-btn--score-3 { color: #15803d; border-color: #bbf7d0; }
.apg-rating-btn--score-3:hover { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.apg-rating-btn--score-3.active { background: #22c55e; border-color: #22c55e; color: #fff; }

/* Summary chips colored by score */
.apg-summary-chip--score-1 { background: #fef2f2; border: 1px solid #fecaca; }
.apg-summary-chip--score-1 .apg-summary-chip-value { color: #b91c1c; }
.apg-summary-chip--score-2 { background: #fffbeb; border: 1px solid #fde68a; }
.apg-summary-chip--score-2 .apg-summary-chip-value { color: #b45309; }
.apg-summary-chip--score-3 { background: #f0fdf4; border: 1px solid #bbf7d0; }
.apg-summary-chip--score-3 .apg-summary-chip-value { color: #15803d; }

/* History badges colored by score */
.apg-badge--score-1 { background: #ef4444 !important; color: #fff !important; }
.apg-badge--score-2 { background: #f59e0b !important; color: #fff !important; }
.apg-badge--score-3 { background: #22c55e !important; color: #fff !important; }

/* Rating responsive rules moved to the consolidated RESPONSIVE block at the end. */

/* =============================================================================
   OCI (Opportunities, Challenges, Issues)
   ============================================================================= */
.apg-oci-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.apg-oci-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }

.apg-oci-totals {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}
.apg-oci-total {
	background: #fff;
	border-radius: 10px;
	padding: 14px 16px;
	box-shadow: 0 1px 8px rgba(0,0,0,0.07);
	text-align: center;
}
.apg-oci-total-label {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #888;
	margin-bottom: 4px;
}
.apg-oci-total strong { font-size: 1.25rem; color: #1a1a2e; }

.apg-oci-list { display: flex; flex-direction: column; gap: 14px; }

.apg-oci-card {
	background: #fff;
	border-radius: 10px;
	padding: 18px 22px;
	border-left: 4px solid #1a3a5c;
	box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.apg-oci-card__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}
.apg-oci-card__title { margin: 0; font-size: 1.1rem; color: #1a1a2e; }
.apg-oci-card__date { font-size: 0.82rem; color: #888; }
.apg-oci-card__desc {
	color: #444;
	font-size: 0.95rem;
	line-height: 1.55;
	margin-bottom: 12px;
	white-space: pre-line;
}
.apg-oci-card__metrics {
	display: flex;
	gap: 18px;
	padding: 10px 14px;
	background: #f7f8fb;
	border-radius: 6px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.apg-oci-metric { display: flex; flex-direction: column; gap: 2px; }
.apg-oci-metric-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #888; }
.apg-oci-metric strong { font-size: 1.05rem; color: #1a1a2e; }

.apg-oci-card__actions { display: flex; justify-content: flex-end; gap: 8px; }

.apg-btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.apg-btn-secondary { background: #e5e7ec; color: #333; text-decoration: none; display: inline-block; }
.apg-btn-secondary:hover { background: #d4d8dd; color: #222; }
.apg-btn-danger { background: #ef4444; color: #fff; text-decoration: none; display: inline-block; }
.apg-btn-danger:hover { background: #dc2626; }

.apg-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* OCI responsive rules moved to the consolidated RESPONSIVE block at the end. */

/* OCI attachments */
.apg-oci-attachments {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.apg-oci-attachment {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f7f8fb;
	border: 1px solid #e3e6ef;
	border-radius: 6px;
	font-size: 0.9rem;
}
.apg-oci-attachment a:not(.apg-oci-attachment-del) {
	color: #1a3a5c;
	text-decoration: none;
	font-weight: 500;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.apg-oci-attachment a:not(.apg-oci-attachment-del):hover { text-decoration: underline; }
.apg-oci-attachment-size { color: #888; font-size: 0.78rem; }
.apg-oci-attachment-del {
	color: #ef4444;
	text-decoration: none;
	font-weight: 700;
	padding: 0 6px;
	font-size: 1.1rem;
	line-height: 1;
}
.apg-oci-attachment-del:hover { color: #dc2626; }
.apg-oci-attachments-block input[type="file"] {
	display: block;
	width: 100%;
	padding: 10px;
	border: 1.5px dashed #c5cce0;
	border-radius: 6px;
	background: #fafbfd;
	font-size: 0.9rem;
	cursor: pointer;
}

/* =============================================================================
   Attachment picker (acumulating selection)
   ============================================================================= */
.apg-attach-picker {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}
.apg-form-group label.apg-attach-picker-btn,
.apg-attach-picker-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #1a3a5c;
	color: #fff;
	padding: 8px 16px;
	margin-bottom: 0;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	border: 1.5px solid #1a3a5c;
	transition: background 0.15s;
}
.apg-form-group label.apg-attach-picker-btn:hover,
.apg-attach-picker-btn:hover {
	background: #0f2942;
	color: #fff;
}
.apg-attach-hint {
	font-size: 0.82rem;
	color: #666;
	font-style: italic;
}

.apg-attach-pending {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.apg-attach-pending-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f0f6ff;
	border: 1px solid #c2d5f5;
	border-radius: 6px;
	font-size: 0.9rem;
}
.apg-attach-pending-name {
	flex: 1;
	color: #1a3a5c;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.apg-attach-pending-size {
	color: #6b7280;
	font-size: 0.8rem;
	flex-shrink: 0;
}
.apg-attach-pending-remove {
	background: none;
	border: none;
	color: #ef4444;
	font-size: 1.3rem;
	line-height: 1;
	padding: 0 6px;
	cursor: pointer;
	font-weight: 700;
}
.apg-attach-pending-remove:hover {
	color: #b91c1c;
}

/* Meeting card state colors */
.apg-meeting-card--upcoming {
	background: #ecfdf5;
	border-left: 4px solid #22c55e;
}
.apg-meeting-card--upcoming .apg-meeting-badge {
	background: #22c55e;
	color: #fff;
}
.apg-meeting-card--today {
	background: #fffbeb;
	border-left: 4px solid #f59e0b;
}
.apg-meeting-card--today .apg-meeting-badge {
	background: #f59e0b;
	color: #fff;
}
/* --past keeps the default look */

/* Admin-only group switcher on the check-in page */
.apg-admin-group-switcher {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #f0f6ff;
	border: 1px solid #c2d5f5;
	border-radius: 8px;
	font-size: 0.9rem;
}
.apg-admin-group-switcher form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0;
}
.apg-admin-group-switcher label { font-weight: 600; color: #1d4ed8; }
.apg-admin-group-switcher select {
	padding: 4px 8px;
	border: 1px solid #c2d5f5;
	border-radius: 4px;
	background: #fff;
	font-size: 0.9rem;
}
.apg-admin-viewing-label { color: #555; }

/* Inline help icon with native tooltip */
.apg-info-tip {
	display: inline-block;
	margin-left: 6px;
	width: 16px;
	height: 16px;
	line-height: 16px;
	text-align: center;
	border-radius: 50%;
	background: #e3e8f0;
	color: #1a3a5c;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: help;
	user-select: none;
}
.apg-info-tip:hover, .apg-info-tip:focus { background: #c5d3e2; outline: none; }

/* Breakdown textarea (toggled via the ⓘ info-tip button next to the label) */
.apg-info-tip {
	cursor: pointer;
	border: none;
	font-family: inherit;
}
.apg-info-tip[aria-expanded="true"] {
	background: #1a3a5c;
	color: #fff;
}
.apg-breakdown {
	margin-top: 8px;
	padding: 10px 12px;
	background: #f7f8fb;
	border: 1px dashed #c7d2e0;
	border-radius: 6px;
}
.apg-breakdown-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: #1a3a5c;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.apg-breakdown textarea {
	width: 100%;
	box-sizing: border-box;
	font-size: 0.9rem;
	padding: 8px 10px;
	border: 1px solid #dde1e7;
	border-radius: 6px;
	resize: vertical;
	font-family: inherit;
}

/* Meeting agenda download link — visually emphasized */
.apg-meeting-agenda-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(26, 58, 92, 0.08);
	padding: 4px 10px;
	border-radius: 4px;
	font-weight: 600;
}
.apg-meeting-agenda-link:hover { background: rgba(26, 58, 92, 0.16); }

/* =============================================================================
   RESPONSIVE — Mobile / tablet refinements
   Breakpoints (Bootstrap-like, desktop-first via max-width):
     <992px → tablet landscape and below (sidebar collapses)
     <768px → tablet portrait and below (2-col grids → 1-col)
     <576px → phone (tap targets, compact spacing, stack everything)
   ============================================================================= */

/* ── Tablet landscape (≤991.98px) ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
	/* Check-in two-column layout collapses to single column. The sidebar
	   (View Check-ins / Print) stays in DOM order — i.e. AFTER the form —
	   so users land on the primary task first and scroll to navigation. */
	.apg-checkin-layout {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	/* Cap sidebar member list height so it doesn't push content way down */
	.apg-sidebar-members {
		max-height: 280px;
		overflow-y: auto;
	}

	/* OCI totals (3-col) compresses to 2-col */
	.apg-oci-totals {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Wrap container padding tightens */
	.apg-checkin-wrap,
	.apg-oci-wrap {
		padding: 0 12px;
	}
}

/* ── Tablet portrait / small tablet (≤767.98px) ─────────────────────────────── */
@media (max-width: 767.98px) {
	/* Cards/forms get slightly less padding */
	.apg-form {
		padding: 22px 18px;
	}
	.apg-oci-card,
	.apg-sidebar-section {
		padding: 16px;
	}

	/* Any 2-column form row stacks */
	.apg-form-row {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	/* Rating row label + scale stack vertically with reasonable spacing */
	.apg-rating-group {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.apg-rating-group label {
		min-width: 0;
	}
	.apg-rating-scale--3 {
		width: 100%;
	}

	/* Header rows wrap cleanly */
	.apg-oci-header,
	.apg-oci-card__header,
	.apg-announcement__header {
		flex-direction: column;
		align-items: flex-start;
	}
	.apg-oci-card__actions {
		width: 100%;
		justify-content: flex-start;
	}

	/* Topbar wraps and keeps badge readable */
	.apg-topbar {
		flex-wrap: wrap;
		gap: 10px;
	}

	/* Meeting card stacks: badge on top, info below — full width. */
	.apg-meeting-card {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		padding: 14px 16px;
	}
	.apg-meeting-badge {
		align-self: flex-start;
		margin-top: 0;
	}
	/* Each "Label: value" row keeps label + value inline but allows the value to wrap. */
	.apg-meeting-location {
		flex-wrap: wrap;
		align-items: baseline;
	}
}

/* ── Phone (≤575.98px) ──────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
	.apg-form {
		padding: 16px 12px;
	}
	.apg-checkin-wrap,
	.apg-oci-wrap {
		padding: 0 10px;
	}

	/* Inputs at 16px prevent iOS auto-zoom on focus */
	.apg-input,
	.apg-form input[type="text"],
	.apg-form input[type="email"],
	.apg-form input[type="number"],
	.apg-form input[type="password"],
	.apg-form input[type="date"],
	.apg-form input[type="tel"],
	.apg-form input[type="url"],
	.apg-form select,
	.apg-form textarea {
		font-size: 16px;
	}

	/* Larger tap targets */
	.apg-btn {
		width: 100%;
		text-align: center;
		min-height: 44px;
		font-size: 1rem;
	}
	.apg-form-footer {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 10px;
	}
	.apg-autosave-status {
		text-align: center;
	}

	/* Rating buttons — tight, compact, single line. Hide the "(1-4)" range hint;
	   the number prefix already conveys it. Keep label horizontal next to number. */
	.apg-rating-scale--3 {
		gap: 6px;
	}
	.apg-rating-scale--3 .apg-rating-btn {
		flex-direction: row;
		padding: 8px 4px;
		min-height: 40px;
		gap: 4px;
		border-radius: 8px;
	}
	.apg-rating-scale--3 .apg-rating-btn__num {
		font-size: 0.85rem;
		opacity: 1;
	}
	.apg-rating-scale--3 .apg-rating-btn__text {
		font-size: 0.72rem;
		line-height: 1.1;
		white-space: nowrap;
	}
	.apg-rating-btn__range {
		display: none;
	}

	/* Summary chips wrap with tighter gap + smaller text */
	.apg-ratings-summary-row {
		gap: 8px;
	}
	.apg-summary-chip {
		padding: 5px 10px;
		font-size: 0.78rem;
	}
	.apg-summary-chip-value {
		font-size: 0.85rem;
	}

	/* OCI totals: 3-col → 2-col (tablet) → 1-col (phone) */
	.apg-oci-totals {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	/* OCI metric row: each metric on its own line for readability */
	.apg-oci-card__metrics {
		gap: 10px;
		flex-direction: column;
	}

	/* Attachments: shrink filename area so size + remove still fit */
	.apg-oci-attachment {
		font-size: 0.85rem;
		padding: 8px 10px;
	}
	.apg-oci-attachment-del {
		font-size: 1.3rem;
		padding: 0 8px;
	}

	/* Sidebar member list: tighter rows */
	.apg-sidebar-members { gap: 6px; max-height: 220px; }
	.apg-sidebar-member { padding: 6px 4px; }

	/* Announcement card — less padding, smaller title */
	.apg-announcement {
		padding: 14px 16px;
	}
	.apg-announcement__title { font-size: 1.02rem; }

	/* Meeting cards — tighter padding */
	.apg-meeting-card { padding: 12px 14px; }

	/* Admin group switcher — labels above selects so they don't wrap weirdly */
	.apg-admin-group-switcher,
	.apg-admin-group-switcher form {
		flex-direction: column;
		align-items: stretch;
	}
	.apg-admin-group-switcher select {
		width: 100%;
		font-size: 16px;
	}

	/* OCI card header title shrinks slightly */
	.apg-oci-card__title { font-size: 1rem; }
}
