/* DayFlow account screen
   Visual refresh only: keep the existing auth IDs, modes, and handlers intact. */

html.auth-open,
body.auth-open{
  height:auto !important;
  min-height:100% !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:auto !important;
}

body.auth-open #app{
  display:none !important;
}

#auth-overlay,
#auth-overlay *{
  box-sizing:border-box;
  font-family:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:0;
}

#auth-overlay{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  color:#f5f7ff;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  background:
    linear-gradient(135deg, rgba(7,17,31,1) 0%, rgba(18,24,39,1) 48%, rgba(10,16,28,1) 100%);
}

#auth-overlay::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:56px 56px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.88), rgba(0,0,0,.2));
}

#auth-overlay.hidden{
  display:none;
}

.auth-shell{
  position:relative;
  z-index:1;
  width:min(1180px,100%);
  min-height:min(720px, calc(100vh - 56px));
  display:grid;
  grid-template-columns:minmax(360px, 430px) minmax(0, 1fr);
  gap:16px;
  align-items:stretch;
}

.auth-panel{
  position:relative;
  border:1px solid rgba(137,153,192,.18);
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 28px 74px rgba(0,0,0,.34);
}

.auth-panel--form{
  background:rgba(9,15,27,.94);
  padding:24px;
  display:flex;
  align-items:stretch;
}

.auth-form-inner{
  width:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:52px;
}

.auth-brand-lockup{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.auth-brand-icon{
  width:42px;
  height:42px;
  display:block;
  flex:0 0 42px;
  object-fit:contain;
}

.auth-brand-name{
  color:#ffffff;
  font-size:21px;
  line-height:1.1;
  font-weight:800;
}

.auth-brand-tag{
  margin-top:3px;
  color:#9faac0;
  font-size:13px;
  line-height:1.25;
  font-weight:600;
}

.auth-card{
  width:100%;
}

.auth-register-mode .auth-form-inner{
  gap:28px;
}

.auth-eyebrow{
  margin:0 0 12px;
  color:#69d5a0;
  font-size:12px;
  line-height:1.3;
  font-weight:800;
  text-transform:uppercase;
}

.auth-title{
  margin:0;
  color:#ffffff;
  font-size:40px;
  line-height:1.05;
  font-weight:850;
}

.auth-register-mode .auth-title{
  font-size:37px;
  white-space:nowrap;
}

.auth-sub{
  margin:12px 0 28px;
  color:#b7c2d8;
  font-size:16px;
  line-height:1.55;
  font-weight:550;
}

.auth-register-mode .auth-sub{
  margin-bottom:18px;
}

.auth-tabs{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:4px;
  margin:0 0 22px;
  padding:4px;
  border:1px solid rgba(137,153,192,.16);
  border-radius:8px;
  background:rgba(255,255,255,.035);
}

.auth-register-mode .auth-tabs{
  margin-bottom:14px;
}

.auth-tab{
  appearance:none;
  width:100%;
  min-width:0;
  min-height:44px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#d7deed;
  padding:10px 12px;
  font-size:14px;
  line-height:1.2;
  font-weight:800;
  text-align:center;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease;
}

#auth-overlay .auth-tab.active{
  color:#ffffff;
  background:linear-gradient(180deg, rgba(124,158,255,.95), rgba(105,117,224,.95));
  box-shadow:0 10px 22px rgba(105,117,224,.25);
}

.auth-field{
  display:block;
  width:100%;
  margin-bottom:16px;
}

.auth-register-mode .auth-field{
  margin-bottom:12px;
}

.auth-field[hidden],
.auth-field.is-hidden{
  display:none !important;
}

.auth-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.auth-label{
  display:block;
  width:100%;
  margin:0 0 8px;
  color:#f1f4ff;
  font-size:14px;
  line-height:1.35;
  font-weight:750;
}

.auth-input{
  display:block;
  width:100%;
  min-height:54px;
  padding:15px 15px;
  border-radius:8px;
  border:1px solid rgba(137,153,192,.18);
  background:rgba(255,255,255,.05);
  color:#ffffff !important;
  caret-color:#ffffff;
  outline:none;
  box-shadow:none;
  font-size:16px;
  line-height:1.25;
  font-weight:600;
}

.auth-register-mode .auth-input{
  min-height:50px;
  padding-top:13px;
  padding-bottom:13px;
}

.auth-input::placeholder{
  color:#8f9bb2 !important;
  opacity:1;
}

.auth-input:focus{
  border-color:rgba(124,158,255,.68);
  box-shadow:0 0 0 4px rgba(124,158,255,.12);
}

.auth-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:18px;
}

.auth-register-mode .auth-actions{
  margin-top:12px;
}

