:root{
  --page:#fbf8ef;
  --surface:#ffffff;
  --surface-soft:#fcfaf4;
  --surface-blue:#f6f1e1;
  --text:#132f52;
  --muted:#6a7280;
  --muted-strong:#3f4d61;
  --line:#eadfbe;
  --line-soft:#f2ead1;
  --blue:#132f52;
  --blue-strong:#202a44;
  --blue-soft:#f5efd9;
  --gold:#d19b00;
  --gold-soft:#fcf8eb;
  --green:#12a774;
  --green-soft:#e8f7f1;
  --red:#d92d20;
  --red-soft:#fff1f0;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 14px 34px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 70px rgba(16, 24, 40, .18);
  --radius:8px;
}

*{ box-sizing:border-box; }
html,body{ min-height:100%; }
body{
  position:relative;
  margin:0;
  font-family: "proxima-nova", Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    linear-gradient(180deg, #fcf8eb 0, #fffdf7 330px, var(--page) 100%),
    var(--page);
  font-size: 15px;
  line-height: 1.45;
}

.pageBackdrop{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(19,47,82,.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(209,155,0,.075) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.34), transparent 66%);
}

[hidden]{ display:none !important; }

.appShell{
  min-height:100vh;
}

.loginView{
  position:relative;
  z-index:1;
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
}

