.contacts-page { min-height: 100vh; margin: 0; color: rgb(253, 239, 213); background: #000; }
.contacts-app { width: 100%; padding: 0 18px 48px; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.directory-columns { display: grid; grid-template-columns: minmax(0, 1fr); width: min(1480px, 100%); margin: 0 auto; gap: 18px; }
.directory-divider { width: 100%; height: 0; margin: 2px 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--pajaro-border, aqua) 58%, transparent); }
.directory-column-title { margin: 0 0 14px; color: #fff; font-size: 1rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.contacts-shell { width: min(1480px, 100%); margin: 0 auto; padding: 18px; border: 1px solid rgba(0, 255, 255, .68); border-radius: 18px; background: linear-gradient(145deg, rgba(16,20,21,.99), rgba(3,5,6,.99)); box-shadow: 0 18px 54px rgba(0,0,0,.62), 0 0 18px rgba(255,255,255,.1); }
.contacts-eyebrow { margin: 0 0 3px; color: rgba(253,239,213,.55); font-size: .7rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.contacts-dialog h2 { margin: 0; color: #fff; font-size: clamp(1.65rem, 4vw, 2.4rem); }
.contacts-shell button, .contacts-dialog button { min-height: 42px; margin: 0; padding: 0 14px; border: 1px solid #fff; border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); font: 700 .78rem/1 system-ui, sans-serif; cursor: pointer; }
.contacts-shell button:hover, .contacts-dialog button:hover, .contacts-shell button:focus-visible, .contacts-dialog button:focus-visible { color: #fff; background: rgba(255,255,255,.2); }
.contacts-tools { position: relative; display: grid; grid-template-columns: 44px minmax(180px, 1fr) auto; gap: 10px; align-items: center; }
.contacts-tools #contacts-add { min-height: 44px; white-space: nowrap; }
.contacts-tools > .pajaro-stats-menu { position: static; width: 44px; margin: 0 !important; }
.contacts-tools > .pajaro-stats-menu > summary { width: 44px; min-height: 44px; padding: 6px; justify-content: center; border-radius: 0; background: transparent; }
.contacts-tools > .pajaro-stats-menu > summary svg { display: block; width: 26px; height: 28px; }
.contacts-tools > .pajaro-stats-menu > summary span,
.contacts-tools > .pajaro-stats-menu > summary::after { display: none; }
.contacts-tools > .pajaro-stats-menu #stats_container.pajaro-stats-card { top: calc(100% + 4px); right: auto; left: 0; width: min(560px, 100%) !important; }
.contacts-tools input, .contacts-tools select, .contacts-dialog input, .contacts-dialog select, .contacts-dialog textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid rgba(0,255,255,.4); border-radius: 9px; color: rgb(253,239,213); background: #050708; font: inherit; }
.contacts-categories { display: grid; gap: 10px; margin-top: 14px; }
.contacts-category { border: 1px solid rgba(0,255,255,.3); border-radius: 12px; background: rgba(0,0,0,.3); overflow: hidden; }
.contacts-category[open] { border-color: rgba(0,255,255,.62); box-shadow: inset 0 1px rgba(255,255,255,.04); }
.contacts-category > summary { display: flex; min-height: 54px; padding: 0 15px; align-items: center; justify-content: space-between; gap: 12px; color: #fff; font-size: .95rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; cursor: pointer; list-style: none; }
.contacts-category > summary::-webkit-details-marker { display: none; }
.contacts-category > summary > span:first-child { margin-right: auto; }
.contacts-category > summary::after { content: "⌄"; margin-left: 0; color: aqua; font-size: 1.15rem; transform: rotate(0deg); transition: transform .16s ease; }
.contacts-category[open] > summary::after { transform: rotate(180deg); }
.contacts-category-add { display: inline-grid !important; width: 36px; min-width: 36px !important; height: 36px; min-height: 36px !important; margin: 0 !important; padding: 0 !important; place-items: center; border: 1px solid rgba(0,255,255,.45) !important; border-radius: 50% !important; color: aqua !important; background: rgba(0,255,255,.06) !important; font-size: 1.3rem !important; line-height: 1 !important; }
.contacts-category:not([open]) .contacts-category-add { display: none !important; }
.contacts-category-add:hover, .contacts-category-add:focus-visible { background: rgba(0,255,255,.18) !important; }
.contacts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; }
.contacts-category > .contacts-list { padding: 0 12px 12px; }
.contacts-category-empty { grid-column: 1 / -1; margin: 0; padding: 16px; border: 1px dashed rgba(253,239,213,.16); border-radius: 9px; color: rgba(253,239,213,.45); font-size: .78rem; text-align: center; }
.contact-card { display: grid; gap: 11px; min-width: 0; padding: 14px; border: 1px solid rgba(253,239,213,.15); border-radius: 13px; background: rgba(0,0,0,.34); }
.contact-card.is-inactive { opacity: .58; }
.contact-card header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.contact-card header > div:first-child { min-width: 0; }
.contact-card h3 { margin: 0; color: #fff; font-size: 1.03rem; overflow-wrap: anywhere; }
.contact-company { margin: 3px 0 0; color: rgba(253,239,213,.62); font-size: .76rem; overflow-wrap: anywhere; }
.contact-trade { margin: 0; color: rgba(253,239,213,.58); font-size: .76rem; line-height: 1.45; overflow-wrap: anywhere; }
.contact-card-tools { display: flex; flex: 0 0 auto; gap: 5px; align-items: center; }
.contact-card .contact-card-tool { display: inline-flex; min-height: 30px; padding: 0 8px; gap: 4px; align-items: center; border-color: rgba(0,255,255,.3); border-radius: 999px; color: rgba(253,239,213,.58); background: rgba(0,255,255,.035); font-size: .65rem; }
.contact-card .contact-card-tool.has-value { color: aqua; border-color: rgba(0,255,255,.55); background: rgba(0,255,255,.09); }
.contact-card-rating span { font-size: .95rem; line-height: 1; }
.contact-card-rating small { font-size: .62rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.contact-actions a, .contact-actions button { display: inline-flex; min-height: 36px; padding: 0 10px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.62); border-radius: 8px; color: #fff; background: rgba(255,255,255,.06); font-size: .72rem; font-weight: 700; text-decoration: none; }
.contact-actions button { margin-left: auto; }
.contacts-category[data-category="contractor"] .contacts-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); }
.contacts-empty { padding: 48px 16px; border: 1px dashed rgba(253,239,213,.2); border-radius: 12px; color: rgba(253,239,213,.48); text-align: center; }
.contacts-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid rgba(0,255,255,.68); border-radius: 16px; color: rgb(253,239,213); background: #080b0c; box-shadow: 0 22px 70px rgba(0,0,0,.84); overflow: auto; }
.contacts-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.contacts-dialog form { padding: 17px; }
.contacts-dialog header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.contacts-dialog h2 { font-size: 1.55rem; }
.contacts-dialog .contacts-icon-button { width: 42px; padding: 0; font-size: 1.4rem; }
.contacts-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin-top: 16px; }
.contacts-form-grid label { display: grid; gap: 5px; min-width: 0; }
.contacts-form-grid label > span { color: rgba(253,239,213,.55); font-size: .67rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.contacts-form-wide { grid-column: 1 / -1; }
.contacts-dialog textarea { resize: vertical; }
.contacts-dialog footer { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; margin-top: 16px; }
.contacts-dialog .contacts-danger { border-color: #ff6868; background: rgba(255,80,80,.12); }
.contacts-dialog .contacts-secondary { border-color: rgba(253,239,213,.28); background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .contacts-app { padding: 0 0 36px; } .contacts-shell { padding: 14px; } }
@media (min-width: 561px) and (max-width: 900px) {
   .directory-columns { gap: 10px; }
   .directory-columns .contacts-shell { padding: 12px; }
   .directory-column-title { margin-bottom: 11px; font-size: .85rem; }
   .directory-columns .contacts-tools { grid-template-columns: 44px minmax(0,1fr) auto; }
   .contacts-category[data-category="contractor"] .contacts-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
   .contacts-category[data-category="contractor"] .contact-card { gap: 12px; min-height: 164px; padding: 13px; }
   .contacts-category[data-category="contractor"] .contact-card header { flex-wrap: wrap; }
   .contacts-category[data-category="contractor"] .contact-card-tools { width: 100%; }
   .contacts-category[data-category="contractor"] .contact-card .contact-card-tool { min-height: 36px; padding-inline: 10px; }
   .contacts-category[data-category="contractor"] .contact-actions a,
   .contacts-category[data-category="contractor"] .contact-actions button { flex: 1 1 72px; min-height: 40px; padding-inline: 9px; }
   .contacts-category[data-category="contractor"] .contact-actions button { margin-left: 0; }
}
@media (min-width: 901px) {
   .directory-columns { gap: 16px; }
   .contacts-category[data-category="contractor"] .contact-card { gap: 13px; min-height: 170px; padding: 16px; }
   .contacts-category[data-category="contractor"] .contact-card .contact-card-tool { min-height: 36px; padding-inline: 10px; }
   .contacts-category[data-category="contractor"] .contact-actions { gap: 8px; }
   .contacts-category[data-category="contractor"] .contact-actions a,
   .contacts-category[data-category="contractor"] .contact-actions button { min-width: 58px; min-height: 40px; padding-inline: 12px; }
}
@media (max-width: 560px) {
   .directory-column-title { display: none; }
   .vendors-directory-panel { display: block; }
   .vendors-directory-panel .directory-column-title { display: block; margin-bottom: 11px; }
   .contacts-shell { padding: 12px 8px; border-radius: 14px; }
   .contacts-tools { grid-template-columns: 44px minmax(0,1fr) auto; gap: 7px; }
   .contacts-tools #contacts-add { padding-inline: 9px; }
   .contacts-list { grid-template-columns: minmax(0,1fr); }
   .contacts-category > summary { min-height: 50px; padding-inline: 12px; }
   .contacts-category-add { width: 34px; min-width: 34px !important; height: 34px; min-height: 34px !important; }
   .contacts-category > .contacts-list { padding: 0 8px 8px; }
   .contacts-form-grid { grid-template-columns: minmax(0,1fr); }
   .contacts-form-wide { grid-column: auto; }
   .contacts-dialog footer { grid-template-columns: repeat(2, minmax(0,1fr)); }
   .contacts-dialog footer span { display: none; }
   .contacts-dialog footer button[type="submit"] { grid-column: 1 / -1; grid-row: 1; }
}
@media (min-width: 561px) {
   .directory-columns { grid-template-columns: minmax(0, 1fr); align-items: start; }
   .directory-columns .contacts-shell { width: 100%; margin: 0; box-shadow: none; }
}
