/* Complete light/dark treatment for the owner dashboard. */
body{color-scheme:light;background:var(--bg);transition:background-color .2s,color .2s}
.top,.card,.stat,.customer-record,.date,.toolbar input,.field input,.field select,.field textarea,.owner-menu-toggle,.owner-menu-panel,.membership-header,.record{transition:background-color .2s,border-color .2s,color .2s}
.toolbar input{background:var(--card);color:var(--ink)}
.toolbar input::placeholder,.field input::placeholder,.field textarea::placeholder{color:var(--muted);opacity:.9}
.field input:disabled,.field select:disabled,.field textarea:disabled{background:#eef3f2;color:#526864;opacity:1;cursor:not-allowed}

body{color-scheme:light;background:var(--bg);transition:background-color .2s,color .2s}
.top,.card,.stat,.customer-record,.date,.toolbar input,.field input,.field select,.field textarea,.owner-menu-toggle,.owner-menu-panel,.membership-header,.record{transition:background-color .2s,border-color .2s,color .2s}
.toolbar input{background:var(--card);color:var(--ink)}
.toolbar input::placeholder,.field input::placeholder,.field textarea::placeholder{color:var(--muted);opacity:.9}
.field input:disabled,.field select:disabled,.field textarea:disabled{background:#eef3f2;color:#526864;opacity:1;cursor:not-allowed}

@media(max-width:600px){
  .shop-top .theme-toggle{overflow:hidden}
  .shop-top .theme-toggle span{left:50%!important;right:auto!important;top:50%!important;transform:translate(-50%,-50%);transition:opacity .2s,transform .2s}
  .shop-top .theme-toggle .theme-moon{opacity:0}
  .shop-dark .shop-top .theme-toggle .theme-sun{opacity:0}
  .shop-dark .shop-top .theme-toggle .theme-moon{opacity:1}
}

/* Dark mode contrast for every remaining dashboard surface. */
.shop-dark{color-scheme:dark;--bg:#0d1b1a;--card:#172d2b;--ink:#f1faf7;--muted:#b4cbc5;--line:#365651;--soft:#20413d;background:var(--bg);color:var(--ink)}
.shop-dark .top,.shop-dark .card,.shop-dark .stat,.shop-dark .date,.shop-dark .customer-record,.shop-dark .record,.shop-dark .customer-panel-actions,.shop-dark .toolbar input,.shop-dark .field input,.shop-dark .field select,.shop-dark .field textarea,.shop-dark .owner-menu-toggle,.shop-dark .owner-menu-panel{background:var(--card);color:var(--ink);border-color:var(--line)}
.shop-dark .customer-header,.shop-dark .rx th,.shop-dark .rx td:nth-child(2),.shop-dark .rx td:nth-child(3){background:var(--soft);color:var(--ink)}
.shop-dark .rx th:first-child{background:var(--card);color:var(--muted)}
.shop-dark .rx td,.shop-dark .customer-panel-actions,.shop-dark .record{border-color:var(--line)}
.shop-dark .ghost{background:#294944;color:#effaf7}.shop-dark .danger{background:#43282a;color:#ffb8b8}
.shop-dark .membership-header,.shop-dark .membership-header.trial,.shop-dark .membership-header.annual,.shop-dark .membership-header.lifetime{background:#1c3935;border-color:#41665f;color:#e8f7f3}
.shop-dark .membership-header span,.shop-dark .membership-header b,.shop-dark .membership-header small{color:#d4e9e4}
.shop-dark .owner-menu-copy small,.shop-dark .customer-header small,.shop-dark .record small,.shop-dark .muted{color:var(--muted)}
.shop-dark .owner-menu-panel button{color:#e6f4f0}.shop-dark .owner-menu-panel button:hover{background:#284842}.shop-dark .owner-menu-panel .menu-logout{color:#ffabab;border-color:var(--line)}
.shop-dark .notice{background:#21433f;color:#c5f2e8}.shop-dark .notice.error{background:#43282a;color:#ffb8b8}
.shop-dark .money-grid input[readonly]{background:#203d39!important;border-color:#42655f!important;color:#c7f4e9!important}
.shop-dark option{background:#172d2b;color:#f1faf7}

/* Accessible required birth-date control in both themes. */
.required-mark{margin-left:5px;color:#a13d3d;font-size:9px;text-transform:uppercase;letter-spacing:.05em}
.birth-date-wrap{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:6px}
.birth-date-wrap .birth-date{min-width:0;padding-right:10px!important}
.birth-date-picker{height:42px;border:1px solid #a8ded4;border-radius:9px;background:#e7f6f2;color:#106f64;font-size:18px;cursor:pointer}
.birth-date-picker:hover{background:#d6efe9}.birth-date-picker:disabled{cursor:not-allowed;opacity:.55}
.shop-dark .required-mark{color:#ffaaaa}.shop-dark .birth-date-picker{background:#294944;color:#dff8f2;border-color:#4b756d}.shop-dark .birth-date-picker:hover{background:#365c55}
.shop-dark .birth-date::-webkit-calendar-picker-indicator{filter:invert(1) brightness(1.5);opacity:1}

/* The native date input already includes its own calendar control. */
.required-mark{display:none!important}
.birth-date-wrap{position:relative;display:block;width:100%}
.birth-date-wrap .birth-date{display:block;width:100%;height:46px;padding-right:54px!important;border-color:#b9dcd5!important;border-radius:10px!important;background:#f8fcfb!important;color:#183c37!important;box-shadow:0 1px 2px rgba(18,75,67,.04)}
.birth-date-wrap .birth-date:focus{outline:0;border-color:#168d7d!important;box-shadow:0 0 0 3px rgba(22,141,125,.13)}
.birth-date-wrap .birth-date::-webkit-calendar-picker-indicator{opacity:0;width:0;margin:0;padding:0}
.birth-date-picker{position:absolute;top:1px;right:1px;z-index:2;display:grid!important;place-items:center;width:46px;height:44px;padding:0;border:0;border-left:1px solid #cee3df;border-radius:0 9px 9px 0;background:transparent;color:#147568;font-size:0;line-height:1;cursor:pointer}
.birth-date-picker:before{content:'';display:block;width:16px;height:15px;border:2px solid currentColor;border-radius:3px;box-shadow:inset 0 4px 0 currentColor}
.birth-date-picker:hover,.birth-date-picker:focus-visible{background:#e5f5f1;outline:0}
.birth-date-picker:disabled{background:transparent;cursor:not-allowed;opacity:.45}
.shop-dark .birth-date-wrap .birth-date{background:#19312f!important;color:#edf7f4!important;border-color:#446861!important;box-shadow:none}
.shop-dark .birth-date-wrap .birth-date:focus{border-color:#55b7a3!important;box-shadow:0 0 0 3px rgba(85,183,163,.16)}
.shop-dark .birth-date-picker{background:transparent;color:#8edbc9;border-left-color:#3d625c}.shop-dark .birth-date-picker:hover,.shop-dark .birth-date-picker:focus-visible{background:#284842}

@media(max-width:600px){
  .birth-date:invalid,.birth-date:invalid::-webkit-datetime-edit,.birth-date:invalid::-webkit-datetime-edit-text,.birth-date:invalid::-webkit-datetime-edit-month-field,.birth-date:invalid::-webkit-datetime-edit-day-field,.birth-date:invalid::-webkit-datetime-edit-year-field{color:#9aadaa!important;font-weight:500!important}
  .birth-date:valid,.birth-date:valid::-webkit-datetime-edit,.birth-date:valid::-webkit-datetime-edit-text,.birth-date:valid::-webkit-datetime-edit-month-field,.birth-date:valid::-webkit-datetime-edit-day-field,.birth-date:valid::-webkit-datetime-edit-year-field{color:#183c37!important;font-weight:700!important}
  .shop-dark .birth-date:invalid,.shop-dark .birth-date:invalid::-webkit-datetime-edit,.shop-dark .birth-date:invalid::-webkit-datetime-edit-text,.shop-dark .birth-date:invalid::-webkit-datetime-edit-month-field,.shop-dark .birth-date:invalid::-webkit-datetime-edit-day-field,.shop-dark .birth-date:invalid::-webkit-datetime-edit-year-field{color:#7f9d97!important}
  .shop-dark .birth-date:valid,.shop-dark .birth-date:valid::-webkit-datetime-edit,.shop-dark .birth-date:valid::-webkit-datetime-edit-text,.shop-dark .birth-date:valid::-webkit-datetime-edit-month-field,.shop-dark .birth-date:valid::-webkit-datetime-edit-day-field,.shop-dark .birth-date:valid::-webkit-datetime-edit-year-field{color:#edf7f4!important}
}
