/* The Accra Handyman – wp-admin styles (only loaded on Handyman screens). */

.tah-wrap { max-width: 1280px; }
.tah-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.tah-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.tah-card {
	display: flex; flex-direction: column; gap: 2px; padding: 16px; text-decoration: none; color: #1d2327;
	background: #fff; border: 1px solid #dcdcde; border-left: 4px solid #2271b1; border-radius: 6px;
}
.tah-card:hover { border-color: #2271b1; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.tah-card__n { font-size: 28px; font-weight: 700; line-height: 1.1; }
.tah-card__l { color: #50575e; font-size: 13px; }
.tah-card--new { border-left-color: #1d4ed8; }
.tah-card--awaiting_contact { border-left-color: #b45309; }
.tah-card--awaiting_contact.is-alert { background: #fff7ed; border-color: #f0b27a; }
.tah-card--awaiting_contact.is-alert .tah-card__n { color: #b45309; }
.tah-card--quote_required { border-left-color: #7c3aed; }
.tah-card--quote_sent { border-left-color: #b45309; }
.tah-card--scheduled { border-left-color: #15803d; }
.tah-card--in_progress { border-left-color: #c2410c; }
.tah-card--completed { border-left-color: #374151; }
.tah-card--cancelled { border-left-color: #991b1b; }

.tah-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.tah-table td, .tah-table th { vertical-align: top; }
.tah-empty { padding: 24px; background: #fff; border: 1px dashed #c3c4c7; border-radius: 6px; }
.tah-inactive td { opacity: .55; }

.tah-badge {
	display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.7;
	color: var(--c, #374151); background: color-mix(in srgb, var(--c, #374151) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c, #374151) 35%, #fff);
}
.tah-urg { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #f0f0f1; color: #3c434a; line-height: 1.7; }
.tah-urg--emergency { background: #fcebea; color: #8a1f17; }
.tah-urg--soon { background: #fff4e5; color: #8a4b00; }

.tah-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.tah-grid--even { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 960px) { .tah-grid, .tah-grid--even { grid-template-columns: 1fr; } }
.tah-box { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 4px 18px 16px; margin: 0 0 16px; }
.tah-box h2 { font-size: 15px; margin: 14px 0 8px; }
.tah-box h3 { font-size: 13px; margin: 14px 0 6px; }
.tah-dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 8px 0; }
.tah-dl dt { color: #646970; }
.tah-dl dd { margin: 0; overflow-wrap: anywhere; }

.tah-media { display: flex; flex-wrap: wrap; gap: 10px; }
.tah-media img { width: 150px; height: 112px; object-fit: cover; border-radius: 6px; border: 1px solid #dcdcde; display: block; background: #f0f0f1; }
.tah-media video { width: 260px; max-width: 100%; border-radius: 6px; background: #000; }

.tah-note { padding: 10px 12px; margin: 10px 0 0; background: #fffbe6; border-left: 3px solid #dba617; border-radius: 3px; }
.tah-note__meta { font-size: 12px; color: #646970; margin-bottom: 4px; }
.tah-timeline { list-style: none; margin: 8px 0 0; padding: 0; border-left: 2px solid #dcdcde; }
.tah-timeline li { position: relative; padding: 0 0 12px 16px; }
.tah-timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #2271b1; }
.tah-timeline__when { display: block; font-size: 12px; color: #646970; }
.tah-timeline__who { color: #646970; }
.tah-wa { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* Phase 2: triage, payments */
.tah-opt { border: 1px solid #dcdcde; border-radius: 6px; margin: 8px 0; background: #fff; }
.tah-opt > summary { cursor: pointer; padding: 10px 12px; display: grid; gap: 2px; list-style: none; }
.tah-opt > summary::-webkit-details-marker { display: none; }
.tah-opt > summary span { color: #646970; font-size: 12px; }
.tah-opt[open] > summary { border-bottom: 1px solid #dcdcde; background: #f6f7f7; }
.tah-opt form { padding: 4px 12px 8px; }
.tah-triage { border-left: 4px solid #2271b1; }
.tah-warn { background: #fcf9e8; border-left: 4px solid #dba617; padding: 8px 12px; margin: 10px 0; }
.tah-payrow { border: 1px solid #dcdcde; border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.tah-payrow.is-paid { border-color: #00a32a; background: #f3faf5; }
.tah-payrow.is-unpaid { border-color: #dba617; background: #fffdf3; }
.tah-payrow.is-overridden { border-color: #8c5e00; background: #fff8ec; }
.tah-payrow__title { font-weight: 600; }
.tah-payrow__amount { font-size: 20px; font-weight: 700; margin: 2px 0 6px; }
.tah-paystat { padding: 2px 8px; border-radius: 10px; font-size: 12px; letter-spacing: .02em; }
.tah-paystat--paid { background: #00a32a; color: #fff; }
.tah-paystat--wait { background: #dba617; color: #1d2327; }
.tah-paystat--over { background: #8c5e00; color: #fff; }
.tah-attempts { margin-top: 6px; font-size: 12px; }
.tah-reply { margin-top: 8px; padding: 8px 10px; background: #f0f6fc; border-radius: 6px; }
.tah-tag{display:inline-block;background:#e7eefc;color:#1d4ed8;border-radius:10px;padding:0 7px;font-size:11px;font-weight:600;vertical-align:middle}

/* ---------- V2.3: operational strip, estimate builder, communications ---------- */
.tah-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: #dcdcde; border: 1px solid #dcdcde; border-radius: 6px; overflow: hidden; margin: 12px 0 16px; }
.tah-strip__c { background: #fff; padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.tah-strip__k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #646970; }
.tah-strip__v { font-weight: 600; overflow-wrap: anywhere; }
.tah-cta { background: #f0f6fc; border-left: 4px solid #2271b1; padding: 10px 14px; margin: 8px 0 14px; }
.tah-ok { background: #edfaef; border-left: 4px solid #00a32a; padding: 8px 12px; }
.tah-elines td { vertical-align: top; padding: 6px; }
.tah-elines .tah-q { width: 64px; } .tah-elines .tah-p { width: 100px; } .tah-lt { white-space: nowrap; padding-top: 12px !important; }
.tah-ecols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.tah-etotals dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
.tah-etotals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tah-ebtns .button { margin-right: 6px; }
.tah-badge--draft { background: #f0f0f1; } .tah-badge--sent { background: #fcf9e8; } .tah-badge--accepted { background: #edfaef; } .tah-badge--declined { background: #fcf0f1; } .tah-badge--void { background: #f0f0f1; }
.tah-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tah-comms td, .tah-comms th { font-size: 12px; }
.tah-res--sent, .tah-res--accepted { color: #00a32a; font-weight: 600; } .tah-res--failed { color: #d63638; font-weight: 600; } .tah-res--not_setup, .tah-res--skipped { color: #996800; }
@media (max-width: 782px) { .tah-ecols { grid-template-columns: 1fr; } .tah-elines { display: block; overflow-x: auto; } }

/* ---- V2.5 operations ---- */
.tah-cards--ops { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tah-card--ops .tah-card__l { font-weight: 700; letter-spacing: .04em; }
.tah-card--attention { border-left-color: #b91c1c; }
.tah-card--attention.is-alert { background: #fef2f2; border-color: #f1a9a9; }
.tah-card--attention.is-alert .tah-card__n { color: #b91c1c; }
.tah-card--new_requests { border-left-color: #1d4ed8; } .tah-card--today { border-left-color: #0e7490; }
.tah-card--awaiting_customer, .tah-card--awaiting_payment { border-left-color: #b45309; }
.tah-card--upcoming { border-left-color: #15803d; } .tah-card--completed { border-left-color: #374151; }
.tah-dash2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 24px; }
.tah-feed { margin: 0; padding: 0; list-style: none; } .tah-feed li { padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.tah-attn { color: #b91c1c; font-weight: 600; font-size: 12px; }
.tah-attnbox { border: 1px solid #f1a9a9; background: #fef2f2; border-left: 4px solid #b91c1c; border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; }
.tah-attnbox ul { margin: 6px 0 0 18px; list-style: disc; }
.tah-tag--biz { background: #1d4ed8; color: #fff; } .tah-tag--home { background: #e5e7eb; }
.tah-pay { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #e5e7eb; }
.tah-pay--ok { background: #dcfce7; color: #166534; } .tah-pay--part { background: #fef9c3; color: #854d0e; } .tah-pay--due { background: #fee2e2; color: #991b1b; }
.tah-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 14px; }
.tah-jobs { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.tah-job { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; background: #fff; border: 1px solid #dcdcde; border-left: 4px solid #0e7490; border-radius: 8px; padding: 12px 14px; }
.tah-job--in_progress { border-left-color: #c2410c; } .tah-job--completed { border-left-color: #374151; opacity: .8; }
.tah-job--technician_dispatched { border-left-color: #0e7490; background: #f0fdfa; }
.tah-job__time { font-size: 18px; font-weight: 700; } .tah-job__state { text-align: right; }
@media (max-width: 782px) {
	.tah-dash2 { grid-template-columns: 1fr; }
	.tah-job { grid-template-columns: 1fr; gap: 6px; } .tah-job__state { text-align: left; }
	.tah-table thead { display: none; }
	.tah-table, .tah-table tbody, .tah-table tr, .tah-table td { display: block; width: 100%; box-sizing: border-box; }
	.tah-table tr { border: 1px solid #dcdcde; border-radius: 8px; margin-bottom: 10px; padding: 6px 10px; background: #fff; }
	.tah-table td { border: 0; padding: 4px 0; }
	.tah-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: #50575e; }
	.tah-filters > * { flex: 1 1 100%; }
	.tah-grid { display: block; }
}
@media (max-width: 782px) {
	.tah-wrap table.widefat:not(.tah-table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.tah-wrap .tah-grid, .tah-wrap .tah-cols { display: block; }
	.tah-wrap input[type=text], .tah-wrap input[type=email], .tah-wrap input[type=date], .tah-wrap input[type=time], .tah-wrap select, .tah-wrap textarea { max-width: 100%; box-sizing: border-box; }
}
