/**
 * Tickets Please Admin Dashboard Styles
 * 
 * Polished, custom design for the admin dashboards.
 * Uses the theme's accent color (#7c3aed) throughout.
 *
 * @package Tickets_Please
 * @since 2.3.37
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --tp-color-primary: #7c3aed;
    --tp-color-primary-hover: #6d28d9;
    --tp-color-primary-light: #ede9fe;
    --tp-color-success: #10b981;
    --tp-color-success-light: #d1fae5;
    --tp-color-warning: #f59e0b;
    --tp-color-warning-light: #fef3c7;
    --tp-color-danger: #ef4444;
    --tp-color-danger-light: #fee2e2;
    --tp-color-info: #3b82f6;
    --tp-color-info-light: #dbeafe;
    --tp-color-text: #1f2937;
    --tp-color-text-muted: #6b7280;
    --tp-color-border: #e5e7eb;
    --tp-color-bg: #f9fafb;
    --tp-color-bg-white: #ffffff;
    --tp-radius-sm: 4px;
    --tp-radius-md: 8px;
    --tp-radius-lg: 12px;
    --tp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --tp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --tp-transition: 150ms ease;
}

/* ==========================================================================
   Base Dashboard Styles
   ========================================================================== */

.tp-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

.tp-dashboard__title {
    font-size: 28px;
    font-weight: 600;
    color: var(--tp-color-text);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tp-color-border);
}

.tp-dashboard__header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tp-color-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tp-dashboard__header .tp-dashboard__title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
}

.tp-dashboard__header .tp-back-link {
    width: 100%;
}

.tp-dashboard__subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--tp-color-text-muted);
}

.tp-btn--outline {
    background: transparent;
    border: 1px solid var(--tp-color-border);
    color: var(--tp-color-text-muted);
}

.tp-btn--outline:hover {
    border-color: var(--tp-color-primary);
    color: var(--tp-color-primary);
}

.tp-badge--muted {
    background: var(--tp-color-bg);
    color: var(--tp-color-text-muted);
    font-weight: 400;
}

.tp-badge--bundle {
    background: #fef3c7;
    color: #92400e;
}

.tp-badge--group {
    background: #cffafe;
    color: #0e7490;
}

.tp-event-row__stat--addon {
    font-size: 0.85em;
    color: var(--tp-color-text-muted);
}

.tp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--tp-color-text-muted);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color var(--tp-transition);
}

.tp-back-link:hover {
    color: var(--tp-color-primary);
}

.tp-back-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Variation Tags in Event Rows */
.tp-event-row__variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.tp-variation-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--tp-color-bg);
    border-radius: 4px;
    font-size: 11px;
    color: var(--tp-color-text-muted);
}

.tp-variation-tag strong {
    color: var(--tp-color-text);
}

/* Booking Slots (grouped by date, with variation rows) */
.tp-event-row__booking-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.tp-booking-date-group__header {
    font-weight: 700;
    font-size: 14px;
    color: var(--tp-color-text);
    margin-bottom: 4px;
}

.tp-booking-date-group__slots {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tp-booking-slot {
    font-size: 13px;
    color: var(--tp-color-text-muted);
}

.tp-booking-slot__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}

.tp-booking-slot__label {
    font-weight: 700;
    font-size: 14px;
    color: var(--tp-color-text);
}

.tp-booking-slot__summary {
    font-size: 13px;
    font-weight: 500;
}

.tp-booking-slot__summary strong {
    color: var(--tp-color-text);
    font-weight: 700;
}

.tp-booking-slot__variations {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 16px;
}

.tp-booking-slot__var-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.tp-booking-slot__var-label {
    color: var(--tp-color-text-muted);
}

.tp-booking-slot__var-row strong {
    color: var(--tp-color-text);
}

.tp-dashboard__grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.tp-dashboard__grid--simple {
    grid-template-columns: 1fr 280px;
}

/* ==========================================================================
   Stat Cards
   ========================================================================== */

.tp-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.tp-dashboard__stats--compact {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 16px;
}

.tp-stat-card {
    background: var(--tp-color-bg-white);
    border-radius: var(--tp-radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid var(--tp-color-border);
    transition: box-shadow var(--tp-transition), transform var(--tp-transition);
}

.tp-stat-card:hover {
    box-shadow: var(--tp-shadow-md);
    transform: translateY(-1px);
}

.tp-stat-card--small {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tp-stat-card--large {
    padding: 24px 28px;
}

.tp-stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--tp-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-color-bg);
    color: var(--tp-color-text-muted);
}

.tp-stat-card__icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.tp-stat-card--primary .tp-stat-card__icon {
    background: var(--tp-color-primary-light);
    color: var(--tp-color-primary);
}

.tp-stat-card--success .tp-stat-card__icon {
    background: var(--tp-color-success-light);
    color: var(--tp-color-success);
}

.tp-stat-card--info .tp-stat-card__icon {
    background: var(--tp-color-info-light);
    color: var(--tp-color-info);
}

.tp-stat-card__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tp-stat-card__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--tp-color-text);
    line-height: 1.2;
}

.tp-stat-card--small .tp-stat-card__value {
    font-size: 20px;
}

