/* PolarOne Xero Integration — definitive page styling */
.po-xero-page,
.po-xero-page *,
.po-xero-page *::before,
.po-xero-page *::after{box-sizing:border-box}

.po-xero-page{display:block;max-width:1500px;margin:0 auto;padding-bottom:64px;color:#10264a}
.po-xero-page>.po-crm-header{margin-bottom:28px}

.po-xero-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:0 0 30px}
.po-xero-kpis>article{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:150px;padding:26px 30px;background:#fff;border:1px solid #d7e2ef;border-radius:20px;box-shadow:0 12px 32px rgba(15,42,75,.06);overflow:hidden}
.po-xero-kpis>article>span{display:block;margin:0 0 12px;color:#5f7189;font-size:15px;font-weight:700;line-height:1.3}
.po-xero-kpis>article>strong{display:block;margin:0 0 8px;color:#0d2b57;font-size:34px;font-weight:800;line-height:1.08;overflow-wrap:anywhere}
.po-xero-kpis>article>small{display:block;margin:0;color:#8090a5;font-size:14px;line-height:1.45}

.po-xero-page .po-crm-card{min-width:0;margin:0 0 28px;padding:30px;background:#fff;border:1px solid #d7e2ef;border-radius:20px;box-shadow:0 12px 32px rgba(15,42,75,.05);overflow:hidden}
.po-xero-page .po-crm-card h2{margin:4px 0 10px;font-size:28px;line-height:1.2}
.po-xero-page .po-crm-card p{margin:0;color:#5e718b;line-height:1.6}
.po-xero-page .po-card-heading{margin:0 0 24px;padding:0 0 22px;border-bottom:1px solid #e2e9f2}
.po-xero-page .po-card-heading h2{margin:5px 0 8px}

.po-xero-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr);gap:28px;margin:0 0 28px}
.po-xero-grid>.po-crm-card{margin:0;height:100%}
.po-xero-connection{display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-areas:"logo content" "logo action";column-gap:28px!important;row-gap:18px!important;align-items:start!important}
.po-xero-connection>.po-xero-logo{grid-area:logo}
.po-xero-connection>div:nth-child(2){grid-area:content;min-width:0}
.po-xero-connection>form,
.po-xero-connection>.po-button,
.po-xero-connection>.po-xero-hint{grid-area:action;justify-self:start;max-width:100%}
.po-xero-logo{width:72px;height:72px;border-radius:20px;display:grid;place-items:center;background:#13b5ea;color:#fff;font-weight:900;font-size:30px}
.po-xero-hint{display:block;padding:14px 16px;border-radius:12px;background:#eef5fb;color:#5d7189;line-height:1.5}

.po-xero-list{list-style:none;margin:22px 0 0;padding:0;display:grid;gap:16px}
.po-xero-list li{display:grid;gap:7px;padding:18px;border-radius:14px;background:#f4f8fc}
.po-xero-list b{font-size:16px;color:#193a65}
.po-xero-list span{color:#687b92;line-height:1.5}

.po-xero-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px;align-items:start;margin:0}
.po-xero-form>label:not(.po-xero-check){display:grid!important;gap:9px!important;min-width:0;margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:#15365e!important;font-weight:700!important;line-height:1.3!important}
.po-xero-form input:not([type="checkbox"]),
.po-xero-form select{display:block;width:100%;max-width:100%;min-height:52px;margin:0;padding:13px 16px;border:1px solid #cfdaea;border-radius:13px;background:#fff;color:#10264a;box-shadow:none;font:inherit}
.po-xero-form input:focus,
.po-xero-form select:focus{outline:3px solid rgba(37,99,235,.14);border-color:#2563eb}
.po-xero-check{grid-column:1/-1;display:flex!important;align-items:center!important;gap:12px!important;min-height:28px;margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:#15365e!important;font-weight:700!important;line-height:1.4!important}
.po-xero-check input{flex:0 0 auto;width:20px!important;height:20px!important;min-height:0!important;margin:0!important;padding:0!important}
.po-xero-form>.po-button{grid-column:1/-1;justify-self:start;margin-top:2px}

.po-xero-page .po-button,
.po-xero-page button,
.po-xero-page input[type="submit"]{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:50px;padding:13px 22px;border-radius:12px;line-height:1.2;white-space:nowrap}

.po-xero-page .po-table-wrap{overflow-x:auto;border:1px solid #e1e9f2;border-radius:14px}
.po-xero-page table{width:100%;min-width:760px;border-collapse:separate;border-spacing:0}
.po-xero-page th,.po-xero-page td{padding:15px 16px;border-bottom:1px solid #e6edf5;text-align:left;vertical-align:middle}
.po-xero-page th{background:#f6f9fc;color:#4d617b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.po-xero-page tbody tr:last-child td{border-bottom:0}
.po-xero-page .po-empty-state{margin:0;padding:24px;background:#f8fbfe;border:0;border-radius:10px;color:#64758c}

.po-xero-credentials{padding:0!important;overflow:hidden!important}
.po-xero-credentials>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:72px;padding:22px 30px;cursor:pointer;font-size:18px;font-weight:800;list-style:none}
.po-xero-credentials>summary::-webkit-details-marker{display:none}
.po-xero-credentials>summary::after{content:'⌄';font-size:24px;line-height:1;transition:transform .2s ease}
.po-xero-credentials[open]>summary::after{transform:rotate(180deg)}
.po-xero-credentials[open]>summary{border-bottom:1px solid #e2e9f2}
.po-xero-form--credentials{margin:0!important;padding:28px 30px 30px!important;background:#fff!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.po-xero-form--credentials>.po-button{grid-column:1/-1}

.po-xero-status{display:inline-flex;padding:6px 10px;border-radius:999px;background:#e9f8ef;color:#18864b;font-weight:800;font-size:12px}

@media(max-width:1100px){
  .po-xero-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .po-xero-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .po-xero-page{padding-bottom:44px}
  .po-xero-page .po-crm-card{padding:22px}
  .po-xero-kpis{gap:16px}
  .po-xero-kpis>article{padding:22px;min-height:132px}
  .po-xero-form{grid-template-columns:1fr}
  .po-xero-form>.po-button,.po-xero-form--credentials>.po-button{grid-column:auto}
  .po-xero-connection{grid-template-columns:58px minmax(0,1fr)!important;column-gap:18px!important}
  .po-xero-logo{width:58px;height:58px;border-radius:16px;font-size:25px}
  .po-xero-credentials>summary{padding:20px 22px}
  .po-xero-form--credentials{padding:22px!important}
}
@media(max-width:560px){
  .po-xero-kpis{grid-template-columns:1fr}
  .po-xero-kpis>article>strong{font-size:30px}
  .po-xero-connection{grid-template-columns:1fr!important;grid-template-areas:"logo" "content" "action"}
  .po-xero-page .po-button,.po-xero-page button,.po-xero-page input[type="submit"]{max-width:100%}
}
