/* PropertiWA CRM — editorial property workspace */
:root {
  --pw-ink: #142821;
  --pw-forest: #174f3d;
  --pw-forest-deep: #103b2e;
  --pw-mint: #dff1e8;
  --pw-accent: #c79a4a;
  --pw-canvas: #f4f6f3;
  --pw-surface: #ffffff;
  --pw-line: #e4eae5;
  --pw-muted: #718078;
  --pw-danger: #b54747;
  --pw-shadow: 0 12px 32px rgba(20, 40, 33, .055);
  --pw-radius: 18px;
}

.pw-wrap,
.pw-wrap *,
.pw-public-form,
.pw-public-form * { box-sizing: border-box; }

.pw-wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 22px 44px;
  color: var(--pw-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pw-brandbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 20px 26px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  color: #f6faf7;
  background: radial-gradient(circle at 82% 10%, rgba(199,154,74,.22), transparent 25%), linear-gradient(115deg, #123c30 0%, #1c5a44 56%, #28664e 100%);
  box-shadow: 0 14px 34px rgba(16,59,46,.16);
}
.pw-brandbar::after {
  position: absolute;
  right: 12%;
  bottom: -95px;
  width: 260px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  content: "";
  transform: rotate(-22deg);
}
.pw-brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.pw-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 15px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
  box-shadow: inset 0 1px rgba(255,255,255,.12);
}
.pw-brand-name { display: block; color: #fff; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.pw-brand-caption { display: block; margin-top: 3px; color: rgba(242,249,244,.7); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pw-brand-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: rgba(246,250,247,.8); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.pw-brand-meta::before { width: 7px; height: 7px; border-radius: 50%; background: #a8dfbd; box-shadow: 0 0 0 4px rgba(168,223,189,.12); content: ""; }

.pw-nav {
  display: flex;
  gap: 5px;
  margin: 15px 0 28px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--pw-line);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  scrollbar-width: thin;
}
.pw-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 10px;
  color: #68766e;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.pw-nav a:hover { color: var(--pw-forest); background: #f0f5f1; }