.tp-stat-card--large .tp-stat-card__value {
    font-size: 28px;
}

.tp-stat-card__label {
    font-size: 13px;
    color: var(--tp-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tp-stat-card__footnote {
    font-size: 12px;
    color: var(--tp-color-text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   Dashboard Sections
   ========================================================================== */

.tp-dashboard__section {
    background: var(--tp-color-bg-white);
    border-radius: var(--tp-radius-lg);
    padding: 24px;
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid var(--tp-color-border);
    overflow-x: auto;
}

.tp-dashboard__section--full {
    grid-column: 1 / -1;
}

.tp-dashboard__section--sidebar {
    height: fit-content;
}

.tp-dashboard__section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tp-color-text);
    margin: 0 0 16px 0;
    padding: 0;
}

.tp-dashboard__section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tp-dashboard__section-header h2 {
    margin: 0;
}

/* ==========================================================================
   Event List
   ========================================================================== */

.tp-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-event-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-md);
    transition: background var(--tp-transition);
}

.tp-event-row:hover {
    background: var(--tp-color-primary-light);
}

.tp-event-row__info {
    min-width: 0;
}

.tp-event-row__title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-event-row__title a {
    color: var(--tp-color-text);
    text-decoration: none;
}

.tp-event-row__title a:hover {
    color: var(--tp-color-primary);
}

.tp-event-row__date {
    font-size: 12px;
    color: var(--tp-color-text-muted);
}

.tp-event-row__stats {
    display: flex;
    gap: 16px;
}

.tp-event-row__stat {
    font-size: 12px;
    color: var(--tp-color-text-muted);
    white-space: nowrap;
}

.tp-event-row__stat strong {
    color: var(--tp-color-text);
}

/* ==========================================================================
   Dashboard Inline Quick Edit
   ========================================================================== */

.tp-dashboard-qe-panel {
    background: var(--tp-color-bg-white);
    border: 1px solid var(--tp-color-border);
    border-radius: var(--tp-radius-md);
    padding: 16px;
    margin-top: -4px;
}

.tp-dashboard-qe-panel[hidden] {
    display: none;
}

.tp-dashboard-qe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 16px;
}

.tp-dashboard-qe-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.tp-dashboard-qe-label {
    color: var(--tp-color-text-muted);
    font-weight: 600;
}

.tp-dashboard-qe-field select,
.tp-dashboard-qe-field input[type="number"],
.tp-dashboard-qe-field input[type="text"],
.tp-dashboard-qe-field input[type="datetime-local"] {
    padding: 6px 8px;
    border: 1px solid var(--tp-color-border);
    border-radius: 4px;
    font-size: 13px;
    background: var(--tp-color-bg-white);
}

.tp-dashboard-qe-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
}

.tp-dashboard-qe-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tp-dashboard-qe-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tp-color-border);
}

.tp-dashboard-qe-status {
    font-size: 12px;
    color: var(--tp-color-text-muted);
    margin-right: auto;
}

.tp-dashboard-qe-status.is-success {
    color: var(--tp-color-success);
}

.tp-dashboard-qe-status.is-error {
    color: var(--tp-color-danger);
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.tp-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-radius: 100px;
    white-space: nowrap;
}

.status-on-sale,
.tp-status-badge--waiting {
    background: var(--tp-color-success-light);
    color: var(--tp-color-success);
}

.status-sold-out {
    background: var(--tp-color-danger-light);
    color: var(--tp-color-danger);
}

/* Online sales cutoff passed, but the event itself hasn't happened yet. */
.status-closed {
    background: var(--tp-color-warning-light);
    color: var(--tp-color-warning);
}

.status-past {
    background: var(--tp-color-bg);
    color: var(--tp-color-text-muted);
}

.tp-status-badge--notified {
    background: var(--tp-color-info-light);
    color: var(--tp-color-info);
}

.tp-status-badge--fulfilled {
    background: var(--tp-color-success-light);
    color: var(--tp-color-success);
}

.tp-status-badge--declined {
    background: var(--tp-color-danger-light);
    color: var(--tp-color-danger);
}

.tp-status-badge--success {
    background: var(--tp-color-success-light);
    color: var(--tp-color-success);
}

/* ==========================================================================
   Quick Links
   ========================================================================== */

.tp-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-md);
    color: var(--tp-color-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--tp-transition);
}

.tp-quick-link:hover {
    background: var(--tp-color-primary-light);
    color: var(--tp-color-primary);
}

.tp-quick-link .dashicons {
    color: var(--tp-color-text-muted);
    transition: color var(--tp-transition);
}

.tp-quick-link:hover .dashicons {
    color: var(--tp-color-primary);
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.tp-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--tp-radius-md);
    font-size: 13px;
    margin-top: 16px;
}

.tp-alert--info {
    background: var(--tp-color-info-light);
    color: var(--tp-color-info);
}

.tp-alert--warning {
    background: var(--tp-color-warning-light);
    color: var(--tp-color-warning);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--tp-radius-sm);
    border: 1px solid var(--tp-color-border);
    background: var(--tp-color-bg-white);
    color: var(--tp-color-text);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--tp-transition);
    white-space: nowrap;
}

