#barber-commission-rules { width:min(600px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);box-sizing:border-box;margin:auto;padding:20px;overflow:auto;border:1px solid #344750;background:#18262f;border-radius:22px;color:#e5edf3; }
#barber-commission-rules::backdrop { background:#000b;backdrop-filter:blur(4px); }
#barber-commission-rules .comm-rules-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:20px; }
#barber-commission-rules h3 { font-size:19px; font-weight:700; margin:0 0 6px; }
#barber-commission-rules p { font-size:12px; line-height:1.5; color:#acbec9; }
#barber-commission-rules button { min-height:44px; border:1px solid #39704e; background:#224332; color:#afe7c2; border-radius:12px; padding:10px 16px; font-weight:650; font-size:13px; }
#barber-commission-rules .comm-rules-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; }
#barber-commission-rules .comm-rule-field { display:flex; flex-direction:column; min-width:0; gap:7px; color:#bdcdd6; font-size:11px; }
#barber-commission-rules .comm-rule-field > span { min-height:30px; line-height:1.35; }
#barber-commission-rules .comm-rule-field > div { position:relative; }
#barber-commission-rules .comm-rule-field b { position:absolute; right:12px; top:14px; color:#91ac9f; }
#barber-commission-rules input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; height:48px; padding:10px 28px 10px 12px; background:#101d25 !important; color:#dcebe3 !important; -webkit-text-fill-color:#dcebe3 !important; border:1px solid #3a515c !important; border-radius:12px !important; font-size:16px; opacity:1 !important; }
#barber-commission-rules input:disabled { cursor:default; }
#barber-commission-rules input::placeholder { font-size:11px; color:#acc0cd; -webkit-text-fill-color:#acc0cd; opacity:1; }
#barber-commission-rules .comm-rules-note { margin:12px 0; }
#barber-commission-rules .comm-rules-section { margin-top:18px; border-top:1px solid #344750; padding-top:16px; }
#barber-commission-rules summary { font-size:14px; font-weight:650; cursor:pointer; padding:5px 0; }
#barber-commission-rules .comm-tier-row { display:grid; grid-template-columns:minmax(0,1fr) 105px; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid #2c414b; font-size:13px; }
#barber-commission-rules .comm-tier-row label>span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#barber-commission-rules .comm-override { margin-top:16px; padding:14px; border-radius:15px; background:#13212a; }
#barber-commission-rules h4 { font-size:14px; margin-bottom:16px; font-weight:650; }
#barber-commission-rules .comm-rules-save { margin-top:20px; padding-top:18px; border-top:1px solid #3d535e; }
#barber-commission-rules .comm-rules-save button { width:100%; background:#16a34a; color:#062310; margin-top:14px; }
#barber-commission-rules .comm-rules-save label>span { min-height:0; }
#barber-commission-rules .comm-rules-feedback { color:#b7ebc8; margin-top:14px; }

/* Agenda header alignment and confirmation motion. */
#barber-schedule-calendar .barber-agenda-history-nav { align-items:flex-end; }
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #modal-barber-confirm { padding:12px 12px calc(14px + env(safe-area-inset-bottom)) !important; align-items:flex-end !important; background:#050b1299 !important; }
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #modal-barber-confirm > div { width:100% !important; max-width:440px !important; border-radius:24px !important; overflow:hidden; box-shadow:0 18px 60px #0007; }
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #modal-barber-confirm > div > div:first-child { padding:24px 22px 20px !important; }
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #modal-barber-confirm > div > div:last-child { display:grid !important; grid-template-columns:minmax(0,.6fr) minmax(0,1.4fr); gap:10px !important; padding:16px 20px 20px !important; background:#15232c !important; }
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #modal-barber-confirm button { min-height:48px; border-radius:13px !important; font-size:13px !important; padding:12px !important; }
html.fluxo-barber-app #modal-barber-confirm.is-open { animation:barber-confirm-fade-in .22s ease both; }
html.fluxo-barber-app #modal-barber-confirm.is-open > div { animation:barber-confirm-in .28s cubic-bezier(.2,.8,.2,1) both; }
html.fluxo-barber-app #modal-barber-confirm.is-leaving { animation:barber-confirm-fade-out .2s ease both; pointer-events:none; }
html.fluxo-barber-app #modal-barber-confirm.is-leaving > div { animation:barber-confirm-out .2s ease both; }
@keyframes barber-confirm-fade-in { from {opacity:0} to {opacity:1} }
@keyframes barber-confirm-fade-out { from {opacity:1} to {opacity:0} }
@keyframes barber-confirm-in { from {transform:translateY(28px);opacity:0} to {transform:translateY(0);opacity:1} }
@keyframes barber-confirm-out { from {transform:translateY(0);opacity:1} to {transform:translateY(20px);opacity:0} }
@media (prefers-reduced-motion:reduce) { html.fluxo-barber-app #modal-barber-confirm,html.fluxo-barber-app #modal-barber-confirm > div { animation:none !important; } }
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #app-container #barber-schedule-calendar :is(#barber-agenda-view-date,.barber-agenda-history-nav button) { height:48px !important; min-height:48px !important; box-sizing:border-box; }

html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #modal-barber-confirm > div > div:last-child > button:first-child { color:#e4edf1 !important; background:#243640 !important; border:1px solid #405661 !important; }

/* The visible date uses the same centering on iOS and other browsers.
   The native date input remains the touch/keyboard calendar control. */
#barber-schedule-calendar .barber-agenda-history-picker--centered {
 position:relative; height:48px; box-sizing:border-box; border:1px solid #3c5d49;
 border-radius:12px; background:#152b20;
}
#barber-schedule-calendar .barber-agenda-history-picker--centered > span {
 position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
 margin:0; padding:0 8px; color:#b3e8c4; font-size:14px; line-height:1;
 white-space:nowrap; pointer-events:none;
}
html.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app.fluxo-barber-app #app-container #barber-schedule-calendar .barber-agenda-history-picker--centered #barber-agenda-view-date {
 position:absolute; inset:0; width:100%; height:100% !important; min-height:0 !important;
 margin:0; padding:0; border:0 !important; opacity:0; cursor:pointer;
}
#barber-schedule-calendar .barber-agenda-history-picker--centered:focus-within {
 outline:2px solid #16a34a; outline-offset:2px;
}
