/* Shared responsive contract. Loaded after the screen-specific styles. */
:root {
  --ui-gutter: clamp(16px, 4vw, 28px);
  --ui-line: #dce7e3;
  --ui-muted: #526b69;
  --ui-radius: 20px;
}
html { -webkit-text-size-adjust:100%; scroll-padding-block:24px; }
body { min-width:0; }
button,a,input,select,textarea { touch-action:manipulation; }
button:focus-visible,a:focus-visible {
  outline:3px solid #168579!important; outline-offset:3px!important;
}
input,select,textarea { max-width:100%; min-width:0; scroll-margin-block:80px; }
textarea { resize:vertical; }
img { max-width:100%; }
/* Only the navigation belonging to the active screen can intercept taps. */
html body[data-screen="home"]>nav.mobile-nav { display:none!important; }
html body.profile-screen-open>nav.mobile-nav,
html body:has(.udipro-standalone-page)>nav.mobile-nav { display:none!important; }
html body :is(.home-profile-menu,.provider-profile-menu) { max-height:calc(100dvh - 100px); overflow-y:auto; overscroll-behavior:contain; }
html body :is(.home-profile-menu-list>button,.provider-compact-grid>button) { min-height:48px; }
html body :is(.home-section-title,.provider-section-title,.section-heading) { gap:12px; }
html body :is(.home-section-title,.provider-section-title,.section-heading)>:first-child { min-width:0; }
html body :is(.home-pro-body,.client-name,.provider-explore-request-content,.udipro-chat-head>div) { min-width:0; }
html body :is(.client-name h2,.home-pro-body strong,.provider-opportunity-main h3,.provider-explore-request-content h3) { overflow-wrap:anywhere; }
html body :is(.overlay,.client-request-overlay,.provider-request-detail-overlay) { overscroll-behavior:contain; }
html body :is(.auth-card,.profile-modal,.client-request-card,.provider-request-full,.udipro-sheet) {
  max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain;
}
html body :is(.profile-subview,.registration-flow,.client-request-form,.provider-proposal-form) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select) {
  min-height:48px; font-size:16px!important;
}
html body :is(.profile-subview,.registration-flow,.client-request-form,.provider-proposal-form) textarea { font-size:16px!important; line-height:1.5; }
html body :is(.profile-subview,.registration-flow,.client-request-form) label { line-height:1.45; }
html body :is(.client-request-submit,.provider-request-actions button,.udipro-app-dialog-actions button) { min-height:48px!important; }
html body :is(.udipro-chat-form input,.udipro-chat-form button) { min-height:48px!important; }
html body .udipro-chat-form input { font-size:16px!important; }
html body .udipro-chat-message { overflow-wrap:anywhere; }
html body .udipro-standalone-header { gap:12px; }
html body .udipro-standalone-header>div { min-width:0; }
html body .udipro-standalone-header h1 { overflow-wrap:anywhere; line-height:1.2; }
html body .udipro-standalone-back { width:48px; height:48px; flex-shrink:0; }
html body .account-profile-screen .client-profile-v2 .client-profile-quick>button,
html body .account-profile-screen .professional-profile-v2 .professional-profile-menu-v2>button { min-height:84px!important; gap:12px!important; }
html body .account-profile-screen .client-profile-v2 .client-profile-quick strong,
html body .account-profile-screen .professional-profile-v2 .professional-profile-menu-v2 strong { font-size:16px!important; line-height:1.35!important; }
html body .account-profile-screen .client-profile-v2 .client-profile-quick small,
html body .account-profile-screen .professional-profile-v2 .professional-profile-menu-v2 small { font-size:13px!important; line-height:1.45!important; color:var(--ui-muted)!important; white-space:normal!important; }
html body :is(.udipro-attendance-filters,.udipro-order-filters) button { min-height:44px!important; font-size:14px!important; }
html body :is(.udipro-orders-v4,.udipro-attendance-v4,.udipro-chat-cards-v4) small { font-size:13px!important; line-height:1.45!important; }
html body :is(.udipro-order-detail-page,.udipro-attendance-detail-v2) p { font-size:15px!important; line-height:1.6!important; }
html body .account-profile-screen .professional-profile-v2 { padding-inline:var(--ui-gutter)!important; }

