/* phase 535: Tenant Management redesign (teal header band, icon tiles, step guide, sectioned forms, tenant cards)
   and a friendlier empty box on every page. Uses the brand tokens in tokens.css, so light and dark both work. */
.tmx{display:grid;gap:16px;min-width:0}
.tmx *{box-sizing:border-box}
.tmx>*{min-width:0}

/* header band */
.tmx-band{background:#08403c;border-radius:18px;padding:18px 20px;color:#d7f3ea;display:grid;gap:16px}
.tmx-band a{color:#9fe1cb}
.tmx-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:13px;color:#9fe1cb}
.tmx-top a{text-decoration:none}
.tmx-top .i,.tmx-top svg{width:15px;height:15px;vertical-align:-2px}
.tmx-id{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.tmx-logo{width:56px;height:56px;border-radius:15px;background:#0f766e;display:flex;align-items:center;justify-content:center;flex:none;color:#9fe1cb;font-weight:700;font-size:18px;letter-spacing:.02em}
.tmx-logo svg,.tmx-logo .i{width:28px;height:28px}
.tmx-id>div{flex:1;min-width:200px}
.tmx-id h1{margin:0;color:#fff;font-size:1.35rem;line-height:1.3;font-weight:700;text-wrap:balance}
.tmx-sub{display:flex;gap:10px;margin-top:6px;flex-wrap:wrap;align-items:center;font-size:13px;color:#9fe1cb}
.tmx-sub a{text-decoration:underline}
.tmx-pill{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;white-space:nowrap}
.tmx-pill svg,.tmx-pill .i{width:13px;height:13px}
.tmx-pill.ok{background:#dcf5e6;color:#14532d}.tmx-pill.warn{background:#fef3c7;color:#713f12}.tmx-pill.bad{background:#fde2e2;color:#7f1d1d}.tmx-pill.info{background:#e0ecfb;color:#0c447c}.tmx-pill.mute{background:#e8ecec;color:#3f4b49}
.tmx-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.tmx-tile{background:rgba(215,243,234,.09);border-radius:13px;padding:11px 12px;display:flex;gap:10px;align-items:center;min-width:0}
.tmx-tile>svg,.tmx-tile>.i{width:21px;height:21px;color:#9fe1cb;flex:none}
.tmx-tile small{display:block;font-size:12px;color:#9fe1cb}
.tmx-tile b{display:block;font-size:1.15rem;color:#fff;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.tmx-tile em{display:block;font-style:normal;font-size:11.5px;color:#9fe1cb;opacity:.9}
.tmx-tile.bad>svg,.tmx-tile.bad>.i{color:#fca5a5}.tmx-tile.bad b{color:#fecaca}
.tmx-tile.warn>svg,.tmx-tile.warn>.i{color:#fcd34d}
.tmx-acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.tmx-acts form{margin:0}
.tmx-b{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:8px 15px;font-size:13.5px;font-weight:600;border:1px solid rgba(215,243,234,.35);background:transparent;color:#e6f7f1!important;text-decoration:none;cursor:pointer;line-height:1.2}
.tmx-b svg,.tmx-b .i{width:16px;height:16px}
.tmx-b:hover{background:rgba(215,243,234,.1)}
.tmx-b.pri{background:#5dcaa5;border-color:#5dcaa5;color:#04342c!important}
.tmx-b.pri:hover{background:#7fd8b8}

/* cards on the page */
.tmx-card{background:var(--ls-surface);border:1px solid var(--ls-border);border-radius:18px;padding:18px}
.tmx-card>h2,.tmx-card>h3{margin:0 0 12px;font-size:1.05rem}

/* empty state with drawing and steps */
.tmx-empty{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;align-items:center}
.tmx-empty svg.tmx-art{width:100%;max-width:240px;height:auto}
.tmx-empty h3{margin:6px 0 4px;font-size:1.1rem}
.tmx-empty p{margin:0;color:var(--ls-text-muted)}
.tmx-steps{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.tmx-steps li{display:flex;gap:10px;align-items:center;font-size:14.5px}
.tmx-steps li span{width:30px;height:30px;border-radius:50%;background:var(--ls-brand-tint);color:var(--ls-brand-hover);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex:none}

/* sectioned form */
.tmx-form{display:grid;gap:18px}
.tmx-fh{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.tmx-fh b{font-size:1.05rem}.tmx-fh small{color:var(--ls-text-muted)}
.tmx-sec{display:grid;gap:12px}
.tmx-sec+.tmx-sec{border-top:1px dashed var(--ls-border-strong);padding-top:16px}
.tmx-h{display:flex;align-items:center;gap:6px;margin:0;font-size:13.5px;font-weight:700;color:var(--ls-brand)}
.tmx-h svg,.tmx-h .i{width:17px;height:17px}
.tmx-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.tmx-grid>*{min-width:0}
.tmx-f label,.tmx-lb{display:block;font-size:12.5px;font-weight:600;color:var(--ls-text-muted);margin-bottom:5px}
.tmx-f small{display:block;font-size:12px;color:var(--ls-text-muted);margin-top:4px}
.tmx-ip{position:relative}
.tmx-ip>svg,.tmx-ip>.i{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--ls-text-muted);pointer-events:none}
.tmx-ip input,.tmx-ip select{width:100%;padding-left:36px!important}
.tmx-seg{display:flex;flex-wrap:wrap;background:var(--ls-surface-sunken);border-radius:999px;padding:3px;gap:2px}
.tmx-seg label{flex:1;margin:0;min-width:70px;position:relative}
.tmx-seg input{position:absolute;opacity:0;pointer-events:none}
.tmx-seg span{display:block;text-align:center;font-size:12.5px;font-weight:600;padding:7px 6px;border-radius:999px;color:var(--ls-text-muted);cursor:pointer;border:1px solid transparent}
.tmx-seg input:checked+span{background:var(--ls-surface);color:var(--ls-text);border-color:var(--ls-border)}
.tmx-seg input:focus-visible+span{outline:2px solid var(--ls-focus,#0f766e);outline-offset:1px}
.tmx-sw{display:flex;gap:10px;align-items:center;font-size:13.5px;cursor:pointer;margin:2px 0 0}
.tmx-sw input{position:absolute;opacity:0}
.tmx-sw i{width:36px;height:21px;border-radius:999px;background:var(--ls-border-strong);position:relative;flex:none;transition:background .15s}
.tmx-sw i::after{content:"";position:absolute;left:3px;top:3px;width:15px;height:15px;border-radius:50%;background:#fff;transition:left .15s}
.tmx-sw input:checked+i{background:#1d9e75}
.tmx-sw input:checked+i::after{left:18px}
.tmx-sw input:focus-visible+i{outline:2px solid var(--ls-focus,#0f766e);outline-offset:2px}
.tmx-sw svg,.tmx-sw .i{width:16px;height:16px;color:#1d9e75}
.tmx-wa:has(.tmx-sw input:checked) .tmx-wa-in{display:none}
.tmx-note{font-size:12.5px;color:var(--ls-brand-hover);background:var(--ls-brand-tint);border-radius:11px;padding:9px 11px;display:flex;gap:7px;align-items:flex-start}
.tmx-note svg,.tmx-note .i{width:16px;height:16px;flex:none;margin-top:1px}
.tmx-more{border:1px solid var(--ls-border);border-radius:13px;padding:0}
.tmx-more>summary{list-style:none;cursor:pointer;padding:11px 13px;font-size:13.5px;color:var(--ls-text-muted);display:flex;justify-content:space-between;align-items:center;gap:8px}
.tmx-more>summary::-webkit-details-marker{display:none}
.tmx-more>summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-right:4px;transition:transform .15s}
.tmx-more[open]>summary::after{transform:rotate(-135deg)}
.tmx-more>div{padding:4px 13px 14px;display:grid;gap:12px}
.tmx-save{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.tmx-save .btn{border-radius:999px}

/* tenant cards */
.tmx-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.tmx-tc{border:1px solid var(--ls-border);border-radius:15px;padding:13px;display:grid;gap:9px;background:var(--ls-surface);min-width:0}
.tmx-tc-h{display:flex;gap:10px;align-items:center;min-width:0}
.tmx-av{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13.5px;font-weight:700;flex:none;background:var(--ls-brand-tint);color:var(--ls-brand-hover)}
.tmx-av.bad{background:#fde2e2;color:#7f1d1d}.tmx-av.warn{background:#fef3c7;color:#713f12}
.tmx-tc-h>div{flex:1;min-width:0}
.tmx-tc-h b{display:block;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tmx-tc-h b a{color:inherit;text-decoration:none}
.tmx-tc-h small{display:block;font-size:12.5px;color:var(--ls-text-muted)}
.tmx-row{display:flex;justify-content:space-between;gap:8px;font-size:12.5px;color:var(--ls-text-muted);flex-wrap:wrap}
.tmx-row .bad{color:var(--ls-danger,#dc2626);font-weight:600}.tmx-row .warn{color:var(--ls-accent-ink,#92400e);font-weight:600}
.tmx-bar{height:6px;border-radius:999px;background:var(--ls-surface-sunken);overflow:hidden}
.tmx-bar i{display:block;height:6px;border-radius:999px;background:#1d9e75}
.tmx-bar i.warn{background:#f59e0b}.tmx-bar i.bad{background:#e24b4a}
.tmx-tc-a{display:flex;gap:6px;flex-wrap:wrap}
.tmx-tc-a>a,.tmx-tc-a>form{flex:1;min-width:0;margin:0}
.tmx-tc-a .btn{width:100%;justify-content:center;border-radius:999px;font-size:12.5px}
.tmx-ext{display:flex;gap:6px}
.tmx-ext select{flex:1;min-width:0;font-size:12.5px;border-radius:999px}
.tmx-ext .btn{width:auto}

/* All houses: house cards and panels */
.tmx .panel{border-radius:18px}
.tmx .tm-house{border-radius:16px}
.tmx .tm-house.add{border-style:dashed}

/* landlord dashboard tenants section (ld-tenants): same band look for its header and counts */
.ldx.tmx-ld .ldx-head{background:#08403c;border-radius:18px 18px 0 0;padding:18px 20px 8px;margin:0;color:#d7f3ea}
.ldx.tmx-ld .ldx-head h1{color:#fff}
.ldx.tmx-ld .ldx-head p{color:#9fe1cb}
.ldx.tmx-ld .ldx-head .ldx-btn{border-radius:999px}
.ldx.tmx-ld .ldx-head .ldx-btn.out{background:transparent;color:#e6f7f1;border-color:rgba(215,243,234,.35)}
.ldx.tmx-ld .ldx-head .ldx-btn:not(.out){background:#5dcaa5;border-color:#5dcaa5;color:#04342c}
.ldx.tmx-ld .ldx-stats{background:#08403c;border-radius:0 0 18px 18px;padding:8px 20px 18px;margin-top:-22px}
.ldx.tmx-ld .ldx-s{background:rgba(215,243,234,.09);border:0;box-shadow:none}
.ldx.tmx-ld .ldx-s small,.ldx.tmx-ld .ldx-s em{color:#9fe1cb}
.ldx.tmx-ld .ldx-s b{color:#fff}
.ldx.tmx-ld .ldx-si{background:#0f766e;color:#9fe1cb}
.ldx.tmx-ld .ldx-none>svg,.ldx.tmx-ld .ldx-none>.i{width:30px;height:30px;padding:14px;box-sizing:content-box;border-radius:50%;background:var(--ls-brand-tint);color:var(--ls-brand)}

/* every empty box on the site: a calm card with the icon in a soft brand circle */
.empty{border-style:solid;border-radius:18px}
.empty>.i,.empty>svg:first-child{width:30px!important;height:30px!important;padding:15px;box-sizing:content-box;border-radius:50%;background:var(--ls-brand-tint);color:var(--ls-brand)!important;margin-bottom:10px}
.empty h3{margin:4px 0 6px}
.empty p{max-width:460px;margin-left:auto;margin-right:auto}

@media (max-width:560px){
  .tmx-band{padding:16px 14px;border-radius:16px}
  .tmx-id h1{font-size:1.2rem}
  .tmx-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tmx-b{flex:1 1 auto;justify-content:center}
  .tmx-card{padding:15px 13px}
}
/* example text in the boxes stays light so it never looks filled in */
.tmx input::placeholder,.tmx textarea::placeholder{color:var(--ls-placeholder,#94a3b8);opacity:.75}