.loginCard{
  position:relative;
  width:min(480px, 100%);
  padding:44px;
  overflow:hidden;
  text-align:center;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(234, 223, 190, .98);
  border-radius:18px;
  box-shadow:var(--shadow-lg);
}
.loginCard:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:4px;
  background:linear-gradient(90deg, var(--gold), var(--blue));
}
.loginLogo{
  display:block;
  width:min(220px, 70%);
  height:auto;
  margin:0 auto 34px;
}
.loginEyebrow{
  color:#8a6500;
  font-size:12px;
  font-weight:850;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.loginCard h1{
  margin:8px 0 10px;
  color:var(--blue-strong);
  font-size:clamp(34px, 7vw, 46px);
  line-height:1.05;
}
.loginCard p{
  max-width:340px;
  margin:0 auto 26px;
  color:var(--muted-strong);
  font-size:17px;
}
.loginButton{
  width:100%;
  min-height:50px;
}
.loginStatus{
  min-height:20px;
  margin-top:16px;
  font-size:13px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 22px;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(16px);
  border-bottom:1px solid rgba(234, 223, 190, .88);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}

.brand{
  display:flex;
  align-items:center;
  min-width:0;
  gap:13px;
}
.brandLogo{
  width:166px;
  height:34px;
  object-fit:contain;
  object-position:left center;
  display:block;
  flex:0 0 auto;
}
.brandText{
  min-width:0;
  padding-left: 12px;
  border-left: 1px solid rgba(19,47,82,.16);
}
.brandSub{
  font-weight:800;
  color:var(--blue);
  letter-spacing: .01em;
  white-space:nowrap;
}

.auth{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}
.userPill{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  max-width: min(420px, 46vw);
  padding:8px 13px;
  border-radius:999px;
  font-size:13px;
  font-weight:750;
  color:#fff;
  background: linear-gradient(180deg, #1f426d, var(--blue));
  box-shadow: 0 12px 24px rgba(19, 47, 82, .20);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.container{
  position:relative;
  z-index:1;
  width:min(1180px, calc(100% - 36px));
  margin: 34px auto 42px;
}

.hero{
  padding: 22px 4px 8px;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  min-height: 28px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(209, 155, 0, .22);
  background: rgba(252,248,235,.82);
  color:#8a6500;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.hero h1{
  margin: 12px 0 8px;
  max-width: 820px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
  color:var(--blue-strong);
}
.hero p{
  margin:0;
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 17px;
}

.card{
  position:relative;
  margin-top: 20px;
  padding: 20px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(234, 223, 190, .96);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.card:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  opacity:.88;
}

.card h2{
  margin: 0 0 10px;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--blue-strong);
  font-size: 19px;
  line-height:1.25;
  letter-spacing:0;
}
.card h2:before{
  content:"";
  flex:0 0 auto;
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(209, 155, 0, .14);
}
.card p{ margin-top:0; }

.muted{ color: var(--muted); }
.small{ font-size: 13px; }
.statusLine{ margin-top:12px; }
.tableHint{ margin-top:12px; }

.row{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
}
.filtersRow{
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}
.sendActions{ padding-top: 2px; }

label{
  color:var(--blue);
  font-weight:650;
}

.filterLabel{
  color:var(--blue);
  font-weight:650;
}

.viewFilterPanel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(209, 155, 0, .34);
  border-radius: 12px;
  background: rgba(209, 155, 0, .08);
}

.viewFilterPanel .small{
  margin:4px 0 0;
}

.viewFilterGroup{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.viewFilterButton{
  min-height:42px;
}

.viewFilterButton.active{
  border-color: rgba(209, 155, 0, .72);
  background: rgba(209, 155, 0, .16);
  color: var(--blue);
  box-shadow: 0 0 0 3px rgba(209, 155, 0, .14);
}

select,
input[type="number"]{
  width: 116px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  outline: none;
  background: #fff;
  color:var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
select{
  min-width: 180px;
}

select:focus,
input[type="number"]:focus{
  border-color: rgba(209, 155, 0, .72);
  box-shadow: 0 0 0 4px rgba(209, 155, 0, .18);
}
input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color: var(--gold);
}

button{
  min-height: 40px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fcfaf4);
  color: var(--blue);
  border-radius: 999px;
  padding: 9px 15px;
  cursor:pointer;
  font: inherit;
  font-weight:750;
  box-shadow: var(--shadow-sm);
  transition: transform .08s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
button:hover{
  border-color:#dfce98;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .10);
  transform: translateY(-1px);
}
button:active{ transform: translateY(0); }
button:focus-visible{
  outline:none;
  box-shadow: 0 0 0 4px rgba(209, 155, 0, .20), var(--shadow-sm);
}
button:disabled{
  opacity:.62;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

button.primary{
  border-color: transparent;
  color:#fff;
  background: linear-gradient(180deg, #1f426d, var(--blue-strong));
  padding: 11px 20px;
  box-shadow: 0 14px 28px rgba(19, 47, 82, .22);
}
button.primary:hover{
  box-shadow: 0 18px 34px rgba(19, 47, 82, .28);
}
button.ghost{
  background: rgba(255,255,255,.72);
  color:var(--blue);
}

.uploadRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-top: 14px;
}

.filePick{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  min-width:min(450px, 100%);
  min-height: 56px;
  padding:8px 10px;
  border-radius: 8px;
  border: 1px dashed #d9c786;
  background: linear-gradient(180deg, #fff, #fffdf7);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.filePick:hover{
  border-color: rgba(209, 155, 0, .75);
  box-shadow: 0 12px 24px rgba(16, 24, 40, .08);
}
.visuallyHiddenFile{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}
.filePickBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #8a6500;
  background: var(--blue-soft);
  border: 1px solid rgba(209, 155, 0, .22);
  font-weight:800;
  white-space:nowrap;
  cursor:pointer;
}
.visuallyHiddenFile:focus-visible + .filePickBtn{
  outline:3px solid rgba(209, 155, 0, .32);
  outline-offset:2px;
}
.filePickName{
  color: var(--muted-strong);
  font-size: 14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 320px;
}

.pillrow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.pill{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding: 7px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--blue);
  font-size: 13px;
  font-weight:750;
  box-shadow: var(--shadow-sm);
}
.pill.ok{
  color:#027a48;
  border-color: rgba(18, 167, 116, .24);
  background: var(--green-soft);
}

.tablewrap{
  margin-top: 14px;
  border-radius: 8px;
  overflow:auto;
  border: 1px solid var(--line);
  background:#fff;
  max-height: 68vh;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.tablewrap table{
  width:100%;
  min-width: 1020px;
  border-collapse:separate;
  border-spacing:0;
  font-size: 13px;
}
.tablewrap thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  text-align:left;
  padding: 13px 14px;
  background: var(--gold-soft);
  border-bottom: 1px solid var(--line);
  color:var(--blue);
  font-weight:850;
  white-space:nowrap;
}
.tablewrap tbody td{
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align:middle;
  color:#213b5f;
}
.tablewrap tbody tr{ transition: background .12s ease; }
.tablewrap tbody tr:hover td{ background:#fffdf7; }
.tablewrap tbody tr:last-child td{ border-bottom:none; }

.emptyCell{
  text-align:center;
  color: var(--muted);
  padding: 30px 14px;
  background: #fff;
}

.tablewrap .shortageRow td{ background:#fff1f0; }
.tablewrap .shortageRow:hover td{ background:#ffe5e2; }
.tablewrap tbody td:last-child button{
  white-space:nowrap;
}

.previewBody{ color:var(--blue); }
.previewBody p{ margin: 10px 0; }

.log{
  margin-top: 14px;
  padding: 12px 14px;
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--muted-strong);
  font-size: 13px;
}
.log:empty{ display:none; }
.logLine{
  position:relative;
  padding: 6px 0;
  padding-left: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.logLine:before{
  content:"";
  position:absolute;
  left:0;
  top:13px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:#98a2b3;
}
.logLine-success:before{ background:var(--green); }
.logLine-error:before{ background:var(--red); }
.logLine-warn:before{ background:#f59e0b; }
.logLine:last-child{ border-bottom:0; }

.sendProgress{
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(18, 167, 116, .22);
  border-radius: 8px;
  background: linear-gradient(180deg, #f2fbf7, #fff);
  box-shadow: var(--shadow-sm);
}

.sendProgressTop{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 850;
  color:var(--blue);
}

.progressTrack{
  width:100%;
  height: 10px;
  overflow:hidden;
  border-radius:999px;
  background:#dff3eb;
  margin-bottom: 8px;
}

.progressBar{
  width:0%;
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, #34d399, var(--green));
  transition: width .18s ease;
}

.footer{
  text-align:center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0 8px;
}

.focusMode .topbar{
  box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 14px 44px rgba(209, 155, 0, .18);
}
.focusMode:after{
  content:"";
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 46%, rgba(209,155,0,.22), transparent 20%),
    radial-gradient(circle at 50% 46%, rgba(19,47,82,.20), transparent 42%),
    rgba(19,47,82,.10);
  animation: focusSpotlight 9.5s ease forwards;
}
.focusMode .card:before{
  background: linear-gradient(90deg, var(--gold), var(--blue), var(--gold));
  background-size: 220% 100%;
  animation: focusSweep 1.8s ease-in-out infinite;
}
.focusMode .brandLogo{
  filter: drop-shadow(0 8px 18px rgba(209, 155, 0, .34));
}

.focusBurst{
  position:fixed;
  inset:0;
  z-index:10001;
  display:grid;
  place-items:center;
  pointer-events:none;
  overflow:hidden;
}
.focusBurstLabel{
  position:relative;
  z-index:3;
  display:grid;
  gap:8px;
  width:min(560px, calc(100vw - 64px));
  min-height:150px;
  padding:30px 34px;
  border:1px solid rgba(234, 223, 190, .95);
  border-radius:16px;
  background:rgba(255,255,255,.94);
  color:var(--blue-strong);
  font-weight:900;
  box-shadow: var(--shadow-lg);
  text-align:center;
  overflow:hidden;
  animation: focusLabel 5.8s ease forwards;
}
.focusBurstLabel:before{
  content:"";
  position:absolute;
  inset:-80px;
  background: conic-gradient(from 0deg, transparent, rgba(209,155,0,.28), transparent, rgba(19,47,82,.18), transparent);
  animation: focusRing 2.4s linear infinite;
}
.focusBurstLabel:after{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:15px;
  background:rgba(255,255,255,.91);
}
.focusBurstLabel > *{
  position:relative;
  z-index:1;
}
.focusBurstLabel .focusMini{
  color:#8a6500;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.focusBurstLabel strong{
  color:var(--blue-strong);
  font-size:44px;
  line-height:1.02;
}
.focusBurstLabel em{
  color:var(--muted-strong);
  font-size:18px;
  line-height:1.25;
  font-style:normal;
  font-weight:800;
}
.focusWord{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  padding:8px 12px;
  border:1px solid rgba(234, 223, 190, .9);
  border-radius:999px;
  background:rgba(255,255,255,.9);
  color:var(--blue);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  box-shadow: 0 16px 34px rgba(16, 24, 40, .16);
  animation: focusWord 5.4s cubic-bezier(.16, 1, .3, 1) forwards;
}
.focusBurst span{
  position:absolute;
  left:50%;
  top:50%;
  z-index:1;
  width:var(--s);
  height:var(--s);
  border-radius:999px;
  background:var(--gold);
  box-shadow: 0 0 0 1px rgba(255,255,255,.72), 0 10px 24px rgba(209, 155, 0, .24);
  animation: focusParticle 2.3s cubic-bezier(.16, 1, .3, 1) var(--d) forwards;
}
.focusBurst span:nth-child(3n){
  background:var(--blue);
}
.focusBurst span:nth-child(4n){
  border-radius:3px;
}
.focusBurst span:nth-child(5n){
  background:#fff;
  box-shadow: 0 0 0 1px rgba(209,155,0,.6), 0 0 24px rgba(209,155,0,.48);
}

@keyframes focusSweep{
  0%{ background-position:0% 50%; }
  50%{ background-position:100% 50%; }
  100%{ background-position:0% 50%; }
}
@keyframes focusSpotlight{
  0%{ opacity:0; }
  10%{ opacity:1; }
  88%{ opacity:1; }
  100%{ opacity:0; }
}
@keyframes focusRing{
  to{ transform: rotate(360deg); }
}
@keyframes focusLabel{
  0%{ opacity:0; transform: translateY(18px) scale(.92); }
  14%{ opacity:1; transform: translateY(0) scale(1); }
  86%{ opacity:1; transform: translateY(0) scale(1); }
  100%{ opacity:0; transform: translateY(-16px) scale(.96); }
}
@keyframes focusWord{
  0%{ opacity:0; transform: translate(-50%, -50%) scale(.8); }
  18%{ opacity:1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
  82%{ opacity:1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
  100%{ opacity:0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) - 14px)) scale(.98); }
}
@keyframes focusParticle{
  0%{ opacity:0; transform: translate(-50%, -50%) scale(.4); }
  18%{ opacity:1; }
  100%{ opacity:0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
}

.modalBackdrop{
  position:fixed;
  inset:0;
  z-index:9996;
  background: rgba(16, 24, 40, .38);
  backdrop-filter: blur(4px);
  opacity:0;
  pointer-events:none;
  transition: opacity .22s ease;
}
.modalBackdrop.show{
  opacity:1;
  pointer-events:auto;
}

.confirmModal{
  position:fixed;
  left:50%;
  top:50%;
  z-index:9997;
  display:flex;
  align-items:flex-start;
  gap:16px;
  width:min(560px, calc(100vw - 32px));
  padding:22px;
  border:1px solid rgba(234, 223, 190, .98);
  border-radius:12px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -48%) scale(.98);
  opacity:0;
  pointer-events:none;
  transition: opacity .22s ease, transform .22s ease;
}
.confirmModal.show{
  opacity:1;
  pointer-events:auto;
  transform: translate(-50%, -50%) scale(1);
}

.confirmIcon{
  position:relative;
  flex:0 0 auto;
  width:44px;
  height:44px;
  border-radius:999px;
  background: linear-gradient(180deg, #e4b526, var(--gold));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32), 0 14px 30px rgba(209, 155, 0, .24);
}
.confirmIcon span:before{
  content:"";
  position:absolute;
  left:20px;
  top:12px;
  width:4px;
  height:17px;
  border-radius:999px;
  background:#fff;
}
.confirmIcon span:after{
  content:"";
  position:absolute;
  left:19px;
  top:31px;
  width:6px;
  height:6px;
  border-radius:999px;
  background:#fff;
}

.confirmContent{
  min-width:0;
  flex:1;
}
.confirmKicker{
  margin-bottom:4px;
  color:#8a6500;
  font-size:12px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.confirmModal h2{
  margin:0 0 8px;
  color:var(--blue-strong);
  font-size:22px;
  line-height:1.2;
  letter-spacing:0;
}
.confirmMessage{
  margin:0;
  color:var(--muted-strong);
}
.confirmMeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.confirmPill{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--blue);
  font-size:13px;
  font-weight:750;
}
.confirmPill.ok{
  color:#027a48;
  border-color: rgba(18, 167, 116, .24);
  background: var(--green-soft);
}
.confirmPill.warn{
  color:#92400e;
  border-color: rgba(245, 158, 11, .28);
  background:#fffbeb;
}
.confirmActions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
}

.previewModal{
  position:fixed;
  left:50%;
  top:50%;
  z-index:9997;
  width:min(860px, calc(100vw - 36px));
  max-height:min(780px, calc(100vh - 36px));
  overflow:auto;
  padding:22px;
  border:1px solid rgba(234, 223, 190, .98);
  border-radius:12px;
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -48%) scale(.98);
  opacity:0;
  pointer-events:none;
  transition: opacity .22s ease, transform .22s ease;
}
.previewModal.show{
  opacity:1;
  pointer-events:auto;
  transform: translate(-50%, -50%) scale(1);
}
.previewModalHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line-soft);
}
.previewModal h2{
  margin:0;
  color:var(--blue-strong);
  font-size:24px;
  line-height:1.15;
}
.previewClose{
  flex:0 0 auto;
}
.previewMeta{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-top:16px;
}
.previewMetaItem{
  min-width:0;
  padding:10px 12px;
  border:1px solid var(--line-soft);
  border-radius:8px;
  background:var(--gold-soft);
}
.previewMetaItem span{
  display:block;
  margin-bottom:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.previewMetaItem strong{
  display:block;
  color:var(--blue);
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.previewSubjectLine{
  margin-top:16px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
}
.previewSubjectLine span{
  display:block;
  margin-bottom:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.previewSubjectLine strong{
  color:var(--blue-strong);
  font-size:15px;
}
.previewModalBody{
  margin-top:16px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  overflow-x:auto;
}
.previewModalBody table{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  border-collapse:collapse;
  table-layout:auto;
}
.previewModalBody th,
.previewModalBody td{
  box-sizing:border-box;
}
.previewModalBody th{
  white-space:nowrap;
}
.previewModalBody td{
  overflow-wrap:normal;
}
.previewModalBody > table > tbody > tr > td{
  width:50% !important;
}
.previewModalBody > table > tbody > tr > td:first-child{
  padding-right:6px !important;
}
.previewModalBody > table > tbody > tr > td:last-child{
  padding-left:6px !important;
}

.toastBackdrop{
  position:fixed;
  inset:0;
  background: rgba(16, 24, 40, .30);
  opacity:0;
  pointer-events:none;
  transition: opacity .28s ease;
  z-index: 9998;
}
.toastBackdrop.show{
  opacity:1;
  pointer-events:auto;
}

.toast{
  position:fixed;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%) scale(.98);
  opacity:0;
  pointer-events:none;
  transition: opacity .28s ease, transform .28s ease;
  z-index: 9999;
}
.toast.show{
  opacity:1;
  pointer-events:auto;
  transform: translate(-50%, -50%) scale(1);
}

.toastInner{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding: 18px 20px 18px 18px;
  min-width: 440px;
  max-width: min(720px, calc(100vw - 32px));
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(234, 223, 190, .98);
  box-shadow: var(--shadow-lg);
}

.toastIcon{
  position:relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius:999px;
  margin-top: 1px;
  background:var(--gold-soft);
}
.toastSuccess .toastIcon{
  background: linear-gradient(180deg, #34d399, var(--green));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.36), 0 14px 30px rgba(18, 167, 116, .26);
}
.toastError .toastIcon{
  background: linear-gradient(180deg, #f97066, var(--red));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 14px 30px rgba(217, 45, 32, .22);
}
.toastInfo .toastIcon{
  background: linear-gradient(180deg, #e4b526, var(--gold));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.30), 0 14px 30px rgba(209, 155, 0, .24);
}

.toastIconGlyph{
  position:absolute;
  inset:0;
}
.toastSuccess .toastIconGlyph:before{
  content:"";
  position:absolute;
  left:14px;
  top:10px;
  width:11px;
  height:18px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
  border-radius: 2px;
}
.toastError .toastIconGlyph:before,
.toastError .toastIconGlyph:after{
  content:"";
  position:absolute;
  left:13px;
  top:19px;
  width:16px;
  height:4px;
  border-radius:999px;
  background:#fff;
}
.toastError .toastIconGlyph:before{ transform: rotate(45deg); }
.toastError .toastIconGlyph:after{ transform: rotate(-45deg); }
.toastInfo .toastIconGlyph:before{
  content:"";
  position:absolute;
  left:19px;
  top:17px;
  width:4px;
  height:15px;
  border-radius:999px;
  background:#fff;
}
.toastInfo .toastIconGlyph:after{
  content:"";
  position:absolute;
  left:18px;
  top:10px;
  width:6px;
  height:6px;
  border-radius:999px;
  background:#fff;
}
.toastContent{ min-width: 0; }
.toastTitle{
  font-size: 16px;
  font-weight: 850;
  color:var(--blue-strong);
  line-height: 1.25;
  margin-bottom: 3px;
}
.toastText{
  font-size: 14px;
  color: var(--muted-strong);
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 760px){
  .topbar{
    height:auto;
    min-height:68px;
    align-items:flex-start;
    flex-direction:column;
    padding:14px 16px;
  }
  .auth{
    width:100%;
    justify-content:flex-start;
  }
  .userPill{ max-width:100%; }
  .container{
    width:min(100% - 24px, 1180px);
    margin-top:22px;
  }
  .card{ padding:16px; }
  .focusBurstLabel{
    width:calc(100vw - 44px);
    min-height:132px;
    padding:24px 22px;
  }
  .focusBurstLabel strong{
    font-size:34px;
  }
  .focusBurstLabel em{
    font-size:15px;
  }
  .focusWord[data-word-index="0"]{
    --x:-128px !important;
    --y:-168px !important;
  }
  .focusWord[data-word-index="1"]{
    --x:128px !important;
    --y:-168px !important;
  }
  .focusWord[data-word-index="2"]{
    --x:-128px !important;
    --y:168px !important;
  }
  .focusWord[data-word-index="3"]{
    --x:128px !important;
    --y:168px !important;
  }
  .uploadRow{ align-items:stretch; }
  .uploadRow > *,
  .sendActions button{ width:100%; }
  .filePick{ min-width:0; }
  .filePickName{ max-width: calc(100vw - 190px); }
  select,
  input[type="number"]{
    width: 100%;
    max-width: 180px;
  }
}

@media (max-width: 520px){
  .loginView{ padding:16px; }
  .loginCard{ padding:34px 22px; }
  .brandText{ display:none; }
  .auth{ flex-wrap:wrap; }
  .hero{ padding-top: 12px; }
  .hero p{ font-size:15px; }
  .filtersRow,
  .viewFilterPanel{ align-items:stretch; }
  .filtersRow button,
  .filtersRow label.small,
  .viewFilterGroup{ width:100%; }
  .toastInner{
    min-width: 0;
    width: calc(100vw - 28px);
  }
  .confirmModal{
    flex-direction:column;
    padding:18px;
  }
  .confirmActions{
    width:100%;
    flex-direction:column-reverse;
  }
  .confirmActions button{
    width:100%;
  }
  .previewModal{
    width: calc(100vw - 28px);
    padding:18px;
  }
  .previewModalHeader{
    flex-direction:column;
  }
  .previewClose{
    width:100%;
  }
  .previewMeta{
    grid-template-columns:1fr;
  }
}
