/* ============================================================================
   Wedge UI — homeowner experience (iMaintain IA × landing-page brand)
   Editorial: deep teal-green + serif display, flat cards. Scoped to .wedge.
   ========================================================================== */
.wedge{
  --brand:#112225; --brand-2:#24545C; --ink:#112225; --body:#3f4a4c;
  --muted:#6b7678; --faint:#9aa3a4; --line:#E4E8E7; --soft:#F3F5F3;
  --accent-soft:#E7EDEC; --green:#2e7d52; --amber:#B7791F; --red:#C0392B; --purple:#7C3AED;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--body); font-size:13px; line-height:1.45;
}
.wedge *,.wedge *::before,.wedge *::after{box-sizing:border-box;}
.wedge a{text-decoration:none;color:inherit;}
.wedge .serif{font-family:Georgia,'Times New Roman',serif;font-weight:600;}

/* Layout */
.wedge{display:flex;min-height:100vh;background:#fff;}
.wedge .sidebar{width:238px;background:#fff;border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;height:100vh;padding:16px 12px;display:flex;flex-direction:column;z-index:20;}
.wedge .brand{display:flex;align-items:center;gap:9px;padding:4px 8px 16px;}
.wedge .brand .logo{width:30px;height:30px;border-radius:8px;background:transparent;display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;}
.wedge .brand b{font-size:15px;color:var(--ink);font-weight:600;}
.wedge .nav-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--faint);padding:14px 12px 6px;}
.wedge .nav a{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:9px;color:var(--muted);font-weight:500;font-size:13px;margin-bottom:1px;}
.wedge .nav a .ic{width:18px;text-align:center;}
.wedge .nav a:hover{background:var(--soft);color:var(--ink);}
.wedge .nav a.active{background:var(--brand);color:#fff;font-weight:600;}
.wedge .acct{margin-top:auto;display:flex;align-items:center;gap:10px;padding:11px;border-top:1px solid var(--line);}
.wedge .acct .av{width:30px;height:30px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;}
.wedge .acct .nm{font-size:12.5px;font-weight:600;color:var(--ink);}.wedge .acct .em{font-size:11px;color:var(--muted);}
.wedge .main{flex:1;margin-left:238px;min-width:0;}
.wedge .topbar{display:flex;align-items:center;justify-content:space-between;padding:15px 30px;border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:10;}
.wedge .crumb{font-size:12px;color:var(--muted);}.wedge .crumb b{color:var(--ink);}
.wedge .topbar .right{font-size:12.5px;color:var(--muted);}
.wedge .topbar .right .logout-ic{display:none;}  /* desktop: text link; icon hidden */
.wedge .topbar .right .profile-link{display:none;}  /* desktop: sidebar avatar covers it */
.wedge .content{padding:24px 30px 44px;max-width:1080px;}

/* Typography / misc */
.wedge h1{font-size:30px;font-weight:600;color:var(--ink);letter-spacing:-.2px;}
.wedge .lede{color:var(--muted);font-size:14px;margin-top:5px;margin-bottom:20px;}
.wedge .section-title{font-size:19px;font-weight:600;margin:28px 0 13px;color:var(--ink);}
.wedge .card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px 19px;}
.wedge .fox{font-size:12.5px;color:#4b4034;background:#FBF7F0;border:1px solid #ECE0CC;border-radius:12px;padding:11px 14px;margin-bottom:20px;display:flex;gap:9px;}
.wedge .btn{font:inherit;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:9px;padding:8px 14px;font-size:12.5px;font-weight:600;cursor:pointer;display:inline-block;}
.wedge .btn.primary{background:var(--brand);color:#fff;border-color:var(--brand);}
.wedge .chip{display:inline-block;font-size:10.5px;font-weight:700;padding:2px 9px;border-radius:20px;}
.wedge .chip.w{background:#FBF1DD;color:var(--amber);}.wedge .chip.s{background:#E4F0E8;color:var(--green);}.wedge .chip.n{background:#EEF1F0;color:var(--muted);}.wedge .chip.d{background:#FBE9E7;color:var(--red);}
/* Task rows (homeowner Tasks page + per-property maintenance calendar) —
   desktop = single row with actions right; mobile = stacked, actions right. */
.wedge .task-card{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:13px;padding:13px 16px;margin-bottom:9px;border:1px solid var(--line);border-radius:12px;background:#fff;}
.wedge .task-card.dimmed{opacity:.55;}
.wedge .task-body{min-width:0;}
.wedge .task-title{font-size:13px;font-weight:600;color:var(--ink);}
.wedge .task-meta{font-size:12px;color:var(--muted);}
.wedge .task-due{font-size:12px;color:var(--muted);white-space:nowrap;}
.wedge .task-due.over{color:var(--red);font-weight:600;}
.wedge .task-actions{display:flex;gap:6px;}
.wedge .task-actions .btn{padding:5px 11px;font-size:11.5px;}
.wedge .task-actions form:last-child .btn{border:none;color:var(--muted);background:transparent;}
@media (max-width:680px){
  .wedge .task-card{grid-template-columns:1fr auto;grid-template-areas:"body due" "actions actions";gap:8px;}
  .wedge .task-body{grid-area:body;}
  .wedge .task-due{grid-area:due;align-self:start;text-align:right;}
  .wedge .task-actions{grid-area:actions;justify-content:flex-end;flex-wrap:wrap;}
}

/* Dashboard */
.wedge .stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;}
.wedge .stat .lbl{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);}
.wedge .stat .val{font-size:30px;font-weight:600;margin-top:8px;display:flex;align-items:baseline;gap:9px;color:var(--ink);}
.wedge .actions{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;}
.wedge .action{display:flex;flex-direction:column;gap:8px;padding:15px;}
.wedge .action .ic{width:40px;height:40px;border-radius:10px;background:var(--accent-soft);color:var(--brand);display:flex;align-items:center;justify-content:center;font-size:17px;}
.wedge .action .t{font-weight:600;font-size:13px;color:var(--ink);}.wedge .action .d{font-size:11.5px;color:var(--muted);}
.wedge .action:hover{border-color:var(--brand-2);}
.wedge .homes{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;}
.wedge .home{padding:15px;}
.wedge .home .img{height:88px;border-radius:9px;background:var(--soft);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;color:#c2cbc9;font-size:22px;margin-bottom:12px;}
.wedge .home h3{font-size:14px;font-weight:600;color:var(--ink);}.wedge .home .meta{font-size:12px;color:var(--muted);margin-top:2px;}
.wedge .home .foot{display:flex;align-items:center;justify-content:space-between;margin-top:12px;}
.wedge .home:hover{border-color:var(--brand-2);}

/* Property header + tabs */
.wedge .prop-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:16px;}
.wedge .prop-head h1{font-size:26px;font-weight:600;color:var(--ink);}.wedge .prop-head .sub{font-size:13px;color:var(--muted);margin-top:3px;}
.wedge .tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:22px;}
.wedge .tabs a{padding:11px 16px;font-size:13.5px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;}
.wedge .tabs a.active{color:var(--brand);border-bottom-color:var(--brand);}.wedge .tabs a:hover{color:var(--ink);}

/* Cards w/ header, grid */
.wedge .card-h{font-size:13px;font-weight:700;color:var(--ink);margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;}
.wedge .card-h a{font-size:12px;color:var(--brand-2);font-weight:600;}
.wedge .grid2{display:grid;grid-template-columns:1.1fr 1fr;gap:16px;margin-bottom:16px;}

/* Hero gauge */
.wedge .score-hero{display:flex;align-items:center;gap:22px;}
.wedge .gauge{width:130px;height:130px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;}
.wedge .gauge .inner{width:100px;height:100px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.wedge .gauge .num{font-size:38px;font-weight:600;color:var(--ink);line-height:1;font-family:'Fraunces',serif;}
.wedge .gauge .den{font-size:11px;color:var(--faint);}
.wedge .rating{font-size:13px;font-weight:700;}
.wedge .rating .up{display:block;font-size:11px;font-weight:500;color:var(--muted);margin-top:2px;}
.wedge .bars{margin-top:14px;}
.wedge .bar-row{display:flex;align-items:center;gap:10px;margin-bottom:7px;font-size:12px;}
.wedge .bar-row .lab{width:160px;color:var(--muted);}
.wedge .bar-row .track{flex:1;height:6px;background:#EDEFEE;border-radius:4px;}
.wedge .bar-row .fill{height:6px;border-radius:4px;}
.wedge .bar-row b{width:30px;text-align:right;color:var(--ink);}

/* key-value, tasks, systems */
.wedge .kv{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--soft);font-size:13px;}
.wedge .kv:last-child{border-bottom:none;}.wedge .kv span{color:var(--muted);}.wedge .kv b{color:var(--ink);font-weight:600;}
.wedge .task,.wedge .sys{display:flex;align-items:center;gap:11px;padding:9px 0;border-bottom:1px solid var(--soft);}
.wedge .task:last-child,.wedge .sys:last-child{border-bottom:none;}
.wedge .pill{font-size:10px;font-weight:700;padding:2px 8px;border-radius:6px;}
.wedge .pill.diy{background:var(--accent-soft);color:var(--brand);}.wedge .pill.pro{background:#EFE7F2;color:var(--purple);}
.wedge .task .t{flex:1;font-weight:600;color:var(--ink);font-size:12.5px;}
.wedge .task .due{font-size:11.5px;color:var(--muted);}.wedge .task .due.over{color:var(--red);font-weight:700;}
.wedge .sys .nm{flex:1;font-size:12.5px;font-weight:600;color:var(--ink);}
.wedge .sys .track{width:90px;height:6px;background:#EDEFEE;border-radius:4px;}.wedge .sys .fill{height:6px;border-radius:4px;}

/* Calendar (compact) + day panel */
.wedge .cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:12px;flex-wrap:wrap;}
.wedge .month-nav{display:flex;align-items:center;gap:12px;}
.wedge .month-nav h2{font-size:18px;font-weight:600;color:var(--ink);min-width:120px;text-align:center;}
.wedge .month-nav .arrow{width:28px;height:28px;border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted);}
.wedge .cal-layout{display:grid;grid-template-columns:1fr 286px;gap:18px;align-items:start;}
.wedge .cal{border:1px solid var(--line);border-radius:12px;overflow:hidden;}
.wedge .dow{display:grid;grid-template-columns:repeat(7,1fr);}
.wedge .dow div{padding:8px 0;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--faint);text-align:center;}
.wedge .cgrid{display:grid;grid-template-columns:repeat(7,1fr);}
.wedge .cell{min-height:58px;border-top:1px solid var(--line);border-right:1px solid var(--line);padding:6px;display:flex;flex-direction:column;align-items:center;gap:4px;}
.wedge .cell:nth-child(7n){border-right:none;}
.wedge .cell.out{background:#FAFBFB;}
.wedge .dn{font-size:12.5px;font-weight:600;color:var(--ink);width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:50%;}
.wedge .cell.out .dn{color:var(--faint);}
.wedge .cell.sel .dn{background:var(--brand);color:#fff;}
.wedge .cell.today .dn{box-shadow:inset 0 0 0 1.5px var(--brand);}
.wedge .dots{display:flex;gap:3px;}.wedge .dot{width:6px;height:6px;border-radius:50%;}
.wedge .dot.diy{background:var(--brand-2);}.wedge .dot.pro{background:var(--purple);}.wedge .dot.over{background:var(--red);}
.wedge .day-panel{border:1px solid var(--line);border-radius:12px;padding:16px;}

/* History timeline */
.wedge .verified{font-size:10px;font-weight:700;padding:2px 8px;border-radius:6px;background:#E4F0E8;color:var(--green);}
.wedge .self{font-size:10px;font-weight:700;padding:2px 8px;border-radius:6px;background:#EEF1F0;color:var(--muted);}
.wedge .home-tag{font-size:10.5px;font-weight:600;color:var(--brand-2);background:var(--accent-soft);border-radius:6px;padding:2px 8px;}
.wedge .ev{display:flex;align-items:flex-start;gap:15px;border:1px solid var(--line);border-radius:11px;padding:14px 16px;margin-bottom:9px;}
.wedge .ev .date{width:96px;flex-shrink:0;}.wedge .ev .date .d{font-size:12.5px;font-weight:700;color:var(--ink);display:block;}
.wedge .ev .body{flex:1;}.wedge .ev .body h4{font-size:13px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:8px;}
.wedge .ev .body .meta{font-size:12px;color:var(--muted);margin-top:3px;}.wedge .ev .body .meta b{color:var(--ink);}
.wedge .ev .rm{font-size:12px;color:var(--red);font-weight:600;}

/* Bootstrap-compat utilities (some ported pages still use these to toggle visibility) */
.wedge .d-none{display:none !important;}
.wedge .d-block{display:block !important;}
.wedge .d-flex{display:flex !important;}
.wedge .position-relative{position:relative;}
.wedge .position-absolute{position:absolute;}
.wedge .text-center{text-align:center;}
.wedge .alert{border-radius:8px;padding:10px 13px;font-size:13px;}
.wedge .alert-danger{background:#FBE9E7;color:#C0392B;border:1px solid #f5c6cb;}
.wedge .alert-warning{background:#FFF6E1;color:#8a6300;border:1px solid #f0dcab;}
.wedge .alert-info{background:#E7EDEC;color:#24545C;border:1px solid #cfe0de;}
.wedge .alert-success{background:#E4F0E9;color:#2e7d52;border:1px solid #bcd9c7;}

/* Table */
.wedge .tbl{width:100%;border-collapse:collapse;}
.wedge .tbl th{text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);font-weight:700;padding:10px 14px;border-bottom:1px solid var(--line);}
.wedge .tbl td{font-size:13px;padding:12px 14px;border-bottom:1px solid var(--soft);color:var(--ink);vertical-align:middle;}
.wedge .tbl tr:last-child td{border-bottom:none;}
/* Mobile: let any wide table scroll horizontally within its card instead of
   overflowing the page (request lists override this with a stacked layout). */
@media(max-width:640px){.wedge .tbl{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}}
.wedge .tbl tr:hover td{background:var(--soft);}
.wedge .tbl .badge{display:inline-block;font-size:10px;font-weight:700;padding:2px 8px;border-radius:6px;background:var(--accent-soft);color:var(--brand);margin-right:4px;}
.wedge .toolbar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap;}
.wedge .toolbar select{width:auto;min-width:150px;}

/* Forms */
.wedge .form-card{max-width:580px;}
.wedge label,.wedge .form-label{display:block;font-size:12px;font-weight:600;color:var(--ink);margin-bottom:5px;}
/* width + max-width:100% + min-width:0 so date/time inputs (which carry an
   intrinsic min-width on iOS) never overflow a narrow container. */
.wedge input[type=text],.wedge input[type=number],.wedge input[type=date],.wedge input[type=time],.wedge input[type=email],.wedge input[type=password],.wedge select,.wedge textarea,.wedge .form-control{width:100%;max-width:100%;min-width:0;padding:9px 11px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:13px;color:var(--ink);background:#fff;box-sizing:border-box;}
.wedge input:focus,.wedge select:focus,.wedge textarea:focus,.wedge .form-control:focus{outline:none;border-color:var(--brand-2);}
.wedge .field{margin-bottom:15px;}
.wedge .help{font-size:11.5px;color:var(--muted);margin-top:4px;}
.wedge .err{font-size:11.5px;color:var(--red);margin-top:4px;}
.wedge .form-actions{display:flex;justify-content:space-between;align-items:center;margin-top:6px;}

/* Property list cards */
.wedge .plist{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;}
.wedge .plist .home .img{font-size:22px;}

/* Hamburger toggle + backdrop — hidden by default, shown on mobile. */
.wedge .nav-toggle{
  display:none; position:fixed; top:5px; left:12px; z-index:30;
  background:#fff; border:1px solid var(--line); border-radius:8px;
  width:38px; height:38px; font-size:18px; cursor:pointer; color:var(--ink);
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.wedge .sidebar-backdrop{
  display:none; position:fixed; inset:0; background:rgba(17,34,37,.45); z-index:18;
}
.wedge.sidebar-open .sidebar-backdrop{display:block;}

@media (max-width:900px){
  .wedge .plist{grid-template-columns:1fr;}
  /* Sidebar becomes an off-canvas drawer */
  .wedge .sidebar{
    transform:translateX(-100%); transition:transform .25s ease;
  }
  .wedge.sidebar-open .sidebar{transform:translateX(0); box-shadow:2px 0 16px rgba(0,0,0,.18);}
  .wedge .main{margin-left:0;}
  .wedge .nav-toggle{display:flex; align-items:center; justify-content:center;}
  /* Hide hamburger while the drawer is open so it doesn't sit on top of the
     sidebar's brand logo. Tap the backdrop or any nav link to close. */
  .wedge.sidebar-open .nav-toggle{display:none;}
  /* Push topbar crumb past the hamburger */
  .wedge .topbar{padding-left:58px;}
  /* Mobile: drop the "Hello, name" greeting + "Logout" text; show an icon */
  .wedge .topbar .right .greeting,
  .wedge .topbar .right .logout-text{display:none;}
  .wedge .topbar .right .logout{display:inline-flex;align-items:center;color:var(--muted);}
  .wedge .topbar .right .logout-ic{display:inline-block;}
  /* Mobile: surface the profile as an icon (left of logout) — the bottom-of-page
     sidebar avatar is hard to reach once the sidebar collapses. */
  .wedge .topbar .right .profile-link{display:inline-flex;align-items:center;color:var(--muted);padding:2px;}
  .wedge .topbar .right .profile-link:hover{color:var(--ink);}
  /* Globe-only language switcher (hide the language name + caret), matching the
     public landing/guide top bar. */
  .wedge .lang-switch > summary{gap:0;padding:6px 8px;}
  .wedge .lang-switch .lang-cur,
  .wedge .lang-switch .lang-caret{display:none;}
  .wedge .content{padding-left:18px; padding-right:18px;}
  /* !important so this beats per-row inline grid-template-columns (e.g. the
     cockpit's 6-col funnel / 4-col acquisition strips) on phones. */
  .wedge .stat-row,.wedge .actions{grid-template-columns:repeat(2,1fr)!important;}
  .wedge .homes,.wedge .grid2,.wedge .cal-layout{grid-template-columns:1fr;}
  /* Filter row on Tasks page → single column */
  .wedge .filter-row{grid-template-columns:1fr;}
  /* Asset header: stack so the action button (Log work, Add task, etc.)
     drops below the title instead of crowding the address subtitle. */
  .wedge .prop-head{flex-direction:column; gap:10px;}
  .wedge .prop-head > a.btn{align-self:flex-start;}
  /* Asset tabs: horizontal scroll instead of overflow when all 5 don't fit.
     Keep individual tabs on one line and let the strip scroll sideways. */
  .wedge .tabs{flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none;}
  .wedge .tabs::-webkit-scrollbar{display:none;}
  .wedge .tabs a{flex-shrink:0; white-space:nowrap;}
}