.tp-btn:hover {
    background: var(--tp-color-bg);
    border-color: var(--tp-color-text-muted);
    color: var(--tp-color-text);
}

.tp-btn--primary {
    background: var(--tp-color-primary);
    border-color: var(--tp-color-primary);
    color: white;
}

.tp-btn--primary:hover {
    background: var(--tp-color-primary-hover);
    border-color: var(--tp-color-primary-hover);
    color: white;
}

.tp-btn--success {
    background: var(--tp-color-success);
    border-color: var(--tp-color-success);
    color: white;
}

.tp-btn--success:hover {
    background: #059669;
    border-color: #059669;
    color: white;
}

.tp-btn--secondary {
    background: var(--tp-color-bg);
}

.tp-btn--danger {
    background: var(--tp-color-danger);
    color: white;
}

.tp-btn--danger:hover {
    background: #dc2626;
    color: white;
}

.tp-btn--text {
    border: none;
    background: transparent;
    color: var(--tp-color-primary);
    padding: 4px 8px;
}

.tp-btn--text:hover {
    background: var(--tp-color-primary-light);
    border: none;
}

.tp-btn--small {
    padding: 4px 10px;
    font-size: 12px;
}

.tp-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.tp-input,
.tp-select {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--tp-color-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-color-bg-white);
    color: var(--tp-color-text);
    transition: border-color var(--tp-transition), box-shadow var(--tp-transition);
}

.tp-input:focus,
.tp-select:focus {
    outline: none;
    border-color: var(--tp-color-primary);
    box-shadow: 0 0 0 3px var(--tp-color-primary-light);
}

.tp-input {
    min-width: 250px;
}

/* ==========================================================================
   Toolbar & Filters
   ========================================================================== */

.tp-dashboard__toolbar {
    margin-bottom: 24px;
}

.tp-event-selector {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tp-event-selector .tp-select {
    min-width: 350px;
}

.tp-dashboard__filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.tp-filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.tp-filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==========================================================================
   Tables
   ========================================================================== */

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

.tp-table thead th {
    text-align: left;
    font-weight: 600;
    color: var(--tp-color-text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--tp-color-border);
    background: var(--tp-color-bg);
}

.tp-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--tp-color-border);
    vertical-align: middle;
}

.tp-table tbody tr:hover {
    background: var(--tp-color-bg);
}

.tp-table__col--status {
    width: 60px;
    text-align: center;
}

.tp-table__col--actions {
    width: 120px;
    text-align: right;
}

.tp-table__col--number {
    text-align: right;
}

.tp-table--compact {
    font-size: 12px;
}

.tp-table--compact thead th,
.tp-table--compact tbody td {
    padding: 8px 12px;
}

/* Booking slot table (simplified dashboard layout): dates as rows, time
   slots as columns, tickets sold in the cells. Spans a full row of the
   event-row grid so it never collides with the stats columns. */
.tp-event-row__slot-table {
    grid-column: 1 / -1;
    min-width: 0;
    overflow-x: auto;
}

.tp-slot-table {
    width: auto;
    border: 1px solid var(--tp-color-border);
    border-radius: var(--tp-radius-sm);
}

.tp-slot-table thead th {
    white-space: nowrap;
    text-align: center;
}

.tp-slot-table thead th:first-child {
    text-align: left;
}

.tp-slot-table tbody td {
    text-align: center;
}

.tp-slot-table .tp-slot-table__date {
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

/* Sub-section heading inside a dashboard section (e.g. Parking Passes
   listed below the Upcoming Events list). */
.tp-dashboard__section-header--secondary {
    margin-top: 28px;
}

/* Sortable Table Columns */
.tp-table__col--sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px !important;
    white-space: nowrap;
}

.tp-table__col--sortable:hover {
    background-color: var(--tp-color-primary-light);
}

.tp-table__col--sortable::after {
    content: '\2195'; /* up-down arrow */
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.3;
    line-height: 1;
}

.tp-table__col--sorted-asc::after {
    content: '\2191'; /* up arrow */
    opacity: 0.8;
    color: var(--tp-color-primary);
}

.tp-table__col--sorted-desc::after {
    content: '\2193'; /* down arrow */
    opacity: 0.8;
    color: var(--tp-color-primary);
}

.tp-table__col--sorted-asc,
.tp-table__col--sorted-desc {
    background-color: var(--tp-color-primary-light);
}

/* ==========================================================================
   Attendance Specific
   ========================================================================== */

.tp-attendance-row.is-checked-in {
    background: var(--tp-color-success-light);
}

.tp-attendance-row.is-checked-in:hover {
    background: #a7f3d0;
}

.tp-checkin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.tp-checkin-badge--checked {
    background: var(--tp-color-success);
    color: white;
}

.tp-checkin-badge--pending {
    background: var(--tp-color-bg);
    color: var(--tp-color-text-muted);
}

.tp-checkin-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tp-attendee-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tp-attendee-name {
    color: var(--tp-color-text);
}

.tp-attendee-email {
    font-size: 12px;
    color: var(--tp-color-text-muted);
}

.tp-ticket-id {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    padding: 2px 6px;
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-sm);
}

