.ptsp-portal-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ptsp-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ptsp-portal-header h2 {
    font-size: 24px;
    margin: 0;
}

.ptsp-portal-section-title {
    font-size: 18px;
    margin: 25px 0 10px;
    font-weight: 600;
}

.ptsp-job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.ptsp-job-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ptsp-job-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ptsp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

.ptsp-badge-status-scheduled {
    background: #eff6ff;
    color: #1d4ed8;
}

.ptsp-badge-status-in_progress {
    background: #fef3c7;
    color: #b45309;
}

.ptsp-badge-status-completed {
    background: #ecfdf5;
    color: #15803d;
}

.ptsp-badge-status-skipped {
    background: #fef2f2;
    color: #b91c1c;
}

.ptsp-badge-date {
    background: #f3f4f6;
    color: #4b5563;
}

.ptsp-job-title {
    font-size: 16px;
    font-weight: 600;
    margin: 4px 0;
}

.ptsp-job-meta {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}

.ptsp-job-internal-note {
    border-left: 3px solid #0f766e;
    padding-left: 8px;
}

.ptsp-job-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.ptsp-button {
    border-radius: 999px;
    padding: 6px 14px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ptsp-button-primary {
    background: #0f766e;
    color: #ffffff;
}

.ptsp-button-secondary {
    background: #e5e7eb;
    color: #111827;
}

.ptsp-empty-state {
    padding: 15px;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    background: #f9fafb;
    font-size: 14px;
    color: #6b7280;
}

.ptsp-portal-user-label {
    font-size: 13px;
    color: #6b7280;
}

.ptsp-portal-user-label strong {
    color: #111827;
}

.ptsp-job-internal-note {
    border-left: 3px solid #0f766e;
    padding-left: 8px;
}

.ptsp-job-started {
    font-size: 12px;
    color: #047857;
}

/* Checklist styles (if not already present) */
.ptsp-checklist-form {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
}

.ptsp-checklist-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #374151;
}

.ptsp-checklist-progress {
    font-size: 12px;
    color: #6b7280;
}

.ptsp-checklist {
    list-style: none;
    margin: 0 0 6px 0;
    padding: 0;
}

.ptsp-checklist li {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.ptsp-checklist label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

.ptsp-checklist input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.ptsp-checklist-save {
    font-size: 12px;
    padding: 4px 12px;
}

.ptsp-checklist-locked {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
    padding: 6px 0;
}

.ptsp-checklist-readonly {
    opacity: 0.8;
}

.ptsp-checklist-readonly input[type="checkbox"] {
    cursor: default;
}


@media (max-width: 640px) {
    .ptsp-portal-wrapper {
        padding: 15px;
    }
}

/* Summary card at top */
.ptsp-summary-card {
    margin-bottom: 15px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #14532d;
}

.ptsp-summary-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ptsp-summary-label {
    font-weight: 600;
}

.ptsp-summary-value {
    font-weight: 700;
}

.ptsp-summary-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: #166534;
}

/* Time tracking pills */
.ptsp-job-started {
    font-size: 12px;
    color: #047857;
}

.ptsp-job-time-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    color: #047857;
}

.ptsp-job-time-total {
    margin-top: 3px;
    font-size: 12px;
    color: #065f46;
}

/* Tabs */
.ptsp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.ptsp-tab-button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 999px 999px 0 0;
    color: #6b7280;
}

.ptsp-tab-button.ptsp-tab-active {
    background: #111827;
    color: #f9fafb;
}

.ptsp-tab-content {
    display: none;
}

.ptsp-tab-content.ptsp-tab-content-active {
    display: block;
}

/* Alert */
.ptsp-alert-success {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    font-size: 13px;
    color: #166534;
}

/* Expense form */
.ptsp-expense-form {
    padding: 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.ptsp-expense-form .ptsp-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.ptsp-expense-form label {
    font-size: 13px;
    color: #374151;
    display: flex;
    flex-direction: column;
    flex: 1 1 220px;
    gap: 4px;
}

.ptsp-expense-form input[type="text"],
.ptsp-expense-form input[type="date"],
.ptsp-expense-form input[type="file"],
.ptsp-expense-form select,
.ptsp-expense-form textarea {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
}

.ptsp-expense-form textarea {
    resize: vertical;
}

.ptsp-checkbox-inline {
    flex: 1 1 100%;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

/* Expense table */
.ptsp-expense-list {
    overflow-x: auto;
}

.ptsp-expense-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ptsp-expense-table th,
.ptsp-expense-table td {
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.ptsp-expense-table th {
    background: #f3f4f6;
    font-weight: 600;
}

.ptsp-expense-table td a {
    text-decoration: underline;
}

.ptsp-job-notes-block {
    margin-top: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
}

.ptsp-job-notes-details > summary {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    list-style: none;
}

.ptsp-job-notes-details[open] > summary {
    margin-bottom: 6px;
}

.ptsp-job-notes-details > summary::-webkit-details-marker {
    display: none;
}

.ptsp-job-notes-forms {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
}

.ptsp-job-note-form,
.ptsp-job-issue-form {
    padding: 8px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
}

.ptsp-job-notes-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 2px;
    display: block;
}

.ptsp-job-note-form textarea,
.ptsp-job-issue-form textarea,
.ptsp-job-issue-form select,
.ptsp-job-issue-form input[type="file"] {
    width: 100%;
    font-size: 12px;
}

.ptsp-job-issue-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.ptsp-job-issue-row label {
    flex: 1 1 120px;
}

.ptsp-job-note-submit,
.ptsp-job-issue-submit {
    margin-top: 4px;
    font-size: 11px;
    padding: 4px 8px;
}

.ptsp-job-notes-history {
    margin-top: 4px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 6px;
}

.ptsp-job-notes-history-section + .ptsp-job-notes-history-section {
    margin-top: 6px;
}

.ptsp-job-notes-history-title {
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 2px;
}

.ptsp-job-notes-history ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ptsp-job-notes-history li {
    margin-bottom: 4px;
}

.ptsp-job-note-meta {
    font-size: 10px;
    color: #9ca3af;
}

.ptsp-job-note-text {
    font-size: 11px;
    color: #111827;
}

/* Upcoming (next 7 days) — professional card grid */
.ptsp-upcoming-week-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

@media (max-width: 1024px) {
    .ptsp-upcoming-week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ptsp-upcoming-week-grid {
        grid-template-columns: 1fr;
    }
}

.ptsp-upcoming-day-card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #ffffff; /* match job cards */
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    color: #111827; /* override theme green */
}

.ptsp-upcoming-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ptsp-upcoming-day-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ptsp-upcoming-day-dow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
}

.ptsp-upcoming-day-date {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.ptsp-upcoming-day-date-num {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.ptsp-upcoming-day-date-month {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.ptsp-upcoming-day-empty {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.ptsp-upcoming-day-jobs {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ptsp-upcoming-day-job {
    padding: 6px 8px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.ptsp-upcoming-job-title {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.ptsp-upcoming-job-service {
    font-size: 11px;
    color: #4b5563;
}

.ptsp-upcoming-job-time {
    font-size: 11px;
    color: #6b7280;
}

