/* House Manager 360: shared finishing layer. Keep appearance settings in control. */
.login-card,.panel,.stat,.table-wrap,.modal-card,.room-card{
  border:1px solid var(--line);
  box-shadow:0 10px 30px color-mix(in srgb,var(--ink) 5%,transparent);
}
.login-card{max-width:480px}
.login-card input,.login-card select{min-height:46px;width:100%}
.page-head{max-width:100%;padding-bottom:4px}
.page-head h1{overflow-wrap:anywhere}
.page-head p{max-width:70ch;line-height:1.55}
.panel,.stat,.room-card{min-width:0}
.panel h2,.panel h3{line-height:1.3}
.btn,.icon-btn,.avatar{transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s}
.btn:disabled,.icon-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.btn:not(:disabled):hover,.icon-btn:not(:disabled):hover{box-shadow:0 4px 12px color-mix(in srgb,var(--ink) 9%,transparent)}
.table-wrap{max-width:100%;overflow-x:auto}
.table-wrap th,.table-wrap td{overflow-wrap:anywhere}
.table-wrap th{z-index:1;white-space:nowrap}
.form-grid>*{min-width:0}
.form-grid input,.form-grid select,.form-grid textarea{max-width:100%}
.modal-card{max-width:min(720px,100%)}
.sidebar nav button:focus-visible,.nav-more summary:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
.sidebar nav button.active{box-shadow:inset 3px 0 var(--primary)}
.topbar .top-actions{min-width:0}
.topbar .search-box input{max-width:100%}

