/* ── AUTH SCREEN ─────────────────────────────────────────────────────────────── */
#auth-screen {
  position:        fixed;
  inset:           0;
  z-index:         2000;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      var(--navy);
  padding:         1rem;
}

#auth-card {
  background:    var(--bg);
  border-radius: 12px;
  padding:       2rem 2rem 1.5rem;
  width:         100%;
  max-width:     400px;
  box-shadow:    0 24px 64px rgba(0,0,0,.45);
}

#auth-brand {
  text-align:    center;
  margin-bottom: 1.5rem;
}

#auth-brand .cw-lockup {
  justify-content: center;
  margin: 0 auto .6rem;
}

#auth-brand .cw-lockup-mark {
  width: 42px;
  height: 42px;
}

#auth-brand .cw-lockup-name {
  font-size: 17px;
}

#auth-brand .cw-lockup-title {
  font-size: 9px;
}

#auth-brand-name {
  font-size:     15px;
  font-weight:   700;
  letter-spacing: .12em;
  color:         var(--navy);
}
[data-theme="dark"] #auth-brand-name { color: var(--gold); }
#auth-brand-sub {
  font-size:  11px;
  color:      var(--text2);
  margin-top: 2px;
}
#auth-brand-tagline {
  font-family: Georgia, serif;
  font-size:   11px;
  font-style:  italic;
  color:       var(--cbd-ink-mute, #8a7d6f);
  margin-top:  8px;
  line-height: 1.55;
  max-width:   240px;
  text-align:  center;
}

#auth-tabs {
  display:       flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  gap:           0;
}
.auth-tab {
  flex:          1;
  background:    none;
  border:        none;
  border-bottom: 2px solid transparent;
  padding:       .5rem;
  font-size:     12px;
  font-weight:   500;
  color:         var(--text2);
  cursor:        pointer;
  margin-bottom: -1px;
  transition:    color .15s, border-color .15s;
}
.auth-tab.on {
  color:         var(--text);
  font-weight:   600;
  border-bottom-color: var(--gold);
}

.auth-panel .fg { margin-bottom: .625rem; }
.auth-panel .fg label { font-size: 11px; }

.auth-submit-btn {
  width:      100%;
  padding:    .625rem;
  font-size:  13px;
  margin-top: .25rem;
}

.auth-error {
  font-size:    11px;
  color:        #dc2626;
  min-height:   16px;
  margin:       .25rem 0;
  line-height:  1.4;
}
.auth-success {
  font-size:    11px;
  color:        #16a34a;
  min-height:   16px;
  margin:       .25rem 0;
}

.auth-link {
  display:    block;
  background: none;
  border:     none;
  color:      var(--text2);
  font-size:  11px;
  cursor:     pointer;
  margin-top: .625rem;
  text-align: center;
  text-decoration: underline;
  padding:    0;
}
.auth-link:hover { color: var(--gold); }

.auth-note {
  font-size:     11px;
  color:         var(--text2);
  margin-bottom: .75rem;
  line-height:   1.6;
}

.auth-footer-note {
  text-align: center;
  font-size:  11px;
  color:      var(--text2);
  margin-top: 1.25rem;
  margin-bottom: 0;
}

/* ── TOAST SYSTEM ─────────────────────────────────────────────── */
#toast-stack {
  position:      fixed;
  top:           16px;
  right:         16px;
  z-index:       9999;
  display:       flex;
  flex-direction: column;
  gap:           10px;
  pointer-events: none;
  width:         340px;
  max-width:     calc(100vw - 32px);
}

.cbd-toast {
  background:   var(--bg, #faf8f4);
  border:       1px solid var(--border, rgba(0,0,0,.1));
  border-radius: var(--radius-lg, 12px);
  box-shadow:   var(--shadow-raised, 0 12px 28px rgba(26,20,16,.10));
  overflow:     hidden;
  pointer-events: auto;
  animation:    toast-in var(--dur-base, 200ms) var(--ease-out, ease) forwards;
  position:     relative;
}

.cbd-toast.toast-leaving {
  animation: toast-out var(--dur-base, 200ms) var(--ease-in, ease) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 120px; }
  to   { opacity: 0; transform: translateX(24px); max-height: 0; margin: 0; padding: 0; }
}

