/* Stayease theme: CheckedIn blog + owners' portal. Brand tokens match stayease.co.za. */
@import url('/fonts/fonts.css');

:root {
  --navy: #03045E; --ocean: #023E8A; --blue: #0077B6; --mid: #0096C7; --cyan: #48CAE4;
  --sky: #90E0EF; --pale: #ADE8F4; --ice: #CAF0F8; --soft: #EFF9FC; --white: #fff;
  --text: #1E293B; --muted: #475569; --line: #CFE7EF; --danger: #B91C1C; --ok: #047857; --warn: #92400E;
  --head: 'Poppins', 'Segoe UI', system-ui, sans-serif; --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 16px; --shadow: 0 10px 30px rgba(3, 4, 94, 0.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--white); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--mid); outline-offset: 2px; }
.eyebrow { display: inline-block; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.lead { font-size: 1.15rem; color: var(--ocean); margin-top: 14px; max-width: 40em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.chip { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--ocean); background: var(--ice); border-radius: 999px; padding: 3px 10px; text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--body); border-radius: 999px; padding: 14px 24px; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn-primary { background: var(--cyan); color: var(--navy); box-shadow: 0 8px 20px rgba(72, 202, 228, 0.35); }
.btn-primary:hover { transform: translateY(-1px); background: #5ad3ea; }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--cyan); }
.btn-outline-light { color: var(--white); border-color: var(--cyan); background: transparent; }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Header */
.site-header { background: var(--ice); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(173, 232, 244, 0.6); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo img { height: 32px; width: auto; display: block; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--navy); text-decoration: none; font-family: var(--head); font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--blue); }
.header-cta { display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) { .nav { display: none; } .header-cta { margin-left: auto; } }
@media (max-width: 420px) { .header-login-hide { display: none; } }

/* Blog index */
.blog-hero { background: linear-gradient(180deg, var(--ice), var(--soft)); padding: 56px 0 36px; }
.blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 8px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.topics a { text-decoration: none; font-size: 0.9rem; font-weight: 500; color: var(--ocean); background: var(--white); border: 1.5px solid var(--pale); border-radius: 999px; padding: 7px 14px; }
.topics a[aria-current] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.posts-section { padding: 40px 20px 64px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-card-img { display: block; aspect-ratio: 16 / 9; background: var(--ice); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.post-card:hover .post-card-img img { transform: scale(1.03); }
.img-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ice), var(--sky)); }
.post-card-body { padding: 20px 22px 24px; display: grid; gap: 10px; }
.post-card h2, .post-card h3 { font-size: 1.2rem; }
.post-card h2 a, .post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--blue); }
.post-meta { font-size: 0.82rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.excerpt { color: var(--muted); font-size: 0.95rem; }
.post-card.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; }
.post-card.feature .post-card-img { aspect-ratio: auto; min-height: 320px; }
.post-card.feature .post-card-body { padding: 36px; align-content: center; }
.post-card.feature h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .post-card.feature { grid-template-columns: 1fr; } .post-card.feature .post-card-img { min-height: 0; aspect-ratio: 16 / 9; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { color: var(--muted); padding: 40px 0; }

/* Article */
.article-head { padding: 48px 20px 24px; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-top: 14px; }
.article-hero { margin: 8px auto 32px; }
.article-hero img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.article-hero figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.prose { font-size: 1.08rem; line-height: 1.75; color: var(--text); padding-bottom: 8px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--cyan); color: var(--ocean); font-size: 1.15rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--blue); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; }
.prose .wp-block-table { overflow-x: auto; }
.prose .callout { background: var(--soft); border: 1px solid var(--pale); border-left: 4px solid var(--cyan); border-radius: 0 12px 12px 0; padding: 16px 20px; }
.prose a { text-underline-offset: 3px; }
.prose figure img { border-radius: 12px; }
.article-foot { padding: 24px 20px 48px; }
.byline { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 0.92rem; }
.related { padding-bottom: 56px; }
.related h2 { font-size: 1.5rem; margin-bottom: 20px; }
.notfound { padding: 96px 20px; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 10px; }

