/* The tenants' pages and the privacy notice, on the tokens base.css defines
   (--ink-rgb, --shade-rgb, --muted, --faint, --serif, --sans, the accents), so
   light and dark both come from the shared theme (KILN-76). Taken from
   3kl-clays' clays.css, which followed Connect's portal.css. */

:root { --portal-danger-rgb: 248, 113, 113; }
:root[data-theme="light"] { --portal-danger-rgb: 190, 38, 38; }

/* "Signed in · Jane Smith", as Connect's and Clays' identity pill. */
.status-pill { display: inline-flex; align-items: center; gap: .42rem; margin-top: .9rem; padding: .38rem .72rem; border: 1px solid rgba(var(--ink-rgb), .18); border-radius: 999px; background: rgba(var(--ink-rgb), .075); color: var(--muted); font-family: var(--sans); font-size: .78rem; letter-spacing: .01em; max-width: 100%; overflow-wrap: anywhere; }
.status-dot { flex: 0 0 auto; width: .44rem; height: .44rem; border-radius: 999px; background: rgb(var(--bins-green-rgb)); box-shadow: 0 0 14px rgba(var(--bins-green-rgb), .75); animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(var(--bins-green-rgb), .75); } 50% { transform: scale(.82); box-shadow: 0 0 0 6px rgba(var(--bins-green-rgb), 0); } }
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none; } }
.portal-intro .status-pill { margin-left: auto; margin-right: auto; }

.portal-section { display: flex; flex-direction: column; gap: 14px; width: min(620px, 100%); margin: 0 auto; padding-bottom: 16px; }