.cbd-toast-bar {
  height:     3px;
  background: var(--cbd-gold, #C99A39);
  width:      100%;
  transform-origin: left;
  animation:  toast-bar linear forwards;
}

@keyframes toast-bar {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.cbd-toast-inner {
  display:  flex;
  gap:      10px;
  padding:  12px 14px;
  align-items: flex-start;
}

.cbd-toast-icon {
  width:         20px;
  height:        20px;
  border-radius: 50%;
  flex-shrink:   0;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     11px;
  font-weight:   700;
  margin-top:    1px;
}

.cbd-toast-body {
  flex: 1;
  min-width: 0;
}

.cbd-toast-title {
  font-weight:  600;
  font-size:    12.5px;
  color:        var(--text, #1a1410);
  line-height:  1.3;
  margin-bottom: 2px;
}

.cbd-toast-msg {
  font-size:   11.5px;
  color:       var(--text2, #4a4036);
  line-height: 1.4;
}

.cbd-toast-close {
  background:  none;
  border:      none;
  cursor:      pointer;
  color:       var(--text2);
  font-size:   14px;
  line-height: 1;
  padding:     0 0 0 4px;
  flex-shrink: 0;
  opacity:     0.5;
  transition:  opacity var(--dur-fast, 120ms);
}
.cbd-toast-close:hover { opacity: 1; }

/* Tone variants */
.cbd-toast.success .cbd-toast-bar    { background: var(--color-success, var(--green)); }
.cbd-toast.success .cbd-toast-icon  { background: var(--success-bg, #EAF3DE); color: var(--color-success, var(--green)); }
.cbd-toast.error   .cbd-toast-bar   { background: var(--color-danger, var(--red)); }
.cbd-toast.error   .cbd-toast-icon  { background: var(--danger-bg, #FCEBEB);  color: var(--color-danger, var(--red)); }
.cbd-toast.warning .cbd-toast-bar   { background: var(--color-warning, var(--amber)); }
.cbd-toast.warning .cbd-toast-icon  { background: var(--warn-bg, #FAEEDA);   color: var(--color-warning, var(--amber)); }
.cbd-toast.info    .cbd-toast-bar   { background: var(--color-info, var(--blue)); }
.cbd-toast.info    .cbd-toast-icon  { background: var(--info-bg, #E6F1FB);   color: var(--color-info, var(--blue)); }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.cbd-empty {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  padding:        3rem 1.5rem;
}

.cbd-empty-icon {
  width:           64px;
  height:          64px;
  border-radius:   50%;
  background:      var(--bg3, #e5ddd0);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       26px;
  margin-bottom:   1.25rem;
  color:           var(--text2);
}

.cbd-empty-eyebrow {
  font-family:    var(--font-display, "Cinzel", Georgia, serif);
  font-size:      10px;
  font-weight:    600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--cbd-gold-deep, var(--gold));
  margin-bottom:  .375rem;
}

.cbd-empty-title {
  font-size:    16px;
  font-weight:  600;
  color:        var(--text);
  margin-bottom: .5rem;
  line-height:  1.3;
}

.cbd-empty-body {
  font-size:    13px;
  color:        var(--text2);
  max-width:    340px;
  line-height:  1.6;
  margin-bottom: 1.5rem;
}

.cbd-empty-steps {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:                   10px;
  width:                 100%;
  max-width:             480px;
  margin-bottom:         1.25rem;
}

.cbd-empty-step {
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding:       .75rem;
  text-align:    left;
}

.cbd-empty-step-num {
  font-family:  var(--font-display, "Cinzel", Georgia, serif);
  font-size:    18px;
  font-weight:  700;
  color:        var(--cbd-gold-deep, var(--gold));
  line-height:  1;
  margin-bottom: .25rem;
}

.cbd-empty-step-label {
  font-size:   11.5px;
  font-weight: 600;
  color:       var(--text);
  margin-bottom: .2rem;
}

.cbd-empty-step-hint {
  font-size:  10.5px;
  color:      var(--text2);
  line-height: 1.4;
}

/* ── CBD EYEBROW CLASS ───────────────────────────────────────── */
.cbd-eyebrow {
  font-family:    var(--font-display, "Cinzel", Georgia, serif);
  font-weight:    600;
  font-size:      10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--cbd-gold-deep, var(--gold));
}
