/* FTS — same design tokens as the original app (dark theme, gold primary) */
:root{
  --background:225 25% 9%;--foreground:210 40% 98%;--primary:43 74% 49%;--primary-foreground:225 25% 9%;
  --destructive:356 100% 71%;--card:225 25% 12%;--muted:225 20% 16%;--muted-foreground:215 20% 65%;
  --border:225 20% 18%;--input:225 20% 18%;--ring:43 74% 49%;--radius:.75rem;
  --font-display:'Outfit',system-ui,sans-serif;--font-body:'Plus Jakarta Sans',system-ui,sans-serif;
  --emerald:#34d399;--sky:#38bdf8;
  --btn-hover-shadow:0 4px 14px -2px rgba(0,0,0,.25),0 2px 6px -1px rgba(0,0,0,.15);
}
*,*::before,*::after{box-sizing:border-box;border-color:hsl(var(--border))}
html{color-scheme:dark}
body{margin:0;background:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-body);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
h1,h2,h3,p,ul,dl,dd{margin:0;padding:0}ul{list-style:none}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
.font-display{font-family:var(--font-display)}
.app{min-height:100vh;display:flex;flex-direction:column}
.ic{width:1rem;height:1rem;flex-shrink:0}.ic-xs{width:.75rem;height:.75rem}.ic-sm{width:.875rem;height:.875rem}
.ic-lg{width:2rem;height:2rem}.ic-xl{width:3rem;height:3rem}
.auth-logo .ic-lg{width:1.5rem;height:1.5rem}
.muted{color:hsl(var(--muted-foreground))}.fg{color:hsl(var(--foreground))}
.c-primary{color:hsl(var(--primary))}.c-emerald{color:var(--emerald)}.c-sky{color:var(--sky)}
.sm{font-size:.875rem}.xs{font-size:.75rem}.strong{font-weight:500}.center{text-align:center}
.trunc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.minw0{min-width:0}.grow{flex:1;min-width:0}
.mt05{margin-top:.125rem}.mt1{margin-top:.25rem}.mt3{margin-top:.75rem}.mb4{margin-bottom:1rem}.mb6{margin-bottom:1.5rem}.py6{padding:1.5rem 0}
.inline{display:inline;margin:0}.fit{width:fit-content}
.between{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.wrap-gap{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.wrap-gap2{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.end-gap{display:flex;justify-content:flex-end;gap:.5rem}
.space8>*+*{margin-top:2rem}.space6>*+*{margin-top:1.5rem}.stack>*+*{margin-top:1rem}.stack5>*+*{margin-top:1.25rem}
.stack-sm>*+*{margin-top:.5rem}.stack-md>*+*{margin-top:.75rem}.list-tight>*+*{margin-top:.25rem}
.h1{font-size:1.5rem;font-weight:700;letter-spacing:-.025em;line-height:2rem}
.h1c{font-size:1.5rem;font-weight:700}.h2{font-size:.875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.h2x{margin-top:1rem;font-size:1.25rem;font-weight:700}.h3{font-size:1.125rem;font-weight:700}
.eyebrow{font-size:.75rem;font-weight:500;text-transform:uppercase;letter-spacing:.05em;color:hsl(var(--muted-foreground))}
.stat{margin-top:.75rem;font-size:1.875rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:2.25rem}

/* layout */
.topbar{position:sticky;top:0;z-index:40;border-bottom:1px solid hsl(var(--border));background:hsl(var(--card)/.8);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.topbar-in{max-width:72rem;margin:0 auto;height:4rem;padding:0 1.5rem;display:flex;align-items:center;gap:1.5rem}
.brand{display:flex;align-items:center;gap:.5rem}
.brand-logo{width:2rem;height:2rem;border-radius:calc(var(--radius) - 2px);background:hsl(var(--primary));color:hsl(var(--primary-foreground));display:flex;align-items:center;justify-content:center}
.brand-name{font-size:1.125rem;font-weight:700;letter-spacing:-.025em}.brand-sub{display:none;font-size:.75rem;color:hsl(var(--muted-foreground))}
.nav{display:flex;align-items:center;gap:.25rem}
.nav a{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border-radius:calc(var(--radius) - 2px);font-size:.875rem;font-weight:500;color:hsl(var(--muted-foreground));transition:.15s}
.nav a:hover{background:hsl(var(--muted)/.6);color:hsl(var(--foreground))}
.nav a.active{background:hsl(var(--muted));color:hsl(var(--foreground))}
.nav a.nav-up{color:hsl(var(--primary))}.nav a.nav-up:hover{background:hsl(var(--primary)/.1)}.nav a.nav-up.active{background:hsl(var(--primary)/.15)}
.lbl{display:none}
.userbox{margin-left:auto;display:flex;align-items:center;gap:.75rem}
.user-meta{display:none;text-align:right}.user-name{font-size:.875rem;font-weight:500;line-height:1.25}.user-role{font-size:.75rem;text-transform:capitalize;color:hsl(var(--muted-foreground));line-height:1.25}
.avatar{width:2rem;height:2rem;border-radius:50%;background:hsl(var(--primary)/.2);color:hsl(var(--primary));display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;text-transform:uppercase}
.icon-btn{width:2rem;height:2rem;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:calc(var(--radius) - 2px);color:hsl(var(--muted-foreground));cursor:pointer;transition:.15s}
.icon-btn:hover{background:hsl(var(--muted));color:hsl(var(--foreground))}.icon-danger:hover{background:none;color:hsl(var(--destructive))}
.link-muted{padding:.5rem .75rem;font-size:.875rem;font-weight:500;color:hsl(var(--muted-foreground))}.link-muted:hover{color:hsl(var(--foreground))}
.link{color:hsl(var(--primary));font-weight:500}.link:hover,.xs.link:hover{text-decoration:underline}
.main{width:100%;max-width:72rem;margin:0 auto;flex:1;padding:2rem 1.5rem}
.foot{border-top:1px solid hsl(var(--border));padding:1.5rem 0}
.foot-in{max-width:72rem;margin:0 auto;padding:0 1.5rem;display:flex;justify-content:space-between;font-size:.75rem;color:hsl(var(--muted-foreground))}
@media(min-width:640px){.brand-sub,.lbl{display:inline}.user-meta{display:block}}

/* cards & grids */
.card{border:1px solid hsl(var(--border));background:hsl(var(--card));border-radius:var(--radius)}
.card-p5{padding:1.25rem}.card-p6{padding:1.5rem}.card-p8{padding:2rem}
.grid3{display:grid;grid-template-columns:1fr;gap:1rem}.grid2{display:grid;grid-template-columns:1fr;gap:1rem}
@media(min-width:640px){.grid3{grid-template-columns:repeat(3,1fr)}}
@media(min-width:768px){.grid2{grid-template-columns:repeat(2,1fr)}}
.row-item{display:flex;align-items:center;gap:.75rem;font-size:.875rem}.list-tight .row-item{padding:.5rem}
.qa{display:flex;align-items:center;gap:.75rem;padding:.75rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:.875rem;font-weight:500;transition:.15s}
.qa:hover{border-color:hsl(var(--primary));background:hsl(var(--primary)/.05)}
.chip{display:inline-flex;align-items:center;gap:.25rem;flex-shrink:0;padding:.125rem .375rem;border-radius:.25rem;background:hsl(var(--muted));font-size:.75rem;font-weight:500;color:hsl(var(--muted-foreground))}
.chip-ok{background:rgba(16,185,129,.15);color:var(--emerald)}
.file-row{display:flex;flex-direction:column;gap:.75rem;padding:1rem}
.file-ico{width:2.5rem;height:2.5rem;border-radius:calc(var(--radius) - 2px);background:hsl(var(--primary)/.1);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.file-ico .ic{width:1.25rem;height:1.25rem}
.file-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}
@media(min-width:640px){.file-row{flex-direction:row;align-items:center}}
.empty{border:1px dashed hsl(var(--border));border-radius:var(--radius);padding:4rem 0;text-align:center}.empty .ic-lg,.empty-in .ic-lg{margin:0 auto;display:block}
.empty-in{padding:4rem 0;text-align:center}
.alert{margin-bottom:1.5rem;padding:.5rem .75rem;border-radius:calc(var(--radius) - 2px);background:hsl(var(--destructive)/.1);color:hsl(var(--destructive));font-size:.875rem}
.done{display:flex;flex-direction:column;align-items:center;padding:5rem 0;text-align:center}.done .ic-xl{width:3rem;height:3rem}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem 1rem;border:1px solid transparent;border-radius:calc(var(--radius) - 2px);font-size:.875rem;font-weight:600;cursor:pointer;transition:all .25s ease-in-out}
.btn-primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}
.btn-primary:hover{transform:translateY(-1px);box-shadow:var(--btn-hover-shadow)}.btn-primary:active{transform:scale(.98);box-shadow:none}
.btn-outline{background:none;border-color:hsl(var(--border));color:hsl(var(--foreground));font-weight:500}
.btn-muted{color:hsl(var(--muted-foreground))}.btn-muted:hover{color:hsl(var(--foreground))}
.btn-hl:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}
.btn-sm{padding:.5rem .75rem}.btn-xs{padding:.5rem .75rem;font-size:.75rem;gap:.375rem}
.btn-block{width:100%;padding:.625rem 1rem}.btn-block .ic{width:1rem;height:1rem}

/* forms */
.field{display:flex;flex-direction:column;gap:.5rem}.field label{font-size:.875rem;font-weight:500}
input[type=text],input[type=email],input[type=password],input:not([type]),select,textarea{
  width:100%;padding:.5rem .75rem;border:1px solid hsl(var(--input));border-radius:calc(var(--radius) - 2px);background:hsl(var(--background));font-size:.875rem}
textarea{resize:none}
input:focus,select:focus,textarea:focus{outline:0;box-shadow:0 0 0 1px hsl(var(--ring))}
.req{color:hsl(var(--destructive))}
.err{padding:.5rem .75rem;border-radius:calc(var(--radius) - 2px);background:hsl(var(--destructive)/.1);color:hsl(var(--destructive));font-size:.75rem}
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:2.5rem 1rem;border:1px dashed hsl(var(--border));border-radius:var(--radius);text-align:center;cursor:pointer;transition:.15s}
.drop:hover{border-color:hsl(var(--primary))}.drop-sm{padding:2rem 1rem}.drop-sm .ic-lg{width:1.5rem;height:1.5rem}.drop .ic-lg{width:1.75rem;height:1.75rem}
.narrow{max-width:36rem;margin:0 auto}
.auth{max-width:28rem;min-height:70vh;margin:0 auto;display:flex;flex-direction:column;justify-content:center;padding:3rem 0}
.auth-head{display:flex;flex-direction:column;align-items:center;text-align:center;margin-bottom:1.5rem}
.auth-logo{width:3rem;height:3rem;margin-bottom:.75rem;border-radius:var(--radius);background:hsl(var(--primary));color:hsl(var(--primary-foreground));display:flex;align-items:center;justify-content:center}
.auth-foot{margin-top:1.5rem;text-align:center;font-size:.875rem;color:hsl(var(--muted-foreground))}

/* modal */
.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);padding:1rem}.modal[hidden]{display:none}
.modal-box{width:100%;max-width:28rem;padding:1.5rem;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));box-shadow:0 20px 25px -5px rgba(0,0,0,.4)}

