/* Shared form controls */
.uh-form,
.uhc-module-wrap .uh-form {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    background:#fff;
    border:1px solid var(--uh-border);
    border-radius:var(--uh-radius);
    padding:24px;
    box-shadow:var(--uh-shadow);
}
.uh-form label,.uh-form-field{display:flex;flex-direction:column;gap:7px;font-weight:600;font-size:13px;min-width:0}
.uh-form label:has(textarea),.uh-form .uh-form-full{grid-column:1/-1}
.uh-field-label{display:block;line-height:1.35}
.uh-required,.required{color:#dc2626;margin-inline-start:3px}
.uh-form input[type="text"],.uh-form input[type="email"],.uh-form input[type="password"],.uh-form input[type="number"],.uh-form input[type="date"],.uh-form input[type="time"],.uh-form input[type="datetime-local"],.uh-form input[type="tel"],.uh-form input[type="url"],.uh-form input[type="search"],.uh-form select,.uh-form textarea,.uh-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),.uh-search select,.uh-form-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),.uh-form-card select,.uh-form-card textarea,.uh-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),.uh-form-grid select,.uh-form-grid textarea{
    width:100%;max-width:100%;min-width:0;min-height:46px;border:1px solid #dbe1eb;border-radius:11px;background:#fbfcff;padding:10px 13px;color:var(--uh-text);outline:0;box-sizing:border-box
}
.uh-form textarea,.uh-form-grid textarea,.uh-form-card textarea{min-height:130px;resize:vertical}
.uh-form input:focus,.uh-form select:focus,.uh-form textarea:focus,.uh-search input:focus,.uh-form-grid input:focus,.uh-form-grid select:focus,.uh-form-grid textarea:focus{border-color:var(--uh-primary);box-shadow:0 0 0 3px rgba(22,119,255,.12)}
.uh-form input[type="checkbox"],.uh-form input[type="radio"],.uh-form-grid input[type="checkbox"],.uh-form-grid input[type="radio"],.uh-check-card input[type="checkbox"],.uh-role-card input[type="radio"],.uh-inline-check input[type="checkbox"],.uh-inline-check input[type="radio"]{
    width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;max-height:18px!important;flex:0 0 18px!important;padding:0!important;margin:0!important;box-shadow:none!important
}
.uh-form input[type="file"],.uh-form-grid input[type="file"]{width:auto;min-height:0;padding:0;border:0;background:transparent}
.uh-form button,.uh-search button{border:0;border-radius:11px;min-height:46px;padding:10px 20px;background:var(--uh-primary);color:#fff;font-weight:600;cursor:pointer}
.uh-form-row,.uh-login-options{display:flex;align-items:center;justify-content:space-between;gap:16px;grid-column:1/-1}
.uh-inline-check{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:9px!important;font-weight:600!important;cursor:pointer}
.uh-help-text{color:var(--uh-muted);font-size:11px;font-weight:500;line-height:1.45}
.uh-field-error{display:block;color:#b91c1c;font-size:12px;font-weight:650;line-height:1.4;margin-top:1px}
.has-error input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),.has-error select,.has-error textarea,.has-error .uh-upload-box{border-color:#dc2626!important;background:#fff7f7!important}
.uh-error-summary{margin-bottom:18px}.uh-error-summary p{margin:4px 0 0}
.uh-alert-success{background:#dcfce7;color:#166534;border:1px solid #bbf7d0;border-radius:12px;padding:12px;margin-bottom:16px}

/* Auth shell */
.uhc-auth-page{min-height:calc(100vh - 76px);display:grid;grid-template-columns:1fr 1fr;background:#fff}
.uhc-auth-visual{background:linear-gradient(145deg,#0b5adb,#7441e8);color:#fff;padding:clamp(42px,7vw,110px);display:flex;align-items:center;position:relative;overflow:hidden;min-height:720px}
.uhc-auth-visual:after{content:"";position:absolute;width:420px;height:420px;border-radius:50%;border:70px solid rgba(255,255,255,.08);right:-120px;bottom:-140px}
.uhc-auth-visual h1{font-size:clamp(2.5rem,5vw,4.5rem);line-height:1.08;max-width:620px}.uhc-auth-visual p{font-size:18px;color:#dfeaff;max-width:560px}.uhc-auth-visual ul{list-style:none;padding:0;display:grid;gap:10px}.uhc-auth-visual li:before{content:"✓";margin-inline-end:10px}
.uhc-auth-panel{padding:50px clamp(28px,5vw,80px);display:flex;align-items:flex-start;justify-content:center;background:#fff;overflow:visible}
.uhc-auth-card{width:min(470px,100%);margin-block:auto}.uhc-auth-card-wide{width:min(760px,100%);margin-block:20px}
.uhc-auth-card>.uhc-brand{margin-bottom:34px}.uhc-auth-card h2{font-size:34px;margin-bottom:4px}.uhc-auth-card>p{color:var(--uh-muted);margin-bottom:24px}
.uhc-auth-card .uh-form,.uh-auth-simple-form{display:grid;grid-template-columns:1fr;box-shadow:none;padding:0;border:0;background:transparent}
.uhc-auth-foot{text-align:center;margin-top:22px;color:var(--uh-muted)}.uhc-auth-foot a{color:var(--uh-primary);font-weight:600}
.page-template-login .uhc-site-footer,.page-template-register .uhc-site-footer,.page-template-auth-generic .uhc-site-footer,.page-template-pending-approval .uhc-site-footer{display:none}
.uh-login-submit{width:100%;grid-column:1/-1}.uh-login-form{gap:17px!important}.uh-login-options a{color:var(--uh-primary);font-weight:600;font-size:13px}
.uh-password-field{display:flex;align-items:center;position:relative;width:100%}.uh-password-field input{padding-inline-end:48px!important}.uh-password-toggle{position:absolute;inset-inline-end:6px;width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#64748b!important;box-shadow:none!important}
.uh-password-toggle:hover,.uh-password-toggle:focus{background:#edf4ff!important;color:var(--uh-primary)!important}
.uh-password-strength{display:flex;align-items:center;gap:12px}.uh-password-strength>span{height:7px;flex:1;border-radius:99px;background:#e5e7eb;overflow:hidden;position:relative}.uh-password-strength>span:after{content:"";position:absolute;inset:0;width:var(--strength,0%);background:var(--strength-color,#ef4444);transition:.2s}.uh-password-strength small{color:var(--uh-muted);font-size:11px}
.uhc-status-page{min-height:70vh;display:grid;place-items:center;padding:40px}.uhc-status-card{max-width:620px;text-align:center;background:#fff;border-radius:24px;padding:48px;box-shadow:var(--uh-shadow)}

/* Registration wizard */
.uh-register-wizard{display:block;width:100%}.uh-register-actions [hidden]{display:none!important}
.uh-stepper{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 26px;overflow:auto;padding-bottom:2px;scrollbar-width:thin}
.uh-stepper-item{border:0!important;min-height:54px!important;padding:9px 10px!important;border-radius:12px!important;background:#eef2f8!important;color:#64748b!important;text-align:center!important;font-size:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;box-shadow:none!important;white-space:normal}
.uh-stepper-item b{width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#64748b;flex:0 0 23px}.uh-stepper-item.is-active{background:#1677ff!important;color:#fff!important}.uh-stepper-item.is-active b{color:#1677ff}
.uh-register-step{display:none}.uh-register-step.is-active{display:block}
.uh-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.uh-role-card{position:relative;border:1px solid #e2e8f0;border-radius:16px;padding:18px;cursor:pointer;min-height:155px;display:flex;flex-direction:column;gap:7px;background:#fff;transition:.18s;min-width:0}
.uh-role-card:hover{border-color:#9bc5ff;box-shadow:0 9px 24px rgba(15,23,42,.08);transform:translateY(-2px)}
.uh-role-card input{position:absolute!important;opacity:0!important;pointer-events:none}.uh-role-card:focus-within{outline:3px solid rgba(22,119,255,.2);outline-offset:2px}.uh-role-card.is-selected,.uh-role-card:has(input:checked){border-color:#1677ff;background:#f2f7ff;box-shadow:0 0 0 3px rgba(22,119,255,.12)}
.uh-role-card-icon{width:48px;height:48px;border-radius:14px;background:#eef5ff;color:var(--uh-primary);display:grid;place-items:center}.uh-role-card-icon svg{width:28px;height:28px}.uh-role-card-title{font-size:14px;line-height:1.3}.uh-role-card small{color:var(--uh-muted);font-size:11px;line-height:1.4}.uh-role-selected-check{position:absolute;top:11px;right:11px;width:24px;height:24px;border-radius:50%;background:var(--uh-primary);color:#fff;display:none;place-items:center;font-size:13px}.uh-role-card.is-selected .uh-role-selected-check,.uh-role-card:has(input:checked) .uh-role-selected-check{display:grid}
.uh-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.uh-span-2,.uh-field-wide{grid-column:1/-1}.uh-role-dependent[hidden]{display:none!important}
.uh-register-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:24px;padding-top:18px;border-top:1px solid var(--uh-border);position:sticky;bottom:0;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);z-index:5}
.uh-register-actions [data-register-next],.uh-register-actions [data-register-submit]{margin-inline-start:auto}.uh-check-card{display:flex;flex-direction:row!important;align-items:flex-start!important;gap:11px!important;padding:18px;border:1px solid #e6eaf1;border-radius:14px;background:#fbfcff;font-weight:600!important}.uh-review-card{background:#f7faff;border:1px solid #dbeafe;border-radius:14px;padding:18px;margin-bottom:16px}.uh-review-card h3{margin-bottom:6px}.uh-review-card p{margin:0;color:var(--uh-muted)}
.uh-upload-field{min-width:0}.uh-upload-box{position:relative;display:flex;align-items:center;gap:10px;width:100%;min-height:50px;padding:7px;border:1px dashed #b9c6d8;border-radius:12px;background:#fbfcff;overflow:hidden}.uh-upload-box input[type="file"]{position:absolute;inset:0;width:100%!important;height:100%!important;opacity:0;cursor:pointer}.uh-upload-button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border-radius:9px;background:#e9f3ff;color:var(--uh-primary);font-size:12px;font-weight:800;white-space:nowrap}.uh-upload-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--uh-muted);font-size:12px;font-weight:500}.uh-upload-preview{width:74px;height:56px;object-fit:cover;border-radius:9px;margin-top:7px}

/* Horse form */
.uh-horse-form{display:block;width:100%;max-width:none}.uh-horse-form-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}.uh-form-section{width:100%;min-width:0;border:1px solid var(--uh-border);border-radius:16px;padding:22px 18px 18px;margin:0;background:#fff;overflow:visible}.uh-form-section legend{font-weight:850;font-size:19px;line-height:1.3;padding:0 10px;max-width:calc(100% - 24px);white-space:normal}.uh-form-section .uh-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.uh-horse-form input[type="date"]{appearance:auto;-webkit-appearance:auto}.uh-negotiable-check{margin:20px 0 0;padding:14px 16px;border:1px solid var(--uh-border);border-radius:12px;background:#fff;width:max-content;max-width:100%}.uh-horse-form-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:18px}.uh-horse-form-actions .uhc-btn{min-width:160px}

@media(max-width:980px){.uhc-auth-page{grid-template-columns:.8fr 1.2fr}.uhc-auth-visual{padding:50px;min-height:650px}.uh-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.uh-horse-form-sections{grid-template-columns:1fr}}
@media(max-width:767px){
    .uh-form,.uhc-module-wrap .uh-form{grid-template-columns:1fr;padding:18px;gap:15px}.uh-form label:has(textarea),.uh-form .uh-form-full{grid-column:auto}
    .uhc-auth-page{display:block;min-height:100vh}.uhc-auth-visual{display:none}.uhc-auth-panel{padding:28px 16px 40px;min-height:calc(100vh - 64px)}.uhc-auth-card,.uhc-auth-card-wide{width:100%;margin:0}.uhc-auth-card>.uhc-brand{margin-bottom:24px}.uhc-auth-card h2{font-size:29px}.uhc-register-page .uhc-auth-panel{align-items:flex-start}
    .uh-stepper{display:flex;gap:8px;margin-inline:-2px;padding-inline:2px}.uh-stepper-item{min-width:112px;flex:0 0 112px}.uh-stepper-item span{font-size:10px}.uh-stepper-item b{width:21px;height:21px;flex-basis:21px}
    .uh-role-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.uh-role-card{padding:13px;min-height:135px}.uh-role-card-icon{width:42px;height:42px}.uh-role-card-title{font-size:12px}.uh-role-card small{font-size:10px}
    .uh-form-grid,.uh-form-section .uh-form-grid{grid-template-columns:1fr!important}.uh-span-2,.uh-field-wide{grid-column:auto}.uh-register-actions{gap:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));flex-wrap:wrap}.uh-register-actions .uhc-btn{flex:1;min-width:110px}.uh-register-actions [data-register-submit]{width:100%;flex-basis:100%}
    .uh-password-strength{align-items:flex-start;flex-direction:column}.uh-password-strength>span{width:100%;flex:none}
    .uh-login-options{align-items:center;gap:10px}.uh-login-options a{font-size:12px}
    .uh-horse-form-sections{display:grid;grid-template-columns:1fr!important;gap:18px}.uh-form-section{width:100%;min-width:0;padding:20px 16px 16px}.uh-form-section legend{font-size:18px;max-width:calc(100% - 24px)}
    .uh-form-field,.uh-form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),.uh-form-field select,.uh-form-field textarea{min-width:0;width:100%;max-width:100%}.uh-horse-form input[type="date"],.uh-horse-form input[type="time"],.uh-horse-form input[type="number"],.uh-horse-form input[type="url"],.uh-horse-form select{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
    .uh-upload-box{width:100%}.uh-upload-button{flex:0 0 auto}.uh-upload-name{flex:1}.uh-negotiable-check{width:100%;margin-top:18px}.uh-horse-form-actions{display:flex;flex-direction:column;margin-top:16px}.uh-horse-form-actions .uhc-btn{width:100%;min-height:48px}.uh-horse-form-actions .uhc-btn-primary{order:1}.uh-horse-form-actions .uhc-btn-ghost{order:2}
}
@media(max-width:390px){.uh-role-grid{grid-template-columns:1fr}.uh-role-card{min-height:120px}.uh-register-actions .uhc-btn{width:100%;flex-basis:100%}.uh-login-options{align-items:flex-start;flex-direction:column}}

/* v1.5 auth template/footer and native control safeguards */
body.page-template-page-templates-login-php .uhc-site-footer,
body.page-template-page-templates-register-php .uhc-site-footer,
body.page-template-page-templates-auth-generic-php .uhc-site-footer,
body.page-template-page-templates-pending-approval-php .uhc-site-footer,
body:has(> .uhc-auth-page) .uhc-site-footer{display:none!important}
.uh-register-actions [hidden],.uh-register-step[hidden]{display:none!important}
.uh-form-card input[type="checkbox"],.uh-form-card input[type="radio"],
.uh-module-form input[type="checkbox"],.uh-module-form input[type="radio"]{
    width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;max-height:18px!important;flex:0 0 18px!important;padding:0!important;margin:0!important
}
@media(max-width:767px){
    .uhc-auth-panel{overflow-x:hidden}
    .uh-register-wizard,.uh-register-step,.uh-form-section,.uh-horse-form,.uh-horse-form-sections{min-width:0;max-width:100%}
    .uh-form-section .uh-form-grid>*{min-width:0}
    .uh-horse-form input[type="file"]{max-width:100%}
}

/* v1.7 inline required labels: override broad label column rules without absolute positioning. */
.uh-form .uh-field-label,
.uh-field-label{
    display:inline-flex!important;
    flex-direction:row!important;
    align-items:baseline!important;
    flex-wrap:nowrap!important;
    gap:4px!important;
    width:auto!important;
    height:auto!important;
    margin:0 0 8px!important;
    padding:0!important;
    font-weight:600;
    line-height:1.35;
}
.uh-field-label-text{display:inline!important;width:auto!important;min-width:0}
.uh-required,.required{
    display:inline!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    color:var(--uh-required-color,var(--uh-danger,#ef4444))!important;
    font-size:1em;
    line-height:inherit!important;
    flex:0 0 auto!important;
}
.uh-login-form>.uh-form-field{margin:0 0 22px!important;gap:0!important}
.uh-login-form>.uh-form-field:last-of-type{margin-bottom:0!important}
.uh-login-form .uh-input-wrap{position:relative;width:100%}
.uh-login-form .uh-input-wrap>input{width:100%;min-height:52px;padding:12px 16px;box-sizing:border-box}
.uh-login-form .uh-password-field>input{padding-inline-end:52px!important}