.tp-ticket-tier {
    display: block;
    font-size: 11px;
    color: var(--tp-color-text-muted);
    margin-top: 2px;
}

.tp-seat-label {
    font-size: 12px;
    color: var(--tp-color-text);
}

/* ==========================================================================
   Waitlist Cards
   ========================================================================== */

.tp-waitlist-card {
    background: var(--tp-color-bg-white);
    border-radius: var(--tp-radius-lg);
    border: 1px solid var(--tp-color-border);
    margin-bottom: 20px;
    overflow: hidden;
}

.tp-waitlist-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--tp-color-bg);
    border-bottom: 1px solid var(--tp-color-border);
}

.tp-waitlist-card__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.tp-waitlist-card__title a {
    color: var(--tp-color-text);
    text-decoration: none;
}

.tp-waitlist-card__title a:hover {
    color: var(--tp-color-primary);
}

.tp-waitlist-card__date {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 400;
    color: var(--tp-color-text-muted);
}

.tp-waitlist-card__count {
    font-size: 13px;
    color: var(--tp-color-text-muted);
}

.tp-waitlist-card .tp-table {
    margin: 0;
}

.tp-waitlist-card .tp-table thead th:first-child,
.tp-waitlist-card .tp-table tbody td:first-child {
    padding-left: 20px;
}

.tp-waitlist-card .tp-table thead th:last-child,
.tp-waitlist-card .tp-table tbody td:last-child {
    padding-right: 20px;
}

.tp-waitlist-card__footer {
    padding: 12px 20px;
    background: var(--tp-color-bg);
    border-top: 1px solid var(--tp-color-border);
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.tp-empty-state {
    text-align: center;
    color: var(--tp-color-text-muted);
    padding: 40px 20px;
    font-size: 14px;
}

.tp-empty-state--large {
    padding: 80px 20px;
    font-size: 16px;
}

/* ==========================================================================
   Text Utilities
   ========================================================================== */

.tp-text--muted {
    color: var(--tp-color-text-muted);
}

.tp-text--success {
    color: var(--tp-color-success);
}

.tp-text--danger {
    color: var(--tp-color-danger);
}

.tp-na {
    color: var(--tp-color-text-muted);
}

/* ==========================================================================
   Dashboard Widgets (WordPress Dashboard)
   ========================================================================== */

.tp-widget {
    margin: -11px -12px;
}

.tp-widget__stats {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--tp-color-bg);
    border-bottom: 1px solid var(--tp-color-border);
}

.tp-widget__stats--financial {
    flex-direction: column;
    gap: 12px;
}

.tp-widget__stat {
    flex: 1;
    text-align: center;
}

.tp-widget__stat--large {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tp-color-border);
}

.tp-widget__stat--alert .tp-widget__stat-value {
    color: var(--tp-color-warning);
}

.tp-widget__stat--negative .tp-widget__stat-value {
    color: var(--tp-color-danger);
}

.tp-widget__stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--tp-color-text);
    line-height: 1.2;
}

.tp-widget__stat--large .tp-widget__stat-value {
    font-size: 24px;
}

.tp-widget__stat-label {
    display: block;
    font-size: 11px;
    color: var(--tp-color-text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.tp-widget__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tp-widget__list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tp-color-border);
}

.tp-widget__list-item:last-child {
    border-bottom: none;
}

.tp-widget__event {
    flex: 1;
    min-width: 0;
}

.tp-widget__event-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-widget__event-date {
    display: block;
    font-size: 11px;
    color: var(--tp-color-text-muted);
}

.tp-widget__event-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 11px;
    color: var(--tp-color-text-muted);
}

.tp-widget__checkin-rate {
    color: var(--tp-color-success);
}

.tp-widget__event-actions {
    display: flex;
    gap: 4px;
}

.tp-widget__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--tp-radius-sm);
    color: var(--tp-color-text-muted);
    text-decoration: none;
    transition: all var(--tp-transition);
}

.tp-widget__link:hover {
    background: var(--tp-color-primary-light);
    color: var(--tp-color-primary);
}

.tp-widget__link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tp-widget__links {
    padding: 12px 16px;
    background: var(--tp-color-bg);
    text-align: center;
}

.tp-widget__links a {
    font-size: 12px;
    color: var(--tp-color-primary);
    text-decoration: none;
    font-weight: 500;
}

.tp-widget__links a:hover {
    text-decoration: underline;
}

.tp-widget__empty {
    text-align: center;
    color: var(--tp-color-text-muted);
    padding: 24px 16px;
    margin: 0;
    font-size: 13px;
}

/* ==========================================================================
   Expandable Table Rows (Sales Breakdown)
   ========================================================================== */

.tp-table--expandable .tp-expand-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-right: 8px;
    border: none;
    background: var(--tp-color-bg);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.tp-table--expandable .tp-expand-toggle:hover {
    background: var(--tp-color-border);
}

.tp-table--expandable .tp-expand-toggle[aria-expanded="true"] .dashicons {
    transform: rotate(90deg);
}

.tp-table--expandable .tp-expand-toggle .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.tp-table__row--expandable {
    cursor: pointer;
}

.tp-table__row--expandable:hover {
    background: var(--tp-color-bg);
}

.tp-table__row--detail {
    background: #f8fafc;
}

