/* Whale Delivery Log - simple mobile-first UI */
:root{
  --bg:#0a1220;
  --card:#0f1b33;
  --text:#eef4ff;
  --muted:#b7c6e3;
  --line:#243a66;
  --btn:#2b6cff;
  --btn2:#13284a;
  --danger:#ff4b4b;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% 0%, #142b55 0%, var(--bg) 55%);
  color:var(--text);
}

.topbar{
  position:sticky; top:0; z-index:10;
  padding:14px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  backdrop-filter: blur(10px);
  background: rgba(10,18,32,.65);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.brand{display:flex; align-items:center; gap:10px}
.logo{font-size:28px; width:40px; height:40px; display:grid; place-items:center; background:rgba(255,255,255,.06); border-radius:12px}
.titles .appname{font-weight:800; letter-spacing:.2px}
.titles .subtitle{font-size:12px; color:var(--muted); margin-top:2px}
.actions{display:flex; gap:10px; align-items:center}

.wrap{max-width:1100px; margin:0 auto; padding:14px; padding-bottom:40px}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
}
.grid{
  display:grid;
  gap:14px;
  grid-template-columns: 1fr;
  margin:14px 0;
}
@media(min-width:900px){
  .grid{grid-template-columns: 1fr 1fr 1fr;}
}
.cardhead{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px}
.cardhead h2{margin:0; font-size:18px}
.muted{color:var(--muted); font-size:12px; line-height:1.35}

.row{display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end}
.row.compact{margin-top:10px}
.row.end{justify-content:flex-end; margin-top:10px}
.field{display:flex; flex-direction:column; gap:6px; min-width:150px}
.field.grow{flex:1; min-width:220px}
label{font-size:12px; color:var(--muted)}
input, select, textarea{
  background: rgba(10,18,32,.7);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  border-radius:12px;
  padding:10px 10px;
  outline:none;
}
input:focus,select:focus,textarea:focus{border-color: rgba(43,108,255,.7); box-shadow: 0 0 0 3px rgba(43,108,255,.15);}
textarea.export{width:100%; min-height:220px; resize:vertical; margin-top:10px; font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

.btn{
  border:none; cursor:pointer;
  background: var(--btn);
  color:white;
  border-radius: 12px;
  padding:10px 12px;
  font-weight:700;
}
.btn.small{padding:8px 10px; font-size:12px}
.btn.ghost{background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12)}
.btn.danger{background: rgba(255,75,75,.18); border:1px solid rgba(255,75,75,.35)}

.legend{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.pill{
  font-size:12px; color:var(--text);
  padding:6px 10px; border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}
.pill.red{border-color: rgba(255,75,75,.45); background: rgba(255,75,75,.12)}
.pill.green{border-color: rgba(76,217,100,.45); background: rgba(76,217,100,.10)}
.pill.gray{border-color: rgba(200,200,200,.25); background: rgba(255,255,255,.05)}
.pill.yellow{border-color: rgba(255,215,0,.35); background: rgba(255,215,0,.08)}

.list{display:flex; flex-direction:column; gap:10px}
.item{
  background: rgba(10,18,32,.55);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding:10px;
}
.itemtop{display:flex; align-items:center; justify-content:space-between; gap:10px}
.itemtop .left{display:flex; align-items:center; gap:10px; flex:1}
.itemtop .right{display:flex; align-items:center; gap:6px}

.check{display:inline-flex; align-items:center; cursor:pointer}
.check input{display:none}
.check .box{
  width:22px; height:22px; border-radius:8px;
  border:1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.06);
  display:inline-block;
  position:relative;
}
.check input:checked + .box{background: rgba(76,217,100,.20); border-color: rgba(76,217,100,.55)}
.check input:checked + .box:after{
  content:"✔"; position:absolute; inset:0;
  display:grid; place-items:center; font-size:12px;
}

input.title{flex:1; min-width:220px; font-weight:700}
.tag{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding:6px 8px;
  cursor:pointer;
}
.tag.red{border-color: rgba(255,75,75,.45); background: rgba(255,75,75,.12)}
.tag.yellow{border-color: rgba(255,215,0,.35); background: rgba(255,215,0,.08)}
.tag.gray{border-color: rgba(200,200,200,.25); background: rgba(255,255,255,.05)}
.tag.active{outline: 2px solid rgba(43,108,255,.8); outline-offset:2px}

.meta{display:flex; gap:8px; margin-top:8px}
.metaBadge{
  font-size:12px;
  padding:3px 8px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color: var(--muted);
  display:none;
}
.metaBadge.show{display:inline-block}

.changelog{display:flex; flex-direction:column; gap:6px; margin-top:10px}
.logline{
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:12px;
  padding:8px 10px;
  border-radius:12px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color: var(--text);
}
.foot{margin-top:12px}

.btn.tiny{padding:7px 10px; font-size:12px; border-radius:10px}
.custPick{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px}
.custPick select{min-width:220px}
.custListWrap{margin-top:10px}
.custList{display:flex; flex-direction:column; gap:8px; margin-top:8px}
.custRow{
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding:10px; border-radius:14px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
}
.custRow .name{font-weight:800}
.custRow .mini{color:var(--muted); font-size:12px}
.custRow .spacer{flex:1}


/* Cloud sync status */
.cloud-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  font-size:12px;
  color:rgba(255,255,255,.85);
}
