:root{
  --bg1:#0b0c10;
  --bg2:#11131a;
  --card: rgba(255,255,255,.08);
  --card2: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.14);
  --txt: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --r: 22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display","SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial;
  color:var(--txt);
  background: radial-gradient(1200px 800px at 20% 10%, rgba(255,255,255,.12), transparent 60%),
              radial-gradient(1000px 700px at 90% 30%, rgba(255,255,255,.10), transparent 55%),
              linear-gradient(180deg, var(--bg1), var(--bg2));
  overflow-x:hidden;
}

.bg{
  position:fixed; inset:-60px;
  background:
    radial-gradient(900px 520px at 15% 20%, rgba(140,180,255,.14), transparent 60%),
    radial-gradient(900px 520px at 80% 35%, rgba(255,170,210,.10), transparent 60%),
    radial-gradient(900px 520px at 45% 80%, rgba(170,255,220,.08), transparent 60%);
  filter: blur(18px);
  pointer-events:none;
  z-index:-1;
}

.wrap{
  max-width: 760px;
  margin: 28px auto;
  padding: 0 16px 28px;
}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 6px 18px;
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:600; letter-spacing:.2px;
}

.dot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 6px rgba(255,255,255,.08);
}

.right{display:flex; align-items:center; gap:10px}

.accountLabel{
  max-width: 180px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.card{
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 16px;
}

.card.tiny{
  margin-top: 14px;
  padding: 14px;
}

.tabs{
  display:flex;
  gap:8px;
  margin-bottom: 14px;
}

.tab{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  cursor:pointer;
  user-select:none;
}
.tab.on{
  background: rgba(255,255,255,.14);
  color: var(--txt);
}

.pane{display:none}
.pane.on{display:block}

.retentionPanel{
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.16);
}

.retentionPanel.ownerMode{
  opacity:.78;
}

.retentionHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.retentionCopy{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.retentionCopy strong{
  font-size:15px;
}

.retentionCopy span{
  color: var(--muted);
  font-size: 14px;
  line-height:1.4;
}

.retentionBadge{
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--txt);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.retentionControls{
  margin-top: 12px;
}

.retentionRange{
  width:100%;
  accent-color: #d8dee9;
}

.retentionBottom{
  display:flex;
  gap:12px;
  align-items:flex-end;
  margin-top: 10px;
}

.retentionField{
  min-width: 150px;
  display:flex;
  flex-direction:column;
  gap:6px;
  color: var(--muted);
  font-size: 14px;
}

.retentionNumber{
  width: 100px;
  min-width: 100px;
  text-align:center;
}

.retentionPresets{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.retentionPreset.active{
  background: rgba(255,255,255,.14);
  color: var(--txt);
  border-color: rgba(255,255,255,.24);
}

.drop{
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 18px;
  padding: 16px;
  position:relative;
  background: rgba(0,0,0,.16);
  min-height: 140px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.drop.busy{
  opacity:.72;
}

.drop.drag{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.38);
}

#file{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.dropInner{
  display:flex;
  align-items:center;
  gap:14px;
}

.dropCopy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.dropCopy strong{
  font-size: 15px;
}
.dropCopy span{
  color: var(--muted);
  font-size: 14px;
}

.icon{
  width:44px; height:44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(18px 18px at 70% 70%, rgba(255,255,255,.10), transparent 60%),
    rgba(255,255,255,.06);
}

.row{display:flex; gap:10px; margin-top: 12px; align-items:center}

.btn{
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.14);
  color: var(--txt);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor:pointer;
}
.btn:active{transform: translateY(1px)}
.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
  transform:none;
}

.ghost{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  cursor:pointer;
}
.ghost:active{transform: translateY(1px)}
.ghost:disabled{
  opacity:.6;
  cursor:not-allowed;
  transform:none;
}

#ownerBtn{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  padding: 0;
}
#ownerBtn::before{
  content:"";
  display:block;
  width: 16px; height: 16px;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.30);
  background: rgba(255,255,255,.10);
}
#ownerBtn.active{
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.12);
}

.in, .out{
  flex:1;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.14);
  color: var(--txt);
  padding: 10px 12px;
  border-radius: 14px;
  outline:none;
}
.out{opacity:.92}

.ta{
  width:100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.14);
  color: var(--txt);
  padding: 12px 12px;
  border-radius: 14px;
  outline:none;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mini{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  cursor:pointer;
  width: 84px;
}
.mini:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.bar{
  width:100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  overflow:hidden;
}
.barFill{
  width:0%;
  height:100%;
  background: rgba(255,255,255,.26);
  transition: width .12s linear;
}

.ownerRow{
  display:flex; gap:10px; align-items:center;
}
.ownerRow .btn,
.ownerRow .ghost{
  white-space:nowrap;
}
.ownerRow2{
  display:flex; gap:10px; align-items:center;
  margin-top: 10px;
}
.spacer{flex:1}

.list{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
}
.item.empty{
  justify-content:center;
  color: var(--muted);
}
.item .meta{
  flex:1;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color: rgba(255,255,255,.80);
}
.item .meta small{color: rgba(255,255,255,.55)}
.itemActions{
  display:flex;
  gap:8px;
  align-items:center;
}
.itemLink{
  color: var(--txt);
  text-decoration:none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  padding: 8px 10px;
  border-radius: 12px;
}
.itemLink:hover{
  background: rgba(255,255,255,.09);
}
.item button{
  width:auto;
  padding: 8px 10px;
  border-radius: 12px;
}

.status{
  margin-top: 10px;
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}
.status.error{
  color: #ffb4b4;
}
.status.success{
  color: #b9f3cb;
}

@media (max-width:640px){
  .wrap{
    margin: 18px auto;
  }

  .dropInner,
  .row,
  .retentionHeader,
  .retentionBottom,
  .ownerRow,
  .ownerRow2,
  .item{
    flex-direction:column;
    align-items:stretch;
  }

  .mini,
  .btn,
  .ghost{
    width:100%;
  }

  .retentionNumber{
    width:100%;
    min-width:0;
  }

  .itemActions{
    width:100%;
  }

  .itemLink{
    text-align:center;
  }
}
