/* Appearance controls shared by management and client panels. */
html[data-pzc-theme="dark"] { color-scheme: dark; }
html[data-pzc-theme="light"] { color-scheme: light; background: #f5f1e8; }
.pzc-profile-menu { position: relative; margin: 0; padding: 0; }
.pzc-profile-menu > summary { list-style: none; cursor: pointer; min-height: 44px; border-radius: 12px; }
.pzc-profile-menu > summary::-webkit-details-marker { display: none; }
.pzc-profile-menu > summary:focus-visible { outline: 3px solid #d2ac47; outline-offset: 4px; }
.pzc-profile-panel { position: absolute; top: calc(100% + 12px); right: 0; width: 320px; max-width: calc(100vw - 32px); z-index: 1001;
  padding: 22px; border: 1px solid #62542d; border-radius: 16px; background: #14130f; color: #f5f0df; box-shadow: 0 12px 34px rgba(0,0,0,.35); text-align: left; }
.pzc-profile-panel h2 { margin: 0 0 12px; font-size: 24px; color: #fff; }
.pzc-profile-identity { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; margin: 0 0 18px; }
.pzc-appearance-options p { margin: 0 0 12px; }
.pzc-appearance-options small { font-size: 13px; color: #c4bb9f; }
.pzc-appearance-choices { display: flex; gap: 10px; }
.pzc-appearance-choice { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1 1 0;
  min-height: 44px; padding: 10px 14px; border: 1px solid #75653b; border-radius: 12px; background: #191712;
  color: #fff; cursor: pointer; font: 600 14px Raleway, Arial, sans-serif; }
.pzc-appearance-choice[aria-pressed="true"] { background: #d2ac47; border-color: #d2ac47; color: #141109; box-shadow: inset 0 0 0 1px currentColor; }
.pzc-appearance-choice:focus-visible { outline: 3px solid #d2ac47; outline-offset: 3px; }
.pzc-appearance-choice:disabled { cursor: wait; opacity: .65; }
.pzc-profile-panel > a { margin-top: 18px; }
.pzc-appearance-status { position: fixed; left: 50%; bottom: 90px; z-index: 1002;
  transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 12px; color: #fff; background: #242016;
  box-shadow: 0 6px 24px rgba(0,0,0,.2); font: 14px/1.5 Raleway, Arial, sans-serif;
}
.pzc-appearance-status:empty { display: none; }
.pzc-connection-removal { margin-top: 14px; border-top: 1px solid #514b3c; }
.pzc-connection-removal > summary { color: #f0aaa0; font-weight: 700; }
.pzc-connection-archive { margin-bottom: 22px; }
@media (max-width: 700px) {
  .pzc-profile-panel { position: fixed; top: 80px; right: 16px; max-height: calc(100dvh - 170px); overflow-y: auto; }
  .pzc-topbar > div:has(> h1) { min-width: 0; flex: 1 1 auto; }
  .pzc-topbar h1 { max-width: 100%; }
  .pzc-management-top-actions,.pzc-client-top-actions { flex: 0 0 auto; gap: 6px; }
  .pzc-user-menu { gap: 0; }
}

/* Shared layout contract: scoped to Portal, never to WordPress/theme pages. */
:is(.pzc-app,.pzc-auth-screen,.pzc-public-booking) *,
:is(.pzc-app,.pzc-auth-screen,.pzc-public-booking) *::before,
:is(.pzc-app,.pzc-auth-screen,.pzc-public-booking) *::after { box-sizing: border-box; }
.pzc-app-content :is(.pzc-content-card,.pzc-form-field,.pzc-card-heading>div,.pzc-section-actions>div,
.pzc-control-list>*,.pzc-crm-task-list>article>div,.pzc-ops-card) { min-width: 0; }
.pzc-app-content :is(h1,h2,h3,h4,p,dd,strong,small,label) { overflow-wrap: anywhere; }
.pzc-app-content :is(.pzc-form-grid,.pzc-management-grid,.pzc-ops-form-grid)>* { min-width: 0; }
.pzc-app-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { max-width: 100%; }
.pzc-app-content textarea { resize: vertical; min-height: 104px; line-height: 1.55; }
:is(.pzc-app,.pzc-auth-screen,.pzc-public-booking) :is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #f5d884; outline-offset: 3px; }
:is(.pzc-app,.pzc-auth-screen,.pzc-public-booking) :is(button,input,select,textarea):disabled { cursor: not-allowed; opacity: .65; }
.pzc-app-content :is(.pzc-inline-error,.pzc-inline-success,.pzc-inline-warning) { overflow-wrap: anywhere; line-height: 1.55; margin-bottom: 18px; }
/* Summary actions have their own space; a long company name cannot crush them. */
.pzc-app-content .pzc-export-company>summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; min-height: 56px; padding: 16px 20px; }
.pzc-export-company>summary>span { white-space: nowrap; font-size: 13px; }
.pzc-export-company>summary>strong { min-width: 0; line-height: 1.5; }
.pzc-export-company__body h3 { margin-top: 24px; }
.pzc-export-actions { gap: 12px; }
.pzc-export-actions>a { align-items: center; min-height: 44px; line-height: 1.5; }
.pzc-app-content .pzc-export-companies { gap: 12px; }
.pzc-app-content :is(.pzc-record-removal,.pzc-connection-removal)>summary { min-height: 48px; cursor: pointer; padding: 14px 0; }
.pzc-app-content :is(.pzc-table-scroll,.pzc-invoice-table-wrap,.pzc-control-table-wrap) { max-width: 100%; overscroll-behavior-x: contain; }
.pzc-connection-links-list summary { line-height: 1.5; }
@media(max-width:700px) {
 .pzc-app-content .pzc-export-company>summary { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 16px; }
 .pzc-export-company>summary>span { justify-self: start; }
 .pzc-export-company__body { padding: 0 16px 16px; }
 .pzc-app-content :is(.pzc-primary-action,.pzc-secondary-action) { min-height: 44px; white-space: normal; text-align: center; line-height: 1.4; }
 .pzc-app-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea),
 .pzc-auth-screen :is(input,select,textarea),.pzc-public-booking :is(input,select,textarea) { font-size: 16px; }
 .pzc-app-content :is(.pzc-card-heading,.pzc-section-actions) { flex-wrap: wrap; gap: 14px; }
 .pzc-app-content .pzc-crm-task-list>article { flex-wrap: wrap; gap: 14px; }
}
@media(max-height:500px) and (orientation:landscape) {
 .pzc-profile-panel { position: fixed; top: 12px; right: 16px; max-height: calc(100dvh - 100px); overflow-y: auto; }
}
@media(prefers-reduced-motion:reduce) {
 :is(.pzc-app,.pzc-auth-screen,.pzc-public-booking) * { scroll-behavior: auto; transition-duration: .01ms; animation-duration: .01ms; animation-iteration-count: 1; }
}

.pzc-app-content .pzc-task-removal { min-width: 0; max-width: 100%; }
.pzc-task-removal>summary { cursor:pointer; min-height:44px; padding:12px 0; line-height:1.5; }
.pzc-task-removal[open] { flex:1 1 100%; }
.pzc-task-removal label { display:flex; gap:10px; align-items:flex-start; }
.pzc-task-removal input[type=checkbox] { flex:0 0 auto; margin-top:4px; }
/* Keep expanded task confirmations on their own row, including column layouts. */
.pzc-app-content .pzc-crm-task-list>article { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; }
.pzc-app-content .pzc-crm-task-list>article>.pzc-task-removal { grid-column:1/-1; width:100%; }
@media(max-width:700px) { .pzc-app-content .pzc-crm-task-list>article { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) {
 .pzc-app-content .pzc-crm-tabs>a { padding:12px; gap:8px; }
 .pzc-app-content .pzc-crm-tabs>a>span { font-size:14px; overflow-wrap:normal; word-break:normal; }
 .pzc-app-content .pzc-crm-calendar-toolbar__actions { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .pzc-app-content .pzc-crm-calendar-toolbar__actions .pzc-secondary-action { width:100%; min-width:0; overflow-wrap:normal; word-break:normal; }
}
@media(max-width:700px) {
 .pzc-app-content .pzc-crm-calendar-toolbar { grid-template-columns:minmax(0,1fr); }
 .pzc-app-content .pzc-crm-calendar-title { grid-row:1; }
 .pzc-app-content .pzc-crm-calendar-toolbar__actions { grid-column:1/-1; }
}
.pzc-app-content .pzc-crm-task-list>article.pzc-crm-task--whatsapp-review{grid-template-columns:minmax(0,1fr)}