.tp-table__row--detail:hover {
    background: #f1f5f9;
}

.tp-table__row--addon-header {
    background: #f1f5f9;
}

.tp-table__row--addon-header td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tp-color-text-muted);
}

.tp-table__cell--indent {
    padding-left: 48px !important;
}

.tp-table__cell--indent-2 {
    padding-left: 64px !important;
}

.tp-variation-label {
    display: inline-block;
    padding: 2px 8px;
    background: var(--tp-color-primary-light);
    color: var(--tp-color-primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tp-addon-label {
    color: var(--tp-color-text-muted);
    font-size: 12px;
}

.tp-addon-item {
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.tp-addon-item + .tp-addon-item {
    margin-top: 2px;
}

.tp-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--tp-color-bg);
    color: var(--tp-color-text-muted);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
    margin-left: 8px;
}

.tp-badge--small {
    padding: 1px 4px;
    font-size: 9px;
}

.tp-badge--info {
    background: #dbeafe;
    color: #1e40af;
}

/* Today's event row in network events table */
.tp-row--today {
    background: rgba(124, 58, 237, 0.08);
}

/* Past-event row in network events table */
.tp-row--past {
    opacity: 0.55;
}

.tp-row--past:hover {
    opacity: 0.85;
}

/* ==========================================================================
   Event Filter & Chart
   ========================================================================== */

.tp-filter-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-filter-select {
    padding: 6px 12px;
    border: 1px solid var(--tp-color-border);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: var(--tp-color-text);
    min-width: 200px;
}

.tp-filter-select:focus {
    outline: none;
    border-color: var(--tp-color-primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.tp-chart-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-chart-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tp-color-text-muted);
}

.tp-date-input {
    padding: 5px 10px;
    border: 1px solid var(--tp-color-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--tp-color-text);
}

.tp-date-input:focus {
    outline: none;
    border-color: var(--tp-color-primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.tp-chart-container {
    background: #fff;
    border: 1px solid var(--tp-color-border);
    border-radius: 8px;
    padding: 20px;
    height: 400px;
    position: relative;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 1200px) {
    .tp-dashboard__grid {
        grid-template-columns: 1fr;
    }
    
    .tp-dashboard__section--sidebar {
        grid-row: auto;
    }
}

@media screen and (max-width: 782px) {
    .tp-dashboard__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tp-dashboard__stats--compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .tp-event-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tp-event-row__stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tp-dashboard__filters {
        flex-direction: column;
        align-items: stretch;
    }

    .tp-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .tp-input {
        min-width: 100%;
    }

    .tp-event-selector .tp-select {
        min-width: 100%;
    }

    .tp-table {
        display: block;
        overflow-x: auto;
    }

    .tp-dashboard__section-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tp-chart-controls {
        flex-wrap: wrap;
    }

    .tp-filter-select {
        min-width: 100%;
    }

    .tp-chart-container {
        height: 300px;
    }
}

/* ==========================================================================
   Event Setup Summary Report
   ========================================================================== */

.tp-event-summary {
    max-width: 900px;
}

.tp-event-summary__header {
    margin-bottom: 24px;
}

.tp-event-summary__header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tp-event-summary__header-row .tp-dashboard__title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tp-event-summary__intro {
    font-size: 14px;
    color: var(--tp-color-text-muted);
    margin: 8px 0 0;
    line-height: 1.6;
}

.tp-event-summary__acknowledged-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--tp-color-success-light);
    border: 1px solid var(--tp-color-success);
    border-radius: var(--tp-radius-md);
    margin-bottom: 24px;
    color: #065f46;
}

.tp-event-summary__acknowledged-banner .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--tp-color-success);
}

.tp-event-summary__acknowledged-banner strong {
    display: block;
    font-size: 14px;
}

.tp-event-summary__acknowledged-banner span {
    font-size: 13px;
}

/* Sections */
.tp-event-summary__section {
    background: var(--tp-color-bg-white);
    border-radius: var(--tp-radius-lg);
    padding: 28px;
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid var(--tp-color-border);
    margin-bottom: 20px;
}

.tp-event-summary__section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--tp-color-text);
    margin: 0 0 20px 0;
    padding: 0 0 14px 0;
    border-bottom: 1px solid var(--tp-color-border);
}

.tp-event-summary__section h2 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--tp-color-primary);
}

/* Event Details Grid */
.tp-event-summary__details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tp-event-summary__detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-sm);
}

.tp-event-summary__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tp-color-text-muted);
}

.tp-event-summary__value {
    font-size: 14px;
    color: var(--tp-color-text);
    word-break: break-word;
}

.tp-event-summary__value--title {
    font-size: 16px;
    font-weight: 600;
}

.tp-event-summary__value a {
    color: var(--tp-color-primary);
    text-decoration: none;
    font-size: 13px;
}

.tp-event-summary__value a:hover {
    text-decoration: underline;
}

/* Pricing */
.tp-event-summary__price-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-md);
}

.tp-event-summary__price-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--tp-color-text);
}

.tp-event-summary__price-amount del {
    color: var(--tp-color-text-muted);
    font-weight: 400;
    font-size: 18px;
}

