/* SalonPro Mobile App Design 2.1 — QA only, 22 Nov 2026.
 * Pure presentation layer: uses existing authenticated controls and real records.
 * No mocked data, new API calls, payment changes or schema changes.
 * Scope owner/master/founder + existing public booking flow to phone widths.
 */
@media (max-width:650px){
  .owner-workspace,.master-workspace,.operator-workspace{
    --primary:#087f69;
    --primary-dark:#065a4f;
    --ink:#17343b;
    --muted:#81949c;
    --line:#e5edef;
    --light:#eaf7f1;
    background:#f4f7f8;
    color:#17343b;
  }
  /* Phone chrome: stable top bar and true safe-area spacing. */
  :is(.owner-workspace,.master-workspace) .main{
    min-width:0;max-width:100%;
  }
  :is(.owner-workspace,.master-workspace) .app-top{
    position:sticky;top:0;z-index:9;
    display:flex;align-items:center;gap:9px;
    height:auto;min-height:66px;
    padding:9px 14px;
    background:#fff;border-bottom:1px solid #e7eff0;
    box-shadow:0 3px 14px #143d3910;
  }
  :is(.owner-workspace,.master-workspace) .app-top>.muted{
    display:none!important;
  }
  :is(.owner-workspace,.master-workspace) .app-top>.mobile-brand{
    flex:1 1 auto;min-width:0;
  }
  :is(.owner-workspace,.master-workspace) .app-top .brand{
    min-width:0;font-size:1rem;gap:8px;color:#173c3b;
  }
  :is(.owner-workspace,.master-workspace) .app-top .brand-mark{
    flex:0 0 35px;width:35px;height:35px;
    display:grid;place-items:center;
    border-radius:12px;background:linear-gradient(135deg,#056c5a,#14b58e);
    color:#fff;box-shadow:0 4px 10px #008b6f20;
  }
  :is(.owner-workspace,.master-workspace) .app-top .top-actions{
    flex:0 0 auto;gap:7px;min-width:0;
  }
  :is(.owner-workspace,.master-workspace) .app-top .lang,
  :is(.owner-workspace,.master-workspace) .app-top .inbox-top-link{
    min-width:35px;min-height:35px;border-radius:11px;
    background:#f3f7f7;border:1px solid #e8eded;color:#276353;
  }
  :is(.owner-workspace,.master-workspace) #content.page{
    min-width:0;padding:15px 13px calc(110px + env(safe-area-inset-bottom));
    gap:15px;
  }
  :is(.owner-workspace,.master-workspace) .page-header h1{
    font-size:clamp(1.38rem,5vw,1.85rem);line-height:1.17;color:#19383f;
  }
  :is(.owner-workspace,.master-workspace) .page-desc{
    font-size:.77rem;line-height:1.45;color:#8b9da5;
  }
  /* Native-app bottom dock; existing links, active state and more drawer stay intact. */
  :is(.owner-workspace,.master-workspace) .bottomnav{
    position:fixed!important;left:8px!important;right:8px!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    z-index:10;display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:stretch;gap:2px;
    min-height:65px;padding:5px!important;
    background:#fff!important;border:1px solid #e3ebeb!important;
    border-radius:20px!important;box-shadow:0 10px 32px #164b4030!important;
    backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  :is(.owner-workspace,.master-workspace) .bottomnav>a,
  :is(.owner-workspace,.master-workspace) .bottomnav>.mobile-more-trigger{
    display:flex!important;flex-direction:column;align-items:center;justify-content:center;
    position:relative;flex:1;min-width:0;width:100%;min-height:54px;
    gap:3px;padding:5px 1px!important;margin:0!important;
    border:0;border-radius:13px;background:transparent;
    color:#879ba1;font-size:.6rem!important;font-weight:780;
    line-height:1.15;text-align:center;white-space:normal;
    overflow-wrap:anywhere;text-decoration:none;
  }
  :is(.owner-workspace,.master-workspace) .bottomnav :is(a.active,.mobile-more-trigger.active){
    background:#e5f6ef!important;color:#07856c!important;
  }
  :is(.owner-workspace,.master-workspace) .bottomnav :is(a.active,.mobile-more-trigger.active) .ico{
    color:#07856c!important;
  }
  :is(.owner-workspace,.master-workspace) .bottomnav .ico,
  :is(.owner-workspace,.master-workspace) .bottomnav .ico svg{
    width:20px;height:20px;display:inline-grid;place-items:center;
  }
  :is(.owner-workspace,.master-workspace) .mobile-more-scrim:not([hidden]){
    background:#123c3799;backdrop-filter:blur(3px);
  }
  :is(.owner-workspace,.master-workspace) .mobile-more-panel:not([hidden]){
    left:9px;right:9px;
    bottom:calc(91px + env(safe-area-inset-bottom));
    max-height:min(65dvh,540px);padding:13px;
    border-radius:22px;background:#fff;border:1px solid #e4ecee;
    box-shadow:0 22px 70px #163f3b30;
    overscroll-behavior:contain;
  }
  :is(.owner-workspace,.master-workspace) :is(.button,.btn-link,button,a):focus-visible,
  .operator-workspace :is(.button,button,a):focus-visible{
    outline:3px solid #4fc3a4;outline-offset:2px;
  }
  /* Real salon dashboard: keep the true public URL and every share action. */
  .owner-workspace .owner-home{gap:12px}
  .owner-workspace .owner-home-hero{
    padding:17px 15px 15px;border-radius:21px;
    background:linear-gradient(125deg,#056a59,#098c72 71%,#13ae8c);
    box-shadow:0 12px 28px #07867423;
  }
  .owner-workspace .owner-home-hero h1{
    font-size:clamp(1.48rem,6vw,1.85rem);margin:0 0 5px;
  }
  .owner-workspace .owner-home-link-label{margin:10px 0 5px;color:#d3f7ec}
  .owner-workspace .owner-home-url{
    border-radius:11px;background:#ffffff17;border-color:#ffffff36;
    color:#fff;font-size:.73rem;
  }
  .owner-workspace .owner-home-hero-actions{margin-top:10px}
  .owner-workspace .owner-home-hero-actions :is(.owner-home-share,.owner-home-visit,.owner-home-copy){
    min-height:53px;border-radius:12px;
  }
  .owner-workspace .owner-home-kpis{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  }
  .owner-workspace .owner-home-kpi{
    min-height:101px;display:grid;
    grid-template-columns:34px minmax(0,1fr);
    gap:5px 9px;padding:12px 10px;
    border:1px solid #e6eef0;border-radius:16px;background:#fff;
    box-shadow:0 3px 12px #12443a08;
  }
  .owner-workspace .owner-home-kpi-icon{
    width:33px;height:33px;grid-row:span 2;border-radius:11px;
    background:#e1f7ed;color:#087d67;
  }
  .owner-workspace .owner-home-kpi-expected .owner-home-kpi-icon{
    background:#fff0db;color:#d58b31;
  }
  .owner-workspace .owner-home-kpi-received .owner-home-kpi-icon{
    background:#e9eeff;color:#5879c9;
  }
  .owner-workspace .owner-home-kpi-attention .owner-home-kpi-icon{
    background:#f0e8ff;color:#9165cf;
  }
  .owner-workspace .owner-home-kpi strong{
    font-size:clamp(1.08rem,5vw,1.43rem);color:#1b3b42;line-height:1.12;
    overflow-wrap:anywhere;
  }
  .owner-workspace .owner-home-kpi small{
    font-size:.67rem;line-height:1.24;color:#78919b;
  }
  .owner-workspace .owner-home-panel{
    padding:14px 13px;border-radius:17px;background:#fff;
    border-color:#e7eef0;box-shadow:0 5px 17px #19443d0a;
  }
  .owner-workspace .owner-home-panel-head h2{font-size:1.12rem;color:#1b4140}
  .owner-workspace .owner-home-appointment{
    min-width:0;grid-template-columns:48px minmax(0,1fr) auto;
    gap:8px;padding:11px 9px;border-radius:13px;
    background:#fff;border:1px solid #e8eeee;
  }
  .owner-workspace .owner-home-appointment-time{
    font-size:.79rem;color:#087b66;font-variant-numeric:tabular-nums;
  }
  .owner-workspace .owner-home-appointment strong{font-size:.76rem}
  .owner-workspace .owner-home-appointment .status{
    max-width:100%;white-space:normal;text-align:center;font-size:.57rem;
  }
  .owner-workspace .owner-home-step{
    padding:10px;border-radius:12px;background:#f9fcfb;border-color:#e8efed;
  }
  .owner-workspace .owner-home-queue-item{
    min-width:0;border-radius:13px;overflow-wrap:anywhere;
  }
  /* Owner calendar & client CRM: readable records, not an overflowing desktop table. */
  .owner-workspace .owner-calendar-metrics{gap:7px}
  .owner-workspace .owner-calendar-metric{
    min-width:0;gap:5px;padding:10px 8px;
    background:#fff;border-color:#e5edef;border-radius:13px;
    box-shadow:none;
  }
  .owner-workspace .owner-calendar-metric>span{
    flex:0 0 29px;width:29px;height:29px;border-radius:10px;
  }
  .owner-workspace .owner-calendar-metric small{font-size:.6rem;overflow-wrap:anywhere}
  .owner-workspace .owner-calendar-metric strong{font-size:1.19rem}
  .owner-workspace .owner-day-visit{
    border-radius:15px;background:#fff;border-color:#e7eef0;
    box-shadow:0 3px 12px #12443b08;padding:12px;
  }
  .owner-workspace .owner-day-visit-time span{color:#067a65}
  .owner-workspace .owner-day-visit-actions button{min-height:44px}
  .owner-workspace .owner-agenda-tools{
    border-radius:14px;border-color:#e3eced;background:#f7faf9;
  }
  .owner-workspace .owner-agenda-filter[aria-pressed="true"]{
    background:#07856c;border-color:#07856c;
  }
  .owner-workspace .owner-client-card,
  .owner-workspace .owner-team-card{
    background:#fff;border-color:#e8eff0;border-radius:16px;
    box-shadow:0 3px 12px #12443a08;
  }
  .owner-workspace .owner-client-avatar{
    border-radius:13px;background:#e6f4ed;
  }
  .owner-workspace .owner-client-card-actions .owner-client-action{
    min-height:44px;border-radius:11px;
  }
  /* Master diary: native summary strip, clean client rows and no hidden actions. */
  .master-workspace .master-premium-dashboard{gap:13px}
  .master-workspace .master-studio-hero.master-premium-hero{
    border-radius:20px;padding:18px 16px;
    background:linear-gradient(125deg,#e6f6ee,#f6fbf5);
    box-shadow:0 8px 24px #104d3712;border-color:#dceee3;
  }
  .master-workspace .master-studio-hero h1{
    font-size:clamp(1.5rem,6vw,1.85rem);color:#194b3c;
  }
  .master-workspace .master-studio-hero p{line-height:1.4}
  .master-workspace .master-premium-stats{gap:7px}
  .master-workspace .master-premium-stat{
    min-width:0;min-height:108px;padding:10px 8px;
    border-radius:15px;background:#fff;border-color:#e8efec;
    box-shadow:0 3px 12px #144f3b08;
  }
  .master-workspace .master-premium-stat-icon{
    width:30px;height:30px;border-radius:10px;
  }
  .master-workspace .master-premium-stat strong{
    font-size:clamp(1.19rem,5vw,1.55rem);color:#193f36;
  }
  .master-workspace .master-premium-stat-label{
    min-height:0;font-size:.65rem;line-height:1.25;
    overflow-wrap:anywhere;
  }
  .master-workspace .master-premium-diary{
    padding:13px;border-radius:18px;background:#fff;border-color:#e7efeb;
    box-shadow:0 4px 16px #174b3d0b;
  }
  .master-workspace .master-premium-visit.master-visit{
    /* Keep the existing one-column Android diary: time remains a flex row. */
    grid-template-columns:minmax(0,1fr);
    gap:8px;padding:12px 10px;border-radius:14px;
    border:1px solid #e7eeee;border-left:3px solid #0b9676;
    background:#fff;box-shadow:0 2px 9px #184b3909;
  }
  .master-workspace .master-premium-visit-time{
    padding-right:0;border-right:0;
  }
  .master-workspace .master-premium-visit-time strong{
    font-size:1.02rem;color:#0c7c66;font-variant-numeric:tabular-nums;
  }
  .master-workspace .master-premium-client-avatar{
    width:38px;height:38px;flex-basis:38px;border-radius:12px;
    background:#e4f4e9;color:#286b4c;
  }
  .master-workspace .master-premium-client-name strong{
    font-size:.83rem;color:#24433c;
  }
  .master-workspace .master-premium-visit .master-actions .button{
    min-height:44px;
  }
  /* Founder console: keep existing four-tab navigation, fixed app-style dock. */
  .operator-workspace .operator-console[data-founder-tabs]{
    width:calc(100% - 22px);min-width:0;gap:10px;
    margin:10px auto 0;
    padding-bottom:calc(104px + env(safe-area-inset-bottom));
  }
  .operator-workspace .operator-console[data-founder-tabs] > .operator-hero{
    padding:16px;border-radius:19px;border-color:#e8efef;
    background:#fff;box-shadow:0 5px 18px #17423c0b;
  }
  .operator-workspace .operator-hero-heading h1{
    font-size:1.28rem;color:#163b40;
  }
  .operator-workspace .operator-console[data-founder-tabs] > .operator-tabs{
    /* Native tab bar touches the viewport edge; reserve iOS safe area inside. */
    left:0;right:0;bottom:0;
    width:100%;min-height:65px;
    border-radius:19px 19px 0 0;border:1px solid #e2ebec;
    border-bottom:0;
    padding:5px 5px max(8px,env(safe-area-inset-bottom));
    background:#fff;
    box-shadow:0 -7px 25px #173f3c21;
    grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;
  }
  .operator-workspace .operator-console[data-founder-tabs] > .operator-tabs>button{
    min-height:54px;border-radius:13px;
    font-size:.59rem;color:#82949e;gap:4px;
  }
  .operator-workspace .operator-console[data-founder-tabs] > .operator-tabs>button[aria-pressed="true"]{
    background:#e5f6ed!important;border-color:transparent;color:#087f69;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-kpi{
    /* Native KPI tiles stay under 85px on 390px phones. */
    min-width:0;min-height:76px;padding:8px 9px;
    background:#fff;border-color:#e8eff0;border-radius:14px;
    box-shadow:0 4px 12px #16413908;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-kpi-icon{
    background:#e1f6eb;color:#087d66;border-radius:10px;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-kpi strong{
    color:#173a3d;font-size:1.2rem;overflow-wrap:anywhere;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-panel{
    border-radius:16px;padding:13px;background:#fff;border-color:#e7eff0;
    box-shadow:0 4px 15px #16433908;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-salon-card{
    border-radius:14px;background:#fff;border-color:#e8eff0;
    box-shadow:0 3px 12px #18433908;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-filter.is-active{
    background:#087d67;color:#fff;border-color:#087d67;
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-salon-actions>.button{
    min-height:44px;
  }
  /* Public booking only: visual-only changes to real booking flow. */
  .booking-wrap{
    max-width:650px;padding:15px 13px calc(92px + env(safe-area-inset-bottom));
  }
  .booking-wrap .booking-card{
    max-width:100%;margin:13px auto 0;
    border-radius:19px;border-color:#e7eeee;
    box-shadow:0 7px 23px #1943380d;
  }
  .booking-wrap :is(.slot,.button){
    min-height:44px;border-radius:12px;
  }
  .booking-wrap .slot.selected{
    color:#fff;background:#087f69;border-color:#087f69;
  }
  /* Do not conceal validation hints, status, disabled controls or errors. */
  :is(.owner-workspace,.master-workspace,.operator-workspace) [hidden]{
    display:none!important;
  }
}
@media (max-width:355px){
  :is(.owner-workspace,.master-workspace) #content.page{
    padding-left:9px;padding-right:9px;
  }
  :is(.owner-workspace,.master-workspace) .bottomnav{
    left:5px!important;right:5px!important;padding:4px!important;
  }
  :is(.owner-workspace,.master-workspace) .bottomnav>a,
  :is(.owner-workspace,.master-workspace) .bottomnav>.mobile-more-trigger{
    font-size:.55rem!important;padding:4px 0!important;
  }
  .owner-workspace .owner-home-kpi{padding:10px 7px;gap:4px 6px}
  .owner-workspace .owner-home-kpi strong{font-size:1.07rem}
  .owner-workspace .owner-home-appointment{
    gap:5px;padding:9px 7px;grid-template-columns:42px minmax(0,1fr);
  }
  .owner-workspace .owner-home-appointment .status{
    grid-column:2;justify-self:start;
  }
  .master-workspace .master-premium-stat{padding:9px 6px}
  .master-workspace .master-premium-stat-label{font-size:.61rem}
  .operator-workspace .operator-console[data-founder-tabs]{
    width:calc(100% - 14px);
  }
  .operator-workspace .operator-console[data-founder-tabs] .operator-kpi{
    padding:9px 7px;
  }
  .booking-wrap{padding-left:9px;padding-right:9px}
}
@media (prefers-reduced-motion:reduce){
  :is(.owner-workspace,.master-workspace,.operator-workspace) *,
  .booking-wrap *{
    scroll-behavior:auto!important;transition-duration:0s!important;
    animation-duration:0s!important;
  }
}