/* The same five destinations stay visible on every resident screen. */
.resident-head{border-bottom:1px solid color-mix(in srgb,var(--panel) 25%,transparent)}
.resident-head .brand{min-width:0}
.resident-head .brand>div:last-child{min-width:0}
.resident-head .brand strong,.resident-head .brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.resident-head .brand strong{color:#fff}
.resident-head .brand span{color:#d0e9dc}
.resident-head .brand-mark{background:#ffffff23;box-shadow:none}
.resident-nav{
  width:100%;justify-content:center;gap:4px;overflow:visible;scroll-snap-type:none;
  border-bottom:1px solid var(--line);box-shadow:0 5px 18px color-mix(in srgb,var(--ink) 5%,transparent);
  z-index:32;
}
.resident-nav button{
  min-width:100px;max-width:180px;min-height:60px;flex:1 1 120px;
  display:flex;justify-content:center;align-items:center;gap:8px;
  padding:10px 14px;white-space:nowrap;overflow:hidden;
  border:0;border-bottom:3px solid transparent;border-radius:0;
  color:var(--muted)!important;background:transparent;font-size:13px;font-weight:650;
}
.resident-nav button span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.resident-nav button .app-icon{width:21px;height:21px;flex:0 0 auto}
.resident-nav button:hover{background:var(--panel2);color:var(--ink)!important}
.resident-nav button.active{background:var(--primary-soft);color:var(--accent-ink)!important;border-color:var(--primary)}
.resident-more-panel{
  position:fixed;z-index:42;right:max(18px,calc((100vw - 1100px)/2));top:142px;
  width:min(520px,calc(100vw - 28px));max-height:min(68dvh,590px);overflow-y:auto;
  padding:20px;background:var(--panel);color:var(--ink);border:1px solid var(--line);
  border-radius:18px;box-shadow:0 24px 58px color-mix(in srgb,var(--ink) 22%,transparent);
}
.resident-more-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}
.resident-more-heading b{font-size:18px;letter-spacing:-.025em}
.resident-more-heading p{color:var(--muted);font-size:13px;margin:4px 0 0;line-height:1.5}
.resident-more-heading .icon-btn{flex:0 0 40px;font-size:22px}
.resident-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.resident-more-link{
  display:flex;align-items:center;gap:11px;min-width:0;min-height:58px;padding:12px;
  border:1px solid var(--line);border-radius:12px;text-align:left;cursor:pointer;
  background:var(--panel2);color:var(--ink);font-size:13px;font-weight:650;
}
.resident-more-link .app-icon{flex:0 0 auto;color:var(--primary)}
.resident-more-link span{overflow-wrap:anywhere}
.resident-more-link:hover,.resident-more-link:focus-visible{border-color:var(--primary);background:var(--primary-soft)}
.resident-more-link.active{border-color:var(--primary);background:var(--primary-soft);color:var(--accent-ink)}
.resident-content{max-width:1040px}
.resident-content.calendar-wide{max-width:1200px}
.resident-hero{
  position:relative;isolation:isolate;overflow:hidden;min-height:185px;
  background:linear-gradient(115deg,#103e34 0%,#176251 67%,#258a70 100%);
  box-shadow:0 16px 32px #123e3518;
}
.resident-hero:after{
  content:"";position:absolute;z-index:-1;width:260px;height:260px;right:-50px;top:-88px;
  border-radius:50%;border:36px solid #ffffff12;pointer-events:none;
}
.resident-hero h1{font-size:clamp(24px,3vw,34px);line-height:1.15;max-width:25ch}
.resident-hero-chips span{background:#ffffff1c;border-color:#ffffff2d}
.resident-home-focus,.resident-home-overview,.resident-discovery-grid{gap:16px}
.resident-today-list>div{min-height:62px}
.resident-today-list>div:first-child{border-top:0}
.resident-today-list .btn{min-width:62px}
.resident-quick-grid .btn{justify-content:flex-start;text-align:left;min-height:50px;line-height:1.25}
.resident-quick-grid .app-icon{flex:0 0 auto;color:var(--primary)}
.resident-home-announcements,.resident-home-alerts{margin:0 0 16px}
.resident-home-announcements h3{margin-bottom:14px}
.resident-home-announcements .notice{margin-bottom:10px;border-radius:12px;background:var(--panel2);color:var(--ink)}
.resident-home-announcements .notice.urgent{border-left:4px solid var(--danger-ink);background:var(--danger-soft)}
.resident-home-announcements .notice:last-child{margin-bottom:0}
.resident-home-announcements .notice p{margin:6px 0;line-height:1.55;overflow-wrap:anywhere}
.resident-home-announcements .notice .btn{margin-top:8px}
.shopping-card,.resident-guide-area,.resident-modal-row{border-color:var(--line);background:var(--panel2)}
.shopping-card{min-width:0;min-height:82px;padding:14px 16px}
.shopping-card>div{min-width:0;overflow-wrap:anywhere}
.shopping-card b{font-size:14px;line-height:1.35}
.shopping-history summary{min-height:40px;display:flex;align-items:center;color:var(--ink)}
.resident-finance-summary .panel{border-top:3px solid var(--primary)}
.resident-finance-summary strong{color:var(--ink)}
.resident-finance-row:last-child{padding-bottom:0}
.resident-guide-panel .section-head{margin-bottom:12px}
.resident-guide-list li{line-height:1.55}
.resident-alert-row:last-child{padding-bottom:0}
.resident-week-day,.resident-task-card,.resident-discovery-card{box-shadow:var(--shadow-sm)}
.resident-week-day:hover,.resident-task-card:focus-within{border-color:var(--primary)}
.resident-duty-layout>*,.resident-calendar-layout>*{min-width:0}
.resident-checks .check-row{min-height:52px}
.resident-task-actions{flex-wrap:wrap}
.resident-assistant{min-width:0}
.assistant-conversation{border-color:var(--line);background:var(--panel2)}
.assistant-message.reply{box-shadow:var(--shadow-sm)}
.resident-assistant .assistant-box input{min-height:46px}

@media(max-width:900px){
  .resident-more-panel{right:14px;top:calc(142px + env(safe-area-inset-top))}
  .topbar .quick-create span{display:none}
  .topbar .quick-create{min-width:42px}
}
@media(max-width:650px){
  .resident-head{padding-left:14px;padding-right:14px}
  .resident-head .brand{flex:1}
  .resident-head .brand strong{font-size:15px}
  .resident-head .brand span{max-width:44vw}
  .resident-content{padding:18px 12px calc(118px + env(safe-area-inset-bottom))}
  .resident-nav{
    position:fixed;top:auto;bottom:0;left:0;right:0;
    height:auto;min-height:calc(72px + env(safe-area-inset-bottom));
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;
    padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
    border-top:1px solid var(--line);border-bottom:0;box-shadow:0 -10px 28px #102b2517;
  }
  .resident-nav button{
    display:flex;flex-direction:column;gap:2px;min-width:0;max-width:none;width:100%;
    min-height:58px;padding:6px 2px;border:0;border-radius:11px;
    font-size:11px;line-height:1.15;text-align:center;
  }
  .resident-nav button.active{border:0}
  .resident-nav button span{display:block;width:100%;white-space:nowrap}
  .resident-nav button .app-icon{width:21px;height:21px}
  .resident-more-panel{
    left:10px;right:10px;top:auto;bottom:calc(82px + env(safe-area-inset-bottom));
    width:auto;max-height:min(65dvh,560px);padding:17px;
  }
  .resident-more-grid{gap:8px}
  .resident-more-link{min-height:58px;padding:10px;font-size:12px}
  .resident-hero{min-height:0;padding:23px 19px}
  .resident-hero:after{right:-110px;top:-110px}
  .resident-hero h1{font-size:26px}
  .resident-hero-chips{gap:6px}
  .resident-hero-chips span{font-size:11px;padding:7px 9px}
  .resident-today-list>div{gap:9px}
  .resident-today-list .btn{min-width:0}
  .resident-quick-grid .btn{font-size:12px;gap:7px;padding:10px}
  .resident-quick-grid .app-icon{width:17px;height:17px}
  .resident-finance-summary{gap:9px}
  .resident-finance-summary strong{font-size:21px}
  .resident-assistant-top{flex-wrap:wrap}
  .resident-assistant .assistant-box{align-items:stretch}
  .resident-assistant .assistant-box input{font-size:16px}
  .page-head .toolbar{display:flex;flex-wrap:wrap}
  .modal-card{max-height:calc(100dvh - 24px)}
}
@media(max-width:360px){
  .resident-nav button{font-size:10px}
  .resident-nav button .app-icon{width:19px;height:19px}
  .resident-more-grid{grid-template-columns:1fr 1fr}
  .resident-quick-grid{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){.btn,.icon-btn,.avatar{transition:none}}