/* CTA band */
.cta-band { background: var(--navy); border-radius: 24px; padding: 40px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin: 8px 0 64px; }
.cta-band h2 { color: #fff; font-size: 1.7rem; }
.cta-band p { color: var(--pale); margin-top: 8px; max-width: 34em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer { background: var(--navy); color: var(--pale); padding: 48px 0 24px; font-size: 0.92rem; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 32px; }
.footer-logo { height: 30px; width: auto; margin-bottom: 12px; display: block; }
.footer-title { color: #fff; font-family: var(--head); font-weight: 600; font-size: 0.85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--sky); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.copyright { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(173, 232, 244, 0.2); font-size: 0.82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.copyright a { color: #fff; font-weight: 600; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
 * Owners' portal
 * ------------------------------------------------------------------------- */
.portal { background: var(--soft); min-height: 70vh; padding: 36px 0 64px; }
.portal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.portal-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-top: 6px; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.portal-tabs a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.portal-tabs a[aria-current] { color: var(--navy); border-color: var(--cyan); }
.portal-tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--cyan); color: var(--navy); font-size: 0.75rem; text-align: center; }
.p-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .p-grid, .p-grid.two { grid-template-columns: minmax(0, 1fr); } }
.p-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.p-card h2 { font-size: 1.15rem; margin-bottom: 12px; }
.p-card h3 { font-size: 1rem; }
.p-card + .p-card { margin-top: 0; }
.p-section { margin-top: 24px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--white); border: 1px solid var(--pale); border-radius: 14px; padding: 16px 18px; }
.kpi-label { font-size: 0.75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.kpi-value { font-family: var(--head); font-weight: 700; font-size: 1.45rem; color: var(--navy); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 0.8rem; color: var(--muted); }
.kpi.accent { background: var(--navy); border-color: var(--navy); }
.kpi.accent .kpi-label { color: var(--sky); } .kpi.accent .kpi-value { color: #fff; } .kpi.accent .kpi-sub { color: var(--pale); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prop-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.prop-card img, .prop-card .img-fallback { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; }
.prop-card .prop-meta { font-size: 0.85rem; color: var(--muted); }
.p-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.p-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--blue); padding: 10px 8px; border-bottom: 1px solid var(--line); background: var(--soft); }
.p-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-table-wrap { overflow-x: auto; }
.status { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--ice); color: var(--ocean); white-space: nowrap; }
.status.open { background: #FEF3C7; color: var(--warn); }
.status.in_progress { background: #DBEAFE; color: #1E40AF; }
.status.done, .status.active, .status.signed { background: #D1FAE5; color: var(--ok); }
.status.ended, .status.cancelled, .status.expired { background: #F1F5F9; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feed li { border-left: 3px solid var(--cyan); padding-left: 14px; }
.feed time { font-size: 0.8rem; color: var(--muted); }
.thread { display: grid; gap: 12px; margin-top: 12px; }
.msg { background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.msg.team { background: var(--ice); }
.msg .who { font-size: 0.8rem; font-weight: 600; color: var(--navy); }
.p-form { display: grid; gap: 14px; }
.p-form label { font-weight: 600; font-size: 0.9rem; color: var(--navy); display: block; margin-bottom: 6px; }
.p-form input[type=text], .p-form input[type=date], .p-form input[type=file], .p-form select, .p-form textarea, .login-card input[type=text], .login-card input[type=password], .login-card input[type=email] {
  width: 100%; font: 400 1rem var(--body); color: var(--text); background: var(--white); border: 1.5px solid var(--pale); border-radius: 12px; padding: 12px 14px;
}
.p-form textarea { min-height: 120px; resize: vertical; }
.p-form input:focus, .p-form select:focus, .p-form textarea:focus, .login-card input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15); }
.notice { border-radius: 12px; padding: 12px 16px; font-size: 0.92rem; margin-bottom: 18px; }
.notice.ok { background: #D1FAE5; color: var(--ok); }
.notice.err { background: #FEE2E2; color: var(--danger); }
.login-wrap { min-height: 70vh; display: grid; place-items: center; padding: 48px 20px; background: linear-gradient(180deg, var(--ice), var(--soft)); }
.login-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 32px; }
.login-card h1 { font-size: 1.7rem; margin: 8px 0 6px; }
.login-card form { display: grid; gap: 14px; margin-top: 18px; }
.login-card label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.login-card .login-remember label { font-weight: 400; color: var(--muted); }
.login-card .button-primary { width: 100%; background: var(--cyan); color: var(--navy); border: 0; border-radius: 999px; padding: 14px; font: 600 1rem var(--body); cursor: pointer; }
.download { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.download::before { content: ''; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230077B6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0l-5-5m5 5l5-5M5 21h14'/%3E%3C/svg%3E") center/contain no-repeat; }
.empty-state { color: var(--muted); font-size: 0.92rem; padding: 8px 0; }

@media print {
  .site-header, .site-footer, .portal-tabs, .cta-band, .btn { display: none !important; }
  .portal { background: #fff; }
  .p-card, .kpi { box-shadow: none; break-inside: avoid; }
}

/* Always light: stops browsers and in-app viewers (Gmail, Google app, Chrome auto-dark) from darkening the pages. */
:root { color-scheme: only light; }
html { background: #fff; }
