/* Na Régua v1.3.65 — normalização global claro/escuro */
html{color-scheme:dark}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}

/* Componentes base: nunca dependem de preto/branco fixo no tema claro */
html[data-theme="light"] :is(.panel,.auth-card,.service-card,.profile-card,.team-row,.working-hours-editor,.payment-method-panel,.recurring-panel,.subscription-history-panel,.subscription-overview-grid .panel,.financial-panel,.finance-card,.commission-panel,.settings-card,.service-form-card,.team-card){background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="light"] :is(input,select,textarea,.form-stack textarea){background:#fff;color:var(--text);border-color:#cfd6cc;color-scheme:light}
html[data-theme="light"] :is(input,select,textarea)::placeholder{color:#8a9299}
html[data-theme="light"] :is(.form-stack label,.date-field,.card-form-grid label,.card-fields-grid label){color:#505a62}
html[data-theme="light"] :is(.badge,.date-chip,.status){border-color:var(--line)}
html[data-theme="light"] .empty{background:#fafbf8;border-color:#ccd3c8;color:#69717a}
html[data-theme="light"] .btn-ghost{background:#fff;color:#20262b;border-color:#cbd2c8}
html[data-theme="light"] .btn-danger{background:#fff5f5;color:#b7353f;border-color:#e6bfc2}
html[data-theme="light"] .flash.success{background:#edf8f1;border-color:#b8dfc7;color:#17663c}
html[data-theme="light"] .flash.error{background:#fff0f1;border-color:#e6b7bc;color:#a72f39}

/* Cabeçalho e menus */
html[data-theme="light"] .topbar{background:rgba(246,247,244,.94);border-color:#dce2d8;color:#171a1d}
html[data-theme="light"] .shop-chip{color:#59636c;border-color:#d8ded4}
html[data-theme="light"] .mobile-menu-toggle{background:#fff;border-color:#d7ddd3;color:#30373d}
html[data-theme="light"] .main-nav{color:#4f5961}

/* Agenda / booking / cliente */
html[data-theme="light"] :is(.choice-card > span,.slot > span,.day-card > span,.booking-barber-photo,.booking-any-photo,.booking-mobile-logo,.booking-mobile-menu-toggle){background:#fff;color:#171a1d;border-color:#d8ded4}
html[data-theme="light"] :is(.choice-card > input:checked + span,.slot > input:checked + span,.day-card > input:checked + span){background:#f2f7e5;border-color:var(--accent);color:#171a1d}
html[data-theme="light"] .day-card.is-off span{background:#fff2f2!important;border-color:#e7caca!important;color:#9a6868!important;opacity:.82}
html[data-theme="light"] .slot-period-head{color:#5f6972}
html[data-theme="light"] .booking-summary{background:var(--surface);color:var(--text)}
html[data-theme="light"] .booking-mobile-menu{background:rgba(255,255,255,.98);border-color:#d7ddd3;box-shadow:0 20px 45px rgba(28,35,25,.16)}
html[data-theme="light"] .booking-mobile-menu :is(a,button){color:#30383f}
html[data-theme="light"] .booking-mobile-menu :is(a:hover,button:hover,a.active){background:#eef2e9;color:#171a1d}
html[data-theme="light"] .mobile-bottom-nav,html[data-theme="light"] .platform-mobile-bottom-nav{background:#fff;color:#20252a;border-color:#d9ded5;box-shadow:0 14px 35px rgba(32,40,28,.16)}
html[data-theme="light"] .mobile-bottom-nav a.active{background:#edf3df;color:#171a1d}

/* Equipe, agenda do dia e financeiro */
html[data-theme="light"] :is(.team-agenda-panel,.daily-appointment-card,.finance-summary-card,.finance-chart-card,.financial-transfer-card,.commission-item,.commission-list,.financial-list){background:#fff!important;border-color:#d9ded5!important;color:#171a1d!important}
html[data-theme="light"] :is(.daily-customer strong,.daily-value strong,.daily-time strong){color:#171a1d!important}
html[data-theme="light"] :is(.daily-customer span,.daily-time span,.daily-value span){color:#69717a!important}
html[data-theme="light"] .daily-time{border-color:#dfe3dc!important}
html[data-theme="light"] .status-scheduled{background:#eef5d9;color:#617d00}
html[data-theme="light"] .status-completed{background:#e8f7ef;color:#167344}
html[data-theme="light"] :is(.status-cancelled,.status-no_show){background:#fff0f1;color:#b63b45}

/* Página Sobre e seções propositalmente escuras: texto precisa permanecer claro */
html[data-theme="light"] :is(.about-system-preview,.about-audience-section,.about-client-section,.about-whatsapp-section,.about-subscription-section){color:#f4f4f2}
html[data-theme="light"] :is(.about-system-preview,.about-audience-section,.about-client-section,.about-whatsapp-section,.about-subscription-section) :is(h1,h2,h3,strong){color:#f4f4f2!important}
html[data-theme="light"] :is(.about-system-preview,.about-audience-section,.about-client-section,.about-whatsapp-section,.about-subscription-section) p{color:#aeb5be!important}
html[data-theme="light"] .about-preview-flow>div{background:#0b0e11;border-color:#30353c;color:#f4f4f2}
html[data-theme="light"] .about-preview-flow>div span{color:#aeb5be}
html[data-theme="light"] .about-preview-flow>div.active{background:#f5f7ef;color:#171a1d}
html[data-theme="light"] .about-preview-flow>div.active :is(strong,span){color:#171a1d!important}

/* Onboarding inteiro acompanha o tema */
html[data-theme="light"] .onboarding-step-count{background:#fff;border-color:#d9ded5;box-shadow:0 16px 34px rgba(32,40,28,.08)}
html[data-theme="light"] .onboarding-progress>a,html[data-theme="light"] .onboarding-progress>div{background:#fff;border-color:#d9ded5;color:#59636c}
html[data-theme="light"] .onboarding-progress span{background:#edf0ea;color:#5f6972}
html[data-theme="light"] .onboarding-progress .active{background:#f3f7e8;color:#171a1d;border-color:var(--accent)}
html[data-theme="light"] .onboarding-card.panel{background:#fff;border-color:#d9ded5;box-shadow:0 22px 52px rgba(32,40,28,.09)}
html[data-theme="light"] :is(.onboarding-hours,.onboarding-hours-block,.onboarding-rule-card,.onboarding-service,.onboarding-other-fields,.info-note){background:#f8f9f6!important;border-color:#d7ddd3!important;color:#171a1d!important}
html[data-theme="light"] :is(.onboarding-day-option>span,.onboarding-interval-choice){background:#fff!important;border-color:#d7ddd3!important;color:#171a1d!important}
html[data-theme="light"] :is(.onboarding-rule-copy strong,.onboarding-hours-block-head strong,.onboarding-interval-choice strong,.onboarding-day-option strong){color:#171a1d!important}
html[data-theme="light"] :is(.onboarding-rule-copy small,.onboarding-hours-block-head>small,.onboarding-interval-choice small,.onboarding-day-option small){color:#647079!important}
html[data-theme="light"] :is(.onboarding-main-period input[type="time"],.onboarding-rule-input input,.onboarding-rule-card select,.onboarding-rule-card-select select){background:#fff!important;color:#171a1d!important;border-color:#cbd3c8!important;color-scheme:light}
html[data-theme="light"] .onboarding-rule-icon{background:#edf3df!important;border-color:#d8e3ba!important;color:#789b00!important}

/* Super Admin também respeita a preferência global */
html[data-theme="light"] body.sa-body,html[data-theme="light"] body.sa-login-body{background:#f3f5f1;color:#171a1d}
html[data-theme="light"] .sa-sidebar{background:#fff;border-color:#d9ded5}
html[data-theme="light"] .sa-brand,html[data-theme="light"] .sa-account-link{color:#171a1d}
html[data-theme="light"] .sa-nav a{color:#59636c}
html[data-theme="light"] .sa-nav a:hover,html[data-theme="light"] .sa-nav a.active,html[data-theme="light"] .sa-account-link:hover,html[data-theme="light"] .sa-account-link.active{background:#f0f4e7;color:#171a1d}
html[data-theme="light"] .sa-main,html[data-theme="light"] .sa-content{background:#f3f5f1;color:#171a1d}
html[data-theme="light"] .sa-topbar{background:rgba(243,245,241,.94);border-color:#d9ded5}
html[data-theme="light"] :is(.sa-panel,.sa-metric,.sa-sub-controls,.sa-notification,.sa-tenant-summary,.sa-login-card){background:#fff;border-color:#d9ded5;color:#171a1d}
html[data-theme="light"] :is(.sa-panel input,.sa-panel select,.sa-panel textarea,.sa-form-grid input,.sa-form-grid select,.sa-form-grid textarea){background:#f8f9f6;color:#171a1d;border-color:#cfd6cc;color-scheme:light}
html[data-theme="light"] .sa-logout{background:#fff5f5;color:#b7353f;border-color:#e6bfc2}
html[data-theme="light"] .sa-footer,html[data-theme="light"] .sa-login-developer{color:#69717a}

/* Elementos nativos */
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator{filter:none;opacity:.8}
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator{filter:invert(1);opacity:.8}

/* v1.3.66 — acabamento de contraste no tema claro */
/* Superfícies escuras intencionais (hero): nunca herdar texto escuro do tema claro */
html[data-theme="light"] .barbershop-hero :is(h1,h2,h3,strong,.hero-title,.hero-how-title){color:#f7f8f5!important}
html[data-theme="light"] .barbershop-hero :is(p,span,small){color:#c5cbd0}
html[data-theme="light"] .barbershop-hero .eyebrow{color:var(--accent)!important}
html[data-theme="light"] .barbershop-hero .btn-ghost{background:#fff!important;color:#171a1d!important;border-color:#e1e5df!important}
html[data-theme="light"] .barbershop-hero .btn-ghost :is(span,strong){color:#171a1d!important}

/* Navegação do painel do barbeiro */
html[data-theme="light"] .barber-topbar :is(a,button),
html[data-theme="light"] body.barber-panel-page .topbar :is(a,button){color:#505a62!important}
html[data-theme="light"] .barber-topbar :is(a.active,button.active),
html[data-theme="light"] body.barber-panel-page .topbar :is(a.active,button.active){color:#171a1d!important}

/* Dashboard mobile: cartões que ainda estavam presos ao visual dark */
html[data-theme="light"] :is(.barber-dashboard-card,.barber-dashboard-shell,.barber-agenda-card,.barber-day-card,.barber-stat-card){background:#fff!important;color:#171a1d!important;border-color:#d7ddd3!important}
html[data-theme="light"] :is(.barber-day-card,.day-strip button,.day-strip a){background:#fff!important;color:#30383f!important;border-color:#d7ddd3!important}
html[data-theme="light"] :is(.barber-day-card,.day-strip button,.day-strip a) :is(strong,b){color:#171a1d!important}
html[data-theme="light"] :is(.barber-day-card,.day-strip button,.day-strip a) :is(span,small){color:#68727a!important}
html[data-theme="light"] :is(.barber-day-card.active,.day-strip button.active,.day-strip a.active){background:#f1f6e5!important;border-color:var(--accent)!important}
html[data-theme="light"] :is(.barber-stat-card,.agenda-stat,.dashboard-stat){background:#f6f8f3!important;color:#171a1d!important;border-color:#d7ddd3!important}

/* Bottom navigation no claro */
html[data-theme="light"] :is(.mobile-bottom-nav,.platform-mobile-bottom-nav){background:#fff!important;color:#59636c!important;border-color:#d8ded4!important}
html[data-theme="light"] :is(.mobile-bottom-nav,.platform-mobile-bottom-nav) a{color:#68727a!important}
html[data-theme="light"] :is(.mobile-bottom-nav,.platform-mobile-bottom-nav) a.active{background:#f0f4e7!important;color:#171a1d!important;border-color:#dce8bd!important}

/* Fluxo mobile de agendamento */
@media(max-width:760px){
  html[data-theme="light"] body.booking-mobile-page{background:#f5f6f2!important;color:#171a1d!important}
  html[data-theme="light"] body.booking-mobile-page .booking-main,
  html[data-theme="light"] body.booking-mobile-page .booking-step-block,
  html[data-theme="light"] body.booking-mobile-page .booking-summary.booking-receipt{background:#fff!important;color:#171a1d!important}
  html[data-theme="light"] .booking-mobile-shop strong,
  html[data-theme="light"] .mobile-booking-step-head h2,
  html[data-theme="light"] .booking-receipt-head h2{color:#171a1d!important}
  html[data-theme="light"] .booking-mobile-shop span,
  html[data-theme="light"] .mobile-booking-step-head p,
  html[data-theme="light"] .booking-receipt-head p{color:#68727a!important}
  html[data-theme="light"] .booking-mobile-progress span{background:#dce1d9!important}
  html[data-theme="light"] .booking-mobile-progress span.active,
  html[data-theme="light"] .booking-mobile-progress span.done{background:var(--accent)!important}
  html[data-theme="light"] .service-choice>span.service-choice-content{background:#fff!important;border-color:#d4dbd0!important;color:#171a1d!important}
  html[data-theme="light"] .service-choice-content :is(strong,span){color:#171a1d!important}
  html[data-theme="light"] .service-choice-content small{color:#68727a!important}
  html[data-theme="light"] .service-choice-content b{color:#59636c!important}
  html[data-theme="light"] .service-choice input:checked+span.service-choice-content{background:#f1f6e5!important;border-color:var(--accent)!important;color:#171a1d!important}
  html[data-theme="light"] .service-choice input:checked+span.service-choice-content :is(strong,span){color:#171a1d!important}
  html[data-theme="light"] .service-choice input:checked+span.service-choice-content b{color:#668900!important}
  html[data-theme="light"] .barber-choice-copy strong{color:#59636c!important}
  html[data-theme="light"] .barber-choice input:checked+span .barber-choice-copy strong{color:#171a1d!important}
  html[data-theme="light"] .booking-receipt-shop{background:#f7f8f5!important;border-color:#d7ddd3!important}
  html[data-theme="light"] .booking-receipt-shop strong{color:#171a1d!important}
  html[data-theme="light"] .booking-receipt-shop small{color:#68727a!important}
  html[data-theme="light"] .booking-receipt .summary-line{border-bottom-color:#dfe4dc!important}
  html[data-theme="light"] .booking-receipt .summary-line span{color:#68727a!important}
  html[data-theme="light"] .booking-receipt .summary-line strong{color:#171a1d!important}
  html[data-theme="light"] .booking-receipt-total{background:#f1f6e5!important;border-color:#d7e5b4!important}
  html[data-theme="light"] .booking-receipt-total span{color:#59636c!important}
  html[data-theme="light"] .booking-change-time{color:#59636c!important}
}

/* v1.3.67 — navegação, calendário e agenda compacta */
/* Desktop: links do cabeçalho precisam ter contraste real no tema claro. */
@media (min-width: 861px){
  html[data-theme="light"] .topbar .main-nav>a,
  html[data-theme="light"] .topbar .main-nav .link-btn,
  html[data-theme="light"] .shop-public-body .main-nav>a,
  html[data-theme="light"] .shop-public-body .main-nav .link-btn{color:#4f5961!important}
  html[data-theme="light"] .topbar .main-nav>a:hover,
  html[data-theme="light"] .topbar .main-nav .link-btn:hover,
  html[data-theme="light"] .shop-public-body .main-nav>a.active{color:#171a1d!important}
  html[data-theme="light"] .topbar .main-nav .btn{background:var(--accent)!important;color:#0b0c0d!important}
}

/* Mobile: painel e área pública usam a mesma linguagem visual. */
@media (max-width: 860px){
  html[data-theme="light"] :is(.mobile-bottom-nav,.customer-mobile-bottom-nav){
    background:#fff!important;border:1px solid #d8ded4!important;color:#59636c!important;
    box-shadow:0 14px 34px rgba(32,40,28,.14)!important
  }
  html[data-theme="light"] :is(.mobile-bottom-nav,.customer-mobile-bottom-nav) :is(a,button){color:#667078!important}
  html[data-theme="light"] :is(.mobile-bottom-nav,.customer-mobile-bottom-nav) :is(a.active,a[aria-current="page"]){
    background:#f1f5e8!important;color:#171a1d!important;box-shadow:inset 0 0 0 1px #dce7c0!important
  }
  html[data-theme="light"] :is(.mobile-bottom-nav,.customer-mobile-bottom-nav) :is(a.active,a[aria-current="page"]) span{color:#171a1d!important}

  /* calendário do dashboard: nenhum dia útil fica com cartão preto no tema claro */
  html[data-theme="light"] .mobile-date-strip{border-color:#d9ded5!important}
  html[data-theme="light"] .mobile-date-strip :is(a,button,.mobile-date-card,.date-chip){
    background:#fff!important;color:#59636c!important;border-color:#d8ded4!important;box-shadow:none!important
  }
  html[data-theme="light"] .mobile-date-strip :is(a,button,.mobile-date-card,.date-chip) :is(strong,b){color:#171a1d!important}
  html[data-theme="light"] .mobile-date-strip :is(a,button,.mobile-date-card,.date-chip) :is(span,small){color:#6b747c!important}
  html[data-theme="light"] .mobile-date-strip :is(.active,[aria-current="date"]){background:#f1f5e8!important;border-color:var(--accent)!important}

  /* agenda do dia: cada atendimento vira uma única faixa compacta. */
  .team-agenda-panel .daily-appointment{
    min-height:72px!important;margin-bottom:7px!important;padding:9px 10px!important;
    grid-template-columns:58px minmax(0,1fr) auto!important;
    grid-template-areas:"time customer status" "time customer actions"!important;
    gap:3px 9px!important;align-items:center!important;border-radius:12px!important
  }
  .team-agenda-panel .daily-time{grid-area:time!important;padding-right:8px!important}
  .team-agenda-panel .daily-time strong{font-size:15px!important}
  .team-agenda-panel .daily-customer{grid-area:customer!important;min-width:0!important;padding:0!important}
  .team-agenda-panel .daily-customer strong{display:block!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .team-agenda-panel .daily-customer span{margin-top:3px!important;font-size:8px!important;white-space:nowrap!important;display:block!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .team-agenda-panel .daily-status{grid-area:status!important;justify-content:flex-end!important;align-self:end!important}
  .team-agenda-panel .daily-status .status{padding:4px 6px!important;font-size:6.5px!important}
  .team-agenda-panel .daily-actions{grid-area:actions!important;justify-content:flex-end!important;align-self:start!important}
  .team-agenda-panel .daily-actions .appointment-status-form{flex-wrap:nowrap!important;gap:4px!important}
  .team-agenda-panel .appointment-action{min-height:24px!important;padding:4px 6px!important;font-size:7px!important}
  .team-agenda-panel :is(.daily-value,.daily-barber){display:none!important}
  html[data-theme="light"] .team-agenda-panel .daily-appointment{background:#fff!important;border-color:#d8ded4!important;box-shadow:0 5px 15px rgba(32,40,28,.06)!important}
}

/* v1.3.73 — hero público mantém superfície escura em ambos os temas.
   Corrige o título do card "Como funciona" que herdava a cor de texto do tema claro. */
html[data-theme="light"] .shop-hero-v320-card h2,
html[data-theme="dark"] .shop-hero-v320-card h2{
  color:#f7f8f5!important;
  -webkit-text-fill-color:#f7f8f5!important;
}
html[data-theme="light"] .shop-hero-v320-card .eyebrow,
html[data-theme="dark"] .shop-hero-v320-card .eyebrow{color:var(--accent)!important}
html[data-theme="light"] .shop-hero-v320-step strong,
html[data-theme="dark"] .shop-hero-v320-step strong{color:#f7f8f5!important}
html[data-theme="light"] .shop-hero-v320-step small,
html[data-theme="dark"] .shop-hero-v320-step small,
html[data-theme="light"] .shop-hero-v320-card-foot small,
html[data-theme="dark"] .shop-hero-v320-card-foot small{color:#bfc5cc!important}
