.performsafe-app {
    --ps-brand: #0F766E;
    --ps-brand-2: #14B8A6;
    --ps-soft: #ECFDF5;
    --ps-navy: #0F172A;
    --ps-ink: #111827;
    --ps-muted: #64748B;
    --ps-line: #DDEAE6;
    --ps-panel: #FAFAFA;
    --ps-success: #22C55E;
    --ps-warning: #F59E0B;
    --ps-red: #DC2626;
    min-height: 100vh;
    margin: 0;
    padding: 18px 14px 104px;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, .18), transparent 34rem),
        linear-gradient(180deg, #0F766E 0%, #0B5F5A 28%, #ECFDF5 28%, #F8FAFC 100%);
    color: var(--ps-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
}

.performsafe-app *,
.performsafe-app *::before,
.performsafe-app *::after,
.performsafe-auth *,
.performsafe-auth *::before,
.performsafe-auth *::after {
    box-sizing: border-box;
}

.ps-header,
.ps-steps,
.ps-main {
    width: min(100%, 1040px);
    margin-left: auto;
    margin-right: auto;
}

.ps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #fff;
    margin-bottom: 18px;
}

.ps-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ps-logo {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, .18));
}

.ps-kicker {
    margin: 0 0 2px;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ps-tagline {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 700;
}

.ps-header h1,
.ps-hero h2,
.ps-panel h2,
.ps-section-head h2 {
    margin: 0;
    letter-spacing: 0;
}

.ps-header h1 {
    font-size: 29px;
    line-height: 1.05;
}

.ps-icon-btn,
.ps-primary,
.ps-secondary,
.ps-quiet-btn,
.ps-card-actions button,
.ps-multi-action-bar button,
.ps-bottom-bar button,
.ps-timeline-item button,
.ps-welfare-row button,
.ps-timeline-tabs button,
.ps-card-link,
.ps-auth-tabs button,
.ps-auth-form button {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.ps-icon-btn {
    min-height: 44px;
    padding: 0 14px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.ps-primary,
.ps-card-actions button,
.ps-multi-action-bar button,
.ps-welfare-row button,
.ps-auth-tabs button.is-active,
.ps-auth-form button {
    background: var(--ps-brand);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, .20);
}

.ps-secondary,
.ps-quiet-btn,
.ps-timeline-item button,
.ps-timeline-tabs button,
.ps-card-link {
    background: #EAF7F3;
    color: #0B4F4A;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.ps-primary:active,
.ps-secondary:active,
.ps-quiet-btn:active,
.ps-card-actions button:active,
.ps-multi-action-bar button:active,
.ps-bottom-bar button:active,
.ps-card-link:active {
    transform: translateY(1px);
}

.ps-steps {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 16px;
    scrollbar-width: none;
}

.ps-steps::-webkit-scrollbar {
    display: none;
}

.ps-steps span {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 850;
}

.ps-steps span.is-active {
    background: #fff;
    color: var(--ps-brand);
}

.ps-main {
    display: grid;
    gap: 16px;
}

.ps-screen[hidden],
[hidden] {
    display: none !important;
}

.ps-hero,
.ps-panel,
.ps-child-card,
.ps-empty,
.ps-existing {
    background: rgba(255, 255, 255, .96);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

.ps-hero,
.ps-panel,
.ps-existing {
    padding: 18px;
}

.ps-hero {
    display: grid;
    gap: 14px;
    background: #FAFAFA;
}

.ps-hero h2 {
    font-size: 28px;
    line-height: 1.12;
}

.ps-hero p {
    margin: 0;
    color: var(--ps-muted);
    font-size: 16px;
    line-height: 1.55;
}

.ps-form {
    display: grid;
    gap: 12px;
}

.ps-form label,
.ps-existing label,
.ps-auth-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.ps-form input,
.ps-form textarea,
.ps-form select,
.ps-existing select,
.ps-auth-form input,
.ps-auth-form textarea {
    width: 100%;
    min-height: 52px;
    border: 1px solid #CFE2DC;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
    color: var(--ps-ink);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.ps-form input:focus,
.ps-form textarea:focus,
.ps-form select:focus,
.ps-auth-form input:focus,
.ps-auth-form textarea:focus {
    outline: 3px solid rgba(20, 184, 166, .18);
    border-color: var(--ps-brand-2);
}

.ps-form textarea,
.ps-auth-form textarea {
    min-height: 94px;
    resize: vertical;
}

.ps-form details {
    border: 1px solid var(--ps-line);
    border-radius: 16px;
    padding: 12px;
    background: #F7FBFA;
}

.ps-form summary {
    min-height: 38px;
    color: var(--ps-brand);
    font-weight: 900;
    cursor: pointer;
}

.ps-form details label {
    margin-top: 10px;
}

.ps-big-action {
    width: 100%;
    min-height: 60px;
    font-size: 16px;
}

.ps-existing {
    margin-top: 14px;
}

.ps-age-preview,
.ps-added-child {
    padding: 12px;
    border-radius: 16px;
    background: var(--ps-soft);
    color: #134E4A;
    font-weight: 800;
}

.ps-added-children {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.ps-added-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-added-child > div {
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ps-added-child .ps-quiet-btn {
    flex: 0 0 auto;
}

.ps-added-child span {
    color: var(--ps-muted);
}

.ps-photo-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(236, 253, 245, .82);
}

.ps-photo-field button {
    min-height: 40px;
}

.ps-section-head,
.ps-toolbar,
.ps-export-row,
.ps-welfare-row,
.ps-timeline-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.ps-section-head {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

.ps-summary-card {
    gap: 14px;
}

.ps-section-head div {
    min-width: 0;
}

.ps-section-head .ps-kicker {
    color: var(--ps-brand);
}

.ps-section-head h2 {
    color: var(--ps-navy);
    font-size: 28px;
    line-height: 1.1;
}

.ps-current-time,
.ps-last-action {
    margin: 7px 0 0;
    color: var(--ps-muted);
    font-size: 14px;
    font-weight: 750;
}

.ps-last-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.ps-last-action-row .ps-last-action {
    margin: 0;
}

.ps-quiet-btn {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.ps-dashboard-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px;
}

.ps-dashboard-tools .ps-secondary {
    min-height: 42px;
    padding: 0 14px;
}

.ps-dashboard-tools .ps-secondary.is-active {
    background: var(--ps-brand);
    color: #fff;
}

.ps-utility-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    margin: 4px 0 12px;
}

.ps-utility-bar .ps-secondary {
    min-height: 42px;
    font-size: 13px;
}

.ps-selected-count {
    margin: 0;
    color: #0B4F4A;
    font-size: 14px;
    font-weight: 900;
}

.ps-production-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0;
}

.ps-production-summary b,
.ps-production-summary span {
    color: #0B4F4A;
    font-size: 13px;
    font-weight: 850;
}

.ps-production-summary .dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 999px;
    background: #0F766E;
}

.ps-production-summary .dot.amber { background: #F59E0B; }
.ps-production-summary .dot.teal { background: #14B8A6; }
.ps-production-summary .dot.grey { background: #94A3B8; }

.ps-multi-action-bar {
    position: sticky;
    top: 8px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 42px rgba(15, 23, 42, .14);
    backdrop-filter: blur(14px);
}

.ps-multi-action-bar button {
    min-height: 46px;
    padding: 8px 6px;
    font-size: 13px;
}

.ps-cards {
    display: grid;
    gap: 14px;
}

.ps-child-card {
    display: grid;
    gap: 13px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(207, 226, 220, .72);
}

.ps-child-card.amber,
.ps-child-card.strong {
    background: #FFFBEB;
}

.ps-child-card.red {
    background: #FFF7F7;
}

.ps-child-card.managed {
    background: #FFFBEB;
}

.ps-child-card.is-selected {
    outline: 3px solid rgba(20, 184, 166, .36);
}

.ps-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.ps-card-top label {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    font-size: 20px;
    line-height: 1.15;
}

.ps-card-top strong {
    overflow-wrap: anywhere;
}

.ps-child-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ps-role-line {
    display: block;
    color: #0F766E;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.ps-avatar {
    display: inline-flex;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    background: #DDF7EF;
    color: #0F766E;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .16);
    font-size: 18px;
    font-weight: 950;
}

.ps-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ps-avatar-placeholder::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(15, 118, 110, .35);
    box-shadow: 0 18px 0 -5px rgba(15, 118, 110, .35);
}

.ps-avatar-placeholder:not(:empty)::before {
    display: none;
}

.ps-card-top input {
    display: none;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    accent-color: var(--ps-brand);
}

.ps-edit-child-button {
    min-height: 42px;
}

.ps-edit-details-link {
    width: fit-content;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0F766E;
    box-shadow: none;
    font-size: 12px;
    font-weight: 850;
    text-align: left;
}

.ps-edit-details-link:hover {
    text-decoration: underline;
}

.ps-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.performsafe-app.is-multi-select .ps-card-top input {
    display: block;
}

.ps-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.status-rest { background: #DDF7EF; color: #0F766E; }
.status-awaiting { background: #F8FAFC; color: #64748B; }
.status-compliant { background: #DDF7EF; color: #0F766E; }
.status-approaching { background: #FEF3C7; color: #92400E; }
.status-managed { background: #CCFBF1; color: #0F766E; }
.status-action { background: #FEE2E2; color: #991B1B; }
.status-makeup { background: #E0F2FE; color: #0369A1; }
.status-costume { background: #F3E8FF; color: #7E22CE; }
.status-performing { background: #FEF3C7; color: #B45309; }
.status-lunch { background: #FEF3C7; color: #92400E; }
.status-travel { background: #E2E8F0; color: #334155; }
.status-tutor { background: #CCFBF1; color: #0F766E; }
.status-wrapped { background: #F1F5F9; color: #475569; }

.ps-child-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 9px;
    margin: -4px 0 0;
    color: var(--ps-muted);
    font-size: 14px;
    font-weight: 800;
}

.ps-child-meta span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 7px 2px 0;
    border-radius: 999px;
    background: #94A3B8;
}

.ps-card-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(248, 250, 252, .72);
}

.ps-card-current {
    background: transparent;
    padding: 0;
}

.ps-card-section h4 {
    margin: 0;
    color: var(--ps-navy);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
}

.ps-mini-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #475569;
    font-weight: 850;
}

.ps-mini-row b {
    color: var(--ps-navy);
    white-space: nowrap;
}

.ps-current {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 0;
    padding: 0;
    background: transparent;
    font-weight: 850;
}

.ps-current span,
.ps-clock span,
.ps-clock-mini span {
    color: var(--ps-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ps-current strong {
    color: var(--ps-navy);
    font-size: 22px;
}

.ps-current em {
    color: var(--ps-muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 750;
}

.ps-clock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ps-clock-hero {
    grid-column: 1 / -1;
    min-height: 112px;
}

.ps-clock-hero strong {
    font-size: 34px;
}

.ps-clock-secondary {
    opacity: .82;
}

.ps-clock {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    background: var(--ps-soft);
    color: var(--ps-navy);
}

.ps-clock strong {
    font-size: 24px;
    line-height: 1;
}

.ps-clock i {
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, currentColor var(--ps-gauge, 0%), rgba(15, 23, 42, .10) 0);
    opacity: .62;
    transition: background .25s ease, color .25s ease;
}

.ps-clock.gauge-green { color: #0F766E; }
.ps-clock.gauge-amber { color: #B45309; background: #FFFBEB; }
.ps-clock.gauge-orange { color: #C2410C; background: #FFF7ED; }
.ps-clock.gauge-red { color: #991B1B; background: #FEF2F2; }
.ps-clock.gauge-neutral { color: var(--ps-navy); }

.ps-clock-total strong {
    font-size: 24px;
}

.ps-clock-mini {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 16px;
    background: #F8FAFC;
    color: var(--ps-navy);
}

.ps-clock-mini strong {
    font-size: 16px;
}

.ps-clock-break {
    grid-column: 1 / -1;
}

.ps-compliance-alert {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border-radius: 16px;
    font-weight: 850;
}

.ps-compliance-alert span {
    font-size: 14px;
}

.ps-compliance-alert.red {
    background: #FEF2F2;
    color: #991B1B;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .12);
}

.ps-compliance-alert.amber {
    background: #FFFBEB;
    color: #92400E;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .16);
}

.ps-compliance-state,
.ps-exception-summary,
.ps-exception-row {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 850;
}

.ps-compliance-state {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.ps-compliance-state.green,
.ps-exception-summary.green {
    background: #ECFDF5;
    color: #0F766E;
}

.ps-compliance-state.managed,
.ps-exception-summary.managed {
    background: #FFFBEB;
    color: #92400E;
}

.ps-compliance-state.amber {
    background: #FFFBEB;
    color: #92400E;
}

.ps-compliance-state.red,
.ps-exception-summary.red {
    background: #FEF2F2;
    color: #991B1B;
}

.ps-exception-summary em {
    font-style: normal;
    font-size: 13px;
}

.ps-record-exception {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: #92400E;
    color: #fff;
    font: inherit;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(146, 64, 14, .18);
}

.ps-next {
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: #ECFDF5;
    color: #0F766E;
    font-weight: 800;
    line-height: 1.4;
}

.ps-next b {
    display: block;
    margin-bottom: 2px;
    color: inherit;
    font-size: 12px;
    text-transform: uppercase;
}

.ps-next.note-blue {
    background: #EFF6FF;
    color: #1D4ED8;
}

.ps-next.note-green {
    background: #ECFDF5;
    color: #0F766E;
}

.ps-next.note-amber {
    background: #FFFBEB;
    color: #B45309;
}

.ps-next.note-red {
    background: #FEF2F2;
    color: #991B1B;
}

.ps-compliance-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 950;
    font-size: 13px;
}

.ps-compliance-pill.green {
    background: #ECFDF5;
    color: #0F766E;
}

.ps-compliance-pill.amber,
.ps-compliance-pill.managed {
    background: #FFFBEB;
    color: #B45309;
}

.ps-compliance-pill.red {
    background: #FEF2F2;
    color: #991B1B;
}

.ps-compliance-pill.awaiting,
.ps-compliance-pill.wrapped {
    background: #F1F5F9;
    color: #475569;
}

.ps-awaiting {
    display: grid;
    gap: 5px;
    padding: 14px;
    border-radius: 18px;
    background: #F8FAFC;
    color: #475569;
}

.ps-awaiting strong {
    color: var(--ps-navy);
    font-size: 17px;
}

.ps-awaiting span,
.ps-live-times span {
    color: var(--ps-muted);
    font-size: 13px;
    font-weight: 800;
}

.ps-live-times {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ps-live-times span {
    border-radius: 999px;
    padding: 7px 10px;
    background: #EAF7F3;
    color: #0B4F4A;
}

.ps-child-meta span {
    display: inline-block;
    margin-left: 6px;
    color: #0F766E;
    font-weight: 900;
}

.ps-day-strip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    color: var(--ps-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.ps-day-strip div {
    display: flex;
    min-width: 0;
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #E2E8F0;
}

.ps-day-strip span {
    flex: var(--ps-seg, 1) 1 0;
    min-width: 6px;
}

.ps-day-strip .status-performing { background: #F59E0B; }
.ps-day-strip .status-rest { background: #14B8A6; }
.ps-day-strip .status-makeup { background: #3B82F6; }
.ps-day-strip .status-costume { background: #8B5CF6; }
.ps-day-strip .status-travel { background: #475569; }
.ps-day-strip .status-tutor { background: #0D9488; }
.ps-day-strip .status-lunch { background: #D97706; }
.ps-day-strip .status-wrapped { background: #94A3B8; }

.ps-card-link {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    background: #0F766E;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, .22);
    font-size: 15px;
}

.ps-schedule {
    margin: 14px 0;
    padding: 14px;
    border-radius: 18px;
    background: #F8FAFC;
}

.ps-schedule pre {
    margin: 0;
    white-space: pre-wrap;
    color: #334155;
    font: inherit;
    font-weight: 750;
}

.ps-report-email-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .52);
}

.ps-report-email-modal[hidden] {
    display: none;
}

.ps-report-email-dialog {
    width: min(680px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.ps-report-email-dialog h2 {
    color: var(--ps-navy);
}

.ps-checkbox {
    display: flex !important;
    grid-template-columns: auto 1fr !important;
    align-items: center;
    gap: 10px;
}

.ps-checkbox input {
    width: 18px;
    height: 18px;
}

.ps-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.ps-card-actions button {
    min-height: 50px;
    padding: 9px 8px;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(15, 118, 110, .14);
}

.ps-card-actions button.is-active-activity,
.ps-card-actions button.is-active-activity:disabled {
    background: var(--ps-brand);
    color: #fff;
    opacity: 1;
    cursor: default;
    box-shadow: 0 14px 28px rgba(15, 118, 110, .30);
}

.ps-card-actions button.is-active-activity span {
    display: inline-block;
    margin-right: 5px;
    font-weight: 900;
}

.ps-card-actions .ps-card-wrap {
    grid-column: 1 / -1;
    background: #F1F5F9;
    color: #475569;
    box-shadow: none;
}

.ps-card-actions-arrival {
    grid-template-columns: 2fr 1fr;
}

.ps-child-card.is-wrapped {
    opacity: .82;
}

.ps-child-card.is-wrapped .ps-clock,
.ps-child-card.is-wrapped .ps-next {
    background: #F8FAFC;
    color: #475569;
}

.ps-wrapped-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: #F8FAFC;
    color: #64748B;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

.ps-card-line,
.ps-card-sub,
.ps-activity-strip {
    display: none;
}

.ps-metrics,
.ps-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ps-metrics p,
.ps-detail-grid p {
    margin: 0;
    min-height: 56px;
    padding: 12px;
    border-radius: 16px;
    background: #F8FAFC;
    color: #233142;
    font-size: 13px;
    font-weight: 800;
}

.ps-detail-grid b,
.ps-detail-grid span {
    display: block;
}

.ps-detail-grid span {
    color: var(--ps-muted);
    margin-top: 4px;
}

.ps-child-detail-head {
    display: flex;
    justify-content: flex-start;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.ps-child-detail-head > div {
    flex: 1 1 auto;
    min-width: 0;
}

.ps-child-detail-live {
    display: grid;
    gap: 13px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 20px;
    background: #F7FBFA;
}

.ps-child-detail-live .ps-card-actions {
    margin-top: 2px;
}

.ps-detail-collapse {
    margin-top: 12px;
    border: 1px solid var(--ps-line);
    border-radius: 18px;
    padding: 12px;
    background: #fff;
}

.ps-detail-collapse summary {
    min-height: 38px;
    color: var(--ps-brand);
    font-weight: 900;
    cursor: pointer;
}

.ps-detail-collapse p {
    margin: 10px 0 0;
    color: #475569;
    line-height: 1.55;
}

.ps-arrival-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(15, 23, 42, .38);
}

.ps-exception-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(15, 23, 42, .40);
}

.ps-exception-dialog {
    width: min(100%, 520px);
    max-height: min(92vh, 780px);
    overflow: auto;
    border-radius: 24px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .30);
}

.ps-exception-dialog h2 {
    margin: 0 0 4px;
    color: var(--ps-navy);
}

.ps-exception-dialog > p {
    margin: 0 0 12px;
    color: var(--ps-muted);
    font-weight: 850;
}

.ps-exception-row {
    margin-top: 10px;
    background: #FFFBEB;
    color: #92400E;
}

.ps-exception-row p,
.ps-exception-row small,
.ps-exception-row span {
    margin: 0;
    color: inherit;
}

.ps-timeline-warning {
    color: #991B1B;
    font-weight: 900;
}

.ps-arrival-dialog {
    width: min(100%, 440px);
    border-radius: 24px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.ps-arrival-dialog h2 {
    margin: 0 0 6px;
    color: var(--ps-navy);
    font-size: 24px;
}

.ps-arrival-dialog p {
    margin: 0 0 14px;
    color: var(--ps-muted);
    font-weight: 750;
}

.ps-first-activity-options {
    display: grid;
    gap: 8px;
}

.ps-first-activity-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #F7FBFA;
    color: #334155;
    font-weight: 850;
}

.ps-first-activity-options input {
    width: 20px;
    height: 20px;
    accent-color: var(--ps-brand);
}

.ps-arrival-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.ps-child-detail h3 {
    margin: 18px 0 8px;
}

.ps-note,
.ps-timeline-item {
    padding: 14px;
    border: 1px solid var(--ps-line);
    border-radius: 18px;
    margin-top: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.ps-note.concern {
    border-left: 6px solid var(--ps-warning);
}

.ps-note.incident {
    border-left: 6px solid var(--ps-red);
}

.ps-note b,
.ps-note span {
    display: block;
}

.ps-note span,
.ps-timeline-item small {
    color: var(--ps-muted);
}

.ps-timeline-item p {
    margin: 0 0 10px;
    line-height: 1.45;
}

.ps-timeline-item div {
    display: flex;
    gap: 8px;
}

.ps-timeline-item button {
    min-height: 40px;
    padding: 0 12px;
}

.ps-timeline-tabs button.is-active {
    background: var(--ps-brand);
    color: #fff;
}

.ps-empty {
    padding: 20px;
    color: var(--ps-muted);
    text-align: center;
}

.ps-note-targets {
    display: grid;
    gap: 8px;
    border: 1px solid var(--ps-line);
    border-radius: 18px;
    padding: 12px;
}

.ps-welfare-row {
    grid-template-columns: 1fr;
}

.ps-note-targets legend {
    font-weight: 900;
}

.ps-note-targets label,
.ps-note-child {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 46px;
    padding: 10px;
    border-radius: 14px;
    background: #F8FAFC;
}

.ps-note-child-list {
    display: grid;
    gap: 8px;
}

.ps-detail-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin: 14px 0;
}

.ps-compliance {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 8px;
    background: var(--ps-soft);
    color: #134E4A;
}

.ps-compliance.amber {
    background: #FFFBEB;
    color: #92400E;
}

.ps-compliance.red {
    background: #FEF2F2;
    color: #991B1B;
}

.ps-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    background: rgba(250, 250, 250, .92);
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -14px 38px rgba(15, 23, 42, .10);
    backdrop-filter: blur(18px);
}

.ps-bottom-bar button {
    min-height: 54px;
    background: #fff;
    color: var(--ps-brand);
    font-size: 13px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.ps-toast {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 88px;
    z-index: 60;
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    color: var(--ps-ink);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
    font-weight: 850;
}

.performsafe-auth {
    --ps-brand: #0F766E;
    --ps-brand-2: #14B8A6;
    --ps-soft: #ECFDF5;
    --ps-navy: #0F172A;
    --ps-ink: #111827;
    --ps-muted: #64748B;
    --ps-line: #DDEAE6;
    --ps-panel: #FAFAFA;
    --ps-success: #22C55E;
    --ps-warning: #F59E0B;
    min-height: 100vh;
    padding: 24px 14px 52px;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, .20), transparent 34rem),
        linear-gradient(180deg, #0F766E 0%, #ECFDF5 44%, #F8FAFC 100%);
    color: var(--ps-ink, #111827);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.performsafe-login,
.ps-auth-card,
.ps-marketing {
    max-width: 760px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 22px 56px rgba(15, 23, 42, .14);
}

.performsafe-login,
.ps-auth-card {
    padding: 24px;
    text-align: center;
}

.ps-auth-card .ps-logo {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
}

.ps-auth-card h1 {
    margin: 0;
    font-size: 34px;
    color: #0F172A;
}

.ps-auth-strapline {
    margin: 7px 0 20px;
    color: #475569;
    font-weight: 800;
}

.ps-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
    padding: 5px;
    border-radius: 18px;
    background: #EAF7F3;
}

.ps-auth-tabs button {
    background: transparent;
    color: #0B4F4A;
    box-shadow: none;
}

.ps-auth-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

.ps-auth-form a {
    color: #0F766E;
    font-weight: 800;
}

.ps-privacy,
.ps-auth-footer,
.ps-auth-message {
    color: #475569;
    font-weight: 700;
}

.ps-auth-message {
    min-height: 24px;
    color: #9A3412;
}

.ps-marketing {
    padding: 24px;
}

.ps-marketing h2 {
    margin: 20px 0 8px;
    color: #0F172A;
}

.ps-marketing p,
.ps-marketing li {
    color: #475569;
    line-height: 1.6;
}

.ps-marketing ul {
    margin: 12px 0;
    padding-left: 20px;
}

.ps-marketing li {
    margin: 8px 0;
}

.ps-feature-cards {
    display: grid;
    gap: 10px;
}

.ps-feature-cards article {
    border-radius: 18px;
    padding: 16px;
    background: #F7FBFA;
}

.ps-feature-cards h3 {
    margin-top: 0;
}

.ps-report-head {
    padding: 14px;
    border-radius: 18px;
    background: var(--ps-soft);
    color: var(--ps-navy);
    margin-bottom: 12px;
}

.ps-report-head h2,
.ps-report-head p {
    margin: 0;
}

.ps-report-head p {
    margin-top: 6px;
    color: #475569;
    line-height: 1.45;
}

.ps-report-status {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: #F8FAFC;
    margin-bottom: 16px;
}

.ps-report-status h3 {
    margin: 0;
}

.ps-report-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ps-report-status span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    font-weight: 900;
}

.ps-report-status .green { background: #16A34A; }
.ps-report-status .amber { background: #D97706; }
.ps-report-status .managed { background: #F59E0B; color: #422006; }
.ps-report-status .red { background: #DC2626; }

.ps-report-status small {
    color: var(--ps-muted);
    font-weight: 800;
}

.ps-report-issues {
    display: grid;
    gap: 8px;
}

.ps-report-issues p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    font-weight: 800;
}

.ps-report-issues button {
    min-height: 36px;
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    padding: 0 12px;
    background: #92400E;
    color: #fff;
    font: inherit;
    font-weight: 900;
}

.ps-report-child-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.ps-report-child {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: #F8FAFC;
}

.ps-report-child span {
    color: var(--ps-muted);
    font-size: 13px;
    font-weight: 800;
}

.ps-report-child-id {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-report-child-id span {
    display: grid;
    gap: 3px;
}

.ps-report-child-id em {
    color: var(--ps-muted);
    font-style: normal;
}

@media (min-width: 540px) {
    .ps-section-head,
    .ps-toolbar,
    .ps-export-row,
    .ps-welfare-row,
    .ps-timeline-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ps-utility-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ps-section-head {
        align-items: end;
    }

    .ps-clock-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ps-clock-break {
        grid-column: auto;
    }
}

@media (min-width: 760px) {
    .performsafe-app {
        padding: 28px 24px 118px;
    }

    .ps-header h1 {
        font-size: 34px;
    }

    .ps-setup {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .ps-screen.ps-setup {
        display: grid;
        gap: 18px;
    }

    .ps-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ps-welfare-row,
    .ps-timeline-tabs,
    .ps-export-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