/* handover table */
.table-card{overflow:hidden}
.ho-grid{display:grid;grid-template-columns:1fr;gap:.5rem;padding:.75rem 1rem;font-size:.875rem}
.ho-head{display:none;background:hsl(var(--muted)/.4);border-bottom:1px solid hsl(var(--border));font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:hsl(var(--muted-foreground))}
.divide>li+li{border-top:1px solid hsl(var(--border))}.ho-time{font-size:.75rem}
@media(min-width:768px){.ho-grid{grid-template-columns:1.6fr .5fr 1.2fr 1.5fr 1.2fr auto;gap:.75rem;align-items:center}.ho-head{display:grid}.ho-time{font-size:.875rem}}

/* print card (original layout) */
.print-body{background:#fff;color:#1a1a1a}.print-bar{padding:1rem;text-align:center}.print-bar .btn-outline{color:#333;border-color:#ccc}
@media print{.noprint{display:none!important}.handover-card{margin:0 auto!important}@page{margin:10mm}}
.handover-card {
  width: 148mm;
  min-height: 200mm;
  margin: 1.5rem auto;
  box-sizing: border-box;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  background: #fff;
  color: #1a1a1a;
  padding: 14px 18px 12px;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.handover-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #1a1a1a;
  border-radius: 6px;
  padding: 8px 10px;
}

.handover-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 36px;
  border-radius: 999px;
  background: #ffe14a;
  border: 2px solid #e10600;
  color: #e10600;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 14px;
}

.handover-card__org {
  font-size: 13px;
  font-weight: 700;
}

.handover-card__sub {
  font-size: 11px;
  color: #333;
}

.handover-card__title {
  margin: 16px 0 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.handover-card__file {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  word-break: break-word;
}

.handover-card__meta {
  margin: 4px 0 10px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.handover-card__badge {
  width: fit-content;
  margin: 0 auto 8px;
  border-radius: 6px;
  background: #e10600;
  color: #fff;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
}

.handover-card__when {
  margin: 6px 0 0;
  text-align: center;
  color: #e10600;
  font-size: 26px;
  font-weight: 800;
}

.handover-card__when-label {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
}

.handover-card__rows {
  margin: 8px 0 18px;
  font-size: 12px;
}

.handover-card__rows > div {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.handover-card__rows dt {
  font-weight: 500;
}

.handover-card__rows dd {
  margin: 0;
  font-weight: 700;
}

.handover-card__signs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.handover-card__role {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
}

.handover-card__signs span {
  display: block;
  margin: 42px 16px 0;
  border-bottom: 1px solid #1a1a1a;
}

.handover-card__foot {
  margin-top: 22px;
  text-align: right;
  font-size: 10px;
  color: #333;
}