.tp-event-summary__pricing-table {
    margin-bottom: 16px;
}

.tp-event-summary__tax-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--tp-color-info-light);
    border-radius: var(--tp-radius-sm);
    font-size: 13px;
    color: var(--tp-color-info);
}

.tp-event-summary__tax-note .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Fee section */
.tp-event-summary__fee-mode {
    margin-bottom: 20px;
}

.tp-event-summary__fee-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--tp-radius-md);
    font-size: 14px;
    font-weight: 600;
}

.tp-event-summary__fee-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tp-event-summary__fee-badge--absorbed {
    background: var(--tp-color-warning-light);
    color: #92400e;
}

.tp-event-summary__fee-badge--passthrough {
    background: var(--tp-color-info-light);
    color: var(--tp-color-info);
}

.tp-event-summary__fee-explanation {
    font-size: 13px;
    color: var(--tp-color-text-muted);
    margin: 10px 0 0 0;
    line-height: 1.5;
}

.tp-event-summary__fee-table {
    margin-bottom: 20px;
}

.tp-event-summary__fee-table tfoot td {
    border-top: 2px solid var(--tp-color-border);
    padding-top: 12px;
    font-size: 14px;
}

/* Example breakdown */
.tp-event-summary__fee-example {
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-md);
    padding: 20px;
    margin-top: 4px;
}

.tp-event-summary__fee-example h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--tp-color-text);
}

.tp-event-summary__example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tp-event-summary__example-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--tp-color-bg-white);
    border-radius: var(--tp-radius-sm);
    border: 1px solid var(--tp-color-border);
}

.tp-event-summary__example-item--highlight {
    grid-column: 1 / -1;
    background: var(--tp-color-primary-light);
    border-color: var(--tp-color-primary);
}

.tp-event-summary__example-item--payout {
    grid-column: 1 / -1;
    background: var(--tp-color-success-light);
    border-color: var(--tp-color-success);
}

.tp-event-summary__example-label {
    font-size: 13px;
    color: var(--tp-color-text-muted);
}

.tp-event-summary__example-item--highlight .tp-event-summary__example-label,
.tp-event-summary__example-item--payout .tp-event-summary__example-label {
    font-weight: 600;
    color: var(--tp-color-text);
}

.tp-event-summary__example-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--tp-color-text);
}

.tp-event-summary__example-value small {
    font-weight: 400;
    font-size: 12px;
    color: var(--tp-color-text-muted);
}

.tp-event-summary__fee-note {
    font-size: 12px;
    margin: 12px 0 0 0;
    line-height: 1.5;
}

/* Acknowledgment section */
.tp-event-summary__section--acknowledge {
    border: 2px solid var(--tp-color-primary);
}

/* Send Summary to Organizer panel */
.tp-event-summary__send-panel {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--tp-color-bg);
    border: 1px solid var(--tp-color-border);
    border-radius: var(--tp-radius-md);
}

.tp-event-summary__send-panel h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px 0;
    font-size: 15px;
}

.tp-event-summary__send-panel h3 .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--tp-color-primary);
}

.tp-event-summary__send-panel > p {
    margin: 0 0 16px 0;
    font-size: 13px;
}

.tp-event-summary__send-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.tp-event-summary__send-row {
    display: flex;
    gap: 10px;
}

.tp-event-summary__send-field {
    flex: 1;
}

.tp-event-summary__send-field--full {
    flex: 1 1 100%;
}

.tp-event-summary__send-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--tp-color-text);
}

.tp-event-summary__send-field label .required {
    color: var(--tp-color-danger);
}

.tp-event-summary__send-field .tp-input {
    width: 100%;
    box-sizing: border-box;
}

/* The organizer note is the only textarea in this panel, and textareas don't
   inherit the surrounding form font. */
.tp-event-summary__send-field textarea.tp-input {
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
}

.tp-event-summary__send-result {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--tp-radius-sm);
    font-size: 13px;
}

.tp-event-summary__send-result--success {
    background: var(--tp-color-success-light);
    color: #065f46;
}

.tp-event-summary__send-result--error {
    background: var(--tp-color-danger-light);
    color: var(--tp-color-danger);
}

.tp-event-summary__on-behalf {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--tp-radius-md);
}

.tp-event-summary__checkbox-label--compact {
    padding: 0;
    background: none;
    border: none;
    font-size: 13px;
}

.tp-event-summary__checkbox-label--compact:hover {
    background: none;
    border-color: transparent;
}

.tp-event-summary__acknowledge-intro {
    font-size: 14px;
    color: var(--tp-color-text);
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.tp-event-summary__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: var(--tp-color-bg);
    border-radius: var(--tp-radius-md);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tp-color-text);
    border: 1px solid var(--tp-color-border);
    transition: border-color var(--tp-transition), background var(--tp-transition);
}

.tp-event-summary__checkbox-label:hover {
    border-color: var(--tp-color-primary);
    background: var(--tp-color-primary-light);
}

.tp-event-summary__checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--tp-color-primary);
}

.tp-event-summary__signature {
    margin-top: 16px;
}

.tp-event-summary__signature label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-color-text);
    margin-bottom: 6px;
}

.tp-event-summary__signature .tp-input {
    width: 100%;
    max-width: 400px;
}

