/* The owner page reuses the customer's home-* components; only owner controls live here. */
#owner-home[hidden], #owner-home [hidden] { display: none !important; }
#owner-home {
    --owner-gold: var(--spotivity-gold, #d8b66a);
    --owner-border: var(--spotivity-gold-border, rgba(216, 182, 106, .25));
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #101a14;
    color: var(--spotivity-cream, #f5efdf);
    text-align: left;
    overflow-x: clip;
}
#owner-home *, #owner-home *::before, #owner-home *::after { box-sizing: border-box; }
#owner-home button, #owner-home input { font-family: inherit; }
#owner-home button, #owner-home a { -webkit-tap-highlight-color: transparent; }
#owner-home button { cursor: pointer; }
#owner-home button:focus-visible, #owner-home a:focus-visible, #owner-home input:focus-visible { outline: 2px solid var(--owner-gold); outline-offset: 3px; }
#owner-home svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#owner-home .owner-home-header { padding-top: env(safe-area-inset-top); }
/* The public field uses an ID selector, so the scoped owner field needs the same treatment. */
#owner-home-nav-search-input {
    flex: 1 1 0; min-width: 0; width: 0; height: 44px; padding: 0 12px;
    border: 0; border-radius: 0; background: transparent;
    color: var(--spotivity-cream, #f5efdf); font-size: 16px; outline: none;
}
#owner-home-nav-search-input::placeholder { color: var(--spotivity-muted, #b9b3a6); opacity: 1; }
#owner-home #owner-home-search-submit { flex: 0 0 44px; width: 44px; min-width: 44px; padding: 0; }
#owner-home .home-search-button svg { stroke: var(--owner-gold); }
#owner-home .owner-home-menu-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; flex: 0 0 44px; width: 44px; height: 44px; margin: 0; padding: 0;
    border: 0; background: transparent;
}
#owner-home .owner-home-menu-toggle span { display: block; width: 18px; height: 1px; background: var(--spotivity-gold-light, #eed397); }
#owner-home .owner-home-content { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.owner-home-actions { max-width: 1048px; margin: 0 auto; padding: 32px 24px 48px; }
.owner-home-actions h2 { overflow-wrap: anywhere; }
.owner-new-sport-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px;
    min-height: 184px; padding: 32px; border: 1px solid var(--owner-border); border-radius: 20px;
    background: linear-gradient(120deg, rgba(216, 182, 106, .10), rgba(216, 182, 106, .025)), #16231a;
}
.owner-new-sport-symbol {
    display: flex; align-items: center; justify-content: center; width: 80px; height: 80px;
    border: 1px solid var(--owner-border); border-radius: 20px; color: var(--owner-gold); background: rgba(216, 182, 106, .06);
}
#owner-home .owner-new-sport-symbol svg { width: 42px; height: 42px; stroke-width: 1.5; }
.owner-new-sport-description { max-width: 36ch; margin: 0; font-size: 17px; line-height: 1.65; color: #d4d9cd; overflow-wrap: anywhere; }
#owner-home .owner-new-sport-card .owner-new-sport-button { min-height: 54px; padding: 14px 24px; font-size: 16px; }
/* Stretch makes the first add card exactly as tall as its neighbouring court cards. */
#owner-home .owner-courts-strip { align-items: stretch; }
#owner-home .owner-add-court-card { align-self: stretch; }
#owner-home .owner-create-symbol { display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--owner-gold); background: rgba(216, 182, 106, .055); }
#owner-home .owner-create-symbol svg { width: 64px; height: 64px; stroke-width: 1.25; }
#owner-home .owner-add-court-card:disabled { cursor: not-allowed; opacity: .65; }
.owner-create-permission { color: var(--spotivity-muted, #b9b3a6); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.owner-home-status, .owner-home-empty { max-width: 1000px; margin: 24px auto; padding: 20px 24px; color: #e7d5ac; line-height: 1.6; overflow-wrap: anywhere; }
.owner-home-status { background: rgba(216, 182, 106, .07); border: 1px solid var(--owner-border); border-radius: 14px; }
.owner-home-status .owner-button { margin: 12px 0 0 12px; }
#owner-home .owner-home-empty h1 { margin: 0; font-size: clamp(26px, 4vw, 36px); color: #f1d797; line-height: 1.25; }
.owner-home-empty p { margin: 12px 0 0; color: var(--spotivity-muted, #b9b3a6); }
.owner-home-base-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.owner-base-card { position: relative; isolation: isolate; overflow: hidden; min-width: 0; padding: 22px; background: #1b2b20; border: 1px solid var(--owner-border); border-radius: 18px; }
.owner-base-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .13; z-index: -2; }
.owner-base-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,26,20,.35), rgba(16,26,20,.9)); z-index: -1; }
.owner-base-info { display: flex; align-items: center; gap: 15px; min-width: 0; }
#owner-home .owner-base-avatar { flex: 0 0 70.7056px; width: 70.7056px; height: 70.7056px; border: 1px solid var(--owner-gold); }
.owner-base-copy { min-width: 0; }
#owner-home .owner-base-copy h3 { margin: 0; color: #efce82; font-size: 21px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.owner-base-copy p { margin: 5px 0 0; color: #c2cabe; font-size: 14px; line-height: 1.5; }
.owner-base-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.owner-base-permission { color: var(--spotivity-muted, #b9b3a6); font-size: 13px; }
#owner-home .owner-button { min-height: 44px; padding: 11px 16px; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--owner-border); border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; white-space: normal; }
#owner-home .owner-button-primary { background: linear-gradient(125deg, #e6c67f, #cba354); border-color: #e6c67f; color: #1c2115; }
#owner-home .owner-button-secondary { color: #ead59f; background: rgba(216,182,106,.07); }
body.owner-home-menu-open, body.owner-home-dialog-open { overflow: hidden; }
.owner-home-menu, .owner-home-dialog {
    position: fixed; inset: 0; z-index: 100000; padding: 12px;
    background: rgba(3,11,6,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; justify-content: flex-end; align-items: stretch;
}
.owner-home-menu-panel, .owner-home-dialog-panel {
    width: min(100%, 390px); min-width: 0; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
    padding: max(22px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    border: 1px solid var(--owner-border); border-radius: 22px; background: #142119; box-shadow: 0 25px 80px rgba(0,0,0,.3);
}
.owner-home-menu-header, .owner-home-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
#owner-home .owner-home-menu-header h2, #owner-home .owner-home-dialog-header h2 { color: #ead095; font-size: 22px; margin: 0; font-weight: 600; line-height: 1.3; }
#owner-home .owner-home-menu-close { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; min-height: 44px; width: 44px; padding: 10px; margin: 0; color: var(--owner-gold); background: transparent; border: 1px solid var(--owner-border); border-radius: 12px; }
#owner-home .owner-home-menu-close svg { width: 24px; height: 24px; }
.owner-home-menu-links { display: flex; flex-direction: column; gap: 8px; }
#owner-home .owner-home-menu-links > button { display: block; width: 100%; min-height: 54px; padding: 13px 12px; margin: 0; background: transparent; border: 1px solid transparent; border-radius: 12px; color: #e9ce8e; font-size: 19px; line-height: 1.4; font-weight: 550; text-align: left; white-space: normal; overflow-wrap: anywhere; }
#owner-home .owner-home-menu-links > button:hover { border-color: var(--owner-border); background: rgba(226,193,122,.05); }
#owner-home .owner-home-menu-links > .owner-menu-logout { margin-top: 16px; padding-top: 17px; border-top: 1px solid var(--owner-border); border-radius: 0; color: #eea79b; font-size: 16px; }
.owner-home-dialog { justify-content: center; align-items: center; }
.owner-home-dialog-panel { width: min(100%, 820px); }
.owner-dialog-hint { display: block; color: var(--spotivity-muted, #b9b3a6); font-size: 14px; line-height: 1.6; margin: 12px 0; }
#owner-home .owner-home-search-input { display: block; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 12px; border: 1px solid var(--owner-border); border-radius: 12px; background: #1b2d20; color: var(--spotivity-cream, #f5efdf); font-size: 16px; color-scheme: dark; }
.owner-home-search-status { min-height: 24px; margin: 12px 0; font-size: 14px; line-height: 1.5; color: var(--spotivity-muted, #b9b3a6); }
#owner-home .owner-home-search-results .home-court-card { width: 100%; }
.owner-home-base-choices { display: grid; gap: 12px; }
#owner-home .owner-home-base-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; min-width: 0; min-height: 64px; padding: 16px; margin: 0; border: 1px solid var(--owner-border); border-radius: 12px; background: #1b2d20; color: #ead59f; text-align: left; overflow-wrap: anywhere; }
.owner-home-base-choice strong { font-size: 16px; }
.owner-home-base-choice span { font-size: 13px; color: var(--spotivity-muted, #b9b3a6); }
@media (max-width: 767px) {
    .owner-home-actions { padding: 24px 18px 32px; }
    .owner-new-sport-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px; }
    .owner-new-sport-symbol { width: 64px; height: 64px; border-radius: 16px; }
    .owner-new-sport-description { font-size: 16px; }
    #owner-home .owner-new-sport-card .owner-new-sport-button { width: 100%; }
    .owner-home-status { margin: 18px; }
    .owner-home-empty { padding: 20px 18px; }
    .owner-base-card { padding: 18px; }
    .owner-home-menu, .owner-home-dialog { padding: 8px; }
    .owner-home-menu-panel, .owner-home-dialog-panel { padding-right: 18px; padding-left: 18px; border-radius: 18px; }
    #owner-home .owner-home-menu-links > button { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    #owner-home *, #owner-home *::before, #owner-home *::after { scroll-behavior: auto !important; }
}
