*{box-sizing:border-box}
body{margin:0;background:#f4f7fb;color:#152238;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
.shell{max-width:1100px;margin:0 auto;padding:28px 18px 60px}
.narrow{max-width:480px;margin:6vh auto}
.brand{font-weight:900;letter-spacing:.06em;font-size:24px;color:#155eef}
.card{background:#fff;border:1px solid #e6eaf0;border-radius:18px;padding:24px;margin:18px 0;box-shadow:0 8px 25px rgba(16,24,40,.05)}
.maincard{max-width:760px;margin-left:auto;margin-right:auto}
h1{margin:0 0 8px;font-size:28px}
h2{margin:0 0 16px}
.muted{color:#667085}
.small{font-size:13px}
label{display:block;font-weight:700;margin:16px 0 7px}
input,textarea{width:100%;border:1px solid #d0d5dd;border-radius:12px;padding:13px 14px;font:inherit;outline:none;background:#fff}
input:focus,textarea:focus{border-color:#155eef;box-shadow:0 0 0 3px rgba(21,94,239,.12)}
textarea{text-transform:uppercase;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:18px;line-height:1.55}
button,.primarylink{width:100%;display:inline-block;border:0;border-radius:12px;background:#155eef;color:#fff;padding:14px 18px;font-weight:800;font-size:15px;cursor:pointer;text-align:center;text-decoration:none;margin-top:14px}
button:disabled{opacity:.65;cursor:wait}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px}
.actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.linkbtn{border:1px solid #d0d5dd;background:#fff;color:#344054;padding:9px 12px;border-radius:10px;text-decoration:none;font-weight:700}
.alert{padding:12px 14px;border-radius:10px;margin:12px 0}
.ok{background:#ecfdf3;color:#027a48;border:1px solid #abefc6}
.error{background:#fef3f2;color:#b42318;border:1px solid #fecdca}
.fixedinfo{background:#f8fafc;border:1px solid #e6eaf0;border-radius:12px;padding:12px 14px;margin:14px 0}
.fixedinfo div{display:grid;grid-template-columns:80px 1fr;gap:10px;padding:6px 0}
.fixedinfo span{color:#667085;font-size:13px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.primarylink{margin-top:12px}
.inlineform{margin:0}
.smallbtn{width:auto;padding:8px 10px;margin:0;background:#344054}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:10px 8px;border-bottom:1px solid #eaecf0;font-size:14px}

/* History */
.history-card{max-width:900px;margin-left:auto;margin-right:auto}
.history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.history-count{background:#eff4ff;color:#155eef;border:1px solid #dbe6ff;border-radius:999px;padding:7px 12px;font-weight:800;font-size:13px;white-space:nowrap}
.history-search{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;margin:20px 0 22px}
.history-search input{margin:0;text-transform:uppercase}
.history-search button{width:auto;margin:0;padding:12px 22px}
.clearbtn{display:flex;align-items:center;justify-content:center;height:46px}
.history-list{display:grid;gap:12px}
.history-item{border:1px solid #e4e7ec;border-radius:14px;padding:16px 18px;background:#fff}
.history-row{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.history-time{font-size:15px;font-weight:800;color:#101828}
.history-user{margin-top:3px;font-size:13px;color:#667085}
.status-pill{border-radius:999px;padding:5px 10px;font-size:11px;font-weight:900;letter-spacing:.05em;white-space:nowrap}
.status-pill.sent{background:#ecfdf3;color:#027a48;border:1px solid #abefc6}
.history-label{margin-top:14px;margin-bottom:7px;font-size:11px;font-weight:900;letter-spacing:.08em;color:#667085;text-transform:uppercase}
.pnr-badges{display:flex;gap:8px;flex-wrap:wrap}
.pnr-badge{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:900;letter-spacing:.07em;background:#f2f4f7;border:1px solid #e4e7ec;border-radius:9px;padding:8px 11px;color:#101828}
.empty-state{text-align:center;padding:42px 18px;border:1px dashed #d0d5dd;border-radius:14px;background:#fcfcfd}
.empty-title{font-weight:800;margin-bottom:4px}
.pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:22px;color:#667085;font-size:13px}

@media(max-width:760px){
  .grid2{grid-template-columns:1fr}
  .topbar{align-items:flex-start}
  .fixedinfo div{grid-template-columns:1fr}
  .history-head{flex-direction:column}
  .history-search{grid-template-columns:1fr 1fr}
  .history-search input{grid-column:1/-1}
  .history-row{align-items:flex-start}
}