/* Phones and tablets: readable forms and controls that can be used by touch. */
@media (max-width:1023px) {
  html body #provider-explore { scroll-padding-bottom:120px; }
  html body #provider-explore main button { scroll-margin-block:100px; }
  html body :is(.provider-home-nav,.provider-explore-nav) small { font-size:13px!important; }
  html body .provider-explore-categories small { font-size:12px!important; white-space:normal!important; overflow:visible!important; line-height:1.35!important; }
  html body .provider-explore-categories button { height:auto!important; min-height:88px; }
  html body .provider-explore-filters label { padding:12px!important; grid-template-columns:minmax(0,1fr); }
  html body .provider-explore-filters label>span { display:none; }
  html body .provider-explore-filters label>div { width:100%; min-width:0; }
  html body .provider-explore-filters small { font-size:13px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; }
  html body .provider-stats { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:12px!important; }
  html body .provider-stats article { min-height:116px!important; padding:16px!important; }
  html body .provider-stats small { font-size:14px!important; line-height:1.4!important; }
  html body .provider-stats a,html body .provider-stats em { font-size:12px!important; }
  html body .provider-home-category-row small { font-size:13px!important; line-height:1.35!important; }
  html body :is(.home-hero,.provider-home-hero) { padding-top:max(24px,env(safe-area-inset-top)); }
  html body :is(.home-content,.provider-home-content) { padding-inline:var(--ui-gutter)!important; }
  html body :is(.home-nav,.provider-home-nav,.provider-explore-nav,nav.mobile-nav) {
    padding-bottom:max(10px,env(safe-area-inset-bottom))!important;
  }
  html body :is(.home-nav,.provider-home-nav,.provider-explore-nav,nav.mobile-nav) button {
    min-height:48px!important; font-size:13px!important;
  }
  html body :is(.home-account,.explore-account,.provider-home-account,.close,.client-request-close) { min-width:44px; min-height:44px; }
  html body :is(.home-see-all,.text-button,.filter-toggle,.home-location) { min-height:44px; }
  html body .home-category { font-size:13px; line-height:1.35; }
  html body :is(.home-pro-location,.home-pro-trade,.client-request-cta small) { font-size:13px!important; line-height:1.45; }
  html body :is(.home-pro,.pro) { border:1px solid var(--ui-line); box-shadow:0 4px 16px #123f4306; }
  html body .filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px; }
  html body .filters :is(input,select) { font-size:16px; min-height:48px; padding-inline:12px; }
  html body .filters label { font-size:13px; }
  html body .explore-directory-heading { flex-wrap:wrap; align-items:flex-start; }
  html body .explore-actions { flex-wrap:wrap; gap:8px; }
  html body .provider-explore-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  html body .provider-explore-filters label { min-width:0; }
  html body .provider-explore-filters :is(select,input) { min-height:48px; font-size:16px; }
  html body :is(.provider-explore-request-content,.provider-request-section) p { font-size:14px!important; line-height:1.55; }
  html body :is(.provider-opportunity-card,.provider-explore-request-card) button { min-height:48px!important; font-size:14px!important; }
  html body .account-profile-screen .client-profile-v2 { padding:24px var(--ui-gutter) max(32px,env(safe-area-inset-bottom))!important; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 button { min-height:84px!important; gap:10px!important; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 button strong { font-size:16px!important; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 button small { font-size:13px!important; line-height:1.45!important; color:var(--ui-muted)!important; }
  html body .account-profile-screen .client-profile-v2 .client-profile-title p { font-size:14px!important; }
  html body .account-profile-screen .client-profile-v2 .client-profile-title>button { width:48px!important; height:48px!important; }
  html body .account-profile-screen .client-profile-v2 .client-name small { font-size:12px!important; }
  html body .account-profile-screen .client-profile-v2 .client-name>span { font-size:12px!important; }
  html body .client-profile-quick :is(small,strong) { font-size:14px!important; }
  html body :is(.udipro-order-list,.udipro-attendance-list,.udipro-chat-cards-v4) { gap:14px; }
  html body .udipro-standalone-page:not([data-standalone-kind="chat"])>.udipro-standalone-body {
    padding-inline:var(--ui-gutter)!important; padding-bottom:max(32px,env(safe-area-inset-bottom))!important;
  }
  html body .udipro-chat-final .udipro-chat-message { max-width:88%!important; font-size:15px!important; line-height:1.5!important; }
  html body .udipro-chat-form { gap:8px!important; padding-inline:12px!important; }
  html body .udipro-chat-form button { min-width:48px!important; flex-shrink:0; }
  html body .public-profile-section { margin-inline:16px; padding:18px; }
  html body .public-profile-section>p { font-size:15px; line-height:1.6; }
  html body .public-profile-nav { overflow-x:auto; overscroll-behavior-x:contain; }
  html body .public-profile-nav button { flex-shrink:0; min-height:44px; }
}

@media (max-width:599px) {
  html body :is(.overlay,.client-request-overlay,.provider-request-detail-overlay) { padding:12px!important; }
  html body :is(.auth-card,.client-request-card,.provider-request-full,.udipro-sheet) {
    width:100%!important; max-height:calc(100dvh - 24px)!important; border-radius:22px!important;
  }
  html body .auth-card { padding:24px 20px!important; }
  html body .profile-modal { max-height:calc(100dvh - 24px)!important; border-radius:22px!important; }
  html body .profile-subview { padding:20px 16px; }
  html body .welcome-screen { overflow-y:auto; }
  html body .welcome-onboarding { min-height:100dvh; padding-bottom:max(20px,env(safe-area-inset-bottom)); }
  html body .welcome-onboarding-content { padding-top:min(43vh,360px); }
  html body .welcome-onboarding-content p { font-size:15px; min-height:0; }
  html body .welcome-actions button { min-height:48px!important; font-size:15px!important; }
  html body .home-banner h2 { font-size:clamp(24px,6.5vw,32px); }
  html body .home-banner button { min-height:44px; }
}
@media (max-width:359px) {
  html body .filters { grid-template-columns:1fr; }
  html body .home-categories { gap:14px 8px; }
  html body .home-category { font-size:12px; }
  html body .home-section-title h2 { font-size:19px; }
}
@media (min-width:600px) and (max-width:1023px) {
  html body :is(.home-content,.provider-home-content) { max-width:900px!important; margin-inline:auto!important; }
  html body :is(.home-professionals,.professional-grid,.provider-explore-list,.provider-all-list) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:18px!important; }
  html body .home-categories { grid-template-columns:repeat(4,minmax(0,1fr)); }
  html body .home-banner { height:280px!important; }
}

/* Desktop: stable navigation, deliberate reading widths, balanced cards. */
@media (min-width:1024px) {
  html body .provider-home-category-row { display:grid!important; grid-template-columns:repeat(7,minmax(0,1fr))!important; gap:16px!important; overflow:visible!important; }
  html body .provider-home-category-row button { width:100%!important; min-width:0!important; padding:12px 8px!important; background:#fff; border:1px solid var(--ui-line); border-radius:16px; }
  html body .provider-home-category-row small { font-size:13px!important; white-space:normal!important; line-height:1.4!important; }
  html body .provider-stats small { font-size:15px!important; line-height:1.4!important; }
  body:has(.udipro-standalone-page[data-standalone-kind="chat"])::before {
    content:""; position:fixed; inset:0; z-index:154; background:#eef3f1;
  }
  html body .udipro-standalone-page[data-standalone-kind="chat"],
  html body .udipro-standalone-page[data-standalone-kind="chat"].udipro-chat-conversation-open {
    top:32px!important; bottom:32px!important; height:calc(100dvh - 64px)!important; max-height:calc(100dvh - 64px)!important;
  }
  html body { background:#f3f6f5; font-size:16px; }
  html body :is(.home-content,.provider-home-content) { max-width:1248px!important; padding-inline:40px!important; }
  html body :is(.home-hero,.provider-home-hero) { padding-top:28px!important; padding-bottom:64px!important; }
  html body :is(.home-top,.provider-home-top) { min-height:60px; margin-bottom:32px; }
  html body :is(.home-hero h1,.provider-home-intro h1) { font-size:34px!important; letter-spacing:-.8px; }
  html body :is(.home-greeting,.provider-home-intro p) { font-size:17px!important; }
  html body :is(.home-nav,.provider-home-nav,.provider-explore-nav,nav.mobile-nav) {
    top:28px!important; height:60px!important; width:440px!important; max-width:440px!important;
    box-shadow:0 8px 28px #082f3020!important;
  }
  html body :is(.home-nav,.provider-home-nav,.provider-explore-nav,nav.mobile-nav) button { min-height:48px!important; height:48px!important; }
  html body .home-search { max-width:880px; height:60px; margin-top:-30px; margin-bottom:28px; }
  html body .home-search input { font-size:16px; }
  html body .client-request-cta { max-width:880px; margin-inline:auto; margin-bottom:32px; }
  html body .home-categories { gap:16px; }
  html body .home-category { min-height:88px; padding:18px; border-radius:18px; font-size:15px; }
  html body .home-banner { height:290px!important; }
  html body .home-banner>div { padding:36px; }
  html body .home-banner h2 { font-size:38px!important; }
  html body :is(.home-section-title h2,.provider-section-title h2) { font-size:24px!important; }
  html body .home-professionals { gap:20px; }
  html body .home-pro { padding:20px; min-height:120px; }
  html body .home-pro-body strong { font-size:18px; }
  html body :is(.home-pro-trade,.home-pro-location) { font-size:14px; }
  html body .provider-explore-filters :is(select,input) { font-size:15px; min-height:44px; }
  html body :is(.provider-opportunity-main p,.provider-opportunity-meta,.provider-explore-request-content p) { font-size:15px!important; line-height:1.55; }
  html body :is(.provider-opportunity-card,.provider-explore-request-card) button { min-height:44px!important; font-size:14px!important; }
  html body .account-profile-screen .client-profile-v2 { width:min(960px,100%)!important; padding:48px 40px!important; }
  html body .account-profile-screen .client-profile-v2 .client-profile-title { margin-bottom:28px!important; }
  html body .account-profile-screen .client-profile-v2 .client-identity-v2 { padding:28px!important; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  html body .account-profile-screen .client-profile-v2 .client-profile-quick,
  html body .account-profile-screen .professional-profile-v2 .professional-profile-menu-v2 { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  html body .account-profile-screen .client-profile-v2 .client-profile-quick>button,
  html body .account-profile-screen .professional-profile-v2 .professional-profile-menu-v2>button { min-height:108px!important; padding:20px!important; border:1px solid #edf2ef!important; }
  html body .account-profile-screen .professional-profile-v2 { width:min(960px,100%)!important; padding:48px 40px!important; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 button { min-height:108px!important; gap:12px; padding:20px!important; border:1px solid #edf2ef; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 button strong { font-size:16px!important; }
  html body .account-profile-screen .client-profile-v2 .client-actions-v2 button small { font-size:14px!important; line-height:1.45; }
  html body .udipro-standalone-page:not([data-standalone-kind="chat"])>.udipro-standalone-body { max-width:1120px!important; padding:32px 40px 48px!important; }
  html body .udipro-order-list,html body .udipro-attendance-list { align-items:start; gap:20px; }
  html body .udipro-order-detail-page { max-width:820px; }
  html body .public-profile-section>p { font-size:16px; line-height:1.65; }
  html body .profile-modal { max-width:960px!important; }
  html body .udipro-chat-final .udipro-chat-message { font-size:16px!important; line-height:1.5; }
}

/* Administration shares the same touch sizes and readable form controls. */
html body.admin-page .btn,html body.admin-page .tab,html body.admin-page .admin-back-summary { min-height:44px; }
html body.admin-page :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size:16px; min-height:44px; }
html body.admin-page .section-head { gap:16px; flex-wrap:wrap; }
html body.admin-page .row>div { min-width:0; overflow-wrap:anywhere; }
html body.admin-page .actions { flex-wrap:wrap; gap:8px; }
html body.admin-page .meta { font-size:14px; line-height:1.5; }
html body.admin-page .review-card { max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain; }
@media(max-width:599px) {
  html body.admin-page main { padding-inline:16px; }
  html body.admin-page .row { padding:16px; }
  html body.admin-page .category-form { display:grid; grid-template-columns:1fr; }
  html body.admin-page .tabs { scrollbar-width:thin; padding-bottom:6px; }
  html body.admin-page .tab { flex-shrink:0; font-size:14px; }
}

/* Respect accessibility settings instead of animating every transition. */
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
@media (hover:hover) {
  .home-category:hover,.client-actions-v2 button:hover { background:#f0f7f4!important; }
}

/* Client directory: complete categories on desktop, readable quick filters. */
html body[data-screen="results"] #quick-filter-cards .quick-filter-card { min-height:76px!important; padding:12px!important; gap:10px!important; }
html body[data-screen="results"] #quick-filter-cards .quick-filter-card>span { flex:1; min-width:0!important; }
html body[data-screen="results"] #quick-filter-cards .quick-filter-card strong { font-size:13px!important; }
html body[data-screen="results"] #quick-filter-cards select { width:100%; min-height:32px; font-size:14px!important; }
html body[data-screen="results"] #quick-filter-cards .quick-filter-card:focus-visible { outline:3px solid #168579!important; outline-offset:3px!important; }
html body[data-screen="results"] #category-grid .category-card { font-size:13px!important; line-height:1.35!important; }
@media(min-width:1024px) {
 html body[data-screen="results"] #category-grid { display:grid!important; grid-template-columns:repeat(8,minmax(0,1fr))!important; gap:18px 12px!important; overflow:visible!important; }
 html body[data-screen="results"] #category-grid .category-card { width:100%!important; min-width:0!important; min-height:100px!important; }
 html body[data-screen="results"] #category-grid .category-card>span:last-child { width:100%!important; max-width:130px; }
}
@media(max-width:1023px) {
 html body[data-screen="results"] #category-grid { scrollbar-width:thin!important; padding-bottom:12px!important; }
 html body[data-screen="results"] #category-grid::-webkit-scrollbar { display:block!important; height:5px; }
 html body[data-screen="results"] #category-grid::-webkit-scrollbar-thumb { background:#a6c7bf; border-radius:8px; }
 html body[data-screen="results"] #category-grid .category-card { flex-basis:92px!important; width:92px!important; min-width:92px!important; }
 html body[data-screen="results"] #category-grid .category-card>span:last-child { width:92px!important; }
 html body[data-screen="results"] #quick-filter-cards select { font-size:16px!important; }
 html body[data-screen="results"] #quick-filter-cards .quick-filter-card>svg { display:none; }
}
@media(max-width:1023px) {
 html body[data-screen="results"] #quick-filter-cards .quick-filter-card { grid-template-columns:minmax(0,1fr) 12px!important; }
}
/* Keep portfolio photos complete at every card width. */
html body[data-screen="results"] .work-gallery {
 width:100%!important; height:auto!important; min-height:0!important;
 aspect-ratio:4 / 3; box-sizing:border-box; background:#e8efec;
}
html body[data-screen="results"] .work-gallery>img {
 display:block; width:100%!important; height:100%!important;
 object-fit:contain!important; object-position:center!important;
}
@media(min-width:1024px) {
 html body[data-screen="results"]>main { max-width:1248px!important; padding-inline:40px!important; }
 html body[data-screen="results"] .professional-grid { align-items:start; }
}
html body[data-screen="results"] .work-gallery { position:relative; }
html body[data-screen="results"] .work-gallery>img { position:absolute; inset:0; }
/* Client Explore fills the desktop viewport, including its header background. */
@media(min-width:1024px) {
 html body[data-screen="results"]>main { width:100%!important; max-width:none!important; }
 html body[data-screen="results"] .results-header { margin-inline:-40px!important; }
}

/* Campos usam a borda arredondada existente; sem o retângulo externo do WebView. */
input:focus,input:focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:none!important;outline-offset:0!important}
