.auth-page{min-height:100vh;background:#f8fafc;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#0f172a;display:flex;align-items:center;justify-content:center;padding:24px}.auth-card{box-sizing:border-box;width:min(440px,100%);background:#fff;border:1px solid #e2e8f0;border-radius:20px;box-shadow:0 20px 60px rgba(15,23,42,.10);padding:32px}.auth-card h1{margin:0 0 8px;font-size:28px}.auth-card p{color:#64748b;line-height:1.6}.auth-label{display:block;font-weight:700;font-size:14px;margin:18px 0 7px}.auth-input{width:100%;box-sizing:border-box;padding:12px 13px;border:1px solid #cbd5e1;border-radius:10px;font:inherit}.auth-input:focus{outline:3px solid rgba(37,99,235,.12);border-color:#2563eb}.auth-btn{width:100%;margin-top:22px;border:0;border-radius:10px;padding:13px;background:#2563eb;color:#fff;font-weight:800;font-size:15px;cursor:pointer}.auth-link{text-align:center;margin-top:18px}.auth-link a{color:#2563eb;font-weight:700;text-decoration:none}.auth-error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;padding:11px 12px;border-radius:10px;margin:16px 0;line-height:1.4}.auth-brand{display:inline-block;margin-bottom:22px;font-weight:900;color:#0f172a;text-decoration:none;font-size:20px}.account-wrap{max-width:1000px;margin:40px auto;padding:0 20px}.account-head{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.saved-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;margin:12px 0}.saved-color{width:52px;height:52px;border-radius:10px;float:left;margin-right:14px;border:1px solid #e2e8f0}.saved-actions{margin-top:12px}.saved-actions button,.account-head a{border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:8px 11px;cursor:pointer;text-decoration:none;color:#0f172a;font-weight:700}.saved-actions button.danger{color:#b91c1c}.auth-nav{display:flex;gap:10px;align-items:center}.auth-nav a{font-weight:700;text-decoration:none}
.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.account-panel{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px}.account-panel h2{margin:0 0 14px;font-size:20px}.account-muted{color:#64748b}.saved-icon{width:52px;height:52px;border-radius:10px;float:left;margin-right:14px;border:1px solid #e2e8f0;display:grid;place-items:center;font-size:24px}.saved-meta{color:#64748b;margin-top:5px;font-size:14px}.saved-card{min-height:82px;overflow:hidden}.saved-card:after{content:"";display:block;clear:both}@media(max-width:760px){.account-head{align-items:flex-start;flex-direction:column}.account-grid{grid-template-columns:1fr}.auth-nav{flex-wrap:wrap}}
.account-page{min-height:100vh;background:#f8fafc;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#0f172a}.account-wrap{max-width:1080px;margin:0 auto;padding:38px 20px 60px}.account-head h1{margin:0;font-size:32px}.account-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:24px}.account-nav{}#logoutForm{display:inline;margin:0}#logoutForm button,.auth-nav a{border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:8px 11px;cursor:pointer;text-decoration:none;color:#0f172a;font-weight:700;font:inherit}.auth-nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.account-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:16px 18px;margin-bottom:20px}.account-summary>div{margin-right:auto;color:#64748b}.account-summary strong{font-size:22px;color:#0f172a}.primary-link,.secondary-link{padding:9px 12px;border-radius:9px;text-decoration:none;font-weight:800}.primary-link{background:#2563eb;color:#fff}.secondary-link{border:1px solid #cbd5e1;color:#0f172a}.account-panel{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:22px}.panel-title{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:16px}.panel-title h2{margin:0 0 4px;font-size:22px}.panel-title p{margin:0;color:#64748b}.panel-title select{padding:9px 11px;border:1px solid #cbd5e1;border-radius:9px;background:#fff}.saved-card{position:relative;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:16px;margin:10px 0;min-height:82px;overflow:hidden}.saved-color,.saved-icon{width:52px;height:52px;border-radius:10px;float:left;margin-right:14px;border:1px solid #e2e8f0}.saved-icon{display:grid;place-items:center;font-size:24px;background:#fff}.saved-type{font-size:12px;font-weight:800;color:#2563eb;text-transform:uppercase;letter-spacing:.04em;margin-bottom:3px}.saved-meta{color:#64748b;margin-top:5px;font-size:14px}.saved-actions{margin-top:12px;display:flex;gap:8px}.saved-actions button{border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:7px 11px;cursor:pointer;font-weight:700}.saved-actions .danger{color:#b91c1c}.empty-state{text-align:center;padding:45px 20px;color:#64748b}.empty-state strong{color:#0f172a}.empty-state p{margin-bottom:0}@media(max-width:760px){.account-head{align-items:flex-start;flex-direction:column}.panel-title{flex-direction:column}.panel-title select{width:100%}.account-summary>div{width:100%;margin-right:0}.primary-link,.secondary-link{flex:1;text-align:center}}



/* Auth pages use the shared site header; keep the form card below it rather
   than letting the page-level centering pull it underneath the header. */
.auth-page{display:block;padding:0;background:#f8fafc}
.auth-page .auth-card{margin:40px auto;}
.auth-page .cw-footer{margin-top:40px}

/* Keep Login / Sign Up from crowding the main navigation on smaller desktop
   widths. The shared header switches to its hamburger before items can overlap. */
@media (max-width:1250px) and (min-width:1051px){
  .cw-header-inner{padding-left:1rem;padding-right:1rem;gap:.7rem}
  .cw-logo{font-size:1.3rem}
  .cw-logo-icon{font-size:1.2rem}
  .cw-nav-list{gap:.65rem;font-size:.86rem}
  .cw-auth-nav-item{gap:.4rem;margin-left:0;padding-left:0}
  .cw-auth-nav-item>a+a{margin-left:.4rem}
  .cw-auth-signup{padding-left:.6rem!important;padding-right:.6rem!important}
}
@media (max-width:1050px){
  .auth-page .auth-card{margin:28px auto}
}

@media(max-width:480px){.auth-page{padding:0 12px}.auth-card{padding:24px 18px}}

/* ========================================================================
   FINAL AUTH PAGE LAYOUT FIX
   The auth pages contain header + main + footer.  Force the body to be a
   full-width vertical page so the header/footer can never become flex
   columns beside the signup/login card.
   ======================================================================== */
html,
body.auth-page {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  padding: 0 !important;
  box-sizing: border-box;
}

body.auth-page {
  display: grid !important;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  justify-items: stretch;
  background: #f8fafc;
  overflow-x: hidden;
}

body.auth-page > .cw-header,
body.auth-page > .auth-card,
body.auth-page > .cw-footer {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body.auth-page > .auth-card {
  grid-row: 2;
  margin: 40px auto !important;
  width: min(440px, calc(100% - 32px));
  align-self: start;
}

body.auth-page > .cw-footer {
  grid-row: 3;
  margin-top: 0 !important;
}

/* Keep the authentication controls separated at every desktop width. */
body.auth-page .cw-auth-nav-item {
  gap: 12px;
}
body.auth-page .cw-auth-nav-item > a + a {
  margin-left: 0 !important;
}

/* At tablet/mobile widths the shared hamburger takes over completely. */
@media (max-width: 1250px) {
  body.auth-page > .auth-card {
    margin: 28px auto !important;
  }
}

@media (max-width: 600px) {
  body.auth-page > .auth-card {
    width: min(440px, calc(100% - 24px));
    padding: 24px 18px;
    margin: 20px auto !important;
    border-radius: 16px;
  }

  body.auth-page .auth-card h1 {
    font-size: 26px;
    line-height: 1.15;
  }

  body.auth-page .cw-header-inner {
    padding: 0.85rem 1rem;
  }

  body.auth-page .cw-logo {
    font-size: 1.3rem;
  }

  body.auth-page .cw-logo-icon {
    font-size: 1.2rem;
  }

  body.auth-page .cw-footer {
    margin-top: 0 !important;
  }
}

@media (max-width: 380px) {
  body.auth-page > .auth-card {
    width: calc(100% - 16px);
    padding: 20px 14px;
  }
}


/* Final auth layout guard: header, form and footer are always full-width rows. */
html,body.auth-page{width:100%;min-width:0;min-height:100%;margin:0!important;padding:0!important;box-sizing:border-box;}
body.auth-page{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;overflow-x:hidden!important;}
body.auth-page>.cw-header{order:1;width:100%!important;flex:0 0 auto!important;}
body.auth-page>.auth-card{order:2;width:min(440px,calc(100% - 32px))!important;max-width:440px!important;margin:40px auto!important;float:none!important;align-self:center!important;box-sizing:border-box!important;}
body.auth-page>.cw-footer{order:3;width:100%!important;flex:0 0 auto!important;margin:0!important;}
@media(max-width:600px){body.auth-page>.auth-card{width:calc(100% - 24px)!important;margin:20px auto!important;padding:24px 18px!important;}}