.card {
  position: relative; padding: 1.25rem 1.3rem; border: 1px solid rgba(var(--ink-rgb), .18); border-radius: 1.1rem;
  background: radial-gradient(circle at top left, rgba(var(--ink-rgb), .12), transparent 16rem), rgba(var(--ink-rgb), .075);
  box-shadow: 0 1px 0 rgba(var(--ink-rgb), .06), 0 12px 30px rgba(var(--shade-rgb), .18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-accent { border-color: rgba(var(--accent-green-rgb), .45); }
.card-title { margin: 0 0 .6rem; font-family: var(--serif); font-size: clamp(1.15rem, 3vw, 1.35rem); font-weight: 400; line-height: 1.15; color: rgb(var(--ink-rgb)); }
.card-actions { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.lede { margin: 0 0 1rem; color: var(--muted); font-family: var(--sans); font-size: .95rem; line-height: 1.55; }
.lede-flush { margin: 0; }
.signin-as { color: rgb(var(--ink-rgb)); font-weight: 600; overflow-wrap: anywhere; }
.note { margin: 0; padding: .7rem .9rem; border-left: 2px solid rgba(var(--ink-rgb), .32); background: rgba(var(--ink-rgb), .04); border-radius: 0 .6rem .6rem 0; color: var(--muted); font-family: var(--sans); font-size: .85rem; line-height: 1.55; }
.card .note { margin-top: 1rem; }

/* Big enough to hit with a thumb: 48px tall on a phone. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid transparent; background: rgb(var(--ink-rgb)); color: var(--dark-text); font-family: var(--sans); font-size: .9rem; font-weight: 600; letter-spacing: .03em; cursor: pointer; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover, .btn:focus-visible { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(var(--shade-rgb), .25); }
.btn.ghost { background: rgba(var(--ink-rgb), .06); border-color: rgba(var(--ink-rgb), .22); color: rgb(var(--ink-rgb)); }
.btn.ghost:hover { background: rgba(var(--ink-rgb), .12); box-shadow: none; }
.btn.small { min-height: 36px; padding: .4rem .85rem; font-size: .8rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.d-inline { display: inline; }

.field { margin-bottom: .9rem; }
.field label { display: block; margin: 0 0 .35rem; color: var(--faint); font-family: var(--sans); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
/* 16px text, so iOS doesn't zoom the page when a field is tapped. */
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid rgba(var(--ink-rgb), .14); border-radius: .75rem; background: rgba(var(--ink-rgb), .06); color: rgb(var(--ink-rgb)); font-family: var(--sans); font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: rgba(var(--ink-rgb), .4); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(var(--ink-rgb), .4); box-shadow: 0 0 0 3px rgba(var(--ink-rgb), .08); }
.field select { padding-right: 2.4rem; background-repeat: no-repeat; background-position: right .9rem center; background-size: .7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.field select option { color: #111; }
/* iOS draws date and time inputs as its own pills; keep them the field's height. */
.field input[type="date"], .field input[type="time"] { min-height: 48px; line-height: 1.2; }
.field input[readonly] { color: var(--muted); font-size: .85rem; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.divider-or { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0 .9rem; color: var(--faint); font-family: var(--sans); font-size: .75rem; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: rgba(var(--ink-rgb), .18); }

.flash { width: min(620px, 100%); margin: 0 auto 1rem; padding: .75rem .9rem; border-radius: .75rem; border: 1px solid; font-family: var(--sans); font-size: .9rem; }
.flash.ok { background: rgba(var(--accent-green-rgb), .1); border-color: rgba(var(--accent-green-rgb), .3); color: rgba(var(--accent-green-rgb), .95); }
.flash.err { background: rgba(var(--portal-danger-rgb), .1); border-color: rgba(var(--portal-danger-rgb), .3); color: rgba(var(--portal-danger-rgb), .95); }
.pk-msg { display: none; margin: .75rem 0 0; font-family: var(--sans); font-size: .85rem; color: rgba(var(--portal-danger-rgb), .95); }
.pk-msg.pk-ok { color: rgba(var(--accent-green-rgb), .95); }

.acct-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; width: min(620px, 100%); margin: 0 auto .9rem; }
.acct-actions { display: flex; gap: .5rem; align-items: center; }

.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(var(--ink-rgb), .1); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row > span:first-child { min-width: 0; }
.row-title { display: block; font-family: var(--serif); font-size: 1.1rem; color: rgb(var(--ink-rgb)); }
.row-meta { display: block; margin-top: .15rem; color: var(--muted); font-family: var(--sans); font-size: .82rem; overflow-wrap: anywhere; }
.chip { flex: 0 0 auto; padding: .2rem .55rem; border-radius: .42rem; border: 1px solid rgba(var(--ink-rgb), .25); color: var(--muted); font-family: var(--sans); font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.steps li { color: rgba(var(--ink-rgb), .85); font-family: var(--sans); font-size: .95rem; line-height: 1.5; }
.steps strong { color: rgb(var(--ink-rgb)); }

.error-section { padding: 0 0 74px; text-align: center; }
.error-body { margin: 0 auto 2rem; max-width: 400px; font-family: var(--sans); font-size: .97rem; line-height: 1.6; color: rgba(var(--ink-rgb), .65); }
.copyright-link { color: inherit; text-decoration: none; }
.copyright-link:hover { text-decoration: underline; }

@media (max-width: 420px) {
  .field-pair { grid-template-columns: 1fr; gap: 0; }
}

/* ---- Dates and states ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.date-block { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.4rem; padding: .35rem 0; border: 1px solid rgba(var(--ink-rgb), .2); border-radius: .7rem; background: rgba(var(--ink-rgb), .05); font-family: var(--sans); line-height: 1.05; }
.date-dow, .date-mon { color: var(--muted); font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.date-day { color: rgb(var(--ink-rgb)); font-family: var(--serif); font-size: 1.45rem; }

.chip-booked { border-color: rgba(var(--accent-green-rgb), .35); color: rgba(var(--accent-green-rgb), .95); background: rgba(var(--accent-green-rgb), .1); }
.chip-interested { border-color: rgba(var(--accent-amber-rgb), .35); color: rgba(var(--accent-amber-rgb), .95); background: rgba(var(--accent-amber-rgb), .1); }
.chip-cancelled { border-color: rgba(var(--portal-danger-rgb), .3); color: rgba(var(--portal-danger-rgb), .9); }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.card-head .card-title a { color: inherit; text-decoration: none; }
.details { margin: 0; display: grid; gap: .55rem; }
.detail { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; font-family: var(--sans); font-size: .92rem; }
.detail dt { color: var(--faint); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding-top: .15rem; }
.detail dd { margin: 0; color: rgb(var(--ink-rgb)); overflow-wrap: anywhere; }
.detail dd a { color: inherit; }
.pre { white-space: pre-line; }
.action-grid, .link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.card .action-grid { margin-top: 1rem; }
.action-grid .btn:only-child { grid-column: 1 / -1; }
.link-grid form { display: contents; }
.delete-form { text-align: center; margin-top: .2rem; }
.btn.danger { color: rgba(var(--portal-danger-rgb), .95); border-color: rgba(var(--portal-danger-rgb), .35); }
.steps.numbered { list-style: decimal; margin-bottom: 1.1rem; }
.steps.numbered li::marker { color: var(--muted); font-weight: 600; }
.card .lede em, .lede em { font-style: italic; }

.centred { text-align: center; }

/* ---- 3kl-rentals' own ---- */

/* The owner's page: a heading per house, its cards under it. */
.portal-house { display: flex; flex-direction: column; gap: 14px; }
.portal-house + .portal-house { margin-top: 26px; }
.portal-house-title { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 400; color: rgb(var(--ink-rgb)); text-align: center; }
.portal-house > .note { text-align: center; border: 0; background: none; padding: 0; }

/* A form folded away under its own line, so a page of two houses stays short. */
.portal-more { margin-top: 1rem; }
.portal-more > summary { cursor: pointer; color: rgb(var(--ink-rgb)); font-family: var(--sans); font-size: .88rem; font-weight: 600; list-style: none; }
.portal-more > summary::-webkit-details-marker { display: none; }
.portal-more > summary::before { content: "+"; display: inline-block; width: 1.1rem; color: var(--muted); }
.portal-more[open] > summary::before { content: "−"; }
.portal-more[open] > summary { margin-bottom: .9rem; }

.portal-check { display: flex; align-items: center; gap: .55rem; margin: .2rem 0 .9rem; color: rgb(var(--ink-rgb)); font-family: var(--sans); font-size: .92rem; }
.portal-check input { width: 1.1rem; height: 1.1rem; accent-color: rgb(var(--ink-rgb)); }
.portal-feed { margin-top: 1rem; }

/* Visits, as Clays lists shoots: a date block, then what and when. */
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-list li + li { border-top: 1px solid rgba(var(--ink-rgb), .1); }
.visit-row { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; }
.visit-list li:first-child { padding-top: 0; }
.visit-list li:last-child { padding-bottom: 0; }
.visit-info { flex: 1 1 auto; min-width: 0; }

/* The privacy notice: running text in the cards. */
.prose .card p, .prose .card li { color: rgba(var(--ink-rgb), .85); font-family: var(--sans); font-size: .95rem; line-height: 1.6; }
.prose .card p { margin: 0 0 .8rem; }
.prose .card p:last-child { margin-bottom: 0; }
.prose .card ul { margin: 0 0 .8rem; padding-left: 1.2rem; }
.prose .card li + li { margin-top: .35rem; }
.prose .card a { color: rgb(var(--ink-rgb)); }

/* The home page's way in to the tenants' page. */
.home-portal { display: flex; justify-content: center; margin: 22px 0 6px; }