.auth-btn{
  width:100%;
  min-height:54px;
  padding:15px 18px;
  border-radius:8px;
  border:1px solid transparent;
  background:linear-gradient(180deg, #7c9eff 0%, #6d79e7 100%);
  color:#ffffff;
  font-size:16px;
  line-height:1.2;
  font-weight:850;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.auth-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 32px rgba(109,121,231,.24);
}

.auth-btn.auth-secondary{
  background:transparent;
  border-color:rgba(137,153,192,.2);
  color:#e9eefc;
}

.auth-btn.auth-secondary:hover{
  border-color:rgba(105,213,160,.42);
  box-shadow:none;
}

.auth-status,
.auth-error{
  margin-top:14px;
  font-size:13px;
  line-height:1.5;
}

.auth-register-mode .auth-status,
.auth-register-mode .auth-error{
  margin-top:10px;
}

.auth-status{
  color:#aeb9cf;
}

.auth-error{
  color:#ff9ba7;
  font-weight:700;
}

.auth-panel--story{
  padding:36px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:28px;
  background:
    linear-gradient(145deg, rgba(18,26,43,.88) 0%, rgba(14,22,36,.96) 56%, rgba(9,15,27,.98) 100%);
}

.auth-story-copy{
  max-width:720px;
}

.auth-hero-title{
  margin:0;
  color:#ffffff;
  max-width:760px;
  font-size:40px;
  line-height:1.05;
  font-weight:900;
  overflow-wrap:break-word;
}

.auth-hero-copy{
  margin:18px 0 0;
  max-width:640px;
  color:#c4cee2;
  font-size:18px;
  line-height:1.6;
  font-weight:550;
}

.auth-preview{
  align-self:center;
  width:min(100%, 680px);
  border:1px solid rgba(137,153,192,.16);
  border-radius:8px;
  padding:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
}

.auth-preview-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(137,153,192,.14);
  color:#dfe7f6;
}

.auth-preview-top span{
  color:#9ea9be;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
}

.auth-preview-top strong{
  color:#ffffff;
  font-size:15px;
  line-height:1.25;
}

.auth-preview-task{
  display:grid;
  grid-template-columns:54px 12px minmax(0,1fr);
  gap:14px;
  align-items:start;
  padding:16px 0;
  border-bottom:1px solid rgba(137,153,192,.12);
}

.auth-preview-task:last-child{
  border-bottom:0;
  padding-bottom:0;
}

.auth-preview-task--active{
  color:#ffffff;
}

.auth-preview-time{
  color:#9da8be;
  font-size:13px;
  line-height:1.35;
  font-weight:800;
}

.auth-preview-dot{
  width:10px;
  height:10px;
  margin-top:4px;
  border-radius:50%;
  background:#69d5a0;
  box-shadow:0 0 0 5px rgba(105,213,160,.12);
}

.auth-preview-task strong{
  display:block;
  color:#f7f9ff;
  font-size:16px;
  line-height:1.25;
}

.auth-preview-task small{
  display:block;
  margin-top:4px;
  color:#aeb9cf;
  font-size:13px;
  line-height:1.35;
}

.auth-feature-list{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px;
}

.auth-feature-item{
  min-width:0;
  padding:14px;
  border:1px solid rgba(137,153,192,.13);
  border-radius:8px;
  background:rgba(255,255,255,.035);
}

.auth-feature-title{
  color:#ffffff;
  font-size:15px;
  line-height:1.25;
  font-weight:850;
}

.auth-feature-copy{
  margin-top:7px;
  color:#aeb9cf;
  font-size:13px;
  line-height:1.45;
  font-weight:550;
}

@media (max-width: 1040px){
  #auth-overlay{
    align-items:flex-start;
    padding:18px;
  }

  .auth-shell{
    grid-template-columns:1fr;
    min-height:auto;
  }

  .auth-panel--form{
    order:1;
  }

  .auth-panel--story{
    order:2;
  }

  .auth-hero-title{
    font-size:40px;
  }
}

@media (max-width: 720px){
  body.auth-open #auth-overlay{
    position:relative;
    inset:auto;
    min-height:100dvh;
  }

  #auth-overlay{
    padding:12px;
  }

  #auth-overlay::before{
    background-size:38px 38px;
  }

  .auth-shell{
    gap:12px;
  }

  .auth-panel--form,
  .auth-panel--story{
    padding:18px;
  }

  .auth-brand-icon{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .auth-brand-name{
    font-size:19px;
  }

  .auth-title{
    font-size:34px;
  }

  .auth-register-mode .auth-title{
    font-size:32px;
  }

  .auth-sub{
    font-size:15px;
    margin-bottom:22px;
  }

  .auth-tabs{
    margin-bottom:18px;
  }

  .auth-input,
  .auth-btn{
    min-height:52px;
  }

  .auth-hero-title{
    font-size:34px;
  }

  .auth-hero-copy{
    font-size:16px;
  }

  .auth-feature-list{
    grid-template-columns:1fr;
  }

  .auth-preview{
    padding:14px;
  }

  .auth-preview-task{
    grid-template-columns:48px 10px minmax(0,1fr);
    gap:12px;
  }
}

@media (max-width: 420px){
  .auth-panel--form,
  .auth-panel--story{
    padding:16px;
  }

  .auth-title{
    font-size:31px;
  }

  .auth-hero-title{
    font-size:31px;
  }

  .auth-tab{
    font-size:13px;
    padding-left:8px;
    padding-right:8px;
  }
}
