/* TIS Customer Portal — customer dashboard */

.tis-portal {
	--tis-brand: #f0a500;
	--tis-dark: #111827;
	--tis-border: #e5e7eb;
	--tis-muted: #6b7280;
	--tis-bg: #f9fafb;
	font-size: 15px;
	line-height: 1.6;
	color: #1f2937;
	max-width: 1180px;
	margin: 0 auto;
	box-sizing: border-box;
}
.tis-portal *, .tis-portal *::before, .tis-portal *::after { box-sizing: border-box; }
.tis-muted { color: var(--tis-muted); font-size: .9em; }
.tis-empty { color: var(--tis-muted); font-style: italic; padding: 14px 0; }

/* Header */
.tis-portal-head {
	display: flex;
	align-items: center;
	gap: 18px;
	background: var(--tis-dark);
	color: #fff;
	padding: 22px 24px;
	border-radius: 12px 12px 0 0;
	flex-wrap: wrap;
}
.tis-avatar {
	width: 72px; height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--tis-brand);
	flex-shrink: 0;
}
.tis-portal-head-text { flex: 1 1 240px; min-width: 0; }
.tis-portal-head h2 { margin: 0 0 4px; font-size: 21px; color: #fff; line-height: 1.25; }
.tis-portal-head p { margin: 0; font-size: 13px; color: #cbd5e1; }
.tis-portal-head p span + span::before { content: '·'; margin: 0 8px; opacity: .6; }
.tis-portal-head .tis-muted { color: #9ca3af; }
.tis-logout {
	color: var(--tis-brand);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	border: 1px solid rgba(240,165,0,.5);
	padding: 7px 14px;
	border-radius: 6px;
	white-space: nowrap;
}
.tis-logout:hover { background: var(--tis-brand); color: var(--tis-dark); }

/* Tabs */
.tis-tabs {
	display: flex;
	gap: 2px;
	background: #1f2937;
	padding: 0 10px;
	overflow-x: auto;
	scrollbar-width: thin;
}
.tis-tab {
	color: #d1d5db;
	text-decoration: none;
	padding: 13px 16px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
}
.tis-tab:hover { color: #fff; }
.tis-tab.is-active { color: var(--tis-brand); border-bottom-color: var(--tis-brand); }

.tis-portal-body {
	background: #fff;
	border: 1px solid var(--tis-border);
	border-top: 0;
	border-radius: 0 0 12px 12px;
	padding: 24px;
}

/* Notices */
.tis-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border-left: 4px solid; font-size: 14px; }
.tis-notice-success { background: #ecfdf5; border-color: #059669; color: #065f46; }
.tis-notice-error { background: #fef2f2; border-color: #dc2626; color: #991b1b; }
.tis-notice-info { background: #eff6ff; border-color: #2563eb; color: #1e40af; }

/* Cards */
.tis-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 26px; }
.tis-card { background: var(--tis-bg); border: 1px solid var(--tis-border); border-radius: 10px; padding: 18px; text-align: center; }
.tis-card-num { display: block; font-size: 30px; font-weight: 700; color: var(--tis-dark); line-height: 1.1; }
.tis-card-label { display: block; font-size: 12px; color: var(--tis-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }

.tis-section-head {
	display: flex; justify-content: space-between; align-items: baseline;
	gap: 12px; flex-wrap: wrap;
	margin: 26px 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--tis-border);
}
.tis-section-head h3, .tis-section-head h4 { margin: 0; font-size: 17px; color: var(--tis-dark); }
.tis-section-head h4 { font-size: 15px; }
.tis-link { color: #2563eb; text-decoration: none; font-size: 14px; font-weight: 600; }
.tis-link:hover { text-decoration: underline; }
.tis-link + .tis-link { margin-left: 10px; }

/* Buttons */
.tis-btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 8px;
	border: 1px solid var(--tis-border);
	background: #fff;
	color: var(--tis-dark);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all .12s ease;
}
.tis-btn:hover { background: var(--tis-bg); border-color: #d1d5db; color: var(--tis-dark); }
.tis-btn-primary { background: var(--tis-brand); border-color: var(--tis-brand); color: var(--tis-dark); }
.tis-btn-primary:hover { filter: brightness(.94); background: var(--tis-brand); color: var(--tis-dark); }

/* Badges & pills */
.tis-badge { display: inline-block; padding: 3px 11px; border-radius: 999px; background: #6b7280; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.tis-inv-sent { background: #2563eb; } .tis-inv-partial { background: #d97706; }
.tis-inv-paid { background: #059669; } .tis-inv-overdue, .tis-inv-cancelled { background: #dc2626; }
.tis-req-new { background: #6b7280; } .tis-req-reviewing { background: #2563eb; }
.tis-req-quoted { background: #d97706; } .tis-req-accepted { background: #059669; }
.tis-req-declined { background: #dc2626; } .tis-req-closed { background: #4b5563; }

.tis-type { display: inline-block; padding: 2px 10px; border: 2px solid var(--tis-brand); border-radius: 999px; font-size: 11px; font-weight: 700; }

.tis-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tis-pill { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: var(--tis-bg); border: 1px solid var(--tis-border); color: #374151; text-decoration: none; }
.tis-pill.is-active { background: var(--tis-dark); border-color: var(--tis-dark); color: #fff; }

/* Tables */
.tis-table-wrap { overflow-x: auto; }
.tis-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tis-table th { text-align: left; padding: 10px 12px; background: var(--tis-bg); border-bottom: 2px solid var(--tis-border); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--tis-muted); }
.tis-table td { padding: 12px; border-bottom: 1px solid var(--tis-border); vertical-align: middle; }
.tis-table tbody tr:hover { background: #fcfcfd; }

@media (max-width: 720px) {
	.tis-table thead { display: none; }
	.tis-table, .tis-table tbody, .tis-table tr, .tis-table td { display: block; width: 100%; }
	.tis-table tr { border: 1px solid var(--tis-border); border-radius: 8px; margin-bottom: 12px; padding: 6px 0; }
	.tis-table td { border: 0; display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; }
	.tis-table td::before { content: attr(data-label); font-weight: 700; font-size: 12px; color: var(--tis-muted); text-transform: uppercase; }
}

/* Job detail */
.tis-job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.tis-job-head h3 { margin: 0 0 4px; font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tis-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; background: var(--tis-bg); border-radius: 10px; padding: 18px; margin: 16px 0; }
.tis-detail-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--tis-muted); margin-bottom: 2px; }
.tis-detail-grid strong { font-size: 14px; color: var(--tis-dark); }
.tis-prose p { margin: 0 0 10px; }

/* Timeline */
.tis-timeline { list-style: none; margin: 0; padding: 0 0 0 8px; border-left: 2px solid var(--tis-border); }
.tis-timeline li { display: flex; gap: 14px; padding: 0 0 20px 18px; position: relative; }
.tis-dot { position: absolute; left: -9px; top: 5px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--tis-border); }
.tis-timeline strong { display: block; font-size: 14px; }
.tis-timeline p { margin: 4px 0 0; font-size: 14px; }

/* Before & after */
.tis-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .tis-ba { grid-template-columns: 1fr; } }
.tis-ba-col h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--tis-muted); }
.tis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tis-grid figure { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--tis-border); background: var(--tis-bg); }
.tis-grid img { display: block; width: 100%; height: 130px; object-fit: cover; transition: transform .2s ease; }
.tis-grid a:hover img { transform: scale(1.05); }
.tis-grid figcaption { font-size: 11px; padding: 6px 8px; color: var(--tis-muted); }
.tis-gallery-job { margin-bottom: 30px; }

/* Lightbox */
.tis-lightbox {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(0,0,0,.9);
	display: flex; align-items: center; justify-content: center;
	padding: 24px; cursor: zoom-out;
}
.tis-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.tis-lightbox-close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 36px; line-height: 1; background: none; border: 0; cursor: pointer; }

/* Forms */
.tis-form { max-width: 780px; }
.tis-field { display: block; margin-bottom: 16px; }
.tis-field > span { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.tis-field input[type="text"], .tis-field input[type="email"], .tis-field input[type="password"],
.tis-field input[type="file"], .tis-field select, .tis-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	color: #1f2937;
}
.tis-field input:focus, .tis-field select:focus, .tis-field textarea:focus {
	outline: 0;
	border-color: var(--tis-brand);
	box-shadow: 0 0 0 3px rgba(240,165,0,.18);
}
.tis-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.tis-checkbox { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; }
.tis-checkbox input { margin-top: 4px; }
.tis-form h4 { margin: 24px 0 10px; font-size: 15px; color: var(--tis-dark); }

.tis-photo-field { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }
.tis-photo-field img { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; border: 1px solid var(--tis-border); }
.tis-photo-field .tis-field { flex: 1 1 240px; }

/* Star rating input */
.tis-star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 34px; line-height: 1; }
.tis-star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.tis-star-input label { color: #d1d5db; cursor: pointer; transition: color .12s ease; }
.tis-star-input input:checked ~ label,
.tis-star-input label:hover,
.tis-star-input label:hover ~ label { color: var(--tis-brand); }
.tis-star-input input:focus-visible + label { outline: 2px solid #2563eb; outline-offset: 2px; }

.tis-stars { color: #d1d5db; letter-spacing: 2px; font-size: 16px; }
.tis-stars .tis-star-on { color: var(--tis-brand); }
.tis-rating-num { font-weight: 700; color: var(--tis-dark); }

/* Requests */
.tis-requests { display: grid; gap: 14px; }
.tis-request { border: 1px solid var(--tis-border); border-radius: 10px; padding: 16px; background: #fff; }
.tis-request-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tis-request-subject { margin: 0 0 4px; font-weight: 600; }
.tis-review-box { background: var(--tis-bg); border-radius: 10px; padding: 18px; }
.tis-review-reply { background: #eff6ff; border-left: 3px solid #2563eb; padding: 10px 14px; margin-top: 10px; border-radius: 0 8px 8px 0; }
.tis-review-reply p { margin: 4px 0 0; font-size: 14px; }

/* Login */
.tis-login-wrap { display: flex; justify-content: center; padding: 40px 16px; }
.tis-login { max-width: 430px; width: 100%; background: #fff; border: 1px solid var(--tis-border); border-radius: 12px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.tis-login h2 { margin: 0 0 8px; font-size: 22px; color: var(--tis-dark); }
.tis-login label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.tis-login input[type="text"], .tis-login input[type="password"] {
	width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; margin-bottom: 12px;
}
.tis-login .button, .tis-login input[type="submit"] {
	width: 100%; padding: 11px; background: var(--tis-brand); color: var(--tis-dark);
	border: 0; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tis-login-links { text-align: center; font-size: 13px; margin: 14px 0 0; }
.tis-login-help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--tis-border); text-align: center; font-size: 14px; }
.tis-login-help p { margin: 0 0 10px; }

/* Public reviews list */
.tis-reviews-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.tis-reviews-grid { display: grid; grid-template-columns: repeat(var(--tis-cols, 3), 1fr); gap: 16px; }
@media (max-width: 900px) { .tis-reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tis-reviews-grid { grid-template-columns: 1fr; } }
.tis-review-card { border: 1px solid var(--tis-border); border-radius: 10px; padding: 18px; background: #fff; }
.tis-review-card h4 { margin: 8px 0 6px; font-size: 15px; }
.tis-review-card p { margin: 0 0 12px; font-size: 14px; }
.tis-review-card footer { font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }

/* Pagination */
.tis-pagination { display: flex; gap: 5px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.tis-pagination .page-numbers {
	padding: 7px 13px; border: 1px solid var(--tis-border); border-radius: 6px;
	text-decoration: none; color: #374151; font-size: 14px;
}
.tis-pagination .page-numbers.current { background: var(--tis-dark); border-color: var(--tis-dark); color: #fff; }