.pw-nav a[aria-current="page"] { color: #fff; background: var(--pw-forest); box-shadow: 0 4px 10px rgba(23,79,61,.18); }

.pw-wrap > h1 {
  margin: 0 0 5px;
  color: var(--pw-ink);
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 760;
  letter-spacing: -.045em;
  line-height: 1.14;
}
.pw-subtitle { max-width: 760px; margin: 0 0 22px; color: var(--pw-muted); font-size: 14px; line-height: 1.65; }
.pw-wrap .notice { margin: 16px 0 22px; padding: 2px 14px; border-radius: 12px; box-shadow: 0 5px 18px rgba(20,40,33,.04); }
.pw-wrap .notice p { margin: 10px 0; }
.pw-wrap .notice-success { border-color: #57a978; }
.pw-wrap .notice-error { border-color: #d27474; }
.pw-wrap .notice-warning { border-color: var(--pw-accent); }

.pw-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0 24px; }
.pw-card {
  position: relative;
  min-height: 142px;
  padding: 22px 22px 18px;
  overflow: hidden;
  border: 1px solid var(--pw-line);
  border-radius: var(--pw-radius);
  background: linear-gradient(145deg, #fff 0%, #fbfcfa 100%);
  box-shadow: var(--pw-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pw-card::before { position: absolute; top: 0; left: 22px; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--pw-accent); content: ""; }
.pw-card::after { position: absolute; right: -36px; bottom: -58px; width: 130px; height: 130px; border: 1px solid rgba(23,79,61,.075); border-radius: 50%; box-shadow: 0 0 0 12px rgba(23,79,61,.025), 0 0 0 26px rgba(23,79,61,.02); content: ""; }
.pw-card:hover { transform: translateY(-2px); box-shadow: 0 17px 38px rgba(20,40,33,.09); }
.pw-card span { position: relative; z-index: 1; display: block; color: #75837a; font-size: 11px; font-weight: 750; letter-spacing: .11em; line-height: 1.5; text-transform: uppercase; }
.pw-card strong { position: relative; z-index: 1; display: block; margin-top: 12px; color: var(--pw-ink); font-size: clamp(31px, 3vw, 39px); font-weight: 760; letter-spacing: -.055em; line-height: 1; }

.pw-panel {
  margin: 17px 0;
  padding: 23px;
  overflow-x: auto;
  border: 1px solid var(--pw-line);
  border-radius: var(--pw-radius);
  background: var(--pw-surface);
  box-shadow: var(--pw-shadow);
}
.pw-panel h2 { margin: 0 0 16px; color: var(--pw-ink); font-size: 18px; font-weight: 730; letter-spacing: -.025em; line-height: 1.35; }
.pw-panel p { color: #596a60; line-height: 1.7; }
.pw-panel p:last-child { margin-bottom: 0; }
.pw-panel .description, .pw-wrap .description { color: var(--pw-muted); font-size: 12px; line-height: 1.65; }
.pw-panel code, .pw-wrap code { padding: 3px 6px; border: 1px solid #e5ece7; border-radius: 6px; color: var(--pw-forest); background: #f3f7f4; font-size: .92em; }

.pw-toolbar { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; flex-wrap: wrap; }
.pw-toolbar form { display: flex; align-items: center; gap: 8px; flex: 1 1 430px; min-width: 260px; margin: 0; }
.pw-toolbar input { min-width: 200px; }
.pw-toolbar select { max-width: 190px; }
.pw-wrap .button,
.pw-wrap button:not(.button-link-delete),
.pw-public-form button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid #dce5de;
  border-radius: 10px;
  color: #355248;
  background: #fff;
  box-shadow: 0 2px 4px rgba(20,40,33,.025);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pw-wrap .button:hover, .pw-wrap button:not(.button-link-delete):hover { transform: translateY(-1px); border-color: #b7cbbd; color: var(--pw-forest-deep); background: #f7faf8; box-shadow: 0 5px 12px rgba(20,40,33,.08); }
.pw-wrap .button-primary, .pw-wrap button.button-primary, .pw-public-form button {
  border-color: var(--pw-forest);
  color: #fff;
  background: linear-gradient(135deg, #1d654a, #174f3d);
  box-shadow: 0 5px 12px rgba(23,79,61,.16);
}
.pw-wrap .button-primary:hover, .pw-wrap button.button-primary:hover, .pw-public-form button:hover { border-color: var(--pw-forest-deep); color: #fff; background: linear-gradient(135deg, #174f3d, #103b2e); box-shadow: 0 8px 16px rgba(23,79,61,.2); }
.pw-wrap .button:focus-visible, .pw-wrap button:focus-visible, .pw-public-form button:focus-visible, .pw-nav a:focus-visible { outline: 3px solid rgba(199,154,74,.55); outline-offset: 2px; }
.pw-wrap button:disabled { transform: none; opacity: .48; cursor: not-allowed; box-shadow: none; }

.pw-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.pw-wrap select,
.pw-wrap textarea,
.pw-public-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.pw-public-form select,
.pw-public-form textarea {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dce5de;
  border-radius: 10px;
  color: var(--pw-ink);
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(20,40,33,.025);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.pw-wrap textarea, .pw-public-form textarea { min-height: 110px; resize: vertical; }
.pw-wrap input:focus, .pw-wrap select:focus, .pw-wrap textarea:focus, .pw-public-form input:focus, .pw-public-form select:focus, .pw-public-form textarea:focus { border-color: #65a786; outline: 0; box-shadow: 0 0 0 3px rgba(65,143,101,.12); }
.pw-wrap label, .pw-public-form label { color: #344b40; font-size: 13px; font-weight: 670; line-height: 1.5; }
.pw-wrap label small { color: var(--pw-muted); }
.pw-wrap input[type="checkbox"], .pw-public-form input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--pw-forest); vertical-align: -3px; }
.pw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 100%; }
.pw-grid > label { display: block; min-width: 0; }
.pw-grid input, .pw-grid select, .pw-grid textarea, .pw-public-form input, .pw-public-form select, .pw-public-form textarea, .pw-block textarea { display: block; width: 100%; max-width: 100%; margin-top: 7px; }
.pw-grid .pw-wide { grid-column: 1 / -1; }
.pw-block { display: block; margin: 0 0 14px; }
.pw-checkbox-label, .pw-consent, .pw-confirm { line-height: 1.65; }
.pw-checkbox-label input[type="checkbox"], .pw-consent input[type="checkbox"], .pw-confirm input[type="checkbox"] { display: inline-block; width: 17px; height: 17px; margin: 0 7px 0 0; }

.pw-panel table.widefat { width: 100%; min-width: 640px; border: 0; border-collapse: separate; border-spacing: 0; background: transparent; box-shadow: none; }
.pw-panel table.widefat thead th { position: sticky; top: 0; z-index: 1; padding: 13px 14px; border: 0; border-bottom: 1px solid #dce5de; color: #718078; background: #f7f9f7; font-size: 10px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.pw-panel table.widefat td { padding: 14px; border: 0; border-bottom: 1px solid #edf1ee; color: #40544a; font-size: 13px; line-height: 1.55; vertical-align: middle; }
.pw-panel table.widefat tbody tr { transition: background .15s ease; }
.pw-panel table.widefat tbody tr:nth-child(even) { background: #fbfcfb; }
.pw-panel table.widefat tbody tr:hover { background: #f2f7f3; }
.pw-panel table.widefat tbody tr:last-child td { border-bottom: 0; }
.pw-panel table.widefat td strong { color: var(--pw-ink); font-weight: 720; }
.pw-panel table.widefat td a:not(.button) { color: var(--pw-forest); font-weight: 680; text-decoration: none; }
.pw-panel table.widefat td a:not(.button):hover { color: #0b3829; text-decoration: underline; }
.pw-panel table.widefat td small { color: var(--pw-muted); }
.pw-panel table.widefat .button { min-height: 33px; padding: 0 10px; font-size: 12px; }

.pw-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pw-chat-head h2 { margin: 0; font-size: 20px; }
.pw-chat-head p { margin: 5px 0 0; color: var(--pw-muted); font-size: 13px; }
.pw-messages { display: flex; max-height: min(64vh, 680px); min-height: 280px; flex-direction: column; gap: 13px; overflow-y: auto; padding: 23px; border-color: #e2ebe4; background-color: #f2f6f2; background-image: radial-gradient(rgba(23,79,61,.07) .7px, transparent .7px); background-size: 18px 18px; }
.pw-message { max-width: min(76%, 680px); padding: 13px 15px; overflow-wrap: anywhere; border: 1px solid #e1e9e2; border-radius: 15px 15px 15px 5px; color: #33483d; background: rgba(255,255,255,.96); box-shadow: 0 4px 10px rgba(20,40,33,.045); font-size: 13px; line-height: 1.65; }
.pw-message.outbound { align-self: flex-end; border-color: #cee7d6; border-radius: 15px 15px 5px 15px; background: #e4f4e9; }
.pw-message.inbound { align-self: flex-start; }
.pw-message small { display: block; margin-top: 9px; color: #849087; font-size: 10px; font-weight: 650; letter-spacing: .04em; }
.pw-message p { margin: 7px 0; }

.pw-broadcast-select { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 8px; color: var(--pw-muted); font-size: 12px; }
.pw-broadcast-select label, .pw-confirm { color: #40564a; font-weight: 680; }
.pw-broadcast-select input[type="checkbox"], .pw-broadcast-recipient { width: 17px; }
.pw-broadcast-filter-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 11px; margin: 17px 0 20px; padding: 15px; border: 1px solid var(--pw-line); border-radius: 13px; background: #f8fbf8; }
.pw-broadcast-filter-form label { display: grid; min-width: min(100%,220px); gap: 6px; color: var(--pw-ink); font-size: 12px; font-weight: 680; }
.pw-broadcast-filter-form select { min-height: 40px; max-width: 340px; }
.pw-broadcast-filter-form .button { min-height: 40px; display: inline-flex; align-items: center; }
.pw-table-scroll { max-height: 420px; margin: 8px 0 18px; overflow: auto; border: 1px solid var(--pw-line); border-radius: 12px; }
.pw-table-scroll .widefat { min-width: 560px !important; }
.pw-confirm { display: block; margin: 14px 0; padding: 15px 17px; border: 1px solid #efdfb9; border-left: 4px solid var(--pw-accent); border-radius: 11px; background: #fffaf0; }
.pw-confirm input[type="checkbox"] { vertical-align: -4px; }
.pw-inline-delete { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.pw-inline-delete .button-link-delete { padding: 0; color: var(--pw-danger); font-size: 12px; font-weight: 680; text-decoration: none; cursor: pointer; }
.pw-inline-delete .button-link-delete:hover { color: #843636; text-decoration: underline; }
.pw-consent-yes { display: inline-flex; align-items: center; gap: 6px; color: #24734d; font-size: 12px; font-weight: 700; }
.pw-consent-yes::before { width: 7px; height: 7px; border-radius: 50%; background: #43a36d; content: ""; }
.pw-consent-no { color: #89928c; font-size: 12px; }
.pw-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pw-public-form {
  display: grid;
  width: min(100%, 680px);
  gap: 17px;
  margin: 24px auto;
  padding: clamp(23px, 5vw, 38px);
  border: 1px solid #e1e9e2;
  border-radius: 23px;
  background: radial-gradient(circle at 100% 0%, rgba(199,154,74,.09), transparent 27%), linear-gradient(145deg, #fff 0%, #fbfdfb 100%);
  box-shadow: 0 20px 55px rgba(20,40,33,.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pw-public-form h3 { margin: 0 0 3px; color: var(--pw-ink); font-size: clamp(22px, 4vw, 29px); font-weight: 750; letter-spacing: -.04em; line-height: 1.2; }
.pw-public-form label { display: block; color: #344b40; }
.pw-public-form .pw-consent { padding: 13px 14px; border: 1px solid #e5ece6; border-radius: 11px; color: #52645a; background: #f6f9f6; font-size: 12px; font-weight: 520; }
.pw-public-form .pw-consent input { display: inline-block; width: 17px; height: 17px; margin: 0 8px 0 0; vertical-align: -4px; }
.pw-public-form button { width: 100%; min-height: 48px; margin-top: 3px; border-radius: 12px; font-size: 14px; }
.pw-form-success { width: min(100%, 680px); margin: 20px auto 0; padding: 15px 18px; border: 1px solid #cde7d4; border-left: 4px solid #328554; border-radius: 12px; color: #24593a; background: #edf8ef; font-size: 14px; line-height: 1.6; }

@media (max-width: 1100px) {
  .pw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
  .pw-wrap { padding: 14px 12px 30px; }
  .pw-brandbar { min-height: 76px; padding: 15px 17px; border-radius: 15px; }
  .pw-brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  .pw-brand-meta { font-size: 10px; }
  .pw-nav { margin: 11px 0 23px; }
  .pw-nav a { padding: 10px 12px; font-size: 12px; }
  .pw-panel { padding: 18px; border-radius: 15px; }
  .pw-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .pw-grid .pw-wide { grid-column: auto; }
  .pw-toolbar { align-items: stretch; }
  .pw-toolbar form { flex-basis: 100%; flex-wrap: wrap; }
  .pw-toolbar input { min-width: 0; flex: 1 1 100%; }
  .pw-toolbar select { max-width: none; flex: 1 1 auto; }
  .pw-toolbar .button { flex: 0 0 auto; }
  .pw-messages { padding: 16px; }
  .pw-message { max-width: 90%; }
}
@media (max-width: 520px) {
  .pw-wrap { padding-right: 8px; padding-left: 8px; }
  .pw-brandbar { align-items: flex-start; flex-direction: column; gap: 11px; }
  .pw-brand-meta { margin-left: 55px; }
  .pw-wrap > h1 { font-size: 28px; }
  .pw-cards { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .pw-card { min-height: 118px; padding: 19px; }
  .pw-panel { margin: 13px 0; padding: 15px; }
  .pw-chat-head { align-items: flex-start; flex-direction: column; }
  .pw-broadcast-select { align-items: flex-start; flex-direction: column; }
  .pw-toolbar .button { flex: 1 1 auto; }
  .pw-toolbar form { gap: 7px; }
  .pw-table-scroll { max-height: 360px; }
  .pw-public-form { gap: 14px; margin: 16px auto; border-radius: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-wrap *, .pw-public-form * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Import & media attachments */
.pw-import-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 4px solid var(--pw-accent); background: linear-gradient(125deg,#fff 0%,#fbfdfb 100%); }
.pw-import-panel > div { width: 100%; }
.pw-import-panel h2 { margin-bottom: 5px; }
.pw-import-form { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0 10px; flex-wrap: wrap; }
.pw-file-picker { display: grid; min-width: min(100%,360px); gap: 7px; }
.pw-wrap input[type="file"] { width: 100%; max-width: 100%; min-height: 42px; padding: 7px 9px; border: 1px dashed #b9cbbf; border-radius: 10px; color: #40564a; background: #f8fbf8; font-size: 12px; }
.pw-import-form button { flex: 0 0 auto; }
.pw-file-preview { margin: 9px 0 12px; }
.pw-file-summary { display: inline-flex; max-width: 100%; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--pw-line); border-radius: 12px; color: #40564a; background: #f7faf7; font-size: 12px; overflow-wrap: anywhere; }
.pw-file-details { font-weight: 620; }
.pw-file-preview-image { display: block; width: 72px; height: 58px; object-fit: cover; border-radius: 8px; }
.pw-file-badge { display: inline-grid; min-width: 38px; height: 38px; place-items: center; padding: 0 6px; border: 1px solid #e6d6ae; border-radius: 9px; color: #765b20; background: #fff9e9; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.pw-file-error { display: inline-block; padding: 8px 10px; border: 1px solid #e9c7c7; border-radius: 9px; color: #963f3f; background: #fff6f6; font-size: 12px; font-weight: 650; }
.pw-message-image-link { display: inline-flex; max-width: 100%; flex-direction: column; gap: 5px; margin-top: 7px; color: var(--pw-forest) !important; font-size: 11px; text-decoration: none; }
.pw-message-image { display: block; max-width: min(100%,360px); max-height: 300px; border: 1px solid rgba(20,40,33,.08); border-radius: 11px; object-fit: cover; }
.pw-message-file { display: flex; align-items: center; gap: 9px; max-width: 100%; margin: 8px 0 0 !important; padding: 8px 10px; border: 1px solid rgba(20,40,33,.08); border-radius: 10px; background: rgba(255,255,255,.62); overflow-wrap: anywhere; }
.pw-message-file a { color: var(--pw-forest) !important; }
.pw-wrap .button-link-delete { color: var(--pw-danger); background: transparent; }

@media (max-width: 782px) {
  .pw-broadcast-filter-form { align-items: stretch; flex-direction: column; }
  .pw-broadcast-filter-form label { min-width: 0; }
  .pw-broadcast-filter-form select { max-width: none; width: 100%; }
  .pw-broadcast-filter-form .button { align-self: flex-start; }
  .pw-import-form { align-items: stretch; flex-direction: column; }
  .pw-file-picker { min-width: 0; }
  .pw-import-form button { align-self: flex-start; }
}

/* Status-based auto-responder */
.pw-auto-info { border-left: 4px solid var(--pw-accent); background: linear-gradient(125deg,#fff 0%,#f8fbf8 100%); }
.pw-auto-rule { padding: 22px 0; border-bottom: 1px solid var(--pw-line); }
.pw-auto-rule:first-child { padding-top: 4px; }
.pw-auto-rule:last-of-type { border-bottom: 0; }
.pw-auto-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pw-auto-rule-head h3 { display: inline-block; margin: 0 10px 0 0; color: var(--pw-ink); font-size: 16px; }
.pw-auto-rule-head code { padding: 4px 7px; border-radius: 6px; color: #536d60; background: #eef4ef; font-size: 11px; }
.pw-auto-rule .pw-grid { align-items: start; }
.pw-auto-rule .pw-grid label { margin: 0; }
.pw-auto-rule input[type="number"] { max-width: 210px; }
.pw-auto-rule textarea { min-height: 92px; }
.pw-auto-error { color: #a54242; font-weight: 650; }
.pw-auto-rule-head .pw-checkbox-label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--pw-line); border-radius: 10px; background: #f9fbf9; white-space: nowrap; }

@media (max-width: 782px) {
  .pw-auto-rule { padding: 18px 0; }
  .pw-auto-rule-head { align-items: flex-start; flex-direction: column; gap: 11px; }
  .pw-auto-rule .pw-grid { grid-template-columns: minmax(0,1fr); }
}

/* Bulk lead status changes */
.pw-bulk-status-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; padding: 14px; border: 1px solid var(--pw-line); border-radius: 13px; background: #f8fbf8; }
.pw-bulk-status-form > label:first-child { display: grid; min-width: min(100%,230px); gap: 6px; color: var(--pw-ink); font-size: 12px; font-weight: 650; }
.pw-bulk-status-form select { min-height: 40px; }
.pw-bulk-count { align-self: center; padding: 7px 10px; border-radius: 999px; color: #456454; background: #eaf2ec; font-size: 12px; font-weight: 700; }
.pw-bulk-consent { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: #5b655e; font-size: 12px; }
.pw-bulk-status-form + .description { margin: 0 0 16px; }
.pw-lead-bulk-checkbox, #pw-leads-select-all { width: 17px; height: 17px; vertical-align: middle; accent-color: var(--pw-forest); }
@media (max-width: 782px) {
  .pw-bulk-status-form { align-items: stretch; flex-direction: column; }
  .pw-bulk-status-form > label:first-child { min-width: 0; }
  .pw-bulk-status-form .button { align-self: flex-start; }
  .pw-bulk-count { align-self: flex-start; }
}


/* Google Contacts integration */
.pw-google-panel { border-left: 4px solid var(--pw-forest); }
.pw-google-panel > p { max-width: 920px; }
.pw-google-panel .pw-grid { margin: 17px 0; }
.pw-google-toggle { display: block; margin: 18px 0 6px; padding: 13px 15px; border: 1px solid #e2ebe4; border-radius: 11px; background: #f7faf7; }
.pw-google-connected { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 14px !important; padding: 8px 11px; border: 1px solid #cfe6d5; border-radius: 999px; color: #256342 !important; background: #eff8f0; font-size: 12px; }
.pw-google-connected strong { color: #1f633f; }
.pw-google-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 4px 0 14px; }
.pw-google-inline { display: inline-flex; margin: 5px 0 0; vertical-align: middle; }
.pw-google-queue-form { margin: 14px 0 7px; }
.pw-google-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #e4eae5; border-radius: 999px; color: #68776e; background: #f7f9f7; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pw-google-status::before { width: 6px; height: 6px; border-radius: 50%; background: #9ba69e; content: ""; }
.pw-google-status-synced { border-color: #cfe6d5; color: #256342; background: #eff8f0; }
.pw-google-status-synced::before { background: #3e9a61; }
.pw-google-status-pending, .pw-google-status-processing { border-color: #efdfb9; color: #815f18; background: #fffaf0; }
.pw-google-status-pending::before, .pw-google-status-processing::before { background: #c79a4a; }
.pw-google-status-failed { border-color: #f0d1d1; color: #9b3b3b; background: #fff5f5; }
.pw-google-status-failed::before { background: #c45656; }
.pw-google-status-none { color: #7c8980; }
.pw-google-status-none::before { background: #b2bbb4; }
.pw-table-scroll .pw-google-inline { display: block; margin: 5px 0 0; }
.pw-table-scroll .pw-google-inline .button-link { padding: 0; color: var(--pw-forest); font-size: 11px; font-weight: 700; text-decoration: none; }
.pw-table-scroll .pw-google-inline .button-link:hover { color: var(--pw-forest-deep); text-decoration: underline; }
@media (max-width: 782px) {
  .pw-google-actions { align-items: stretch; flex-direction: column; }
  .pw-google-actions > .button, .pw-google-actions > form { width: 100%; }
  .pw-google-actions > form .button { width: 100%; }
}

.pw-google-scope-note { margin: 13px 0 18px !important; padding: 12px 14px; border: 1px solid #efdfb9; border-left: 3px solid var(--pw-accent); border-radius: 10px; color: #6a5730 !important; background: #fffaf0; }

/* Per-lead scheduled messages and property filtering */
.pw-scheduled-panel { border-left: 4px solid var(--pw-forest); }
.pw-scheduled-panel > .description { margin: -6px 0 15px; }
.pw-schedule-message-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--pw-line); }
.pw-schedule-message-form .pw-block { display: block; max-width: 780px; margin: 0 0 14px; }
.pw-schedule-message-form select, .pw-schedule-message-form textarea, .pw-schedule-message-form input[type="datetime-local"] { display: block; width: 100%; margin-top: 7px; }
.pw-schedule-message-form input[type="datetime-local"] { max-width: 340px; }
.pw-scheduled-state { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid #e4eae5; border-radius: 999px; color: #68776e; background: #f7f9f7; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pw-scheduled-state-pending, .pw-scheduled-state-processing { border-color: #efdfb9; color: #815f18; background: #fffaf0; }
.pw-scheduled-state-sent { border-color: #cfe6d5; color: #256342; background: #eff8f0; }
.pw-scheduled-state-failed, .pw-scheduled-state-skipped { border-color: #f0d1d1; color: #9b3b3b; background: #fff5f5; }
.pw-scheduled-state-cancelled { color: #7c8980; background: #f4f6f4; }
.pw-schedule-consent-note { margin-top: 16px; padding: 13px 15px; border: 1px solid #efdfb9; border-left: 3px solid var(--pw-accent); border-radius: 10px; color: #6a5730; background: #fffaf0; font-size: 12px; line-height: 1.65; }
.pw-toolbar form select[name="property_filter"] { max-width: 240px; }
@media (max-width: 782px) {
  .pw-toolbar form select[name="property_filter"] { max-width: none; width: 100%; }
  .pw-schedule-message-form input[type="datetime-local"] { max-width: 100%; }
}