.tp-btn--large {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
}

#tp-acknowledge-submit {
    margin-top: 20px;
}

#tp-acknowledge-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tp-event-summary__acknowledge-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--tp-color-danger-light);
    color: var(--tp-color-danger);
    border-radius: var(--tp-radius-sm);
    font-size: 13px;
}

.tp-event-summary__acknowledged {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--tp-color-success-light);
    border-radius: var(--tp-radius-md);
    color: #065f46;
    font-size: 14px;
}

.tp-event-summary__acknowledged .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--tp-color-success);
}

/* QR Code section */
.tp-event-summary__qr-intro {
    color: var(--tp-color-text-muted);
    margin-bottom: 16px;
}

.tp-event-summary__qr-preview {
    margin-bottom: 16px;
}

.tp-event-summary__qr-preview img {
    max-width: 300px;
    height: auto;
    border-radius: var(--tp-radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tp-event-summary__qr-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tp-color-text-muted);
    padding: 20px 0;
}

/* QR Code meta box (product edit sidebar) */
.tp-qr-metabox__loading {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #666;
}

.tp-qr-metabox img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
}

.tp-qr-metabox__download {
    width: 100%;
    text-align: center;
}

/* Shop QR code (Help & Docs → QR Codes) */
.tp-docs-qr__loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tp-color-text-muted);
    padding: 20px 0;
}

/* The source image is 3000x3889 — constrain it or it swallows the page. */
.tp-docs-qr img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin-bottom: 12px;
}

/* Spinner animation */
.tp-spin {
    animation: tp-spin 1s linear infinite;
}

@keyframes tp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .tp-event-summary {
        max-width: 100%;
    }

    .tp-event-summary__print,
    #tp-qr-download,
    .tp-back-link,
    #tp-acknowledge-form,
    #wpadminbar,
    #adminmenumain,
    #adminmenuback,
    .notice,
    .update-nag {
        display: none !important;
    }

    .tp-event-summary__section {
        box-shadow: none;
        break-inside: avoid;
        border: 1px solid #ccc;
    }

    body {
        margin: 0 !important;
    }

    #wpcontent {
        margin-left: 0 !important;
        padding-left: 20px !important;
    }
}

/* Responsive */
@media screen and (max-width: 782px) {
    .tp-event-summary__details-grid {
        grid-template-columns: 1fr;
    }

    .tp-event-summary__example-grid {
        grid-template-columns: 1fr;
    }

    .tp-event-summary__header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Documentation Pages
   ========================================================================== */

/* Landing page card grid */
.tp-docs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tp-docs-card {
    display: flex;
    flex-direction: column;
    background: var(--tp-color-bg-white);
    border: 1px solid var(--tp-color-border);
    border-radius: var(--tp-radius-lg);
    padding: 28px 24px;
    text-decoration: none;
    color: var(--tp-color-text);
    transition: all var(--tp-transition);
    box-shadow: var(--tp-shadow-sm);
    position: relative;
    overflow: hidden;
}

.tp-docs-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tp-color-primary);
    opacity: 0;
    transition: opacity var(--tp-transition);
}

.tp-docs-card:hover {
    border-color: var(--tp-color-primary);
    box-shadow: var(--tp-shadow-lg);
    transform: translateY(-3px);
    color: var(--tp-color-text);
}

.tp-docs-card:hover::before {
    opacity: 1;
}

.tp-docs-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--tp-radius-md);
    background: var(--tp-color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.tp-docs-card__icon .dashicons {
    font-size: 26px;
    width: 26px;
    height: 26px;
    color: var(--tp-color-primary);
}

.tp-docs-card__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--tp-color-text);
}

.tp-docs-card__desc {
    font-size: 14px;
    color: var(--tp-color-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}

.tp-docs-card__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-color-primary);
}

.tp-docs-card__link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform var(--tp-transition);
}

.tp-docs-card:hover .tp-docs-card__link .dashicons {
    transform: translateX(3px);
}

/* Docs content area */
.tp-docs-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tp-docs-content .tp-dashboard__section h2 {
    margin-bottom: 12px;
}

.tp-docs-content p {
    margin: 0 0 12px;
    color: var(--tp-color-text-muted);
    line-height: 1.7;
    font-size: 14px;
}

.tp-docs-content p:last-child {
    margin-bottom: 0;
}

.tp-docs-lead {
    font-size: 15px !important;
    color: var(--tp-color-text) !important;
    line-height: 1.7;
}

/* Numbered steps */
.tp-docs-steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
}

.tp-docs-steps li {
    counter-increment: step;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--tp-color-border);
    color: var(--tp-color-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.tp-docs-steps li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tp-docs-steps li:first-child {
    padding-top: 0;
}

.tp-docs-steps li::before {
    content: counter(step);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tp-color-primary-light);
    color: var(--tp-color-primary);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bulleted list */
.tp-docs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tp-docs-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    color: var(--tp-color-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.tp-docs-list li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tp-color-primary);
    margin-top: 8px;
}

/* Tip callout */
.tp-docs-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--tp-radius-md);
    margin-top: 12px;
}

