*{box-sizing:border-box}body{margin:0;background:#f2f5f8;color:#19334a;font:15px system-ui,sans-serif}main{max-width:1520px;margin:24px auto;padding:0 18px}header{background:#17324d;color:white;border-radius:12px;padding:25px 28px}strong{letter-spacing:.14em}header span{float:right;color:#d9e7f7}h1{margin:16px 0 0;font-size:clamp(24px,4vw,36px)}section{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:15px 0}button{cursor:pointer;background:#174b73;color:white;border:0;border-radius:6px;padding:9px 12px;font-weight:600}button:disabled{opacity:.48;cursor:default}.wrap{overflow:auto}table{border-collapse:collapse;width:100%;background:white}th{background:#dfebf4;text-align:left}th,td{padding:8px;border-bottom:1px solid #d6e0e9}input{width:100%;min-width:76px;border:1px solid #b8c8d4;border-radius:4px;padding:8px;font:inherit;font-size:14px}td:last-child{min-width:105px}small{display:block;margin:5px 0}#msg{color:#365775}@media(max-width:780px){section{align-items:start;flex-direction:column}thead{display:none}table,tbody,tr{display:block}tr{padding:12px;margin:12px 0;background:white;border-radius:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px}table{background:none}td{border:0;padding:0}td:before{content:attr(data-label);font-size:12px;display:block;margin-bottom:4px}td:first-child,td:last-child{grid-column:span 2}td:first-child:before{display:inline;margin-right:4px}}

/* --- mobile usability pass: one field per row, big touch targets --- */
@media(max-width:620px){
 body{font-size:16px}
 main{margin:12px auto;padding:0 10px}
 header{padding:18px 16px;border-radius:14px}
 header span{float:none;display:block;margin-top:6px;font-size:13px}
 h1{margin-top:8px;font-size:24px}
 section{gap:10px;margin:14px 0}
 section p{font-size:14px;line-height:1.45;margin:0}
 #pdf{width:100%;min-height:50px;font-size:16px;border-radius:10px}
 #msg{font-size:13px;margin:10px 2px}
 thead{display:none}
 table,tbody{display:block;background:none}
 tr{display:grid;grid-template-columns:1fr 1fr;gap:10px 10px;background:#fff;border-radius:14px;
    margin:0 0 14px;padding:14px;box-shadow:0 1px 3px rgba(16,42,67,.09)}
 td{display:block;border:0;padding:0;min-width:0}
 td:before{content:attr(data-label);display:block;font-size:11.5px;font-weight:700;letter-spacing:.04em;
   text-transform:uppercase;color:#5c7891;margin-bottom:5px}
 td:nth-child(1){grid-column:1/-1;margin-bottom:-4px}
 td:nth-child(1):before{display:none}
 td:nth-child(1){display:inline-block;justify-self:start;background:#dfebf4;color:#17324d;
   border-radius:999px;padding:3px 12px;font-size:13px;font-weight:700}
 td:nth-child(2){grid-column:1/-1}
 td:nth-child(7),td:nth-child(8),td:nth-child(9){grid-column:1/-1}
 input{min-height:48px;font-size:16px;padding:11px 12px;border-radius:10px;min-width:0;background:#f8fbfd}
 input[readonly]{background:#eef3f7;color:#365775;font-weight:600}
 td:nth-child(8):before{margin-bottom:0}
 td[data-label="Actions"] button{width:100%}
 td[data-label="Actions"] button:first-child{min-height:50px;font-size:16px;border-radius:10px;background:#174b73}
 td[data-label="Actions"] small{text-align:center;font-size:13px;color:#365775;margin:8px 0}
 td[data-label="Actions"] button:last-of-type{background:transparent;color:#174b73;border:1px solid #b8c8d4;
   min-height:44px;font-size:14px;font-weight:600}
}
@media(max-width:380px){ main{padding:0 8px} tr{padding:12px} td:before{font-size:11px} }

/* mobile polish: short labels, clear disabled state, no orphan signature cell */
@media(max-width:620px){
 td[data-short]:before{content:attr(data-short)}
 td:nth-child(8){display:none}
 td:nth-child(9):before{display:none}
 td[data-label="Actions"] button:first-child{background:#174b73;color:#fff;font-weight:700;box-shadow:0 1px 2px rgba(16,42,67,.18)}
 td[data-label="Actions"] button:first-child:disabled{background:#eef3f7;color:#8aa3b8;box-shadow:none;opacity:1}
 td[data-label="Actions"] button:last-of-type{margin-top:2px}
 input:focus{outline:2px solid #174b73;outline-offset:1px;background:#fff}
}

/* add-employee control */
button.add{display:block;width:100%;margin:6px 0 28px;background:#fff;color:#174b73;border:2px dashed #b8c8d4;
  border-radius:12px;padding:14px;font-size:15px;font-weight:700}
button.add:disabled{opacity:.55}
button.add:hover{border-color:#174b73}
@media(max-width:620px){button.add{min-height:52px;font-size:16px}}