.tp-docs-tip .dashicons {
    color: var(--tp-color-success);
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.tp-docs-tip p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #166534 !important;
    line-height: 1.6;
}

/* Note callout */
.tp-docs-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--tp-color-info-light);
    border: 1px solid #93c5fd;
    border-radius: var(--tp-radius-md);
    margin-top: 12px;
}

.tp-docs-note .dashicons {
    color: var(--tp-color-info);
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.tp-docs-note p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #1e40af !important;
    line-height: 1.6;
}

/* Screenshot images in docs */
.tp-docs-screenshot {
    margin: 16px 0 4px;
    border-radius: var(--tp-radius-md);
    border: 1px solid var(--tp-color-border);
    box-shadow: var(--tp-shadow-md);
    overflow: hidden;
}

.tp-docs-screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

.tp-docs-screenshot__caption {
    padding: 10px 14px;
    background: var(--tp-color-bg);
    border-top: 1px solid var(--tp-color-border);
    font-size: 12px;
    color: var(--tp-color-text-muted);
    line-height: 1.5;
}

.tp-docs-screenshot--placeholder {
    margin: 16px 0 4px;
    padding: 40px 24px;
    border-radius: var(--tp-radius-md);
    border: 2px dashed var(--tp-color-border);
    background: var(--tp-color-bg);
    text-align: center;
    color: var(--tp-color-text-muted);
}

.tp-docs-screenshot--placeholder .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--tp-color-border);
    display: block;
    margin: 0 auto 8px;
}

.tp-docs-screenshot--placeholder p {
    margin: 0 !important;
    font-size: 13px !important;
    color: var(--tp-color-text-muted) !important;
}

@media (max-width: 1200px) {
    .tp-docs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .tp-docs-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Payout method modal (event lifecycle)
   ========================================================================= */
.tp-payout-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}
.tp-payout-modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 460px;
    padding: 28px;
}
.tp-payout-modal__title {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
}
.tp-payout-modal__intro {
    margin: 0 0 20px;
    color: #6b7280;
    font-size: 14px;
}
.tp-payout-modal__field {
    display: block;
    margin-bottom: 16px;
}
.tp-payout-modal__field > span {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #374151;
}
.tp-payout-modal__field select,
.tp-payout-modal__field input[type="text"],
.tp-payout-modal__field input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}
.tp-payout-modal__amount-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.tp-payout-modal__amount-wrap .tp-payout-modal__symbol {
    position: absolute;
    left: 10px;
    color: #6b7280;
    font-size: 14px;
    pointer-events: none;
}
.tp-payout-modal__amount-wrap input {
    padding-left: 24px !important;
}
.tp-payout-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}
.tp-payout-modal__warning {
    background: #fef3c7;
    color: #92400e;
    padding: 8px 10px;
    border-radius: 4px;
    margin: 8px 0;
}
.tp-payout-modal__field--ack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.tp-payout-modal__field--ack > span {
    display: inline;
    font-weight: normal;
    font-size: 13px;
    margin-bottom: 0;
}
.tp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================================================
   Network Overview — cash position & outstanding cheques
   ========================================================================= */
.tp-cash-verdict {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 15px;
}
.tp-cash-verdict__amount {
    font-size: 26px;
    font-weight: 700;
}
.tp-cash-verdict--surplus .tp-cash-verdict__amount { color: #15803d; }
.tp-cash-verdict--short .tp-cash-verdict__amount { color: #b91c1c; }

.tp-cash-editor {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.tp-cash-editor__field { display: flex; flex-direction: column; }
.tp-cash-editor__field label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #374151;
}
.tp-cash-editor__field input {
    width: 180px;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}
.tp-cash-editor__meta {
    color: #6b7280;
    font-size: 13px;
    margin-top: 10px;
}
.tp-cheque-cleared-btn[disabled] { opacity: 0.6; cursor: default; }

/* Surplus / short verdict card value colouring (cash position) */
.tp-stat-card--success .tp-stat-card__value { color: #15803d; }
.tp-stat-card--danger .tp-stat-card__value { color: #b91c1c; }

/* Finance Record ---------------------------------------------------------- */
.tp-finance-intro { max-width: 70ch; }
.tp-finance-filters { display: flex; gap: 1rem; align-items: flex-end; margin: 1rem 0; flex-wrap: wrap; }
.tp-finance-filters label { display: flex; flex-direction: column; font-size: 12px; gap: .25rem; }
.tp-finance-derivation, .tp-finance-confidence { max-width: 620px; margin-bottom: 1.5rem; }
.tp-row--estimated { background: #fff7e6 !important; }
.tp-note-flag { color: #7c3aed; cursor: help; margin-left: .25rem; }
.tp-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11px; background: #eee; color: #333; }
.tp-badge--report { background: #ede9fe; color: #5b21b6; }
.tp-badge--backfill { background: #dbeafe; color: #1e40af; }
.tp-badge--auto { background: #dcfce7; color: #166534; }
.tp-badge--reconciliation,
.tp-badge--warn { background: #fef3c7; color: #92400e; }
.tp-stat-card__hint { display: block; font-size: 11px; color: #6b7280; margin-top: .25rem; }
.tp-finance-unrecorded table { margin: .5rem 0 1rem; }
